@github/copilot-sdk 1.0.14-preview.1 → 1.0.14

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.
package/README.md CHANGED
@@ -21,6 +21,10 @@ release's `SHA256SUMS.txt`.
21
21
 
22
22
  `npm run pack:release` builds the main package and all platform packages. Set
23
23
  `COPILOT_CLI_DOWNLOAD_BASE_URL` to use a release mirror while packaging.
24
+ Release workflows instead set `COPILOT_SDK_RUNTIME_PACKAGE_DIR` to a directory
25
+ containing validated runtime npm package roots named for all eight platforms.
26
+ This keeps `COPILOT_CLI_USE_NPM_PACKAGE` false and embeds those runtime files in
27
+ the self-contained SDK platform packages.
24
28
 
25
29
  ## Installation
26
30
 
@@ -147,7 +151,7 @@ Create a new conversation session.
147
151
 
148
152
  - `sessionId?: string` - Custom session ID.
149
153
  - `model?: string` - Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**
150
- - `capi?: CapiSessionOptions` - Copilot API options. With `model: "auto"`, set `autoTier` to `"efficiency"`, `"balance"`, or `"intelligence"` to choose a routing preference. Requires a runtime with Auto tier support and V2 Auto routing. Omission preserves default behavior. See [Auto tier persistence](../docs/features/session-persistence.md#auto-tier-persistence) for resume semantics.
154
+ - `capi?: CapiSessionOptions` - Copilot API options. With `model: "auto"`, set `autoTier` to `"efficiency"`, `"balance"`, `"intelligence"`, or `"fast"` to choose a routing preference. `"fast"` is an integrator-only latency preset, not a first-party GitHub Copilot product preference. Requires a runtime with Auto tier support and V2 Auto routing. Omission preserves default behavior. See [Auto tier persistence](../docs/features/session-persistence.md#auto-tier-persistence) for resume semantics.
151
155
  - `reasoningEffort?: "low" | "medium" | "high" | "xhigh" | "max"` - Reasoning effort level for models that support it. Use `listModels()` to check which models support this option.
152
156
  - `tools?: Tool[]` - Custom tools exposed to the CLI. Tools without `handler` are declaration-only and must be resolved via pending tool-call RPCs.
153
157
  - `systemMessage?: SystemMessageConfig` - System message customization (see below)
@@ -350,7 +354,7 @@ Change the Auto routing preference without changing the selected model. Pass `nu
350
354
 
351
355
  The runtime does not apply the preference immediately. It records the request and commits it only when a later user turn using the `auto` model successfully obtains a usable model from the provider, so a `pending` status confirms acceptance rather than effect. Only the most recent request survives.
352
356
 
353
- Watch for the outcome through the `session.model_change` event on success or the ephemeral `session.auto_tier_switch_failed` event on failure, and read the authoritative state at any time with `session.rpc.model.getCurrent()`.
357
+ Watch for the outcome through the `session.model_change` event on success or the ephemeral `session.auto_tier_switch_failed` event on failure. A failed activation leaves the incumbent effective tier unchanged. Read the authoritative state at any time with `session.rpc.model.getCurrent()`.
354
358
 
355
359
  ```typescript
356
360
  const result = await session.setAutoTier("intelligence");
@@ -22,7 +22,7 @@ __export(cliVersion_exports, {
22
22
  COPILOT_CLI_VERSION: () => COPILOT_CLI_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(cliVersion_exports);
25
- const COPILOT_CLI_VERSION = "1.0.84-5";
25
+ const COPILOT_CLI_VERSION = "1.0.85";
26
26
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -760,15 +760,7 @@ function createInternalServerRpc(connection) {
760
760
  */
761
761
  getBoardEntryCount: async (params) => connection.sendRequest("sessions.getBoardEntryCount", params),
762
762
  /**
763
- * Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself.
764
- *
765
- * @param params Params to attach an extension loader's tools to a session.
766
- *
767
- * @returns Handle for releasing the extension tool registration.
768
- */
769
- registerExtensionToolsOnSession: async (params) => connection.sendRequest("sessions.registerExtensionToolsOnSession", params),
770
- /**
771
- * Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime.
763
+ * Attaches (or detaches) an in-process ExtensionController delegate for the given session in a local host adapter. Pass `controller: undefined` to detach. Internal because the controller cannot cross the JSON-RPC boundary; the runtime manages its own session extension service.
772
764
  *
773
765
  * @param params Params to attach or detach an in-process ExtensionController delegate.
774
766
  */
@@ -877,11 +869,11 @@ function createSessionRpc(connection, sessionId) {
877
869
  /** @experimental */
878
870
  debug: {
879
871
  /**
880
- * Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
872
+ * Collects a session debug log bundle into a local archive or staging directory. Logs are redacted by default; redaction can be configured per caller-provided diagnostic entry. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
881
873
  *
882
- * @param params Options for collecting a redacted session debug bundle.
874
+ * @param params Options for collecting a session debug bundle with configurable redaction.
883
875
  *
884
- * @returns Result of collecting a redacted debug bundle.
876
+ * @returns Result of collecting a session debug bundle.
885
877
  */
886
878
  collectLogs: async (params) => connection.sendRequest("session.debug.collectLogs", { sessionId, ...params })
887
879
  },
@@ -1191,6 +1183,32 @@ function createSessionRpc(connection, sessionId) {
1191
1183
  * @param params Relative path and UTF-8 content for the workspace file to create or overwrite.
1192
1184
  */
1193
1185
  createFile: async (params) => connection.sendRequest("session.workspaces.createFile", { sessionId, ...params }),
1186
+ /**
1187
+ * Returns metadata for a file or directory in the session workspace files directory.
1188
+ *
1189
+ * @param params Relative path of the workspace file or directory to inspect.
1190
+ *
1191
+ * @returns Filesystem metadata for a path in the session workspace files directory.
1192
+ */
1193
+ statFile: async (params) => connection.sendRequest("session.workspaces.statFile", { sessionId, ...params }),
1194
+ /**
1195
+ * Creates a directory in the session workspace files directory.
1196
+ *
1197
+ * @param params Directory to create within the session workspace files directory.
1198
+ */
1199
+ createDirectory: async (params) => connection.sendRequest("session.workspaces.createDirectory", { sessionId, ...params }),
1200
+ /**
1201
+ * Removes a file or directory from the session workspace files directory.
1202
+ *
1203
+ * @param params File or directory to remove from the session workspace files directory.
1204
+ */
1205
+ removePath: async (params) => connection.sendRequest("session.workspaces.removePath", { sessionId, ...params }),
1206
+ /**
1207
+ * Renames a file or directory within the session workspace files directory.
1208
+ *
1209
+ * @param params Source and destination paths for a rename within the session workspace files directory.
1210
+ */
1211
+ renamePath: async (params) => connection.sendRequest("session.workspaces.renamePath", { sessionId, ...params }),
1194
1212
  /**
1195
1213
  * Lists workspace checkpoints in chronological order.
1196
1214
  *
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.84-5";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.85";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.84-5";
1
+ const COPILOT_CLI_VERSION = "1.0.85";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
@@ -38,8 +38,10 @@ export type AdaptiveThinkingSupport =
38
38
  "unsupported"
39
39
  /** The model accepts adaptive thinking but also accepts thinking.type='enabled' */
40
40
  | "optional"
41
- /** The model only accepts adaptive thinking and rejects thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8) */
42
- | "required";
41
+ /** The model defaults to adaptive thinking and rejects thinking.type='enabled' with HTTP 400, but still accepts thinking.type='disabled' (e.g. opus-4.7/4.8/5, sonnet-5) */
42
+ | "required"
43
+ /** The model accepts only thinking.type='adaptive'; 'enabled', 'disabled', and an omitted thinking block all fail with HTTP 400 (e.g. fable, mythos) */
44
+ | "adaptive_only";
43
45
  /**
44
46
  * Which tier this directory belongs to
45
47
  *
@@ -899,7 +901,7 @@ export type DebugCollectLogsSource =
899
901
  /** Caller-provided diagnostic entry. */
900
902
  | "additional";
901
903
  /**
902
- * Destination for the redacted debug bundle.
904
+ * Destination for the session debug bundle.
903
905
  *
904
906
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
905
907
  * via the `definition` "DebugCollectLogsDestination".
@@ -920,7 +922,7 @@ export type DebugCollectLogsDestination = {
920
922
  kind: "archive";
921
923
  } | {
922
924
  /**
923
- * Directory where redacted files should be staged. The directory is created if needed.
925
+ * Directory where files should be staged. The directory is created if needed.
924
926
  */
925
927
  outputDirectory: string;
926
928
  /**
@@ -951,7 +953,9 @@ export type DebugCollectLogsRedaction =
951
953
  /** Redact the file as plain UTF-8 log text. */
952
954
  "plain-text"
953
955
  /** Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines. */
954
- | "events-jsonl";
956
+ | "events-jsonl"
957
+ /** No redaction is applied. The caller must ensure any necessary redaction is performed before this call. */
958
+ | "none";
955
959
  /**
956
960
  * Destination kind that was written.
957
961
  *
@@ -962,7 +966,7 @@ export type DebugCollectLogsRedaction =
962
966
  export type DebugCollectLogsResultKind =
963
967
  /** A .tgz archive was written. */
964
968
  "archive"
965
- /** A directory containing redacted files was written. */
969
+ /** A directory containing the collected files was written. */
966
970
  | "directory";
967
971
  /**
968
972
  * Persisted extension discovery source
@@ -1860,6 +1864,10 @@ export type McpHeadersHandlePendingHeadersRefreshRequest = {
1860
1864
  headers: {
1861
1865
  [k: string]: string | undefined;
1862
1866
  };
1867
+ /**
1868
+ * Optional lifetime in milliseconds for these returned headers. The runtime clamps its configured cache lifetime to this value.
1869
+ */
1870
+ ttlMs?: number;
1863
1871
  /**
1864
1872
  * Headers-refresh response variant discriminator.
1865
1873
  */
@@ -1869,6 +1877,15 @@ export type McpHeadersHandlePendingHeadersRefreshRequest = {
1869
1877
  * Headers-refresh response variant discriminator.
1870
1878
  */
1871
1879
  kind: "none";
1880
+ } | {
1881
+ /**
1882
+ * Host credential broker failure, denial, or revocation reason.
1883
+ */
1884
+ message: string;
1885
+ /**
1886
+ * Headers-refresh response variant discriminator.
1887
+ */
1888
+ kind: "error";
1872
1889
  };
1873
1890
  /**
1874
1891
  * One eligible way to run the server, represented as a tagged package or remote variant so package identity and endpoint states cannot contradict the install method.
@@ -2696,6 +2713,8 @@ export type PermissionModeSource =
2696
2713
  | "autopilot_confirmation"
2697
2714
  /** The mode was set at startup by the `defaultPermissionMode` user setting. */
2698
2715
  | "user_setting"
2716
+ /** The mode was set at startup by authenticated organization targeting. */
2717
+ | "organization_targeting"
2699
2718
  /** The mode was set through an RPC caller. */
2700
2719
  | "rpc";
2701
2720
  /**
@@ -2783,6 +2802,10 @@ export type PluginsReloadRequest = {
2783
2802
  */
2784
2803
  deferRepoHooks?: boolean;
2785
2804
  };
2805
+ /** @experimental */
2806
+ export type ProtocolAppendMode = "append";
2807
+ /** @experimental */
2808
+ export type ProtocolCustomizeMode = "customize";
2786
2809
  /**
2787
2810
  * Controls whether the runtime may defer loading an external tool definition.
2788
2811
  *
@@ -2795,6 +2818,34 @@ export type ProtocolExternalToolDefer =
2795
2818
  "auto"
2796
2819
  /** The runtime must include the tool without deferring it. */
2797
2820
  | "never";
2821
+ /** @experimental */
2822
+ export type ProtocolMarkerSectionOverride = {
2823
+ /**
2824
+ * Section override action discriminator.
2825
+ */
2826
+ action: "transform";
2827
+ } | {
2828
+ /**
2829
+ * Section override action discriminator.
2830
+ */
2831
+ action: "preserve";
2832
+ };
2833
+ /** @experimental */
2834
+ export type ProtocolReplaceMode = "replace";
2835
+ /** @experimental */
2836
+ export type ProtocolSectionOverride = ProtocolStaticSectionOverride | ProtocolMarkerSectionOverride;
2837
+ /** @experimental */
2838
+ export type ProtocolStaticSectionAction =
2839
+ /** Replace the section content. */
2840
+ "replace"
2841
+ /** Remove the section content. */
2842
+ | "remove"
2843
+ /** Append content to the section. */
2844
+ | "append"
2845
+ /** Prepend content to the section. */
2846
+ | "prepend";
2847
+ /** @experimental */
2848
+ export type ProtocolSystemMessageConfig = ProtocolSystemMessageAppendConfig | ProtocolSystemMessageReplaceConfig | ProtocolSystemMessageCustomizeConfig;
2798
2849
  /**
2799
2850
  * Provider family. Matches the `type` field of a BYOK provider config.
2800
2851
  *
@@ -2960,6 +3011,32 @@ export type RemoteSessionMetadataTaskType =
2960
3011
  "cca"
2961
3012
  /** CLI remote task. */
2962
3013
  | "cli";
3014
+ /**
3015
+ * Provider-native structured output format. JSON Schema is forwarded without rewriting or validating the schema or the generated output.
3016
+ *
3017
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3018
+ * via the `definition` "ResponseFormat".
3019
+ */
3020
+ /** @experimental */
3021
+ export type ResponseFormat = {
3022
+ jsonSchema: JsonSchemaResponseFormat;
3023
+ /**
3024
+ * Output format discriminator. Currently only json_schema is supported.
3025
+ */
3026
+ type: "json_schema";
3027
+ };
3028
+ /**
3029
+ * A session-scoped sandbox transition applied while handling a slash command
3030
+ *
3031
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3032
+ * via the `definition` "SandboxSessionChange".
3033
+ */
3034
+ /** @experimental */
3035
+ export type SandboxSessionChange =
3036
+ /** The sandbox is off for the rest of this session; nothing was persisted and a new session starts from managed policy. */
3037
+ "disabled"
3038
+ /** A previous session-scoped opt-out was cleared and the sandbox is enforced again. */
3039
+ | "restored";
2963
3040
  /**
2964
3041
  * Current authentication information, or null when no authentication is active.
2965
3042
  *
@@ -6956,7 +7033,7 @@ export interface CurrentToolMetadata {
6956
7033
  deferLoading?: boolean;
6957
7034
  }
6958
7035
  /**
6959
- * A file included in the redacted debug bundle.
7036
+ * A file included in the session debug bundle.
6960
7037
  *
6961
7038
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6962
7039
  * via the `definition` "DebugCollectLogsCollectedEntry".
@@ -7034,7 +7111,7 @@ export interface DebugCollectLogsInclude {
7034
7111
  previousProcessLogLimit?: number;
7035
7112
  }
7036
7113
  /**
7037
- * Options for collecting a redacted session debug bundle.
7114
+ * Options for collecting a session debug bundle with configurable redaction.
7038
7115
  *
7039
7116
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7040
7117
  * via the `definition` "DebugCollectLogsRequest".
@@ -7049,7 +7126,7 @@ export interface DebugCollectLogsRequest {
7049
7126
  additionalEntries?: DebugCollectLogsEntry[];
7050
7127
  }
7051
7128
  /**
7052
- * Result of collecting a redacted debug bundle.
7129
+ * Result of collecting a session debug bundle.
7053
7130
  *
7054
7131
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7055
7132
  * via the `definition` "DebugCollectLogsResult".
@@ -7062,7 +7139,7 @@ export interface DebugCollectLogsResult {
7062
7139
  */
7063
7140
  path: string;
7064
7141
  /**
7065
- * Files included in the redacted bundle.
7142
+ * Files included in the bundle.
7066
7143
  */
7067
7144
  entries: DebugCollectLogsCollectedEntry[];
7068
7145
  /**
@@ -9575,6 +9652,10 @@ export interface InstalledPluginInfo {
9575
9652
  * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed".
9576
9653
  */
9577
9654
  installedFrom?: string;
9655
+ /**
9656
+ * Runtime-reported plugin provenance. Currently set to "builtin" only for plugins registered through the trusted host built-in boundary; absent for installed, marketplace, direct, and live plugins.
9657
+ */
9658
+ source?: string;
9578
9659
  }
9579
9660
  /**
9580
9661
  * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path.
@@ -9728,6 +9809,31 @@ export interface InterruptMainTurnResult {
9728
9809
  */
9729
9810
  interrupted: boolean;
9730
9811
  }
9812
+ /**
9813
+ * A JSON Schema output contract. OpenAI receives the name, description, schema and strict setting; Anthropic receives the schema in output_config.format and always uses its native strict enforcement.
9814
+ *
9815
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9816
+ * via the `definition` "JsonSchemaResponseFormat".
9817
+ */
9818
+ /** @experimental */
9819
+ export interface JsonSchemaResponseFormat {
9820
+ /**
9821
+ * Name of the output schema, subject to the provider's naming restrictions.
9822
+ */
9823
+ name: string;
9824
+ /**
9825
+ * JSON Schema passed unchanged to the inference provider. Schemas larger than 32 MiB when JSON-encoded are rejected before admission, using the runtime's existing request-size ceiling. This is not a guarantee that the entire model request fits. Supported keywords and schema restrictions are determined by the provider.
9826
+ */
9827
+ schema: JsonValue;
9828
+ /**
9829
+ * Optional description passed to OpenAI providers.
9830
+ */
9831
+ description?: string;
9832
+ /**
9833
+ * Optional strict enforcement setting for OpenAI providers. Omitted uses the provider default. Anthropic always enforces its supported schema subset.
9834
+ */
9835
+ strict?: boolean;
9836
+ }
9731
9837
  /**
9732
9838
  * HTTP headers as a map from lowercased header name to a list of values. Multi-valued headers (e.g. Set-Cookie) preserve all values.
9733
9839
  *
@@ -10076,6 +10182,35 @@ export interface LspInitializeRequest {
10076
10182
  */
10077
10183
  force?: boolean;
10078
10184
  }
10185
+ /**
10186
+ * Non-secret host-managed HTTP MCP server configuration. The containing map key is the stable managed identity; credentials are supplied dynamically by the host.
10187
+ *
10188
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10189
+ * via the `definition` "ManagedMcpServerConfig".
10190
+ */
10191
+ /** @experimental */
10192
+ export interface ManagedMcpServerConfig {
10193
+ /**
10194
+ * Human-readable catalog display name.
10195
+ */
10196
+ displayName: string;
10197
+ /**
10198
+ * Hosted MCP streamable HTTP endpoint.
10199
+ */
10200
+ url: string;
10201
+ /**
10202
+ * Tools to include. Defaults to all tools when omitted.
10203
+ */
10204
+ tools?: string[];
10205
+ /**
10206
+ * Timeout in milliseconds for tool discovery and tool calls.
10207
+ */
10208
+ timeout?: number;
10209
+ /**
10210
+ * Maximum dynamic-header cache lifetime in milliseconds.
10211
+ */
10212
+ headersRefreshTtlMs?: number;
10213
+ }
10079
10214
  /**
10080
10215
  * Validated device-managed settings discovered before a session exists.
10081
10216
  *
@@ -12033,6 +12168,10 @@ export interface McpServer {
12033
12168
  * Plugin version that provided this server, when source is plugin.
12034
12169
  */
12035
12170
  sourcePluginVersion?: string;
12171
+ /**
12172
+ * Human-readable display name supplied by a managed server catalog.
12173
+ */
12174
+ displayName?: string;
12036
12175
  /**
12037
12176
  * Error message if the server failed to connect
12038
12177
  */
@@ -15346,6 +15485,59 @@ export interface ProtocolExternalToolDefinition {
15346
15485
  [k: string]: JsonValue | undefined;
15347
15486
  };
15348
15487
  }
15488
+ /** @experimental */
15489
+ export interface ProtocolStaticSectionOverride {
15490
+ action: ProtocolStaticSectionAction;
15491
+ /**
15492
+ * Optional content used by replace, append, and prepend operations.
15493
+ */
15494
+ content?: string;
15495
+ }
15496
+ /** @experimental */
15497
+ export interface ProtocolSystemMessageAppendConfig {
15498
+ mode?: ProtocolAppendMode;
15499
+ /**
15500
+ * Text appended to the standard system prompt.
15501
+ */
15502
+ content?: string;
15503
+ }
15504
+ /** @experimental */
15505
+ export interface ProtocolSystemMessageReplaceConfig {
15506
+ mode: ProtocolReplaceMode;
15507
+ /**
15508
+ * Complete replacement system-message text.
15509
+ */
15510
+ content: string;
15511
+ /**
15512
+ * Optional structured blocks corresponding to the replacement content.
15513
+ */
15514
+ contentBlocks?: SystemMessageBlock[];
15515
+ }
15516
+ /** @experimental */
15517
+ export interface SystemMessageBlock {
15518
+ /**
15519
+ * Text content for this system-message block.
15520
+ */
15521
+ content: string;
15522
+ /**
15523
+ * Whether the block is static and may be cached independently of dynamic prompt content.
15524
+ */
15525
+ isStatic?: boolean;
15526
+ }
15527
+ /** @experimental */
15528
+ export interface ProtocolSystemMessageCustomizeConfig {
15529
+ mode: ProtocolCustomizeMode;
15530
+ /**
15531
+ * Named standard-prompt section overrides.
15532
+ */
15533
+ sections?: {
15534
+ [k: string]: ProtocolSectionOverride;
15535
+ };
15536
+ /**
15537
+ * Text appended after the customized sections.
15538
+ */
15539
+ content?: string;
15540
+ }
15349
15541
  /**
15350
15542
  * BYOK providers and/or models to add to the session's registry at runtime. Both fields are optional; provide providers, models, or both.
15351
15543
  *
@@ -15404,6 +15596,7 @@ export interface ProviderModelConfig {
15404
15596
  */
15405
15597
  maxOutputTokens?: number;
15406
15598
  capabilities?: ModelCapabilitiesOverride;
15599
+ systemMessage?: ProtocolSystemMessageConfig;
15407
15600
  }
15408
15601
  /**
15409
15602
  * The selectable model entries synthesized for the models added by this call.
@@ -16474,15 +16667,6 @@ export interface RegisterEventInterestResult {
16474
16667
  */
16475
16668
  handle: string;
16476
16669
  }
