@github/copilot-sdk 1.0.6 → 1.0.7-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1055,7 +1055,8 @@ class CopilotClient {
1055
1055
  gitHubToken: config.gitHubToken,
1056
1056
  remoteSession: config.remoteSession,
1057
1057
  cloud: config.cloud,
1058
- expAssignments: config.expAssignments
1058
+ expAssignments: config.expAssignments,
1059
+ enableManagedSettings: config.enableManagedSettings
1059
1060
  });
1060
1061
  const {
1061
1062
  sessionId: returnedSessionId,
@@ -1245,7 +1246,8 @@ class CopilotClient {
1245
1246
  gitHubToken: config.gitHubToken,
1246
1247
  remoteSession: config.remoteSession,
1247
1248
  openCanvases: config.openCanvases,
1248
- expAssignments: config.expAssignments
1249
+ expAssignments: config.expAssignments,
1250
+ enableManagedSettings: config.enableManagedSettings
1249
1251
  });
1250
1252
  const { workspacePath, capabilities, openCanvases } = response;
1251
1253
  session["_workspacePath"] = workspacePath;
@@ -321,6 +321,15 @@ function createServerRpc(connection) {
321
321
  getDiscoveryPaths: async (params) => connection.sendRequest("instructions.getDiscoveryPaths", params)
322
322
  },
323
323
  /** @experimental */
324
+ commands: {
325
+ /**
326
+ * Lists the well-known built-in slash commands that work as the first message in a new session (e.g. /plan, /env), without requiring an active session. Commands that depend on session state, authentication, or a synced session are omitted.
327
+ *
328
+ * @returns Slash commands available in the session, after applying any include/exclude filters.
329
+ */
330
+ list: async () => connection.sendRequest("commands.list", {})
331
+ },
332
+ /** @experimental */
324
333
  user: {
325
334
  /** @experimental */
326
335
  settings: {
@@ -656,6 +665,16 @@ function createSessionRpc(connection, sessionId) {
656
665
  * @experimental
657
666
  */
658
667
  send: async (params) => connection.sendRequest("session.send", { sessionId, ...params }),
668
+ /**
669
+ * Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.
670
+ *
671
+ * @param params Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
672
+ *
673
+ * @returns Result of sending zero or more user messages
674
+ *
675
+ * @experimental
676
+ */
677
+ sendMessages: async (params) => connection.sendRequest("session.sendMessages", { sessionId, ...params }),
659
678
  /**
660
679
  * Aborts the current agent turn.
661
680
  *
@@ -1153,6 +1172,18 @@ function createSessionRpc(connection, sessionId) {
1153
1172
  * @returns Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove).
1154
1173
  */
1155
1174
  removeGitHub: async () => connection.sendRequest("session.mcp.removeGitHub", { sessionId }),
1175
+ /**
1176
+ * Starts an individual MCP server on the live session from a caller-supplied config. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.
1177
+ *
1178
+ * @param params Server name and configuration for an individual MCP server start.
1179
+ */
1180
+ startServer: async (params) => connection.sendRequest("session.mcp.startServer", { sessionId, ...params }),
1181
+ /**
1182
+ * Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).
1183
+ *
1184
+ * @param params Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
1185
+ */
1186
+ restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }),
1156
1187
  /**
1157
1188
  * Stops an individual MCP server on the session's host.
1158
1189
  *
@@ -1972,18 +2003,6 @@ function createInternalSessionRpc(connection, sessionId) {
1972
2003
  * @returns Result of configuring GitHub MCP.
1973
2004
  */
1974
2005
  configureGitHub: async (params) => connection.sendRequest("session.mcp.configureGitHub", { sessionId, ...params }),
1975
- /**
1976
- * Starts an individual MCP server on the session's host.
1977
- *
1978
- * @param params Server name and opaque configuration for an individual MCP server start.
1979
- */
1980
- startServer: async (params) => connection.sendRequest("session.mcp.startServer", { sessionId, ...params }),
1981
- /**
1982
- * Restarts an individual MCP server on the session's host (stops then starts).
1983
- *
1984
- * @param params Server name and opaque configuration for an individual MCP server restart.
1985
- */
1986
- restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }),
1987
2006
  /**
1988
2007
  * Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself.
1989
2008
  *
package/dist/client.js CHANGED
@@ -1042,7 +1042,8 @@ class CopilotClient {
1042
1042
  gitHubToken: config.gitHubToken,
1043
1043
  remoteSession: config.remoteSession,
1044
1044
  cloud: config.cloud,
1045
- expAssignments: config.expAssignments
1045
+ expAssignments: config.expAssignments,
1046
+ enableManagedSettings: config.enableManagedSettings
1046
1047
  });
1047
1048
  const {
1048
1049
  sessionId: returnedSessionId,
@@ -1232,7 +1233,8 @@ class CopilotClient {
1232
1233
  gitHubToken: config.gitHubToken,
1233
1234
  remoteSession: config.remoteSession,
1234
1235
  openCanvases: config.openCanvases,
1235
- expAssignments: config.expAssignments
1236
+ expAssignments: config.expAssignments,
1237
+ enableManagedSettings: config.enableManagedSettings
1236
1238
  });
1237
1239
  const { workspacePath, capabilities, openCanvases } = response;
1238
1240
  session["_workspacePath"] = workspacePath;
@@ -6491,6 +6491,20 @@ export interface McpRemoveGitHubResult {
6491
6491
  */
