66//
77// Generated from: @github/copilot/session-events.schema.json
88// Generated by: scripts/generate-session-types.ts
9- // Generated at: 2026-01-16T00:52:52.781Z
9+ // Generated at: 2026-01-20T04:18:06.775Z
1010//
1111// To update these types:
1212// 1. Update the schema in copilot-agent-runtime
@@ -78,7 +78,7 @@ internal class SessionEventConverter : JsonConverter<SessionEvent>
7878 throw new JsonException ( "Missing 'type' discriminator property" ) ;
7979
8080 if ( ! TypeMap . TryGetValue ( typeProp , out var targetType ) )
81- return null ; // Ignore unknown event types for forward compatibility
81+ throw new JsonException ( $ "Unknown event type: { typeProp } " ) ;
8282
8383 // Deserialize to the concrete type without using this converter (to avoid recursion)
8484 return ( SessionEvent ? ) obj . Deserialize ( targetType , SerializerOptions . WithoutConverter ) ;
@@ -505,6 +505,10 @@ public partial class SessionStartData
505505 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
506506 [ JsonPropertyName ( "selectedModel" ) ]
507507 public string SelectedModel { get ; set ; }
508+
509+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
510+ [ JsonPropertyName ( "context" ) ]
511+ public SessionStartDataContext ? Context { get ; set ; }
508512 }
509513
510514 public partial class SessionResumeData
@@ -514,6 +518,10 @@ public partial class SessionResumeData
514518
515519 [ JsonPropertyName ( "eventCount" ) ]
516520 public double EventCount { get ; set ; }
521+
522+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
523+ [ JsonPropertyName ( "context" ) ]
524+ public SessionResumeDataContext ? Context { get ; set ; }
517525 }
518526
519527 public partial class SessionErrorData
@@ -969,6 +977,42 @@ public partial class SystemMessageData
969977 public SystemMessageDataMetadata ? Metadata { get ; set ; }
970978 }
971979
980+ public partial class SessionStartDataContext
981+ {
982+ [ JsonPropertyName ( "cwd" ) ]
983+ public string Cwd { get ; set ; }
984+
985+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
986+ [ JsonPropertyName ( "gitRoot" ) ]
987+ public string GitRoot { get ; set ; }
988+
989+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
990+ [ JsonPropertyName ( "repository" ) ]
991+ public string Repository { get ; set ; }
992+
993+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
994+ [ JsonPropertyName ( "branch" ) ]
995+ public string Branch { get ; set ; }
996+ }
997+
998+ public partial class SessionResumeDataContext
999+ {
1000+ [ JsonPropertyName ( "cwd" ) ]
1001+ public string Cwd { get ; set ; }
1002+
1003+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1004+ [ JsonPropertyName ( "gitRoot" ) ]
1005+ public string GitRoot { get ; set ; }
1006+
1007+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1008+ [ JsonPropertyName ( "repository" ) ]
1009+ public string Repository { get ; set ; }
1010+
1011+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1012+ [ JsonPropertyName ( "branch" ) ]
1013+ public string Branch { get ; set ; }
1014+ }
1015+
9721016 public partial class SessionHandoffDataRepository
9731017 {
9741018 [ JsonPropertyName ( "owner" ) ]
@@ -1017,6 +1061,10 @@ public partial class AssistantMessageDataToolRequestsItem
10171061 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
10181062 [ JsonPropertyName ( "arguments" ) ]
10191063 public object Arguments { get ; set ; }
1064+
1065+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1066+ [ JsonPropertyName ( "type" ) ]
1067+ public AssistantMessageDataToolRequestsItemType ? Type { get ; set ; }
10201068 }
10211069
10221070 public partial class ToolExecutionCompleteDataResult
@@ -1068,6 +1116,12 @@ public enum UserMessageDataAttachmentsItemType
10681116 Directory ,
10691117 }
10701118
1119+ public enum AssistantMessageDataToolRequestsItemType
1120+ {
1121+ Function ,
1122+ Custom ,
1123+ }
1124+
10711125 public enum SystemMessageDataRole
10721126 {
10731127 System ,
0 commit comments