@@ -1549,7 +1549,7 @@ public partial class SystemNotificationData
15491549 public required string Content { get ; set ; }
15501550
15511551 [ JsonPropertyName ( "kind" ) ]
1552- public required object Kind { get ; set ; }
1552+ public required SystemNotificationDataKind Kind { get ; set ; }
15531553}
15541554
15551555public partial class PermissionRequestedData
@@ -2125,6 +2125,72 @@ public partial class SystemMessageDataMetadata
21252125 public Dictionary < string , object > ? Variables { get ; set ; }
21262126}
21272127
2128+ public partial class SystemNotificationDataKindAgentCompleted : SystemNotificationDataKind
2129+ {
2130+ [ JsonIgnore ]
2131+ public override string Type => "agent_completed" ;
2132+
2133+ [ JsonPropertyName ( "agentId" ) ]
2134+ public required string AgentId { get ; set ; }
2135+
2136+ [ JsonPropertyName ( "agentType" ) ]
2137+ public required string AgentType { get ; set ; }
2138+
2139+ [ JsonPropertyName ( "status" ) ]
2140+ public required SystemNotificationDataKindAgentCompletedStatus Status { get ; set ; }
2141+
2142+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2143+ [ JsonPropertyName ( "description" ) ]
2144+ public string ? Description { get ; set ; }
2145+
2146+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2147+ [ JsonPropertyName ( "prompt" ) ]
2148+ public string ? Prompt { get ; set ; }
2149+ }
2150+
2151+ public partial class SystemNotificationDataKindShellCompleted : SystemNotificationDataKind
2152+ {
2153+ [ JsonIgnore ]
2154+ public override string Type => "shell_completed" ;
2155+
2156+ [ JsonPropertyName ( "shellId" ) ]
2157+ public required string ShellId { get ; set ; }
2158+
2159+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2160+ [ JsonPropertyName ( "exitCode" ) ]
2161+ public double ? ExitCode { get ; set ; }
2162+
2163+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2164+ [ JsonPropertyName ( "description" ) ]
2165+ public string ? Description { get ; set ; }
2166+ }
2167+
2168+ public partial class SystemNotificationDataKindShellDetachedCompleted : SystemNotificationDataKind
2169+ {
2170+ [ JsonIgnore ]
2171+ public override string Type => "shell_detached_completed" ;
2172+
2173+ [ JsonPropertyName ( "shellId" ) ]
2174+ public required string ShellId { get ; set ; }
2175+
2176+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2177+ [ JsonPropertyName ( "description" ) ]
2178+ public string ? Description { get ; set ; }
2179+ }
2180+
2181+ [ JsonPolymorphic (
2182+ TypeDiscriminatorPropertyName = "type" ,
2183+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling . FallBackToBaseType ) ]
2184+ [ JsonDerivedType ( typeof ( SystemNotificationDataKindAgentCompleted ) , "agent_completed" ) ]
2185+ [ JsonDerivedType ( typeof ( SystemNotificationDataKindShellCompleted ) , "shell_completed" ) ]
2186+ [ JsonDerivedType ( typeof ( SystemNotificationDataKindShellDetachedCompleted ) , "shell_detached_completed" ) ]
2187+ public partial class SystemNotificationDataKind
2188+ {
2189+ [ JsonPropertyName ( "type" ) ]
2190+ public virtual string Type { get ; set ; } = string . Empty ;
2191+ }
2192+
2193+
21282194public partial class PermissionRequestShellCommandsItem
21292195{
21302196 [ JsonPropertyName ( "identifier" ) ]
@@ -2420,6 +2486,15 @@ public enum SystemMessageDataRole
24202486 Developer ,
24212487}
24222488
2489+ [ JsonConverter ( typeof ( JsonStringEnumConverter < SystemNotificationDataKindAgentCompletedStatus > ) ) ]
2490+ public enum SystemNotificationDataKindAgentCompletedStatus
2491+ {
2492+ [ JsonStringEnumMemberName ( "completed" ) ]
2493+ Completed ,
2494+ [ JsonStringEnumMemberName ( "failed" ) ]
2495+ Failed ,
2496+ }
2497+
24232498[ JsonConverter ( typeof ( JsonStringEnumConverter < PermissionCompletedDataResultKind > ) ) ]
24242499public enum PermissionCompletedDataResultKind
24252500{
@@ -2567,6 +2642,10 @@ public enum PermissionCompletedDataResultKind
25672642[ JsonSerializable ( typeof ( SystemMessageDataMetadata ) ) ]
25682643[ JsonSerializable ( typeof ( SystemMessageEvent ) ) ]
25692644[ JsonSerializable ( typeof ( SystemNotificationData ) ) ]
2645+ [ JsonSerializable ( typeof ( SystemNotificationDataKind ) ) ]
2646+ [ JsonSerializable ( typeof ( SystemNotificationDataKindAgentCompleted ) ) ]
2647+ [ JsonSerializable ( typeof ( SystemNotificationDataKindShellCompleted ) ) ]
2648+ [ JsonSerializable ( typeof ( SystemNotificationDataKindShellDetachedCompleted ) ) ]
25702649[ JsonSerializable ( typeof ( SystemNotificationEvent ) ) ]
25712650[ JsonSerializable ( typeof ( ToolExecutionCompleteData ) ) ]
25722651[ JsonSerializable ( typeof ( ToolExecutionCompleteDataError ) ) ]
0 commit comments