6492
6492
  removed: boolean;
6493
6493
  }
6494
+ /**
6495
+ * Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
6496
+ *
6497
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6498
+ * via the `definition` "McpRestartServerRequest".
6499
+ */
6500
+ /** @experimental */
6501
+ export interface McpRestartServerRequest {
6502
+ /**
6503
+ * Name of the MCP server to restart
6504
+ */
6505
+ serverName: string;
6506
+ config?: McpServerConfig;
6507
+ }
6494
6508
  /**
6495
6509
  * Outcome of an MCP sampling execution: success result, failure error, or cancellation.
6496
6510
  *
@@ -6567,6 +6581,20 @@ export interface McpSetEnvValueModeParams {
6567
6581
  export interface McpSetEnvValueModeResult {
6568
6582
  mode: McpSetEnvValueModeDetails;
6569
6583
  }
6584
+ /**
6585
+ * Server name and configuration for an individual MCP server start.
6586
+ *
6587
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6588
+ * via the `definition` "McpStartServerRequest".
6589
+ */
6590
+ /** @experimental */
6591
+ export interface McpStartServerRequest {
6592
+ /**
6593
+ * Name of the MCP server to start
6594
+ */
6595
+ serverName: string;
6596
+ config: McpServerConfig;
6597
+ }
6570
6598
  /**
6571
6599
  * MCP server startup filtering result.
6572
6600
  *
@@ -10468,6 +10496,81 @@ export interface SendAttachmentsToMessageParams {
10468
10496
  */
10469
10497
  attachments: PushAttachment[];
10470
10498
  }
