@@ -28,6 +28,7 @@ namespace GitHub.Copilot.SDK;
2828[ JsonDerivedType ( typeof ( AssistantTurnEndEvent ) , "assistant.turn_end" ) ]
2929[ JsonDerivedType ( typeof ( AssistantTurnStartEvent ) , "assistant.turn_start" ) ]
3030[ JsonDerivedType ( typeof ( AssistantUsageEvent ) , "assistant.usage" ) ]
31+ [ JsonDerivedType ( typeof ( CapabilitiesChangedEvent ) , "capabilities.changed" ) ]
3132[ JsonDerivedType ( typeof ( CommandCompletedEvent ) , "command.completed" ) ]
3233[ JsonDerivedType ( typeof ( CommandExecuteEvent ) , "command.execute" ) ]
3334[ JsonDerivedType ( typeof ( CommandQueuedEvent ) , "command.queued" ) ]
@@ -45,6 +46,8 @@ namespace GitHub.Copilot.SDK;
4546[ JsonDerivedType ( typeof ( PendingMessagesModifiedEvent ) , "pending_messages.modified" ) ]
4647[ JsonDerivedType ( typeof ( PermissionCompletedEvent ) , "permission.completed" ) ]
4748[ JsonDerivedType ( typeof ( PermissionRequestedEvent ) , "permission.requested" ) ]
49+ [ JsonDerivedType ( typeof ( SamplingCompletedEvent ) , "sampling.completed" ) ]
50+ [ JsonDerivedType ( typeof ( SamplingRequestedEvent ) , "sampling.requested" ) ]
4851[ JsonDerivedType ( typeof ( SessionBackgroundTasksChangedEvent ) , "session.background_tasks_changed" ) ]
4952[ JsonDerivedType ( typeof ( SessionCompactionCompleteEvent ) , "session.compaction_complete" ) ]
5053[ JsonDerivedType ( typeof ( SessionCompactionStartEvent ) , "session.compaction_start" ) ]
@@ -60,6 +63,7 @@ namespace GitHub.Copilot.SDK;
6063[ JsonDerivedType ( typeof ( SessionModeChangedEvent ) , "session.mode_changed" ) ]
6164[ JsonDerivedType ( typeof ( SessionModelChangeEvent ) , "session.model_change" ) ]
6265[ JsonDerivedType ( typeof ( SessionPlanChangedEvent ) , "session.plan_changed" ) ]
66+ [ JsonDerivedType ( typeof ( SessionRemoteSteerableChangedEvent ) , "session.remote_steerable_changed" ) ]
6367[ JsonDerivedType ( typeof ( SessionResumeEvent ) , "session.resume" ) ]
6468[ JsonDerivedType ( typeof ( SessionShutdownEvent ) , "session.shutdown" ) ]
6569[ JsonDerivedType ( typeof ( SessionSkillsLoadedEvent ) , "session.skills_loaded" ) ]
@@ -151,6 +155,19 @@ public partial class SessionResumeEvent : SessionEvent
151155 public required SessionResumeData Data { get ; set ; }
152156}
153157
158+ /// <summary>Notifies Mission Control that the session's remote steering capability has changed.</summary>
159+ /// <remarks>Represents the <c>session.remote_steerable_changed</c> event.</remarks>
160+ public partial class SessionRemoteSteerableChangedEvent : SessionEvent
161+ {
162+ /// <inheritdoc />
163+ [ JsonIgnore ]
164+ public override string Type => "session.remote_steerable_changed" ;
165+
166+ /// <summary>The <c>session.remote_steerable_changed</c> event payload.</summary>
167+ [ JsonPropertyName ( "data" ) ]
168+ public required SessionRemoteSteerableChangedData Data { get ; set ; }
169+ }
170+
154171/// <summary>Error details for timeline display including message and optional diagnostic information.</summary>
155172/// <remarks>Represents the <c>session.error</c> event.</remarks>
156173public partial class SessionErrorEvent : SessionEvent
@@ -813,6 +830,32 @@ public partial class ElicitationCompletedEvent : SessionEvent
813830 public required ElicitationCompletedData Data { get ; set ; }
814831}
815832
833+ /// <summary>Sampling request from an MCP server; contains the server name and a requestId for correlation.</summary>
834+ /// <remarks>Represents the <c>sampling.requested</c> event.</remarks>
835+ public partial class SamplingRequestedEvent : SessionEvent
836+ {
837+ /// <inheritdoc />
838+ [ JsonIgnore ]
839+ public override string Type => "sampling.requested" ;
840+
841+ /// <summary>The <c>sampling.requested</c> event payload.</summary>
842+ [ JsonPropertyName ( "data" ) ]
843+ public required SamplingRequestedData Data { get ; set ; }
844+ }
845+
846+ /// <summary>Sampling request completion notification signaling UI dismissal.</summary>
847+ /// <remarks>Represents the <c>sampling.completed</c> event.</remarks>
848+ public partial class SamplingCompletedEvent : SessionEvent
849+ {
850+ /// <inheritdoc />
851+ [ JsonIgnore ]
852+ public override string Type => "sampling.completed" ;
853+
854+ /// <summary>The <c>sampling.completed</c> event payload.</summary>
855+ [ JsonPropertyName ( "data" ) ]
856+ public required SamplingCompletedData Data { get ; set ; }
857+ }
858+
816859/// <summary>OAuth authentication request for an MCP server.</summary>
817860/// <remarks>Represents the <c>mcp.oauth_required</c> event.</remarks>
818861public partial class McpOauthRequiredEvent : SessionEvent
@@ -917,6 +960,19 @@ public partial class CommandsChangedEvent : SessionEvent
917960 public required CommandsChangedData Data { get ; set ; }
918961}
919962
963+ /// <summary>Session capability change notification.</summary>
964+ /// <remarks>Represents the <c>capabilities.changed</c> event.</remarks>
965+ public partial class CapabilitiesChangedEvent : SessionEvent
966+ {
967+ /// <inheritdoc />
968+ [ JsonIgnore ]
969+ public override string Type => "capabilities.changed" ;
970+
971+ /// <summary>The <c>capabilities.changed</c> event payload.</summary>
972+ [ JsonPropertyName ( "data" ) ]
973+ public required CapabilitiesChangedData Data { get ; set ; }
974+ }
975+
920976/// <summary>Plan approval request with plan content and available user actions.</summary>
921977/// <remarks>Represents the <c>exit_plan_mode.requested</c> event.</remarks>
922978public partial class ExitPlanModeRequestedEvent : SessionEvent
@@ -1069,6 +1125,11 @@ public partial class SessionStartData
10691125 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
10701126 [ JsonPropertyName ( "alreadyInUse" ) ]
10711127 public bool ? AlreadyInUse { get ; set ; }
1128+
1129+ /// <summary>Whether this session supports remote steering via Mission Control.</summary>
1130+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1131+ [ JsonPropertyName ( "remoteSteerable" ) ]
1132+ public bool ? RemoteSteerable { get ; set ; }
10721133}
10731134
10741135/// <summary>Session resume metadata including current context and event count.</summary>
@@ -1101,6 +1162,19 @@ public partial class SessionResumeData
11011162 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
11021163 [ JsonPropertyName ( "alreadyInUse" ) ]
11031164 public bool ? AlreadyInUse { get ; set ; }
1165+
1166+ /// <summary>Whether this session supports remote steering via Mission Control.</summary>
1167+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1168+ [ JsonPropertyName ( "remoteSteerable" ) ]
1169+ public bool ? RemoteSteerable { get ; set ; }
1170+ }
1171+
1172+ /// <summary>Notifies Mission Control that the session's remote steering capability has changed.</summary>
1173+ public partial class SessionRemoteSteerableChangedData
1174+ {
1175+ /// <summary>Whether this session now supports remote steering via Mission Control.</summary>
1176+ [ JsonPropertyName ( "remoteSteerable" ) ]
1177+ public required bool RemoteSteerable { get ; set ; }
11041178}
11051179
11061180/// <summary>Error details for timeline display including message and optional diagnostic information.</summary>
@@ -1142,6 +1216,11 @@ public partial class SessionIdleData
11421216 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
11431217 [ JsonPropertyName ( "backgroundTasks" ) ]
11441218 public SessionIdleDataBackgroundTasks ? BackgroundTasks { get ; set ; }
1219+
1220+ /// <summary>True when the preceding agentic loop was cancelled via abort signal.</summary>
1221+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1222+ [ JsonPropertyName ( "aborted" ) ]
1223+ public bool ? Aborted { get ; set ; }
11451224}
11461225
11471226/// <summary>Session title change payload containing the new display title.</summary>
@@ -1774,7 +1853,17 @@ public partial class AssistantUsageData
17741853 [ JsonPropertyName ( "duration" ) ]
17751854 public double ? Duration { get ; set ; }
17761855
1777- /// <summary>What initiated this API call (e.g., "sub-agent"); absent for user-initiated calls.</summary>
1856+ /// <summary>Time to first token in milliseconds. Only available for streaming requests.</summary>
1857+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1858+ [ JsonPropertyName ( "ttftMs" ) ]
1859+ public double ? TtftMs { get ; set ; }
1860+
1861+ /// <summary>Average inter-token latency in milliseconds. Only available for streaming requests.</summary>
1862+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1863+ [ JsonPropertyName ( "interTokenLatencyMs" ) ]
1864+ public double ? InterTokenLatencyMs { get ; set ; }
1865+
1866+ /// <summary>What initiated this API call (e.g., "sub-agent", "mcp-sampling"); absent for user-initiated calls.</summary>
17781867 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
17791868 [ JsonPropertyName ( "initiator" ) ]
17801869 public string ? Initiator { get ; set ; }
@@ -2272,6 +2361,30 @@ public partial class ElicitationCompletedData
22722361 public required string RequestId { get ; set ; }
22732362}
22742363
2364+ /// <summary>Sampling request from an MCP server; contains the server name and a requestId for correlation.</summary>
2365+ public partial class SamplingRequestedData
2366+ {
2367+ /// <summary>Unique identifier for this sampling request; used to respond via session.respondToSampling().</summary>
2368+ [ JsonPropertyName ( "requestId" ) ]
2369+ public required string RequestId { get ; set ; }
2370+
2371+ /// <summary>Name of the MCP server that initiated the sampling request.</summary>
2372+ [ JsonPropertyName ( "serverName" ) ]
2373+ public required string ServerName { get ; set ; }
2374+
2375+ /// <summary>The JSON-RPC request ID from the MCP protocol.</summary>
2376+ [ JsonPropertyName ( "mcpRequestId" ) ]
2377+ public required object McpRequestId { get ; set ; }
2378+ }
2379+
2380+ /// <summary>Sampling request completion notification signaling UI dismissal.</summary>
2381+ public partial class SamplingCompletedData
2382+ {
2383+ /// <summary>Request ID of the resolved sampling request; clients should dismiss any UI for this request.</summary>
2384+ [ JsonPropertyName ( "requestId" ) ]
2385+ public required string RequestId { get ; set ; }
2386+ }
2387+
22752388/// <summary>OAuth authentication request for an MCP server.</summary>
22762389public partial class McpOauthRequiredData
22772390{
@@ -2392,6 +2505,15 @@ public partial class CommandsChangedData
23922505 public required CommandsChangedDataCommandsItem [ ] Commands { get ; set ; }
23932506}
23942507
2508+ /// <summary>Session capability change notification.</summary>
2509+ public partial class CapabilitiesChangedData
2510+ {
2511+ /// <summary>UI capability changes.</summary>
2512+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
2513+ [ JsonPropertyName ( "ui" ) ]
2514+ public CapabilitiesChangedDataUi ? Ui { get ; set ; }
2515+ }
2516+
23952517/// <summary>Plan approval request with plan content and available user actions.</summary>
23962518public partial class ExitPlanModeRequestedData
23972519{
@@ -2476,7 +2598,7 @@ public partial class SessionMcpServerStatusChangedData
24762598 [ JsonPropertyName ( "serverName" ) ]
24772599 public required string ServerName { get ; set ; }
24782600
2479- /// <summary>New connection status: connected, failed, pending, disabled, or not_configured.</summary>
2601+ /// <summary>New connection status: connected, failed, needs-auth, pending, disabled, or not_configured.</summary>
24802602 [ JsonPropertyName ( "status" ) ]
24812603 public required SessionMcpServersLoadedDataServersItemStatus Status { get ; set ; }
24822604}
@@ -3586,6 +3708,16 @@ public partial class CommandsChangedDataCommandsItem
35863708 public string ? Description { get ; set ; }
35873709}
35883710
3711+ /// <summary>UI capability changes.</summary>
3712+ /// <remarks>Nested data type for <c>CapabilitiesChangedDataUi</c>.</remarks>
3713+ public partial class CapabilitiesChangedDataUi
3714+ {
3715+ /// <summary>Whether elicitation is now supported.</summary>
3716+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
3717+ [ JsonPropertyName ( "elicitation" ) ]
3718+ public bool ? Elicitation { get ; set ; }
3719+ }
3720+
35893721/// <summary>Nested data type for <c>SessionSkillsLoadedDataSkillsItem</c>.</summary>
35903722public partial class SessionSkillsLoadedDataSkillsItem
35913723{
@@ -3659,7 +3791,7 @@ public partial class SessionMcpServersLoadedDataServersItem
36593791 [ JsonPropertyName ( "name" ) ]
36603792 public required string Name { get ; set ; }
36613793
3662- /// <summary>Connection status: connected, failed, pending, disabled, or not_configured.</summary>
3794+ /// <summary>Connection status: connected, failed, needs-auth, pending, disabled, or not_configured.</summary>
36633795 [ JsonPropertyName ( "status" ) ]
36643796 public required SessionMcpServersLoadedDataServersItemStatus Status { get ; set ; }
36653797
@@ -3871,7 +4003,7 @@ public enum ElicitationRequestedDataMode
38714003 Url ,
38724004}
38734005
3874- /// <summary>Connection status: connected, failed, pending, disabled, or not_configured.</summary>
4006+ /// <summary>Connection status: connected, failed, needs-auth, pending, disabled, or not_configured.</summary>
38754007[ JsonConverter ( typeof ( JsonStringEnumConverter < SessionMcpServersLoadedDataServersItemStatus > ) ) ]
38764008public enum SessionMcpServersLoadedDataServersItemStatus
38774009{
@@ -3881,6 +4013,9 @@ public enum SessionMcpServersLoadedDataServersItemStatus
38814013 /// <summary>The <c>failed</c> variant.</summary>
38824014 [ JsonStringEnumMemberName ( "failed" ) ]
38834015 Failed ,
4016+ /// <summary>The <c>needs-auth</c> variant.</summary>
4017+ [ JsonStringEnumMemberName ( "needs-auth" ) ]
4018+ NeedsAuth ,
38844019 /// <summary>The <c>pending</c> variant.</summary>
38854020 [ JsonStringEnumMemberName ( "pending" ) ]
38864021 Pending ,
@@ -3950,6 +4085,9 @@ public enum SessionExtensionsLoadedDataExtensionsItemStatus
39504085[ JsonSerializable ( typeof ( AssistantUsageDataCopilotUsage ) ) ]
39514086[ JsonSerializable ( typeof ( AssistantUsageDataCopilotUsageTokenDetailsItem ) ) ]
39524087[ JsonSerializable ( typeof ( AssistantUsageEvent ) ) ]
4088+ [ JsonSerializable ( typeof ( CapabilitiesChangedData ) ) ]
4089+ [ JsonSerializable ( typeof ( CapabilitiesChangedDataUi ) ) ]
4090+ [ JsonSerializable ( typeof ( CapabilitiesChangedEvent ) ) ]
39534091[ JsonSerializable ( typeof ( CommandCompletedData ) ) ]
39544092[ JsonSerializable ( typeof ( CommandCompletedEvent ) ) ]
39554093[ JsonSerializable ( typeof ( CommandExecuteData ) ) ]
@@ -4000,6 +4138,10 @@ public enum SessionExtensionsLoadedDataExtensionsItemStatus
40004138[ JsonSerializable ( typeof ( PermissionRequestWrite ) ) ]
40014139[ JsonSerializable ( typeof ( PermissionRequestedData ) ) ]
40024140[ JsonSerializable ( typeof ( PermissionRequestedEvent ) ) ]
4141+ [ JsonSerializable ( typeof ( SamplingCompletedData ) ) ]
4142+ [ JsonSerializable ( typeof ( SamplingCompletedEvent ) ) ]
4143+ [ JsonSerializable ( typeof ( SamplingRequestedData ) ) ]
4144+ [ JsonSerializable ( typeof ( SamplingRequestedEvent ) ) ]
40034145[ JsonSerializable ( typeof ( SessionBackgroundTasksChangedData ) ) ]
40044146[ JsonSerializable ( typeof ( SessionBackgroundTasksChangedEvent ) ) ]
40054147[ JsonSerializable ( typeof ( SessionCompactionCompleteData ) ) ]
@@ -4039,6 +4181,8 @@ public enum SessionExtensionsLoadedDataExtensionsItemStatus
40394181[ JsonSerializable ( typeof ( SessionModelChangeEvent ) ) ]
40404182[ JsonSerializable ( typeof ( SessionPlanChangedData ) ) ]
40414183[ JsonSerializable ( typeof ( SessionPlanChangedEvent ) ) ]
4184+ [ JsonSerializable ( typeof ( SessionRemoteSteerableChangedData ) ) ]
4185+ [ JsonSerializable ( typeof ( SessionRemoteSteerableChangedEvent ) ) ]
40424186[ JsonSerializable ( typeof ( SessionResumeData ) ) ]
40434187[ JsonSerializable ( typeof ( SessionResumeDataContext ) ) ]
40444188[ JsonSerializable ( typeof ( SessionResumeEvent ) ) ]
0 commit comments