@github/copilot-sdk 1.0.20-preview.0 → 1.0.20-preview.2

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.
@@ -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.96-0";
25
+ const COPILOT_CLI_VERSION = "1.0.96-2";
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 = {
@@ -1079,6 +1079,42 @@ function createInternalServerRpc(connection) {
1079
1079
  */
1080
1080
  connect: async (params) => connection.sendRequest("connect", params),
1081
1081
  /** @experimental */
1082
+ mcp: {
1083
+ /** @experimental */
1084
+ registry: {
1085
+ /**
1086
+ * Allocates an ID for one cancellable MCP registry search. The ID exists before the search starts, so callers can cancel before it starts. The networking stack supplies the cancellation namespace. The runtime retains at most 1,024 unused IDs. At capacity, another allocation can reclaim an unused ID. Active searches retain their IDs until they finish.
1087
+ *
1088
+ * @returns Request id naming a cancellable registry search.
1089
+ */
1090
+ allocateRequestId: async () => connection.sendRequest("mcp.registry.allocateRequestId", {}),
1091
+ /**
1092
+ * Searches the MCP registry the supplied credential may read, resolving the registry endpoint from policy first. Hosts usually send credential-free `AuthIdentity`; a `token` identity can be resolved only when it embeds a token, while `env` and `gh-cli` identities can use a token embedded in the request first. The runtime follows registry pages, keeps the newest entry per server name, cuts the list to `limit`, and sorts an empty-query result by GitHub stars. Each server object is carried opaquely.
1093
+ *
1094
+ * @param params Registry search terms, the credential to search under, and the request id that makes the search cancellable.
1095
+ *
1096
+ * @returns Servers selected from the registry response.
1097
+ */
1098
+ search: async (params) => connection.sendRequest("mcp.registry.search", params),
1099
+ /**
1100
+ * Abandons the registry search that uses the given request ID. It acts only on IDs from `mcp.registry.allocateRequestId`, so it never cancels another component's request. Answers `canceled: true` when it stops a running search. Answers `canceled: false` for unknown or reclaimed IDs, completed or canceled searches, and unused reservations. It releases an unused reservation, so a later search with that ID is refused.
1101
+ *
1102
+ * @param params Registry search to abandon.
1103
+ *
1104
+ * @returns Whether the cancel reached a live search.
1105
+ */
1106
+ cancel: async (params) => connection.sendRequest("mcp.registry.cancel", params)
1107
+ },
1108
+ /**
1109
+ * Reports whether the gh-replaceable GitHub MCP tools may be clipped for a session, which a host feeds back as the `excludeGhReplaceableTools` build option. The tools are redundant only when the session can reach a shell *and* the host has the `gh` that would replace them, so both halves are decided here. The shell half runs the platform shell tool through the runtime's own tool-filter matcher, so entry forms like `builtin:bash` and `builtin:*` behave exactly as they do when a session builds its tool catalog. The host half probes for `gh`, and is skipped entirely when the filters already rule the shell out. Host presence alone is not enough: a session restricted to, say, `view` would otherwise lose the built-in issue-read fallback while having no shell to replace it with. The answer describes the host the runtime runs on, so it is never forwarded to a remote engine.
1110
+ *
1111
+ * @param params The session tool filters that decide whether the session still has a shell to run `gh` with.
1112
+ *
1113
+ * @returns Whether the gh-replaceable GitHub MCP tools may be clipped for the session described by the request.
1114
+ */
1115
+ shouldExcludeGitHubTools: async (params) => connection.sendRequest("mcp.shouldExcludeGitHubTools", params)
1116
+ },
1117
+ /** @experimental */
1082
1118
  agents: {
1083
1119
  /**
1084
1120
  * Lists the agents this runtime ships, by name. A consumer separating shipped agents from ones the user or a plugin authored should compare against these names rather than against `AgentInfo.source`: an authored agent may carry the `builtin` source while not being one of these, and the runtime treats the two as separate questions. `disableableNames` is the subset a user may turn off, which a client needs to decide whether to offer a toggle. `yamlBasedNames` is the subset backed by a shipped YAML definition, which a client needs before asking the runtime to load one.
@@ -1136,7 +1172,7 @@ function createInternalServerRpc(connection) {
1136
1172
  */
1137
1173
  loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
1138
1174
  /**
1139
- * Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
1175
+ * Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
1140
1176
  *
1141
1177
  * @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
1142
1178
  */
@@ -1366,6 +1402,12 @@ function createSessionRpc(connection, sessionId) {
1366
1402
  * @returns Managed sandbox enforcement state for a session.
1367
1403
  */
1368
1404
  getEnforcementStatus: async () => connection.sendRequest("session.sandbox.getEnforcementStatus", { sessionId }),
1405
+ /**
1406
+ * Lists possible secret-bearing environment variables available to new sandboxed shells that are not already covered by credential masking. Uses local name rules and known-provider host suggestions, never returns secret values, and changes no settings or network permissions. Returns no suggestions while the session is not sandboxed.
1407
+ *
1408
+ * @returns Possible unconfigured secrets in the sandbox shell environment, sorted by variable name, with no secret values.
1409
+ */
1410
+ getCredentialSuggestions: async () => connection.sendRequest("session.sandbox.getCredentialSuggestions", { sessionId }),
1369
1411
  /**
1370
1412
  * Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass.
1371
1413
  *
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.96-0";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.96-2";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.96-0";
1
+ const COPILOT_CLI_VERSION = "1.0.96-2";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
@@ -3427,6 +3427,18 @@ export type McpSetEnvValueModeDetails =
3427
3427
  "direct"
3428
3428
  /** Treat MCP server environment values as host-side references to resolve before launch. */
3429
3429
  | "indirect";
3430
+ /**
3431
+ * Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set.
3432
+ *
3433
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3434
+ * via the `definition` "OptionsUpdateToolFilterPrecedence".
3435
+ */
3436
+ /** @experimental */
3437
+ export type OptionsUpdateToolFilterPrecedence =
3438
+ /** If availableTools is set, it is the only constraint that applies (excludedTools is ignored). Preserves CLI / pre-existing client behavior. Default. */
3439
+ "available"
3440
+ /** A tool is enabled if and only if it matches the allowlist (or the allowlist is unset) AND it does not match the denylist. Makes 'all except X' expressible by combining the two lists. */
3441
+ | "excluded";
3430
3442
  /**
3431
3443
  * Per-source context-window attribution, or null if the session has not yet been initialized (no system prompt or tool metadata cached).
3432
3444
  *
@@ -3924,18 +3936,6 @@ export type OptionsUpdateReasoningSummary =
3924
3936
  | "concise"
3925
3937
  /** Request a detailed summary of model reasoning. */
3926
3938
  | "detailed";
3927
- /**
3928
- * Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set.
3929
- *
3930
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3931
- * via the `definition` "OptionsUpdateToolFilterPrecedence".
3932
- */
3933
- /** @experimental */
3934
- export type OptionsUpdateToolFilterPrecedence =
3935
- /** If availableTools is set, it is the only constraint that applies (excludedTools is ignored). Preserves CLI / pre-existing client behavior. Default. */
3936
- "available"
3937
- /** A tool is enabled if and only if it matches the allowlist (or the allowlist is unset) AND it does not match the denylist. Makes 'all except X' expressible by combining the two lists. */
3938
- | "excluded";
3939
3939
  /**
3940
3940
  * The client's response to the pending permission prompt
3941
3941
  *
@@ -21919,6 +21919,36 @@ export interface SandboxMaskedEnvVar {
21919
21919
  */
21920
21920
  injectHosts: string[];
21921
21921
  }
21922
+ /**
21923
+ * A possible secret-bearing environment variable and optional locally suggested HTTPS injection hosts. This is a draft for user review, not an active grant.
21924
+ *
21925
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21926
+ * via the `definition` "SandboxCredentialSuggestion".
21927
+ */
21928
+ /** @experimental */
21929
+ export interface SandboxCredentialSuggestion {
21930
+ /**
21931
+ * Environment variable name. The secret value is never returned.
21932
+ */
21933
+ name: string;
21934
+ /**
21935
+ * HTTPS hostnames suggested by a local known-provider mapping. An empty list requires the user to supply injection hosts before adding a masking entry. These suggestions do not allow network access.
21936
+ */
21937
+ suggestedInjectHosts: string[];
21938
+ }
21939
+ /**
21940
+ * Possible unconfigured secrets in the sandbox shell environment, sorted by variable name, with no secret values.
21941
+ *
21942
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21943
+ * via the `definition` "SandboxCredentialSuggestionsResult".
21944
+ */
21945
+ /** @experimental */
21946
+ export interface SandboxCredentialSuggestionsResult {
21947
+ /**
21948
+ * Candidates for user review. Empty when sandboxing is disabled or no unconfigured candidates are present.
21949
+ */
21950
+ suggestions: SandboxCredentialSuggestion[];
21951
+ }
21922
21952
  /**
21923
21953
  * Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt.
21924
21954
  *
@@ -31682,6 +31712,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
31682
31712
  * @returns Managed sandbox enforcement state for a session.
31683
31713
  */
31684
31714
  getEnforcementStatus: () => Promise<SandboxEnforcementStatus>;
31715
+ /**
31716
+ * Lists possible secret-bearing environment variables available to new sandboxed shells that are not already covered by credential masking. Uses local name rules and known-provider host suggestions, never returns secret values, and changes no settings or network permissions. Returns no suggestions while the session is not sandboxed.
31717
+ *
31718
+ * @returns Possible unconfigured secrets in the sandbox shell environment, sorted by variable name, with no secret values.
31719
+ */
31720
+ getCredentialSuggestions: () => Promise<SandboxCredentialSuggestionsResult>;
31685
31721
  /**
31686
31722
  * Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass.
31687
31723
  *
@@ -1051,6 +1051,42 @@ function createInternalServerRpc(connection) {
1051
1051
  */
1052
1052
  connect: async (params) => connection.sendRequest("connect", params),
1053
1053
  /** @experimental */
1054
+ mcp: {
1055
+ /** @experimental */
1056
+ registry: {
1057
+ /**
1058
+ * Allocates an ID for one cancellable MCP registry search. The ID exists before the search starts, so callers can cancel before it starts. The networking stack supplies the cancellation namespace. The runtime retains at most 1,024 unused IDs. At capacity, another allocation can reclaim an unused ID. Active searches retain their IDs until they finish.
1059
+ *
1060
+ * @returns Request id naming a cancellable registry search.
1061
+ */
1062
+ allocateRequestId: async () => connection.sendRequest("mcp.registry.allocateRequestId", {}),
1063
+ /**
1064
+ * Searches the MCP registry the supplied credential may read, resolving the registry endpoint from policy first. Hosts usually send credential-free `AuthIdentity`; a `token` identity can be resolved only when it embeds a token, while `env` and `gh-cli` identities can use a token embedded in the request first. The runtime follows registry pages, keeps the newest entry per server name, cuts the list to `limit`, and sorts an empty-query result by GitHub stars. Each server object is carried opaquely.
1065
+ *
1066
+ * @param params Registry search terms, the credential to search under, and the request id that makes the search cancellable.
1067
+ *
1068
+ * @returns Servers selected from the registry response.
1069
+ */
1070
+ search: async (params) => connection.sendRequest("mcp.registry.search", params),
1071
+ /**
1072
+ * Abandons the registry search that uses the given request ID. It acts only on IDs from `mcp.registry.allocateRequestId`, so it never cancels another component's request. Answers `canceled: true` when it stops a running search. Answers `canceled: false` for unknown or reclaimed IDs, completed or canceled searches, and unused reservations. It releases an unused reservation, so a later search with that ID is refused.
1073
+ *
1074
+ * @param params Registry search to abandon.
1075
+ *
1076
+ * @returns Whether the cancel reached a live search.
1077
+ */
1078
+ cancel: async (params) => connection.sendRequest("mcp.registry.cancel", params)
1079
+ },
1080
+ /**
1081
+ * Reports whether the gh-replaceable GitHub MCP tools may be clipped for a session, which a host feeds back as the `excludeGhReplaceableTools` build option. The tools are redundant only when the session can reach a shell *and* the host has the `gh` that would replace them, so both halves are decided here. The shell half runs the platform shell tool through the runtime's own tool-filter matcher, so entry forms like `builtin:bash` and `builtin:*` behave exactly as they do when a session builds its tool catalog. The host half probes for `gh`, and is skipped entirely when the filters already rule the shell out. Host presence alone is not enough: a session restricted to, say, `view` would otherwise lose the built-in issue-read fallback while having no shell to replace it with. The answer describes the host the runtime runs on, so it is never forwarded to a remote engine.
1082
+ *
1083
+ * @param params The session tool filters that decide whether the session still has a shell to run `gh` with.
1084
+ *
1085
+ * @returns Whether the gh-replaceable GitHub MCP tools may be clipped for the session described by the request.
1086
+ */
1087
+ shouldExcludeGitHubTools: async (params) => connection.sendRequest("mcp.shouldExcludeGitHubTools", params)
1088
+ },
1089
+ /** @experimental */
1054
1090
  agents: {
1055
1091
  /**
1056
1092
  * Lists the agents this runtime ships, by name. A consumer separating shipped agents from ones the user or a plugin authored should compare against these names rather than against `AgentInfo.source`: an authored agent may carry the `builtin` source while not being one of these, and the runtime treats the two as separate questions. `disableableNames` is the subset a user may turn off, which a client needs to decide whether to offer a toggle. `yamlBasedNames` is the subset backed by a shipped YAML definition, which a client needs before asking the runtime to load one.
@@ -1108,7 +1144,7 @@ function createInternalServerRpc(connection) {
1108
1144
  */
1109
1145
  loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
1110
1146
  /**
1111
- * Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
1147
+ * Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
1112
1148
  *
1113
1149
  * @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
1114
1150
  */
@@ -1338,6 +1374,12 @@ function createSessionRpc(connection, sessionId) {
1338
1374
  * @returns Managed sandbox enforcement state for a session.
1339
1375
  */
1340
1376
  getEnforcementStatus: async () => connection.sendRequest("session.sandbox.getEnforcementStatus", { sessionId }),
1377
+ /**
1378
+ * Lists possible secret-bearing environment variables available to new sandboxed shells that are not already covered by credential masking. Uses local name rules and known-provider host suggestions, never returns secret values, and changes no settings or network permissions. Returns no suggestions while the session is not sandboxed.
1379
+ *
1380
+ * @returns Possible unconfigured secrets in the sandbox shell environment, sorted by variable name, with no secret values.
1381
+ */
1382
+ getCredentialSuggestions: async () => connection.sendRequest("session.sandbox.getCredentialSuggestions", { sessionId }),
1341
1383
  /**
1342
1384
  * Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass.
1343
1385
  *
@@ -12406,7 +12406,7 @@ export interface ManagedSettingsResolvedEvent {
12406
12406
  /** @experimental */
12407
12407
  export interface ManagedSettingsResolvedData {
12408
12408
  /**
12409
- * Whether enterprise policy disables bypass-permissions ("yolo") mode for this session. Deny-wins across layers, and forced on when `failClosed` is true.
12409
+ * Whether an explicit enterprise policy restriction disables bypass-permissions ("yolo") mode for this session. Deny-wins across layers; an unresolved policy does not force this on by itself.
12410
12410
  */
12411
12411
  bypassPermissionsDisabled: boolean;
12412
12412
  /**
@@ -12418,7 +12418,7 @@ export interface ManagedSettingsResolvedData {
12418
12418
  */
12419
12419
  deviceManaged: boolean;
12420
12420
  /**
12421
- * Whether managed policy could not be determined (e.g. a failed server fetch) and the session fell back to the fail-closed restriction. When true, restrictions such as disabling bypass-permissions are enforced even though `settings` may be absent.
12421
+ * Whether managed policy could not be determined (e.g. a failed server fetch) and unresolved-policy safeguards remain active. This does not by itself disable bypass-permissions; `bypassPermissionsDisabled` reports only an explicit policy restriction.
12422
12422
  */
12423
12423
  failClosed: boolean;
12424
12424
  /**
package/package.json CHANGED
@@ -5,8 +5,8 @@
5
5
  "url": "https://github.com/github/copilot-agent-runtime.git",
6
6
  "directory": "src/sdk/nodejs"
7
7
  },
8
- "version": "1.0.20-preview.0",
9
- "copilotCliVersion": "1.0.96-0",
8
+ "version": "1.0.20-preview.2",
9
+ "copilotCliVersion": "1.0.96-2",
10
10
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
11
11
  "main": "./dist/cjs/index.js",
12
12
  "types": "./dist/index.d.ts",
@@ -104,18 +104,18 @@
104
104
  "README.md"
105
105
  ],
106
106
  "copilotRuntime": {
107
- "sourceSha": "2d97cdf84e4eed006767c83f2e6dc61b07754b35",
108
- "version": "1.0.96-0",
107
+ "sourceSha": "8227e3a7b5f74c8dde298fcc69dcb27a9a044a93",
108
+ "version": "1.0.96-2",
109
109
  "visibility": "public"
110
110
  },
111
111
  "optionalDependencies": {
112
- "@github/copilot-sdk-darwin-arm64": "1.0.20-preview.0",
113
- "@github/copilot-sdk-darwin-x64": "1.0.20-preview.0",
114
- "@github/copilot-sdk-linux-arm64": "1.0.20-preview.0",
115
- "@github/copilot-sdk-linux-x64": "1.0.20-preview.0",
116
- "@github/copilot-sdk-linuxmusl-arm64": "1.0.20-preview.0",
117
- "@github/copilot-sdk-linuxmusl-x64": "1.0.20-preview.0",
118
- "@github/copilot-sdk-win32-arm64": "1.0.20-preview.0",
119
- "@github/copilot-sdk-win32-x64": "1.0.20-preview.0"
112
+ "@github/copilot-sdk-darwin-arm64": "1.0.20-preview.2",
113
+ "@github/copilot-sdk-darwin-x64": "1.0.20-preview.2",
114
+ "@github/copilot-sdk-linux-arm64": "1.0.20-preview.2",
115
+ "@github/copilot-sdk-linux-x64": "1.0.20-preview.2",
116
+ "@github/copilot-sdk-linuxmusl-arm64": "1.0.20-preview.2",
117
+ "@github/copilot-sdk-linuxmusl-x64": "1.0.20-preview.2",
118
+ "@github/copilot-sdk-win32-arm64": "1.0.20-preview.2",
119
+ "@github/copilot-sdk-win32-x64": "1.0.20-preview.2"
120
120
  }
121
121
  }