10499
+ /**
10500
+ * A single user message to append to the session as part of a `session.sendMessages` turn
10501
+ *
10502
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10503
+ * via the `definition` "SendMessageItem".
10504
+ */
10505
+ /** @experimental */
10506
+ export interface SendMessageItem {
10507
+ /**
10508
+ * The user message text
10509
+ */
10510
+ prompt: string;
10511
+ /**
10512
+ * If provided, this is shown in the timeline instead of `prompt`
10513
+ */
10514
+ displayPrompt?: string;
10515
+ /**
10516
+ * Optional attachments (files, directories, selections, blobs, GitHub references) to include with this message
10517
+ */
10518
+ attachments?: Attachment[];
10519
+ /**
10520
+ * If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange
10521
+ */
10522
+ requiredTool?: string;
10523
+ }
10524
+ /**
10525
+ * Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
10526
+ *
10527
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10528
+ * via the `definition` "SendMessagesRequest".
10529
+ */
10530
+ /** @experimental */
10531
+ export interface SendMessagesRequest {
10532
+ /**
10533
+ * The user messages to append to the conversation, in order. May be empty, in which case a single turn runs over the existing history with no new user message.
10534
+ */
10535
+ messages: SendMessageItem[];
10536
+ mode?: SendMode;
10537
+ /**
10538
+ * If true, adds the messages to the front of the queue instead of the end
10539
+ */
10540
+ prepend?: boolean;
10541
+ agentMode?: SendAgentMode;
10542
+ /**
10543
+ * Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key.
10544
+ */
10545
+ requestHeaders?: {
10546
+ [k: string]: string | undefined;
10547
+ };
10548
+ /**
10549
+ * W3C Trace Context traceparent header for distributed tracing of this agent turn
10550
+ */
10551
+ traceparent?: string;
10552
+ /**
10553
+ * W3C Trace Context tracestate header for distributed tracing
10554
+ */
10555
+ tracestate?: string;
10556
+ /**
10557
+ * If true, await completion of the agentic loop for this turn before returning. Defaults to false (fire-and-forget). When true, the result still contains the same `messageIds`; the caller can rely on the agent having processed the messages before the call resolves.
10558
+ */
10559
+ wait?: boolean;
10560
+ }
10561
+ /**
10562
+ * Result of sending zero or more user messages
10563
+ *
10564
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10565
+ * via the `definition` "SendMessagesResult".
10566
+ */
10567
+ /** @experimental */
10568
+ export interface SendMessagesResult {
10569
+ /**
10570
+ * Unique identifiers assigned to the messages, one per provided message in order. Empty when no messages were provided.
10571
+ */
10572
+ messageIds: string[];
10573
+ }
10471
10574
  /**
10472
10575
  * Parameters for sending a user message to the session
10473
10576
  *
@@ -15143,6 +15246,15 @@ export declare function createServerRpc(connection: MessageConnection): {
15143
15246
  getDiscoveryPaths: (params: InstructionsGetDiscoveryPathsRequest) => Promise<InstructionDiscoveryPathList>;
15144
15247
  };
15145
15248
  /** @experimental */