16477
- /**
16478
- * Optional registration options.
16479
- *
16480
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
16481
- * via the `definition` "SessionsRegisterExtensionToolsOnSessionOptions".
16482
- */
16483
- /** @experimental */
16484
- export interface SessionsRegisterExtensionToolsOnSessionOptions {
16485
- }
16486
16670
  /**
16487
16671
  * Opaque handle previously returned by `registerInterest` to release.
16488
16672
  *
@@ -16904,6 +17088,14 @@ export interface SandboxConfigUserPolicyFilesystem {
16904
17088
  */
16905
17089
  /** @experimental */
16906
17090
  export interface SandboxConfigUserPolicyNetwork {
17091
+ /**
17092
+ * Hosts allowed through the built-in sandbox proxy. A non-empty list denies unmatched hosts; an absent or empty list allows all hosts not blocked. Supports exact hostnames, IP addresses, and *.example.com for strict subdomains. Host rules do not override the outbound or local-network toggles.
17093
+ */
17094
+ allowedHosts?: string[];
17095
+ /**
17096
+ * Hosts denied by the built-in sandbox proxy. Deny rules take precedence over allowedHosts. A domain also denies all its subdomains. IP addresses match exactly; *.example.com matches strict subdomains, and * denies every host.
17097
+ */
17098
+ blockedHosts?: string[];
16907
17099
  /**
16908
17100
  * Whether outbound network traffic is allowed at all.
16909
17101
  */
@@ -17342,7 +17534,7 @@ export interface SendMessageItem {
17342
17534
  /** @experimental */
17343
17535
  export interface SendMessagesRequest {
17344
17536
  /**
17345
- * 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.
17537
+ * The user messages to append to the conversation, in order, before running one agent loop. When the batch starts a run, its final message is the primary initiating message; earlier messages provide context, not separate runs or replies. May be empty, in which case a single turn runs over the existing history with no new user message or originatingMessageId.
17346
17538
  */
17347
17539
  messages: SendMessageItem[];
17348
17540
  mode?: SendMode;
@@ -17357,6 +17549,7 @@ export interface SendMessagesRequest {
17357
17549
  requestHeaders?: {
17358
17550
  [k: string]: string | undefined;
17359
17551
  };
17552
+ responseFormat?: ResponseFormat;
17360
17553
  /**
17361
17554
  * W3C Trace Context traceparent header for distributed tracing of this agent turn
17362
17555
  */
@@ -17379,7 +17572,7 @@ export interface SendMessagesRequest {
17379
17572
  /** @experimental */
17380
17573
  export interface SendMessagesResult {
17381
17574
  /**
17382
- * Unique identifiers assigned to the messages, one per provided message in order. Empty when no messages were provided.
17575
+ * Unique identifiers assigned to the messages, one per provided message in order. For a batch that starts a run, assistant messages use the final ID as originatingMessageId throughout that run, including tool iterations and stop-hook corrections. Immediate steering does not replace the active run's origin. Empty when no messages were provided; that run has no originatingMessageId.
17383
17576
  */
17384
17577
  messageIds: string[];
17385
17578
  }
@@ -17423,6 +17616,7 @@ export interface SendRequest {
17423
17616
  requestHeaders?: {
17424
17617
  [k: string]: string | undefined;
17425
17618
  };
17619
+ responseFormat?: ResponseFormat;
17426
17620
  /**
17427
17621
  * W3C Trace Context traceparent header for distributed tracing of this agent turn
17428
17622
  */
@@ -18591,7 +18785,7 @@ export interface SessionOpenOptions {
18591
18785
  */
18592
18786
  integrationId?: string;
18593
18787
  /**
18594
- * Opt-in: self-fetch and enforce enterprise managed settings at session bootstrap.
18788
+ * Opt-in: self-fetch and enforce enterprise managed settings, including managed hook policies, at session bootstrap.
18595
18789
  */
18596
18790
  enableManagedSettings?: boolean;
18597
18791
  managedSettings?: SessionManagedSettings;
@@ -18693,6 +18887,14 @@ export interface SessionOpenOptions {
18693
18887
  * MCP server names disabled for this session. Disabled servers are not started or authenticated on create or cold resume.
18694
18888
  */
18695
18889
  disabledMcpServers?: string[];
18890
+ /**
18891
+ * Non-secret host-managed HTTP MCP servers keyed by stable managed identity. Managed provenance is runtime-established from this separate field and credentials are supplied through dynamic-header refresh.
18892
+ *
18893
+ * @experimental
18894
+ */
18895
+ managedMcpServers?: {
18896
+ [k: string]: ManagedMcpServerConfig;
18897
+ };
18696
18898
  /**
18697
18899
  * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
18698
18900
  */
@@ -20387,6 +20589,10 @@ export interface ShutdownRequest {
20387
20589
  * Optional human-readable reason. Typically the message of the error that triggered shutdown when type is 'error'.
20388
20590
  */
20389
20591
  reason?: string;
20592
+ /**
20593
+ * Dispatch deferred sessionEnd hooks in the background with their full per-hook timeoutSec instead of awaiting them under the short shared shutdown budget. Set this when the host process keeps running after the session closes (for example the CLI's /clear), so a slow hook neither blocks the close nor is aborted. Hooks still detached when the process later exits are terminated with it. Defaults to false.
20594
+ */
20595
+ detachSessionEndHooks?: boolean;
20390
20596
  }
20391
20597
  /**
20392
20598
  * Skill metadata available to a session, with name, description, source, enabled/invocable state, path, plugin, and argument hint.
@@ -20776,6 +20982,7 @@ export interface SlashCommandTextResult {
20776
20982
  * True when the invocation mutated user runtime settings; consumers caching settings should refresh
20777
20983
  */
20778
20984
  runtimeSettingsChanged?: boolean;
20985
+ sandboxSessionChange?: SandboxSessionChange;
20779
20986
  }
20780
20987
  /**
20781
20988
  * Slash-command invocation result asking the client to present subcommand options for a parent command.
@@ -23042,6 +23249,23 @@ export interface WorkspacesCheckpoints {
23042
23249
  */
23043
23250
  filename: string;
23044
23251
  }
23252
+ /**
23253
+ * Directory to create within the session workspace files directory.
23254
+ *
23255
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
23256
+ * via the `definition` "WorkspacesCreateDirectoryRequest".
23257
+ */
23258
+ /** @experimental */
23259
+ export interface WorkspacesCreateDirectoryRequest {
23260
+ /**
23261
+ * Slash-separated relative path within the workspace files directory
23262
+ */
23263
+ path: string;
23264
+ /**
23265
+ * Whether to create missing parent directories. Defaults to false.
23266
+ */
23267
+ recursive?: boolean;
23268
+ }
23045
23269
  /**
23046
23270
  * Relative path and UTF-8 content for the workspace file to create or overwrite.
23047
23271
  *
@@ -23051,7 +23275,7 @@ export interface WorkspacesCheckpoints {
23051
23275
  /** @experimental */
23052
23276
  export interface WorkspacesCreateFileRequest {
23053
23277
  /**
23054
- * Relative path within the workspace files directory
23278
+ * Slash-separated relative path within the workspace files directory
23055
23279
  */
23056
23280
  path: string;
23057
23281
  /**
@@ -23204,7 +23428,7 @@ export interface WorkspacesListCheckpointsResult {
23204
23428
  /** @experimental */
23205
23429
  export interface WorkspacesListFilesResult {
23206
23430
  /**
23207
- * Relative file paths in the workspace files directory
23431
+ * Slash-separated relative file paths in the workspace files directory
23208
23432
  */
23209
23433
  files: string[];
23210
23434
  }
@@ -23256,7 +23480,7 @@ export interface WorkspacesReadCheckpointResult {
23256
23480
  /** @experimental */
23257
23481
  export interface WorkspacesReadFileRequest {
23258
23482
  /**
23259
- * Relative path within the workspace files directory
23483
+ * Slash-separated relative path within the workspace files directory
23260
23484
  */
23261
23485
  path: string;
23262
23486
  }
@@ -23273,6 +23497,44 @@ export interface WorkspacesReadFileResult {
23273
23497
  */
23274
23498
  content: string;
23275
23499
  }
23500
+ /**
23501
+ * File or directory to remove from the session workspace files directory.
23502
+ *
23503
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
23504
+ * via the `definition` "WorkspacesRemovePathRequest".
23505
+ */
23506
+ /** @experimental */
23507
+ export interface WorkspacesRemovePathRequest {
23508
+ /**
23509
+ * Slash-separated relative path within the workspace files directory
23510
+ */
23511
+ path: string;
23512
+ /**
23513
+ * Whether to remove directory contents recursively. Defaults to false.
23514
+ */
23515
+ recursive?: boolean;
23516
+ /**
23517
+ * Whether a missing path should be treated as success. Defaults to false.
23518
+ */
23519
+ force?: boolean;
23520
+ }
23521
+ /**
23522
+ * Source and destination paths for a rename within the session workspace files directory.
23523
+ *
23524
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
23525
+ * via the `definition` "WorkspacesRenamePathRequest".
23526
+ */
23527
+ /** @experimental */
23528
+ export interface WorkspacesRenamePathRequest {
23529
+ /**
23530
+ * Slash-separated source path relative to the workspace files directory
23531
+ */
23532
+ source: string;
23533
+ /**
23534
+ * Slash-separated destination path relative to the workspace files directory
23535
+ */
23536
+ destination: string;
23537
+ }
23276
23538
  /**
23277
23539
  * Pasted content to save as a UTF-8 file in the session workspace.
23278
23540
  *
@@ -23312,6 +23574,48 @@ export interface WorkspacesSaveLargePasteResult {
23312
23574
  sizeBytes: number;
23313
23575
  } | null;
23314
23576
  }
23577
+ /**
23578
+ * Relative path of the workspace file or directory to inspect.
23579
+ *
23580
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
23581
+ * via the `definition` "WorkspacesStatFileRequest".
23582
+ */
23583
+ /** @experimental */
23584
+ export interface WorkspacesStatFileRequest {
23585
+ /**
23586
+ * Slash-separated relative path within the workspace files directory
23587
+ */
23588
+ path: string;
23589
+ }
23590
+ /**
23591
+ * Filesystem metadata for a path in the session workspace files directory.
23592
+ *
23593
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
23594
+ * via the `definition` "WorkspacesStatFileResult".
23595
+ */
23596
+ /** @experimental */
23597
+ export interface WorkspacesStatFileResult {
23598
+ /**
23599
+ * Whether the path identifies a regular file
23600
+ */
23601
+ isFile: boolean;
23602
+ /**
23603
+ * Whether the path identifies a directory
23604
+ */
23605
+ isDirectory: boolean;
23606
+ /**
23607
+ * Size in bytes
23608
+ */
23609
+ size: number;
23610
+ /**
23611
+ * Last modification time in Unix epoch milliseconds
23612
+ */
23613
+ mtimeMs: number;
23614
+ /**
23615
+ * Creation time in Unix epoch milliseconds
23616
+ */
23617
+ birthtimeMs: number;
23618
+ }
23315
23619
  /**
23316
23620
  * Rollback point for local workspace summaries.
23317
23621
  *
@@ -24269,11 +24573,11 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
24269
24573
  /** @experimental */
24270
24574
  debug: {
24271
24575
  /**
24272
- * Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
24576
+ * Collects a session debug log bundle into a local archive or staging directory. Logs are redacted by default; redaction can be configured per caller-provided diagnostic entry. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
24273
24577
  *
24274
- * @param params Options for collecting a redacted session debug bundle.
24578
+ * @param params Options for collecting a session debug bundle with configurable redaction.
24275
24579
  *
24276
- * @returns Result of collecting a redacted debug bundle.
24580
+ * @returns Result of collecting a session debug bundle.
24277
24581
  */
24278
24582
  collectLogs: (params: DebugCollectLogsRequest) => Promise<DebugCollectLogsResult>;
24279
24583
  };
@@ -24583,6 +24887,32 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
24583
24887
  * @param params Relative path and UTF-8 content for the workspace file to create or overwrite.
24584
24888
  */
24585
24889
  createFile: (params: WorkspacesCreateFileRequest) => Promise<void>;
24890
+ /**
24891
+ * Returns metadata for a file or directory in the session workspace files directory.
24892
+ *
24893
+ * @param params Relative path of the workspace file or directory to inspect.
24894
+ *
24895
+ * @returns Filesystem metadata for a path in the session workspace files directory.
24896
+ */
24897
+ statFile: (params: WorkspacesStatFileRequest) => Promise<WorkspacesStatFileResult>;
24898
+ /**
24899
+ * Creates a directory in the session workspace files directory.
24900
+ *
24901
+ * @param params Directory to create within the session workspace files directory.
24902
+ */
24903
+ createDirectory: (params: WorkspacesCreateDirectoryRequest) => Promise<void>;
24904
+ /**
24905
+ * Removes a file or directory from the session workspace files directory.
24906
+ *
24907
+ * @param params File or directory to remove from the session workspace files directory.
24908
+ */
24909
+ removePath: (params: WorkspacesRemovePathRequest) => Promise<void>;
24910
+ /**
24911
+ * Renames a file or directory within the session workspace files directory.
24912
+ *
24913
+ * @param params Source and destination paths for a rename within the session workspace files directory.
24914
+ */
24915
+ renamePath: (params: WorkspacesRenamePathRequest) => Promise<void>;
24586
24916
  /**
24587
24917
  * Lists workspace checkpoints in chronological order.
24588
24918
  *
@@ -732,15 +732,7 @@ function createInternalServerRpc(connection) {
732
732
  */
733
733
  getBoardEntryCount: async (params) => connection.sendRequest("sessions.getBoardEntryCount", params),
734
734
  /**
735
- * Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself.
736
- *
737
- * @param params Params to attach an extension loader's tools to a session.
738
- *
739
- * @returns Handle for releasing the extension tool registration.
740
- */
741
- registerExtensionToolsOnSession: async (params) => connection.sendRequest("sessions.registerExtensionToolsOnSession", params),
742
- /**
743
- * Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime.
735
+ * Attaches (or detaches) an in-process ExtensionController delegate for the given session in a local host adapter. Pass `controller: undefined` to detach. Internal because the controller cannot cross the JSON-RPC boundary; the runtime manages its own session extension service.
744
736
  *
745
737
  * @param params Params to attach or detach an in-process ExtensionController delegate.
746
738
  */
@@ -849,11 +841,11 @@ function createSessionRpc(connection, sessionId) {
849
841
  /** @experimental */
850
842
  debug: {
851
843
  /**
852
- * Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
844
+ * Collects a session debug log bundle into a local archive or staging directory. Logs are redacted by default; redaction can be configured per caller-provided diagnostic entry. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
853
845
  *
854
- * @param params Options for collecting a redacted session debug bundle.
846
+ * @param params Options for collecting a session debug bundle with configurable redaction.
855
847
  *
856
- * @returns Result of collecting a redacted debug bundle.
848
+ * @returns Result of collecting a session debug bundle.
857
849
  */
858
850
  collectLogs: async (params) => connection.sendRequest("session.debug.collectLogs", { sessionId, ...params })
859
851
  },
@@ -1163,6 +1155,32 @@ function createSessionRpc(connection, sessionId) {
1163
1155
  * @param params Relative path and UTF-8 content for the workspace file to create or overwrite.
1164
1156
  */
1165
1157
  createFile: async (params) => connection.sendRequest("session.workspaces.createFile", { sessionId, ...params }),
1158
+ /**
1159
+ * Returns metadata for a file or directory in the session workspace files directory.
1160
+ *
1161
+ * @param params Relative path of the workspace file or directory to inspect.
1162
+ *
1163
+ * @returns Filesystem metadata for a path in the session workspace files directory.
1164
+ */
1165
+ statFile: async (params) => connection.sendRequest("session.workspaces.statFile", { sessionId, ...params }),
1166
+ /**
1167
+ * Creates a directory in the session workspace files directory.
1168
+ *
1169
+ * @param params Directory to create within the session workspace files directory.
1170
+ */
1171
+ createDirectory: async (params) => connection.sendRequest("session.workspaces.createDirectory", { sessionId, ...params }),
1172
+ /**
1173
+ * Removes a file or directory from the session workspace files directory.
1174
+ *
1175
+ * @param params File or directory to remove from the session workspace files directory.
1176
+ */
1177
+ removePath: async (params) => connection.sendRequest("session.workspaces.removePath", { sessionId, ...params }),
1178
+ /**
1179
+ * Renames a file or directory within the session workspace files directory.
1180
+ *
1181
+ * @param params Source and destination paths for a rename within the session workspace files directory.
1182
+ */
1183
+ renamePath: async (params) => connection.sendRequest("session.workspaces.renamePath", { sessionId, ...params }),
1166
1184
  /**
1167
1185
  * Lists workspace checkpoints in chronological order.
1168
1186
  *
@@ -9,7 +9,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
9
9
  /**
10
10
  * Union of all session event variants emitted by the Copilot CLI runtime.
11
11
  */
12
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
12
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
14
  * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference.
15
15
  */
@@ -482,6 +482,20 @@ export type AbortReason =
482
482
  | "user_abort"
483
483
  /** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
484
484
  | "autopilot_credit_limit";
485
+ /**
486
+ * Configuration source: user, workspace, plugin, builtin, or managed
487
+ */
488
+ export type McpServerSource =
489
+ /** Server configured in the user's global MCP configuration. */
490
+ "user"
491
+ /** Server configured by the current workspace. */
492
+ | "workspace"
493
+ /** Server contributed by an installed plugin. */
494
+ | "plugin"
495
+ /** Server bundled with the runtime. */
496
+ | "builtin"
497
+ /** Server supplied by a trusted host-managed catalog. */
498
+ | "managed";
485
499
  /**
486
500
  * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
487
501
  */
@@ -565,18 +579,6 @@ export type SkillInvokedTrigger =
565
579
  | "agent-invoked"
566
580
  /** Skill content loaded as part of another context, such as a configured custom agent or subagent. */
567
581
  | "context-load";
568
- /**
569
- * Where the model input for a task-tool sub-agent came from.
570
- */
571
- export type SubagentTaskModelSource =
572
- /** The spawning agent supplied the task tool's model argument. */
573
- "task_argument"
574
- /** The task omitted a model and the per-sub-agent settings entry supplied a concrete one. */
575
- | "subagent_configuration"
576
- /** The task omitted a model and the user-defined custom agent's definition supplied one. */
577
- | "custom_agent_definition"
578
- /** Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. */
579
- | "unset";
580
582
  /**
581
583
  * Authority or runtime mechanism responsible for sub-agent model selection.
582
584
  */
@@ -595,6 +597,18 @@ export type SubagentModelSelectionSource =
595
597
  | "agent_definition_default"
596
598
  /** Runtime policy, Auto mode, or an experiment selected the model. */
597
599
  | "runtime_policy";
600
+ /**
601
+ * Where the model input for a task-tool sub-agent came from.
602
+ */
603
+ export type SubagentTaskModelSource =
604
+ /** The spawning agent supplied the task tool's model argument. */
605
+ "task_argument"
606
+ /** The task omitted a model and the per-sub-agent settings entry supplied a concrete one. */
607
+ | "subagent_configuration"
608
+ /** The task omitted a model and the user-defined custom agent's definition supplied one. */
609
+ | "custom_agent_definition"
610
+ /** Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. */
611
+ | "unset";
598
612
  /**
599
613
  * Binary asset type discriminator. Use "image" for images and "resource" otherwise.
600
614
  */
@@ -831,6 +845,8 @@ export type McpHeadersRefreshCompletedOutcome =
831
845
  "headers"
832
846
  /** The host responded with no dynamic headers. */
833
847
  | "none"
848
+ /** The host credential broker rejected or failed the refresh. */
849
+ | "error"
834
850
  /** No response arrived within the bounded window. */
835
851
  | "timeout";
836
852
  /**
@@ -976,18 +992,6 @@ export type AgentModelPolicy =
976
992
  "preferred"
977
993
  /** Require subagent execution to use one of the authored models. */
978
994
  | "required";
979
- /**
980
- * Configuration source: user, workspace, plugin, or builtin
981
- */
982
- export type McpServerSource =
983
- /** Server configured in the user's global MCP configuration. */
984
- "user"
985
- /** Server configured by the current workspace. */
986
- | "workspace"
987
- /** Server contributed by an installed plugin. */
988
- | "plugin"
989
- /** Server bundled with the runtime. */
990
- | "builtin";
991
995
  /**
992
996
  * Connection status: connected, failed, needs-auth, pending, disabled, stopped, or not_configured
993
997
  */
@@ -4745,6 +4749,10 @@ export interface AssistantMessageData {
4745
4749
  * Model that produced this assistant message, if known
4746
4750
  */
4747
4751
  model?: string;
4752
+ /**
4753
+ * Logical ID of the primary user message that initiated this run, matching the messageId returned by session.send (or the last messageId of session.sendMessages). Stable across model/tool iterations, steering messages, and stop-hook corrections. Subagent runs use their own initiating message ID, not the parent's. Absent for runs without an associated initiating message, such as empty batches.
4754
+ */
4755
+ originatingMessageId?: string;
4748
4756
  /**
4749
4757
  * Actual output token count from the API response (completion_tokens), used for accurate token accounting
4750
4758
  */
@@ -5764,6 +5772,11 @@ export interface ToolExecutionStartData {
5764
5772
  * @experimental
5765
5773
  */
5766
5774
  fusion?: FusionAttribution;
5775
+ /**
5776
+ * Preferred lookup name for the MCP server hosting this tool: the configured (namespaced) config-map key when the tool carries one, otherwise the display name from `mcpServerName`. Present when the tool is an MCP tool; this is the name unrestricted provenance telemetry hashes so it joins with `mcp_server_setup`, which keys off the configured name too.
5777
+ */
5778
+ mcpConfigServerName?: string;
5779
+ mcpConfigSource?: McpServerSource;
5767
5780
  /**
5768
5781
  * Name of the MCP server hosting this tool, when the tool is an MCP tool
5769
5782
  */
@@ -6012,6 +6025,12 @@ export interface ToolExecutionCompleteData {
6012
6025
  * Whether this tool execution ran inside a sandbox container
6013
6026
  */
6014
6027
  sandboxed?: boolean;
6028
+ /**
6029
+ * Experimental shell completion facts captured before the persisted result contents are stripped.
6030
+ *
6031
+ * @experimental
6032
+ */
6033
+ shellExecution?: ToolExecutionCompleteShellExecution;
6015
6034
  /**
6016
6035
  * Whether the tool execution completed successfully
6017
6036
  */
@@ -6071,7 +6090,7 @@ export interface ToolExecutionCompleteResult {
6071
6090
  */
6072
6091
  contents?: ToolExecutionCompleteContent[];
6073
6092
  /**
6074
- * Full detailed tool result for UI/timeline display, preserving complete content such as diffs. Falls back to content when absent.
6093
+ * Detailed tool result for UI/timeline display, preserving complete content such as diffs for most tools. Successful skill invocations intentionally use the concise model-facing content here; the authoritative skill body is carried by the corresponding skill invocation event. Falls back to content when absent.
6075
6094
  */
6076
6095
  detailedContent?: string;
6077
6096
  /**
@@ -6485,6 +6504,16 @@ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {
6485
6504
  */
6486
6505
  export interface ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {
6487
6506
  }
6507
+ /**
6508
+ * Experimental shell completion facts retained independently of the full tool result.
6509
+ */
6510
+ /** @experimental */
6511
+ export interface ToolExecutionCompleteShellExecution {
6512
+ /**
6513
+ * Process exit code reported by the shell driver.
6514
+ */
6515
+ exitCode: number;
6516
+ }
6488
6517
  /**
6489
6518
  * Tool definition metadata, present for MCP tools with MCP Apps support
6490
6519
  */
@@ -6699,6 +6728,7 @@ export interface SubagentStartedData {
6699
6728
  * Model the sub-agent will run with, when known at start.
6700
6729
  */
6701
6730
  model?: string;
6731
+ modelSelectionSource?: SubagentModelSelectionSource;
6702
6732
  /**
6703
6733
  * Task-registry ID of the spawning sub-agent. Absent when the root session spawned this child.
6704
6734
  */
@@ -7073,7 +7103,7 @@ export interface HookStartData {
7073
7103
  */
7074
7104
  hookType: string;
7075
7105
  /**
7076
- * Input data passed to the hook. For postToolUse hooks the retained copy served by session.eventLog.read (and by a resumed session) elides the tool result's inline `contents`/`uiResource` and replaces an over-long `textResultForLlm` with a `[copilot:elided ...]` marker, to keep a multi-megabyte payload out of the durable event log; the live subscription stream still delivers the full value. Read the adjacent tool.execution_complete event for the tool result itself.
7106
+ * Input data passed to the hook. For postToolUse hooks the retained copy served by session.eventLog.read (and by a resumed session) drops the tool result's inline `contents`/`uiResource`/`skillInvocation` and replaces duplicated text result fields with a `[copilot:elided ...]` marker; the live subscription stream still delivers the full value. Canonical tool output remains in the adjacent tool.execution_complete event, while an invoked skill's authoritative body remains in its skill invocation event.
7077
7107
  */
7078
7108
  input?: JsonValue;
7079
7109
  /**
@@ -7125,7 +7155,7 @@ export interface HookEndData {
7125
7155
  */
7126
7156
  hookType: string;
7127
7157
  /**
7128
- * Output data produced by the hook
7158
+ * Output data produced by the hook. Durable and resumed postToolUse receipts may omit messages owned by a successful skill invocation and replace an unchanged skill sessionLog copy with an elision marker; hook-modified or re-sourced values are preserved, and the authoritative body remains in the skill invocation event.
7129
7159
  */
7130
7160
  output?: JsonValue;
7131
7161
  /**
@@ -9139,7 +9169,7 @@ export interface PermissionMessageAuthorizationData {
9139
9169
  world?: JsonValue;
9140
9170
  }
9141
9171
  /**
9142
- * Session event "permission.messageAuthorizationRead". Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Persisted purely to avoid wasted model calls across resume; it is never a correctness mechanism.
9172
+ * Session event "permission.messageAuthorizationRead". Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
9143
9173
  */
9144
9174
  /** @experimental */
9145
9175
  export interface PermissionMessageAuthorizationReadEvent {
@@ -9170,10 +9200,16 @@ export interface PermissionMessageAuthorizationReadEvent {
9170
9200
  type: "permission.messageAuthorizationRead";
9171
9201
  }
9172
9202
  /**
9173
- * Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Persisted purely to avoid wasted model calls across resume; it is never a correctness mechanism.
9203
+ * Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
9174
9204
  */
9175
9205
  /** @experimental */
9176
9206
  export interface PermissionMessageAuthorizationReadData {
9207
+ /**
9208
+ * Whether this read activates ongoing message-backed extraction. False for a contextual-assent-only pass while auto-approval is off, so unrelated future messages remain outside extraction.
9209
+ *
9210
+ * @experimental
9211
+ */
9212
+ activatesExtraction?: boolean;
9177
9213
  /**
9178
9214
  * The human turn that was read by the proposer.
9179
9215
  *
@@ -9224,6 +9260,128 @@ export interface PermissionMessageAuthorizationDegradedData {
9224
9260
  */
9225
9261
  turnIndex: number;
9226
9262
  }
9263
+ /**
9264
+ * Session event "permission.assentDetected". Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
9265
+ */
9266
+ /** @experimental */
9267
+ export interface PermissionAssentDetectedEvent {
9268
+ /**
9269
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
9270
+ */
9271
+ agentId?: string;
9272
+ data: PermissionAssentDetectedData;
9273
+ /**
9274
+ * When true, the event is transient and not persisted to the session event log on disk
9275
+ */
9276
+ ephemeral?: boolean;
9277
+ /**
9278
+ * Unique event identifier (UUID v4), generated when the event is emitted
9279
+ */
9280
+ id: string;
9281
+ /**
9282
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9283
+ */
9284
+ parentId: string | null;
9285
+ /**
9286
+ * ISO 8601 timestamp when the event was created
9287
+ */
9288
+ timestamp: string;
9289
+ /**
9290
+ * Type discriminator. Always "permission.assentDetected".
9291
+ */
9292
+ type: "permission.assentDetected";
9293
+ }
9294
+ /**
9295
+ * Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
9296
+ */
9297
+ /** @experimental */
9298
+ export interface PermissionAssentDetectedData {
9299
+ /**
9300
+ * Permission request the likely assent may refer to. The runtime derives this from the preceding durable blocker; the human message and extraction model do not choose it.
9301
+ *
9302
+ * @experimental
9303
+ */
9304
+ requestId: string;
9305
+ /**
9306
+ * Human turn whose text triggered the deterministic assent recognizer.
9307
+ *
9308
+ * @experimental
9309
+ */
9310
+ turnIndex: number;
9311
+ }
9312
+ /**
9313
+ * Session event "permission.contextualAuthorization". Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
9314
+ */
9315
+ /** @experimental */
9316
+ export interface PermissionContextualAuthorizationEvent {
9317
+ /**
9318
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
9319
+ */
9320
+ agentId?: string;
9321
+ data: PermissionContextualAuthorizationData;
9322
+ /**
9323
+ * When true, the event is transient and not persisted to the session event log on disk
9324
+ */
9325
+ ephemeral?: boolean;
9326
+ /**
9327
+ * Unique event identifier (UUID v4), generated when the event is emitted
9328
+ */
9329
+ id: string;
9330
+ /**
9331
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9332
+ */
9333
+ parentId: string | null;
9334
+ /**
9335
+ * ISO 8601 timestamp when the event was created
9336
+ */
9337
+ timestamp: string;
9338
+ /**
9339
+ * Type discriminator. Always "permission.contextualAuthorization".
9340
+ */
9341
+ type: "permission.contextualAuthorization";
9342
+ }
9343
+ /**
9344
+ * Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
9345
+ */
9346
+ /** @experimental */
9347
+ export interface PermissionContextualAuthorizationData {
9348
+ /**
9349
+ * Whether the contextual human span granted or denied authority.
9350
+ *
9351
+ * @experimental
9352
+ */
9353
+ polarity: PermissionMessageAuthorizationPolarity;
9354
+ /**
9355
+ * Deterministic identity of the contextual message grant.
9356
+ *
9357
+ * @experimental
9358
+ */
9359
+ recordId: string;
9360
+ /**
9361
+ * Original blocked permission request selected by deterministic event ordering, never by the extraction model.
9362
+ *
9363
+ * @experimental
9364
+ */
9365
+ requestId: string;
9366
+ /**
9367
+ * End byte offset of the contextual decision span within the turn.
9368
+ *
9369
+ * @experimental
9370
+ */
9371
+ spanEnd: number;
9372
+ /**
9373
+ * Start byte offset of the contextual decision span within the turn.
9374
+ *
9375
+ * @experimental
9376
+ */
9377
+ spanStart: number;
9378
+ /**
9379
+ * Human turn containing the contextual decision.
9380
+ *
9381
+ * @experimental
9382
+ */
9383
+ turnIndex: number;
9384
+ }
9227
9385
  /**
9228
9386
  * Session event "user_input.requested". User input request notification with question and optional predefined choices
9229
9387
  */
@@ -11198,6 +11356,10 @@ export interface McpServersLoadedData {
11198
11356
  * A single MCP server status summary in `session.mcp_servers_loaded`, including name, status, source, transport, and plugin metadata.
11199
11357
  */
11200
11358
  export interface McpServersLoadedServer {
11359
+ /**
11360
+ * Human-readable display name supplied by a managed server catalog.
11361
+ */
11362
+ displayName?: string;
11201
11363
  /**
11202
11364
  * Error message if the server failed to connect
11203
11365
  */
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/github/copilot-sdk.git"
6
6
  },
7
- "version": "1.0.14-preview.1",
8
- "copilotCliVersion": "1.0.84-5",
7
+ "version": "1.0.14",
8
+ "copilotCliVersion": "1.0.85",
9
9
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
10
10
  "main": "./dist/cjs/index.js",
11
11
  "types": "./dist/index.d.ts",
@@ -36,8 +36,10 @@
36
36
  "auth:refresh": "node ../scripts/npm-auth-refresh.mjs --run",
37
37
  "clean": "rimraf --glob dist *.tgz",
38
38
  "build": "tsx esbuild-copilotsdk-nodejs.ts",
39
+ "acquire:runtime-packages": "tsx scripts/runtime-package-acquisition.ts",
39
40
  "pack:release": "tsx scripts/package-sdk.ts",
40
41
  "verify:release-packages": "tsx scripts/verify-release-packages.ts",
42
+ "release:manifest": "tsx scripts/release-manifest.ts",
41
43
  "prepare:runtime": "tsx scripts/prepare-runtime.ts",
42
44
  "test": "vitest run",
43
45
  "test:watch": "vitest",
@@ -96,13 +98,13 @@
96
98
  "README.md"
97
99
  ],
98
100
  "optionalDependencies": {
99
- "@github/copilot-sdk-darwin-arm64": "1.0.14-preview.1",
100
- "@github/copilot-sdk-darwin-x64": "1.0.14-preview.1",
101
- "@github/copilot-sdk-linux-arm64": "1.0.14-preview.1",
102
- "@github/copilot-sdk-linux-x64": "1.0.14-preview.1",
103
- "@github/copilot-sdk-linuxmusl-arm64": "1.0.14-preview.1",
104
- "@github/copilot-sdk-linuxmusl-x64": "1.0.14-preview.1",
105
- "@github/copilot-sdk-win32-arm64": "1.0.14-preview.1",
106
- "@github/copilot-sdk-win32-x64": "1.0.14-preview.1"
101
+ "@github/copilot-sdk-darwin-arm64": "1.0.14",
102
+ "@github/copilot-sdk-darwin-x64": "1.0.14",
103
+ "@github/copilot-sdk-linux-arm64": "1.0.14",
104
+ "@github/copilot-sdk-linux-x64": "1.0.14",
105
+ "@github/copilot-sdk-linuxmusl-arm64": "1.0.14",
106
+ "@github/copilot-sdk-linuxmusl-x64": "1.0.14",
107
+ "@github/copilot-sdk-win32-arm64": "1.0.14",
108
+ "@github/copilot-sdk-win32-x64": "1.0.14"
107
109
  }
108
110
  }