@github/copilot-sdk 1.0.13-preview.0 → 1.0.13-preview.1

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.
@@ -988,7 +988,8 @@ class CopilotClient {
988
988
  *
989
989
  * In empty mode, defaults the four overridable feature flags to safe values
990
990
  * (caller values from `config` win). `installedPlugins=[]` is unconditional
991
- * in empty mode — apps that need custom plugins should switch modes.
991
+ * in empty mode. `includedBuiltinSkills` defaults to `[]`, but callers can
992
+ * explicitly allow selected runtime-bundled skills.
992
993
  */
993
994
  async updateSessionOptionsForMode(session, config) {
994
995
  const patch = {};
@@ -998,6 +999,7 @@ class CopilotClient {
998
999
  patch.coauthorEnabled = config.coauthorEnabled ?? false;
999
1000
  patch.manageScheduleEnabled = config.manageScheduleEnabled ?? false;
1000
1001
  patch.installedPlugins = [];
1002
+ patch.includedBuiltinSkills = config.includedBuiltinSkills ?? [];
1001
1003
  } else {
1002
1004
  if (config.skipCustomInstructions !== void 0)
1003
1005
  patch.skipCustomInstructions = config.skipCustomInstructions;
@@ -1007,6 +1009,8 @@ class CopilotClient {
1007
1009
  patch.coauthorEnabled = config.coauthorEnabled;
1008
1010
  if (config.manageScheduleEnabled !== void 0)
1009
1011
  patch.manageScheduleEnabled = config.manageScheduleEnabled;
1012
+ if (config.includedBuiltinSkills !== void 0)
1013
+ patch.includedBuiltinSkills = config.includedBuiltinSkills;
1010
1014
  }
1011
1015
  if (Object.keys(patch).length === 0) {
1012
1016
  return;
@@ -1991,7 +1991,7 @@ function createSessionRpc(connection, sessionId) {
1991
1991
  */
1992
1992
  list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
1993
1993
  /**
1994
- * Adds a directory to the session's allow-list.
1994
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
1995
1995
  *
1996
1996
  * @param params Directory path to add to the session's allowed directories.
1997
1997
  *
@@ -2837,6 +2837,11 @@ function registerClientGlobalApiHandlers(connection, handlers) {
2837
2837
  if (!handler) return;
2838
2838
  await handler.event(params);
2839
2839
  });
2840
+ connection.onRequest("gitHubToken.getToken", async (params) => {
2841
+ const handler = handlers.gitHubToken;
2842
+ if (!handler) throw new Error("No gitHubToken client-global handler registered");
2843
+ return handler.getToken(params);
2844
+ });
2840
2845
  }
2841
2846
  // Annotate the CommonJS export names for ESM import in node:
2842
2847
  0 && (module.exports = {
package/dist/cjs/index.js CHANGED
@@ -27,6 +27,7 @@ __export(index_exports, {
27
27
  CopilotWebSocketCloseStatus: () => import_types2.CopilotWebSocketCloseStatus,
28
28
  CopilotWebSocketForwarder: () => import_types2.CopilotWebSocketForwarder,
29
29
  CopilotWebSocketHandler: () => import_types2.CopilotWebSocketHandler,
30
+ DisableBypassPermissionsModes: () => import_types.DisableBypassPermissionsModes,
30
31
  FactoryResumeError: () => import_factory.FactoryResumeError,
31
32
  RuntimeConnection: () => import_types.RuntimeConnection,
32
33
  SYSTEM_MESSAGE_SECTIONS: () => import_types2.SYSTEM_MESSAGE_SECTIONS,
@@ -60,6 +61,7 @@ var import_types2 = require("./types.js");
60
61
  CopilotWebSocketCloseStatus,
61
62
  CopilotWebSocketForwarder,
62
63
  CopilotWebSocketHandler,
64
+ DisableBypassPermissionsModes,
63
65
  FactoryResumeError,
64
66
  RuntimeConnection,
65
67
  SYSTEM_MESSAGE_SECTIONS,
package/dist/cjs/types.js CHANGED
@@ -22,6 +22,7 @@ __export(types_exports, {
22
22
  CopilotWebSocketCloseStatus: () => import_copilotRequestHandler.CopilotWebSocketCloseStatus,
23
23
  CopilotWebSocketForwarder: () => import_copilotRequestHandler.CopilotWebSocketForwarder,
24
24
  CopilotWebSocketHandler: () => import_copilotRequestHandler.CopilotWebSocketHandler,
25
+ DisableBypassPermissionsModes: () => DisableBypassPermissionsModes,
25
26
  RuntimeConnection: () => RuntimeConnection,
26
27
  SYSTEM_MESSAGE_SECTIONS: () => SYSTEM_MESSAGE_SECTIONS,
27
28
  SessionFsSqliteTransactionFailure: () => import_sessionFsProvider2.SessionFsSqliteTransactionFailure,
@@ -165,12 +166,19 @@ const approveAll = (request, invocation) => {
165
166
  const defaultJoinSessionPermissionHandler = () => ({
166
167
  kind: "no-result"
167
168
  });
169
+ const DisableBypassPermissionsModes = {
170
+ /** Turn off bypass-permissions mode entirely. */
171
+ Disable: "disable",
172
+ /** Permit automatic bypass but block full allow-all. */
173
+ AllowAutoOnly: "allow-auto-only"
174
+ };
168
175
  // Annotate the CommonJS export names for ESM import in node:
169
176
  0 && (module.exports = {
170
177
  CopilotRequestHandler,
171
178
  CopilotWebSocketCloseStatus,
172
179
  CopilotWebSocketForwarder,
173
180
  CopilotWebSocketHandler,
181
+ DisableBypassPermissionsModes,
174
182
  RuntimeConnection,
175
183
  SYSTEM_MESSAGE_SECTIONS,
176
184
  SessionFsSqliteTransactionFailure,
package/dist/client.d.ts CHANGED
@@ -198,7 +198,8 @@ export declare class CopilotClient {
198
198
  *
199
199
  * In empty mode, defaults the four overridable feature flags to safe values
200
200
  * (caller values from `config` win). `installedPlugins=[]` is unconditional
201
- * in empty mode — apps that need custom plugins should switch modes.
201
+ * in empty mode. `includedBuiltinSkills` defaults to `[]`, but callers can
202
+ * explicitly allow selected runtime-bundled skills.
202
203
  */
203
204
  private updateSessionOptionsForMode;
204
205
  createSession(config: SessionConfig): Promise<CopilotSession>;
package/dist/client.js CHANGED
@@ -965,7 +965,8 @@ class CopilotClient {
965
965
  *
966
966
  * In empty mode, defaults the four overridable feature flags to safe values
967
967
  * (caller values from `config` win). `installedPlugins=[]` is unconditional
968
- * in empty mode — apps that need custom plugins should switch modes.
968
+ * in empty mode. `includedBuiltinSkills` defaults to `[]`, but callers can
969
+ * explicitly allow selected runtime-bundled skills.
969
970
  */
970
971
  async updateSessionOptionsForMode(session, config) {
971
972
  const patch = {};
@@ -975,6 +976,7 @@ class CopilotClient {
975
976
  patch.coauthorEnabled = config.coauthorEnabled ?? false;
976
977
  patch.manageScheduleEnabled = config.manageScheduleEnabled ?? false;
977
978
  patch.installedPlugins = [];
979
+ patch.includedBuiltinSkills = config.includedBuiltinSkills ?? [];
978
980
  } else {
979
981
  if (config.skipCustomInstructions !== void 0)
980
982
  patch.skipCustomInstructions = config.skipCustomInstructions;
@@ -984,6 +986,8 @@ class CopilotClient {
984
986
  patch.coauthorEnabled = config.coauthorEnabled;
985
987
  if (config.manageScheduleEnabled !== void 0)
986
988
  patch.manageScheduleEnabled = config.manageScheduleEnabled;
989
+ if (config.includedBuiltinSkills !== void 0)
990
+ patch.includedBuiltinSkills = config.includedBuiltinSkills;
987
991
  }
988
992
  if (Object.keys(patch).length === 0) {
989
993
  return;
@@ -15,7 +15,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
15
15
  * via the `definition` "AuthInfo".
16
16
  */
17
17
  /** @experimental */
18
- export type AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo;
18
+ export type AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | TokenProviderAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo;
19
19
  /**
20
20
  * User to log out
21
21
  *
@@ -241,6 +241,8 @@ export type AuthInfoType =
241
241
  | "api-key"
242
242
  /** Authentication from a GitHub token. */
243
243
  | "token"
244
+ /** Authentication from an SDK GitHub token callback. */
245
+ | "token-provider"
244
246
  /** Authentication from a Copilot API token. */
245
247
  | "copilot-api-token";
246
248
  /**
@@ -796,8 +798,6 @@ export type DebugCollectLogsResultKind =
796
798
  "archive"
797
799
  /** A directory containing redacted files was written. */
798
800
  | "directory";
799
- /** @experimental */
800
- export type DisableBypassPermissionsMode = "disable";
801
801
  /**
802
802
  * Persisted extension discovery source
803
803
  *
@@ -1128,6 +1128,48 @@ export type FactoryPhaseStatus =
1128
1128
  export type FilterMapping = {
1129
1129
  [k: string]: ContentFilterMode;
1130
1130
  } | ContentFilterMode;
1131
+ /**
1132
+ * Why the runtime is requesting a GitHub credential.
1133
+ *
1134
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1135
+ * via the `definition` "GitHubTokenAcquireReason".
1136
+ */
1137
+ /** @experimental */
1138
+ export type GitHubTokenAcquireReason =
1139
+ /** The runtime is acquiring the registration's first credential. */
1140
+ "initial"
1141
+ /** The runtime is replacing a credential that is approaching expiry. */
1142
+ | "refresh";
1143
+ /**
1144
+ * SDK host response to a GitHub credential request.
1145
+ *
1146
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1147
+ * via the `definition` "GitHubTokenAcquireResult".
1148
+ */
1149
+ /** @experimental */
1150
+ export type GitHubTokenAcquireResult = {
1151
+ /**
1152
+ * GitHub access token acquired by the SDK host.
1153
+ */
1154
+ accessToken: string;
1155
+ /**
1156
+ * OAuth token type. Defaults to bearer when omitted.
1157
+ */
1158
+ tokenType?: string;
1159
+ /**
1160
+ * Remaining token lifetime in seconds when callback execution completes. It must exceed the one-hour preflight refresh threshold.
1161
+ */
1162
+ expiresIn: number;
1163
+ /**
1164
+ * GitHub credential response variant discriminator.
1165
+ */
1166
+ kind: "token";
1167
+ } | {
1168
+ /**
1169
+ * GitHub credential response variant discriminator.
1170
+ */
1171
+ kind: "cancelled";
1172
+ };
1131
1173
  /**
1132
1174
  * Optional compaction parameters.
1133
1175
  *
@@ -1736,7 +1778,7 @@ export type McpOauthPendingRequestResponse = {
1736
1778
  */
1737
1779
  accessToken: string;
1738
1780
  /**
1739
- * OAuth token type. Defaults to Bearer when omitted.
1781
+ * OAuth token type. Defaults to bearer when omitted.
1740
1782
  */
1741
1783
  tokenType?: string;
1742
1784
  /**
@@ -3019,6 +3061,14 @@ export type SessionsOpenProgressStatus =
3019
3061
  "in-progress"
3020
3062
  /** The step has completed successfully. */
3021
3063
  | "complete";
3064
+ /**
3065
+ * Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned token-provider identities cannot be installed through this method.
3066
+ *
3067
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3068
+ * via the `definition` "SettableAuthInfo".
3069
+ */
3070
+ /** @experimental */
3071
+ export type SettableAuthInfo = HMACAuthInfo | EnvAuthInfo | SettableTokenAuthInfo | CopilotApiTokenAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo;
3022
3072
  /**
3023
3073
  * Rust-owned settings predicates exposed across the SDK boundary. Raw feature-flag names are intentionally not part of the contract.
3024
3074
  *
@@ -3913,6 +3963,32 @@ export interface TokenAuthInfo {
3913
3963
  * The token value itself. Treat as a secret.
3914
3964
  */
3915
3965
  token: string;
3966
+ /**
3967
+ * Opaque native GitHub credential registration backing this token identity, when applicable.
3968
+ */
3969
+ registrationId?: string;
3970
+ copilotUser?: CopilotUserResponse;
3971
+ }
3972
+ /**
3973
+ * Authentication-info variant backed by an SDK GitHub token callback. It carries routing metadata but never a plaintext token.
3974
+ *
3975
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3976
+ * via the `definition` "TokenProviderAuthInfo".
3977
+ */
3978
+ /** @experimental */
3979
+ export interface TokenProviderAuthInfo {
3980
+ /**
3981
+ * SDK callback-backed GitHub token authentication.
3982
+ */
3983
+ type: "token-provider";
3984
+ /**
3985
+ * Authentication host.
3986
+ */
3987
+ host: string;
3988
+ /**
3989
+ * Opaque SDK callback registration identifier.
3990
+ */
3991
+ registrationId: string;
3916
3992
  copilotUser?: CopilotUserResponse;
3917
3993
  }
3918
3994
  /**
@@ -4556,6 +4632,10 @@ export interface AuthIdentity {
4556
4632
  * Name of the environment variable that supplied the credential, when applicable
4557
4633
  */
4558
4634
  envVar?: string;
4635
+ /**
4636
+ * Opaque SDK GitHub credential registration backing this identity. Routing metadata only; never a credential.
4637
+ */
4638
+ registrationId?: string;
4559
4639
  copilotUser?: CopilotUserResponse;
4560
4640
  }
4561
4641
  /**
@@ -7968,6 +8048,28 @@ export interface GitHubTelemetryNotification {
7968
8048
  restricted: boolean;
7969
8049
  event: GitHubTelemetryEvent;
7970
8050
  }
8051
+ /**
8052
+ * Asks the SDK client to acquire a GitHub access token from an opaque callback registration.
8053
+ *
8054
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8055
+ * via the `definition` "GitHubTokenAcquireRequest".
8056
+ */
8057
+ /** @experimental */
8058
+ export interface GitHubTokenAcquireRequest {
8059
+ /**
8060
+ * Opaque identifier generated by the SDK for this callback registration.
8061
+ */
8062
+ registrationId: string;
8063
+ /**
8064
+ * Effective GitHub host for which the callback must return a token.
8065
+ */
8066
+ host: string;
8067
+ /**
8068
+ * Session receiving the token. Absent only before a cloud session has been assigned its id.
8069
+ */
8070
+ sessionId?: string;
8071
+ reason: GitHubTokenAcquireReason;
8072
+ }
7971
8073
  /**
7972
8074
  * Pending external tool call request ID, with the tool result or an error describing why it failed.
7973
8075
  *
@@ -8368,6 +8470,10 @@ export interface InstalledPlugin {
8368
8470
  * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
8369
8471
  */
8370
8472
  source_sha?: string;
8473
+ /**
8474
+ * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
8475
+ */
8476
+ installed_from?: string;
8371
8477
  }
8372
8478
  /**
8373
8479
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -8472,6 +8578,10 @@ export interface InstalledPluginInfo {
8472
8578
  * Whether the plugin is currently enabled for new sessions
8473
8579
  */
8474
8580
  enabled: boolean;
8581
+ /**
8582
+ * 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".
8583
+ */
8584
+ installedFrom?: string;
8475
8585
  }
8476
8586
  /**
8477
8587
  * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path.
@@ -11315,6 +11425,15 @@ export interface Model {
11315
11425
  supportedContextTiers?: string[];
11316
11426
  modelPickerCategory?: ModelPickerCategory;
11317
11427
  modelPickerPriceCategory?: ModelPickerPriceCategory;
11428
+ warningText?: ModelWarningText;
11429
+ /**
11430
+ * Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model.
11431
+ */
11432
+ infoMessages?: ModelMessage[];
11433
+ /**
11434
+ * Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking.
11435
+ */
11436
+ warningMessages?: ModelMessage[];
11318
11437
  }
11319
11438
  /**
11320
11439
  * Model capabilities and limits
@@ -11537,6 +11656,36 @@ export interface ModelBillingPromo {
11537
11656
  */
11538
11657
  message?: string;
11539
11658
  }
11659
+ /**
11660
+ * Service-published warning text that hosts should display when presenting a model.
11661
+ *
11662
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11663
+ * via the `definition` "ModelWarningText".
11664
+ */
11665
+ /** @experimental */
11666
+ export interface ModelWarningText {
11667
+ /**
11668
+ * Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported.
11669
+ */
11670
+ dataRetention?: string;
11671
+ }
11672
+ /**
11673
+ * A service-published message about a model, carrying a stable machine-readable code alongside human-readable text.
11674
+ *
11675
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11676
+ * via the `definition` "ModelMessage".
11677
+ */
11678
+ /** @experimental */
11679
+ export interface ModelMessage {
11680
+ /**
11681
+ * Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`.
11682
+ */
11683
+ code: string;
11684
+ /**
11685
+ * Human-readable message text intended for display to the user.
11686
+ */
11687
+ message: string;
11688
+ }
11540
11689
  /**
11541
11690
  * Managed, repository, and CLI model overrides to overlay onto the session at startup.
11542
11691
  *
@@ -13045,7 +13194,7 @@ export interface PermissionLocationResolveResult {
13045
13194
  /** @experimental */
13046
13195
  export interface PermissionPathsAddParams {
13047
13196
  /**
13048
- * Directory to add to the allow-list. The runtime resolves and validates the path before adding.
13197
+ * Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there.
13049
13198
  */
13050
13199
  path: string;
13051
13200
  }
@@ -13088,7 +13237,7 @@ export interface PermissionPathsConfig {
13088
13237
  */
13089
13238
  unrestricted?: boolean;
13090
13239
  /**
13091
- * Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion).
13240
+ * Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion).
13092
13241
  */
13093
13242
  additionalDirectories?: string[];
13094
13243
  /**
@@ -15013,6 +15162,10 @@ export interface QueuePendingItemsResult {
15013
15162
  * Display text for messages currently in the immediate steering queue (interjections sent during a running turn).
15014
15163
  */
15015
15164
  steeringMessages: string[];
15165
+ /**
15166
+ * How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two.
15167
+ */
15168
+ inFlightSteeringCount?: number;
15016
15169
  }
15017
15170
  /**
15018
15171
  * Parameters for removing a queued item by stable id.
@@ -15545,7 +15698,7 @@ export interface SandboxConfig {
15545
15698
  addCurrentWorkingDirectory?: boolean;
15546
15699
  auth?: SandboxConfigAuth;
15547
15700
  /**
15548
- * Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out).
15701
+ * Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out).
15549
15702
  */
15550
15703
  allowDevToolAccess?: boolean;
15551
15704
  }
@@ -16849,6 +17002,10 @@ export interface SessionInstalledPlugin {
16849
17002
  * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
16850
17003
  */
16851
17004
  source_sha?: string;
17005
+ /**
17006
+ * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
17007
+ */
17008
+ installed_from?: string;
16852
17009
  }
16853
17010
  /**
16854
17011
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -17052,7 +17209,10 @@ export interface SessionLoadDeferredRepoHooksResult {
17052
17209
  */
17053
17210
  /** @experimental */
17054
17211
  export interface SessionManagedPermissions {
17055
- disableBypassPermissionsMode?: DisableBypassPermissionsMode;
17212
+ /**
17213
+ * When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` blocks full allow-all but permits advisory auto-approval. Any other value is accepted rather than failing the session, but is enforced as `disable`: the key is only present to restrict something, so a mode this runtime cannot interpret fails closed to the most restrictive one it knows. Omit the key entirely to impose no restriction.
17214
+ */
17215
+ disableBypassPermissionsMode?: string;
17056
17216
  /**
17057
17217
  * Permission rules that block matching operations. Deny has highest precedence.
17058
17218
  */
@@ -17257,7 +17417,7 @@ export interface SessionOpenOptions {
17257
17417
  */
17258
17418
  workingDirectory?: string;
17259
17419
  /**
17260
- * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`).
17420
+ * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories.
17261
17421
  */
17262
17422
  additionalDirectories?: string[];
17263
17423
  workingDirectoryContext?: SessionContext;
@@ -17329,6 +17489,10 @@ export interface SessionOpenOptions {
17329
17489
  * Additional directories to search for skills.
17330
17490
  */
17331
17491
  skillDirectories?: string[];
17492
+ /**
17493
+ * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available.
17494
+ */
17495
+ includedBuiltinSkills?: string[];
17332
17496
  /**
17333
17497
  * Skill IDs disabled for this session.
17334
17498
  */
@@ -17870,7 +18034,29 @@ export interface SessionsEnrichMetadataRequest {
17870
18034
  */
17871
18035
  /** @experimental */
17872
18036
  export interface SessionSetCredentialsParams {
17873
- credentials?: AuthInfo;
18037
+ credentials?: SettableAuthInfo;
18038
+ }
18039
+ /**
18040
+ * Token authentication accepted by session.gitHubAuth.setCredentials.
18041
+ *
18042
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
18043
+ * via the `definition` "SettableTokenAuthInfo".
18044
+ */
18045
+ /** @experimental */
18046
+ export interface SettableTokenAuthInfo {
18047
+ /**
18048
+ * SDK-side token authentication; the host configured the token directly via the SDK.
18049
+ */
18050
+ type: "token";
18051
+ /**
18052
+ * Authentication host.
18053
+ */
18054
+ host: string;
18055
+ /**
18056
+ * The token value itself. Treat as a secret.
18057
+ */
18058
+ token: string;
18059
+ copilotUser?: CopilotUserResponse;
17874
18060
  }
17875
18061
  /**
17876
18062
  * Indicates whether the credential update succeeded.
@@ -18693,6 +18879,10 @@ export interface SessionUpdateOptionsParams {
18693
18879
  * Additional directories to search for skills.
18694
18880
  */
18695
18881
  skillDirectories?: string[];
18882
+ /**
18883
+ * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction.
18884
+ */
18885
+ includedBuiltinSkills?: string[] | null;
18696
18886
  /**
18697
18887
  * Skill IDs that should be excluded from this session.
18698
18888
  */
@@ -23646,7 +23836,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23646
23836
  */
23647
23837
  list: () => Promise<PermissionPathsList>;
23648
23838
  /**
23649
- * Adds a directory to the session's allow-list.
23839
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
23650
23840
  *
23651
23841
  * @param params Directory path to add to the session's allowed directories.
23652
23842
  *
@@ -24332,11 +24522,24 @@ export interface GitHubTelemetryHandler {
24332
24522
  */
24333
24523
  event(params: GitHubTelemetryNotification): Promise<void>;
24334
24524
  }
24525
+ /** Handler for `gitHubToken` client global API methods. */
24526
+ /** @experimental */
24527
+ export interface GitHubTokenHandler {
24528
+ /**
24529
+ * Asks the SDK client to mint a GitHub access token for a session whose configuration supplied a GitHub token provider. The runtime acquires the initial token during bootstrap and refreshes it during expiry preflight when one hour or less remains.
24530
+ *
24531
+ * @param params Asks the SDK client to acquire a GitHub access token from an opaque callback registration.
24532
+ *
24533
+ * @returns SDK host response to a GitHub credential request.
24534
+ */
24535
+ getToken(params: GitHubTokenAcquireRequest): Promise<GitHubTokenAcquireResult>;
24536
+ }
24335
24537
  /** All client global API handler groups. */
24336
24538
  export interface ClientGlobalApiHandlers {
24337
24539
  extensionLaunchProvider?: ExtensionLaunchProviderHandler;
24338
24540
  llmInference?: LlmInferenceHandler;
24339
24541
  gitHubTelemetry?: GitHubTelemetryHandler;
24542
+ gitHubToken?: GitHubTokenHandler;
24340
24543
  }
24341
24544
  /**
24342
24545
  * Register client global API handlers on a JSON-RPC connection.
@@ -1963,7 +1963,7 @@ function createSessionRpc(connection, sessionId) {
1963
1963
  */
1964
1964
  list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
1965
1965
  /**
1966
- * Adds a directory to the session's allow-list.
1966
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
1967
1967
  *
1968
1968
  * @param params Directory path to add to the session's allowed directories.
1969
1969
  *
@@ -2809,6 +2809,11 @@ function registerClientGlobalApiHandlers(connection, handlers) {
2809
2809
  if (!handler) return;
2810
2810
  await handler.event(params);
2811
2811
  });
2812
+ connection.onRequest("gitHubToken.getToken", async (params) => {
2813
+ const handler = handlers.gitHubToken;
2814
+ if (!handler) throw new Error("No gitHubToken client-global handler registered");
2815
+ return handler.getToken(params);
2816
+ });
2812
2817
  }
2813
2818
  export {
2814
2819
  createInternalServerRpc,
@@ -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 | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | 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 | 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 | 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 | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | 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 | 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 | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
14
  * Hosting platform type of the repository (github or ado)
15
15
  */
@@ -303,6 +303,18 @@ export type ModelCallFailureTransport =
303
303
  "http"
304
304
  /** WebSocket transport. */
305
305
  | "websocket";
306
+ /**
307
+ * Final outcome of one logical model dispatch after response acceptance processing
308
+ */
309
+ export type ModelCallFinishedOutcome =
310
+ /** The provider response was accepted for continued agent processing. */
311
+ "success"
312
+ /** The dispatch ended with a provider or transport error. */
313
+ | "error"
314
+ /** The dispatch was cancelled before an accepted response was produced. */
315
+ | "cancelled"
316
+ /** The provider response was rejected during post-response acceptance processing. */
317
+ | "rejected";
306
318
  /**
307
319
  * Finite reason code describing why the current turn was aborted
308
320
  */
@@ -665,7 +677,9 @@ export type ManagedSettingsEnforcedEscalation =
665
677
  /** Unrestricted filesystem access outside the session's allowed directories. */
666
678
  | "unrestricted_paths"
667
679
  /** Unrestricted URL fetch access. */
668
- | "unrestricted_urls";
680
+ | "unrestricted_urls"
681
+ /** A server-wide MCP "Always Allow" (or `--allow-tool <server>`) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. */
682
+ | "server_wide_mcp_approval";
669
683
  /**
670
684
  * Exit plan mode action
671
685
  */
@@ -3594,6 +3608,7 @@ export interface AssistantMessageData {
3594
3608
  * Generation phase for phased-output models (e.g., thinking vs. response phases)
3595
3609
  */
3596
3610
  phase?: string;
3611
+ reasoningBlocks?: AssistantMessageReasoningBlocks;
3597
3612
  /**
3598
3613
  * Opaque/encrypted extended thinking data from Anthropic models. Session-bound and stripped on resume.
3599
3614
  */
@@ -3756,6 +3771,20 @@ export interface CitationLocationBlock {
3756
3771
  */
3757
3772
  type: "block";
3758
3773
  }
3774
+ /**
3775
+ * Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping
3776
+ */
3777
+ /** @experimental */
3778
+ export interface AssistantMessageReasoningBlocks {
3779
+ /**
3780
+ * Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest.
3781
+ */
3782
+ blocks?: JsonValue[];
3783
+ /**
3784
+ * Model provider that produced these reasoning blocks.
3785
+ */
3786
+ provider: string;
3787
+ }
3759
3788
  /**
3760
3789
  * Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping
3761
3790
  */
@@ -4105,6 +4134,10 @@ export interface AssistantUsageData {
4105
4134
  * Number of output tokens produced
4106
4135
  */
4107
4136
  outputTokens?: number;
4137
+ /**
4138
+ * Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output.
4139
+ */
4140
+ outputTtftMs?: number;
4108
4141
  /**
4109
4142
  * @deprecated
4110
4143
  * Parent tool call ID when this usage originates from a sub-agent
@@ -4313,6 +4346,62 @@ export interface ModelCallFailureRequestFingerprint {
4313
4346
  */
4314
4347
  toolResultMessageCount: number;
4315
4348
  }
4349
+ /**
4350
+ * Session event "model.call_finished". Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count.
4351
+ */
4352
+ export interface ModelCallFinishedEvent {
4353
+ /**
4354
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
4355
+ */
4356
+ agentId?: string;
4357
+ data: ModelCallFinishedData;
4358
+ /**
4359
+ * Always true for events that are transient and not persisted to the session event log on disk.
4360
+ */
4361
+ ephemeral: true;
4362
+ /**
4363
+ * Unique event identifier (UUID v4), generated when the event is emitted
4364
+ */
4365
+ id: string;
4366
+ /**
4367
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
4368
+ */
4369
+ parentId: string | null;
4370
+ /**
4371
+ * ISO 8601 timestamp when the event was created
4372
+ */
4373
+ timestamp: string;
4374
+ /**
4375
+ * Type discriminator. Always "model.call_finished".
4376
+ */
4377
+ type: "model.call_finished";
4378
+ }
4379
+ /**
4380
+ * Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count.
4381
+ */
4382
+ export interface ModelCallFinishedData {
4383
+ /**
4384
+ * Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response.
4385
+ */
4386
+ containsBuiltInFileEditRequest?: boolean;
4387
+ /**
4388
+ * Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing
4389
+ */
4390
+ dispatchDurationMs: number;
4391
+ /**
4392
+ * Version of the built-in file-edit semantic classifier used for this event
4393
+ */
4394
+ editClassifierVersion: number;
4395
+ /**
4396
+ * Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available
4397
+ */
4398
+ interactionId?: string;
4399
+ outcome: ModelCallFinishedOutcome;
4400
+ /**
4401
+ * Agent-loop iteration within the interaction that initiated the model dispatch
4402
+ */
4403
+ turnId: string;
4404
+ }
4316
4405
  /**
4317
4406
  * Session event "abort". Turn abort information including the reason for termination
4318
4407
  */
@@ -5400,10 +5489,30 @@ export interface SubagentCompletedData {
5400
5489
  * Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end.
5401
5490
  */
5402
5491
  cancelled?: boolean;
5492
+ /**
5493
+ * Whether the first model actually dispatched matched the user's configured preference
5494
+ */
5495
+ configuredModelMatchesActual?: boolean;
5496
+ /**
5497
+ * Concrete model the user configured for this sub-agent via `/subagents`, when present
5498
+ */
5499
+ configuredModelPreference?: string;
5403
5500
  /**
5404
5501
  * Wall-clock duration of the sub-agent execution in milliseconds
5405
5502
  */
5406
5503
  durationMs?: number;
5504
+ /**
5505
+ * Whether the explicit task-call model matched the user's configured preference
5506
+ */
5507
+ explicitModelMatchesPreference?: boolean;
5508
+ /**
5509
+ * Explicit model supplied by the parent agent on the task call, when present
5510
+ */
5511
+ explicitModelOverride?: string;
5512
+ /**
5513
+ * First model for which the sub-agent started an inference request, when one was dispatched
5514
+ */
5515
+ firstDispatchedModel?: string;
5407
5516
  /**
5408
5517
  * Model used by the sub-agent
5409
5518
  */
@@ -5463,6 +5572,14 @@ export interface SubagentFailedData {
5463
5572
  * Internal name of the sub-agent
5464
5573
  */
5465
5574
  agentName: string;
5575
+ /**
5576
+ * Whether the first model actually dispatched matched the user's configured preference
5577
+ */
5578
+ configuredModelMatchesActual?: boolean;
5579
+ /**
5580
+ * Concrete model the user configured for this sub-agent via `/subagents`, when present
5581
+ */
5582
+ configuredModelPreference?: string;
5466
5583
  /**
5467
5584
  * Wall-clock duration of the sub-agent execution in milliseconds
5468
5585
  */
@@ -5471,6 +5588,18 @@ export interface SubagentFailedData {
5471
5588
  * Error message describing why the sub-agent failed
5472
5589
  */
5473
5590
  error: string;
5591
+ /**
5592
+ * Whether the explicit task-call model matched the user's configured preference
5593
+ */
5594
+ explicitModelMatchesPreference?: boolean;
5595
+ /**
5596
+ * Explicit model supplied by the parent agent on the task call, when present
5597
+ */
5598
+ explicitModelOverride?: string;
5599
+ /**
5600
+ * First model for which the sub-agent started an inference request, when one was dispatched
5601
+ */
5602
+ firstDispatchedModel?: string;
5474
5603
  /**
5475
5604
  * Model selected for the sub-agent, when known
5476
5605
  */
@@ -6784,6 +6913,10 @@ export interface PermissionPromptRequestMcp {
6784
6913
  * @experimental
6785
6914
  */
6786
6915
  assistedApproval?: PermissionAssistedApproval;
6916
+ /**
6917
+ * Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval.
6918
+ */
6919
+ canOfferServerWideApproval?: boolean;
6787
6920
  /**
6788
6921
  * Prompt kind discriminator
6789
6922
  */
@@ -8709,6 +8842,10 @@ export interface ManagedSettingsResolvedData {
8709
8842
  * Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`.
8710
8843
  */
8711
8844
  permissionsAllowIntersected?: boolean;
8845
+ /**
8846
+ * Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy.
8847
+ */
8848
+ sandboxEnabledByUndeterminedPolicy?: boolean;
8712
8849
  /**
8713
8850
  * Whether the server (account/org) managed-settings layer was present
8714
8851
  */
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * JSON-RPC based SDK for programmatic control of GitHub Copilot CLI
5
5
  */
6
6
  export { CopilotClient } from "./client.js";
7
- export { RuntimeConnection } from "./types.js";
7
+ export { DisableBypassPermissionsModes, RuntimeConnection } from "./types.js";
8
8
  export { BuiltInTools, ToolSet } from "./toolSet.js";
9
9
  export { CopilotSession, type AssistantMessageEvent } from "./session.js";
10
10
  export { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./factory.js";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CopilotClient } from "./client.js";
2
- import { RuntimeConnection } from "./types.js";
2
+ import { DisableBypassPermissionsModes, RuntimeConnection } from "./types.js";
3
3
  import { BuiltInTools, ToolSet } from "./toolSet.js";
4
4
  import { CopilotSession } from "./session.js";
5
5
  import { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./factory.js";
@@ -31,6 +31,7 @@ export {
31
31
  CopilotWebSocketCloseStatus,
32
32
  CopilotWebSocketForwarder,
33
33
  CopilotWebSocketHandler,
34
+ DisableBypassPermissionsModes,
34
35
  FactoryResumeError,
35
36
  RuntimeConnection,
36
37
  SYSTEM_MESSAGE_SECTIONS,
package/dist/types.d.ts CHANGED
@@ -1751,6 +1751,13 @@ export interface GitHubMcpToolConfig {
1751
1751
  enableInsidersMode?: boolean;
1752
1752
  disableFormDeferral?: boolean;
1753
1753
  }
1754
+ /** Well-known managed bypass-permissions policies. */
1755
+ export declare const DisableBypassPermissionsModes: {
1756
+ /** Turn off bypass-permissions mode entirely. */
1757
+ readonly Disable: "disable";
1758
+ /** Permit automatic bypass but block full allow-all. */
1759
+ readonly AllowAutoOnly: "allow-auto-only";
1760
+ };
1754
1761
  /**
1755
1762
  * Permissions-only managed policy injected by the host via
1756
1763
  * {@link SessionConfigBase.managedSettings}.
@@ -1761,11 +1768,11 @@ export interface GitHubMcpToolConfig {
1761
1768
  */
1762
1769
  export interface ManagedSettingsPermissions {
1763
1770
  /**
1764
- * When set to `"disable"`, bypass-permissions ("yolo") mode is turned off
1765
- * for the session. This is deny-wins: it cannot be re-enabled by any other
1766
- * layer.
1771
+ * Restricts bypass-permissions mode for the session. See
1772
+ * {@link DisableBypassPermissionsModes} for well-known values. Unknown
1773
+ * values are forwarded so newer runtime policies fail closed.
1767
1774
  */
1768
- disableBypassPermissionsMode?: "disable";
1775
+ disableBypassPermissionsMode?: string;
1769
1776
  /** Operations that must always be denied. Unioned across managed layers. */
1770
1777
  deny?: string[];
1771
1778
  /**
@@ -1944,6 +1951,12 @@ export interface SessionConfigBase {
1944
1951
  * a custom agent with the same name is configured.
1945
1952
  */
1946
1953
  excludedBuiltinAgents?: string[];
1954
+ /**
1955
+ * Built-in skill names to include in the session. In `mode: "empty"`,
1956
+ * omitting this option excludes all runtime-bundled skills; specifying names
1957
+ * opts those built-ins back in. Skills from other sources remain eligible.
1958
+ */
1959
+ includedBuiltinSkills?: string[];
1947
1960
  /**
1948
1961
  * Custom provider configuration (BYOK - Bring Your Own Key).
1949
1962
  * When specified, uses the provided API endpoint instead of the Copilot API.
@@ -2240,8 +2253,8 @@ export interface SessionConfigBase {
2240
2253
  * with the same managed-permission parser it uses for fetched policy and
2241
2254
  * composes it restrictively with any self-fetched (server) and
2242
2255
  * device-managed (MDM) layers: `deny`/`ask` rules are unioned, every
2243
- * declared `allow` list must admit an operation, and
2244
- * `disableBypassPermissionsMode: "disable"` is deny-wins.
2256
+ * declared `allow` list must admit an operation, and bypass-mode
2257
+ * restrictions are composed fail-closed.
2245
2258
  *
2246
2259
  * This is startup-only. It is **not** persisted: it must be re-supplied on
2247
2260
  * {@link CopilotClient.resumeSession | resume}, where it replaces the prior
package/dist/types.js CHANGED
@@ -134,11 +134,18 @@ const approveAll = (request, invocation) => {
134
134
  const defaultJoinSessionPermissionHandler = () => ({
135
135
  kind: "no-result"
136
136
  });
137
+ const DisableBypassPermissionsModes = {
138
+ /** Turn off bypass-permissions mode entirely. */
139
+ Disable: "disable",
140
+ /** Permit automatic bypass but block full allow-all. */
141
+ AllowAutoOnly: "allow-auto-only"
142
+ };
137
143
  export {
138
144
  CopilotRequestHandler,
139
145
  CopilotWebSocketCloseStatus,
140
146
  CopilotWebSocketForwarder,
141
147
  CopilotWebSocketHandler,
148
+ DisableBypassPermissionsModes,
142
149
  RuntimeConnection,
143
150
  SYSTEM_MESSAGE_SECTIONS,
144
151
  SessionFsSqliteTransactionFailure,
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.13-preview.0",
7
+ "version": "1.0.13-preview.1",
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.81-6",
59
+ "@github/copilot": "^1.0.81-10",
60
60
  "koffi": "^3.1.0",
61
61
  "vscode-jsonrpc": "^8.2.1",
62
62
  "zod": "^4.3.6"