15249
+ commands: {
15250
+ /**
15251
+ * Lists the well-known built-in slash commands that work as the first message in a new session (e.g. /plan, /env), without requiring an active session. Commands that depend on session state, authentication, or a synced session are omitted.
15252
+ *
15253
+ * @returns Slash commands available in the session, after applying any include/exclude filters.
15254
+ */
15255
+ list: () => Promise<CommandList>;
15256
+ };
15257
+ /** @experimental */
15146
15258
  user: {
15147
15259
  /** @experimental */
15148
15260
  settings: {
@@ -15422,6 +15534,16 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
15422
15534
  * @experimental
15423
15535
  */
15424
15536
  send: (params: SendRequest) => Promise<SendResult>;
15537
+ /**
15538
+ * Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.
15539
+ *
15540
+ * @param params Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
15541
+ *
15542
+ * @returns Result of sending zero or more user messages
15543
+ *
15544
+ * @experimental
15545
+ */
15546
+ sendMessages: (params: SendMessagesRequest) => Promise<SendMessagesResult>;
15425
15547
  /**
15426
15548
  * Aborts the current agent turn.
15427
15549
  *
@@ -15919,6 +16041,18 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
15919
16041
  * @returns Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove).
15920
16042
  */
15921
16043
  removeGitHub: () => Promise<McpRemoveGitHubResult>;
16044
+ /**
16045
+ * Starts an individual MCP server on the live session from a caller-supplied config. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.
16046
+ *
16047
+ * @param params Server name and configuration for an individual MCP server start.
16048
+ */
16049
+ startServer: (params: McpStartServerRequest) => Promise<void>;
16050
+ /**
16051
+ * Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).
16052
+ *
16053
+ * @param params Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
16054
+ */
16055
+ restartServer: (params: McpRestartServerRequest) => Promise<void>;
15922
16056
  /**
15923
16057
  * Stops an individual MCP server on the session's host.
15924
16058
  *
@@ -293,6 +293,15 @@ function createServerRpc(connection) {
293
293
  getDiscoveryPaths: async (params) => connection.sendRequest("instructions.getDiscoveryPaths", params)
294
294
  },
295
295
  /** @experimental */
296
+ commands: {
297
+ /**
298
+ * Lists the well-known built-in slash commands that work as the first message in a new session (e.g. /plan, /env), without requiring an active session. Commands that depend on session state, authentication, or a synced session are omitted.
299
+ *
300
+ * @returns Slash commands available in the session, after applying any include/exclude filters.
301
+ */
302
+ list: async () => connection.sendRequest("commands.list", {})
303
+ },
304
+ /** @experimental */
296
305
  user: {
297
306
  /** @experimental */
298
307
  settings: {
@@ -628,6 +637,16 @@ function createSessionRpc(connection, sessionId) {
628
637
  * @experimental
629
638
  */
630
639
  send: async (params) => connection.sendRequest("session.send", { sessionId, ...params }),
640
+ /**
641
+ * Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.
642
+ *
643
+ * @param params Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
644
+ *
645
+ * @returns Result of sending zero or more user messages
646
+ *
647
+ * @experimental
648
+ */
649
+ sendMessages: async (params) => connection.sendRequest("session.sendMessages", { sessionId, ...params }),
631
650
  /**
632
651
  * Aborts the current agent turn.
633
652
  *
@@ -1125,6 +1144,18 @@ function createSessionRpc(connection, sessionId) {
1125
1144
  * @returns Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove).
1126
1145
  */
1127
1146
  removeGitHub: async () => connection.sendRequest("session.mcp.removeGitHub", { sessionId }),
1147
+ /**
1148
+ * Starts an individual MCP server on the live session from a caller-supplied config. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.
1149
+ *
1150
+ * @param params Server name and configuration for an individual MCP server start.
1151
+ */
1152
+ startServer: async (params) => connection.sendRequest("session.mcp.startServer", { sessionId, ...params }),
1153
+ /**
1154
+ * Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).
1155
+ *
1156
+ * @param params Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
1157
+ */
1158
+ restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }),
1128
1159
  /**
1129
1160
  * Stops an individual MCP server on the session's host.
1130
1161
  *
@@ -1944,18 +1975,6 @@ function createInternalSessionRpc(connection, sessionId) {
1944
1975
  * @returns Result of configuring GitHub MCP.
1945
1976
  */
1946
1977
  configureGitHub: async (params) => connection.sendRequest("session.mcp.configureGitHub", { sessionId, ...params }),
1947
- /**
1948
- * Starts an individual MCP server on the session's host.
1949
- *
1950
- * @param params Server name and opaque configuration for an individual MCP server start.
1951
- */
1952
- startServer: async (params) => connection.sendRequest("session.mcp.startServer", { sessionId, ...params }),
1953
- /**
1954
- * Restarts an individual MCP server on the session's host (stops then starts).
1955
- *
1956
- * @param params Server name and opaque configuration for an individual MCP server restart.
1957
- */
1958
- restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }),
1959
1978
  /**
1960
1979
  * Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself.
1961
1980
  *
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Union of all session event variants emitted by the Copilot CLI runtime.
7
7
  */
8
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
8
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
9
9
  /**
10
10
  * Hosting platform type of the repository (github or ado)
11
11
  */
@@ -461,6 +461,16 @@ export type SessionLimitsExhaustedResponseAction =
461
461
  | "unset"
462
462
  /** Leave the limit unchanged and cancel the blocked model request. */
463
463
  | "cancel";
464
+ /**
465
+ * Coarse request-difficulty bucket for UX explainability
466
+ */
467
+ export type AutoModeResolvedReasoningBucket =
468
+ /** The request looks low-reasoning; a lighter model is appropriate. */
469
+ "low"
470
+ /** The request needs a moderate amount of reasoning. */
471
+ | "medium"
472
+ /** The request looks high-reasoning; a stronger model is appropriate. */
473
+ | "high";
464
474
  /**
465
475
  * Exit plan mode action
466
476
  */
@@ -3150,6 +3160,10 @@ export interface AssistantMessageData {
3150
3160
  * @experimental
3151
3161
  */
3152
3162
  citations?: Citations;
3163
+ /**
3164
+ * Client-minted request id (x-request-id header) echoed by the server. Distinct from requestId (x-github-request-id) and serviceRequestId (x-copilot-service-request-id).
3165
+ */
3166
+ clientRequestId?: string;
3153
3167
  /**
3154
3168
  * The assistant's text response content
3155
3169
  */
@@ -7497,6 +7511,66 @@ export interface SessionLimitsExhaustedResponse {
7497
7511
  */
7498
7512
  maxAiCredits?: number;
7499
7513
  }
7514
+ /**
7515
+ * Session event "session.auto_mode_resolved". Auto Intent resolution: the concrete model the session settled on for the first prompt of an auto-mode session, and why. Lets SDK clients render the chosen model and the full reason it was picked. The core selection fields (chosenModel/reasoningBucket/categoryScores) are stable; the routing-analytics fields (predictedLabel/confidence/candidateModels) mirror the upstream intent service and may evolve, hence the event's experimental stability.
7516
+ */
7517
+ /** @experimental */
7518
+ export interface AutoModeResolvedEvent {
7519
+ /**
7520
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
7521
+ */
7522
+ agentId?: string;
7523
+ data: AutoModeResolvedData;
7524
+ /**
7525
+ * When true, the event is transient and not persisted to the session event log on disk
7526
+ */
7527
+ ephemeral?: boolean;
7528
+ /**
7529
+ * Unique event identifier (UUID v4), generated when the event is emitted
7530
+ */
7531
+ id: string;
7532
+ /**
7533
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
7534
+ */
7535
+ parentId: string | null;
7536
+ /**
7537
+ * ISO 8601 timestamp when the event was created
7538
+ */
7539
+ timestamp: string;
7540
+ /**
7541
+ * Type discriminator. Always "session.auto_mode_resolved".
7542
+ */
7543
+ type: "session.auto_mode_resolved";
7544
+ }
7545
+ /**
7546
+ * Auto Intent resolution: the concrete model the session settled on for the first prompt of an auto-mode session, and why. Lets SDK clients render the chosen model and the full reason it was picked. The core selection fields (chosenModel/reasoningBucket/categoryScores) are stable; the routing-analytics fields (predictedLabel/confidence/candidateModels) mirror the upstream intent service and may evolve, hence the event's experimental stability.
7547
+ */
7548
+ /** @experimental */
7549
+ export interface AutoModeResolvedData {
7550
+ /**
7551
+ * Ordered candidate model list the router returned, when not a fallback
7552
+ */
7553
+ candidateModels?: string[];
7554
+ /**
7555
+ * Per-category classifier scores (0-1) behind the bucket: the granular HYDRA capability scores (reasoning, code_gen, debugging, tool_use), or the binary needs_reasoning/no_reasoning scores when HYDRA didn't run. Lets clients show a breakdown rather than just the bucket.
7556
+ */
7557
+ categoryScores?: {
7558
+ [k: string]: number | undefined;
7559
+ };
7560
+ /**
7561
+ * The concrete model the session will use after any intent refinement
7562
+ */
7563
+ chosenModel: string;
7564
+ /**
7565
+ * Classifier confidence for the predicted label, when available
7566
+ */
7567
+ confidence?: number;
7568
+ /**
7569
+ * The predicted classifier label (e.g. `needs_reasoning`), when available
7570
+ */
7571
+ predictedLabel?: string;
7572
+ reasoningBucket?: AutoModeResolvedReasoningBucket;
7573
+ }
7500
7574
  /**
7501
7575
  * Session event "commands.changed". SDK command registration change notification
7502
7576
  */
package/dist/types.d.ts CHANGED
@@ -1782,6 +1782,13 @@ export interface SessionConfigBase {
1782
1782
  * the identity used for content exclusion, model routing, and quota checks.
1783
1783
  */
1784
1784
  gitHubToken?: string;
1785
+ /**
1786
+ * Opt-in: when true, the runtime self-fetches enterprise managed settings
1787
+ * (bypass-permissions policy) at session bootstrap using the session's
1788
+ * `gitHubToken`. Requires {@link SessionConfigBase.gitHubToken} to be set;
1789
+ * if omitted, the runtime is expected to reject session creation (fail-closed).
1790
+ */
1791
+ enableManagedSettings?: boolean;
1785
1792
  /**
1786
1793
  * When true, skips embedding-based retrieval for this session.
1787
1794
  * Use in multitenant deployments to prevent cross-session information leakage
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/github/copilot-sdk.git"
6
6
  },
7
- "version": "1.0.6",
7
+ "version": "1.0.7-preview.0",
8
8
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
9
9
  "main": "./dist/cjs/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "author": "GitHub",
57
57
  "license": "MIT",
58
58
  "dependencies": {
59
- "@github/copilot": "^1.0.69",
59
+ "@github/copilot": "^1.0.70-0",
60
60
  "vscode-jsonrpc": "^8.2.1",
61
61
  "zod": "^4.3.6"
62
62
  },