@github/copilot-sdk 1.0.19 → 1.0.20-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.
- package/README.md +30 -0
- package/dist/cjs/cliVersion.js +1 -1
- package/dist/cjs/client.js +6 -1
- package/dist/cjs/generated/rpc.js +54 -1
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/client.js +6 -1
- package/dist/generated/rpc.d.ts +159 -13
- package/dist/generated/rpc.js +54 -1
- package/dist/generated/session-events.d.ts +158 -16
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1377,6 +1377,36 @@ const session = await client.createSession({
|
|
|
1377
1377
|
});
|
|
1378
1378
|
```
|
|
1379
1379
|
|
|
1380
|
+
### Managed network policy for client-owned browsers
|
|
1381
|
+
|
|
1382
|
+
Obtain a reusable `permissionsContext` from
|
|
1383
|
+
`client.rpc.managedSettings.resolve({ selectionId })` for account and device
|
|
1384
|
+
policy, or `session.rpc.managedSettings.get()` for the session's retained policy,
|
|
1385
|
+
including SDK injection and policy-helper rules. Omit `selectionId` for the current
|
|
1386
|
+
account, or device policy only when signed out. Resolution uses the managed-policy
|
|
1387
|
+
cache and can fetch server policy; keep it off latency-critical startup paths.
|
|
1388
|
+
Older runtimes may omit `permissionsContext`. Treat an absent context as unsupported
|
|
1389
|
+
evaluation, not unmanaged policy; do not navigate without a policy decision.
|
|
1390
|
+
|
|
1391
|
+
Call `client.rpc.managedSettings.permissions.evaluate({ context: permissionsContext, operations: [{ kind: "url", url: "https://docs.example.com/guide" }] })`.
|
|
1392
|
+
This is pure, sessionless evaluation: it performs no policy discovery, I/O,
|
|
1393
|
+
prompting, or sandbox changes. Reuse an in-memory context for repeated checks and
|
|
1394
|
+
refresh it when managed policy changes. Retain the runtime-owned `permissions`
|
|
1395
|
+
object verbatim rather than rebuilding it from the flattened settings display.
|
|
1396
|
+
|
|
1397
|
+
The result is `{ results: [{ operation, verdict }], failClosed }`, with one entry per
|
|
1398
|
+
input operation in the same order. `deny` blocks navigation, `ask` requires approval,
|
|
1399
|
+
`allow` approves under managed policy, and `unmanaged` leaves the consumer's normal
|
|
1400
|
+
permission flow in effect. A check never prompts or grants a saved approval.
|
|
1401
|
+
Invalid URLs reject the batch. Unknown policy rejects or returns `failClosed: true`
|
|
1402
|
+
with all URLs denied; do not navigate on an error.
|
|
1403
|
+
|
|
1404
|
+
Check every navigation, redirect, and new-window destination before opening it.
|
|
1405
|
+
These APIs evaluate managed permission rules only: they do not replace browser
|
|
1406
|
+
security checks, user permissions, or sandbox policy. `permissions.limitTo` neither
|
|
1407
|
+
enables the sandbox nor changes `sandbox.userPolicy.network`; configure sandbox
|
|
1408
|
+
network restrictions explicitly.
|
|
1409
|
+
|
|
1380
1410
|
### Permission Result Kinds
|
|
1381
1411
|
|
|
1382
1412
|
The handler must return one of the `PermissionDecision` shapes (or `{ kind: "no-result" }`). Approval scopes are present-tense — they describe the decision to apply, not the outcome reported back on session events:
|
package/dist/cjs/cliVersion.js
CHANGED
|
@@ -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.
|
|
25
|
+
const COPILOT_CLI_VERSION = "1.0.96-1";
|
|
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 = {
|
package/dist/cjs/client.js
CHANGED
|
@@ -2455,6 +2455,7 @@ stderr: ${stderrOutput}`
|
|
|
2455
2455
|
/** Starts the in-process FFI runtime with SDK-managed typed options. */
|
|
2456
2456
|
async startInProcessFfi() {
|
|
2457
2457
|
const explicitEntrypoint = this.resolvedEnv.COPILOT_CLI_PATH;
|
|
2458
|
+
const cliLoginSyncIntegrationId = this.resolvedEnv.GITHUB_COPILOT_INTEGRATION_ID?.trim() || void 0;
|
|
2458
2459
|
let runtimeLibrary;
|
|
2459
2460
|
if (explicitEntrypoint) {
|
|
2460
2461
|
const entrypointDirectory = (0, import_node_path.dirname)((0, import_node_path.resolve)(explicitEntrypoint));
|
|
@@ -2466,7 +2467,8 @@ stderr: ${stderrOutput}`
|
|
|
2466
2467
|
"runtime.node"
|
|
2467
2468
|
);
|
|
2468
2469
|
} else {
|
|
2469
|
-
|
|
2470
|
+
const bundledRuntimePath = await getBundledRuntimePath();
|
|
2471
|
+
runtimeLibrary = (0, import_node_path.join)((0, import_node_path.dirname)(bundledRuntimePath), "runtime.node");
|
|
2470
2472
|
}
|
|
2471
2473
|
const { FfiRuntimeHost } = await import("./ffiRuntimeHost.js");
|
|
2472
2474
|
const environment = {};
|
|
@@ -2495,6 +2497,9 @@ stderr: ${stderrOutput}`
|
|
|
2495
2497
|
if (this.options.enableRemoteSessions) {
|
|
2496
2498
|
args.push("--remote");
|
|
2497
2499
|
}
|
|
2500
|
+
if (cliLoginSyncIntegrationId) {
|
|
2501
|
+
args.push(`--cli-login-sync-integration-id=${cliLoginSyncIntegrationId}`);
|
|
2502
|
+
}
|
|
2498
2503
|
const host = FfiRuntimeHost.create(runtimeLibrary, explicitEntrypoint, environment, args);
|
|
2499
2504
|
this.ffiHost = host;
|
|
2500
2505
|
await host.start();
|
|
@@ -707,6 +707,17 @@ function createServerRpc(connection) {
|
|
|
707
707
|
* @returns Effective enterprise managed settings for an account, resolved without a session.
|
|
708
708
|
*/
|
|
709
709
|
resolve: async (params) => connection.sendRequest("managedSettings.resolve", params),
|
|
710
|
+
/** @experimental */
|
|
711
|
+
permissions: {
|
|
712
|
+
/**
|
|
713
|
+
* Pure, sessionless evaluation of operations against a supplied permissionsContext. Performs no policy discovery, I/O, prompting, navigation, permission grants, or sandbox changes. Obtain the context from managedSettings.resolve or session.managedSettings.get, or reuse an in-memory context. Results preserve input order and duplicates. Consumers must block deny, obtain approval for ask, and use their normal permission flow for unmanaged. Unknown policy returns failClosed with every operation denied. This is not a substitute for user permissions or other security controls.
|
|
714
|
+
*
|
|
715
|
+
* @param params Managed policy context and ordered operations for pure, sessionless evaluation.
|
|
716
|
+
*
|
|
717
|
+
* @returns Ordered managed permission verdicts and the supplied policy's fail-closed posture.
|
|
718
|
+
*/
|
|
719
|
+
evaluate: async (params) => connection.sendRequest("managedSettings.permissions.evaluate", params)
|
|
720
|
+
},
|
|
710
721
|
/**
|
|
711
722
|
* Returns the managed-settings authoring JSON schema with descriptive `x-composition` annotations aligned with the shared settings-engine vocabulary. These annotations are not a complete runtime composition contract: model, effortLevel, and contextTier remain coupled. Use `managedSettings.compose` for the runtime's effective result. Performs no I/O.
|
|
712
723
|
*
|
|
@@ -1068,6 +1079,42 @@ function createInternalServerRpc(connection) {
|
|
|
1068
1079
|
*/
|
|
1069
1080
|
connect: async (params) => connection.sendRequest("connect", params),
|
|
1070
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 */
|
|
1071
1118
|
agents: {
|
|
1072
1119
|
/**
|
|
1073
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.
|
|
@@ -1125,7 +1172,7 @@ function createInternalServerRpc(connection) {
|
|
|
1125
1172
|
*/
|
|
1126
1173
|
loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
|
|
1127
1174
|
/**
|
|
1128
|
-
* 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: `
|
|
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.
|
|
1129
1176
|
*
|
|
1130
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.
|
|
1131
1178
|
*/
|
|
@@ -1355,6 +1402,12 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1355
1402
|
* @returns Managed sandbox enforcement state for a session.
|
|
1356
1403
|
*/
|
|
1357
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 }),
|
|
1358
1411
|
/**
|
|
1359
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.
|
|
1360
1413
|
*
|
package/dist/cliVersion.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const COPILOT_CLI_VERSION = "1.0.
|
|
1
|
+
export declare const COPILOT_CLI_VERSION = "1.0.96-1";
|
|
2
2
|
export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
|
package/dist/cliVersion.js
CHANGED
package/dist/client.js
CHANGED
|
@@ -2435,6 +2435,7 @@ stderr: ${stderrOutput}`
|
|
|
2435
2435
|
/** Starts the in-process FFI runtime with SDK-managed typed options. */
|
|
2436
2436
|
async startInProcessFfi() {
|
|
2437
2437
|
const explicitEntrypoint = this.resolvedEnv.COPILOT_CLI_PATH;
|
|
2438
|
+
const cliLoginSyncIntegrationId = this.resolvedEnv.GITHUB_COPILOT_INTEGRATION_ID?.trim() || void 0;
|
|
2438
2439
|
let runtimeLibrary;
|
|
2439
2440
|
if (explicitEntrypoint) {
|
|
2440
2441
|
const entrypointDirectory = dirname(resolve(explicitEntrypoint));
|
|
@@ -2446,7 +2447,8 @@ stderr: ${stderrOutput}`
|
|
|
2446
2447
|
"runtime.node"
|
|
2447
2448
|
);
|
|
2448
2449
|
} else {
|
|
2449
|
-
|
|
2450
|
+
const bundledRuntimePath = await getBundledRuntimePath();
|
|
2451
|
+
runtimeLibrary = join(dirname(bundledRuntimePath), "runtime.node");
|
|
2450
2452
|
}
|
|
2451
2453
|
const { FfiRuntimeHost } = await import("./ffiRuntimeHost.js");
|
|
2452
2454
|
const environment = {};
|
|
@@ -2475,6 +2477,9 @@ stderr: ${stderrOutput}`
|
|
|
2475
2477
|
if (this.options.enableRemoteSessions) {
|
|
2476
2478
|
args.push("--remote");
|
|
2477
2479
|
}
|
|
2480
|
+
if (cliLoginSyncIntegrationId) {
|
|
2481
|
+
args.push(`--cli-login-sync-integration-id=${cliLoginSyncIntegrationId}`);
|
|
2482
|
+
}
|
|
2478
2483
|
const host = FfiRuntimeHost.create(runtimeLibrary, explicitEntrypoint, environment, args);
|
|
2479
2484
|
this.ffiHost = host;
|
|
2480
2485
|
await host.start();
|
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generated from: api.schema.json
|
|
4
4
|
*/
|
|
5
5
|
import type { MessageConnection } from "vscode-jsonrpc/node.js";
|
|
6
|
-
import type { AbortReason, AgentModelPolicy, Attachment, AutoTier, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, IndexedSearchState, ManagedSettingsResolvedData, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerMetadata, McpServerSource, McpServerStatus, ModelChangeSource, ModelProviderKind, ModelProviderRef, PermissionDecisionSource, PermissionMode, PermissionPromptRequest, PermissionRule, ProviderQuotaState, ReasoningSummary, RemediationAction, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, TaskCompleteData, TaskCompletionOutcome, UsageGetMetricsResult, UserToolSessionApproval, Verbosity } from "./session-events.js";
|
|
6
|
+
import type { AbortReason, AgentModelPolicy, Attachment, AutoTier, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, IndexedSearchState, ManagedPermissionsContext, ManagedSettingsResolvedData, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerMetadata, McpServerSource, McpServerStatus, ModelChangeSource, ModelProviderKind, ModelProviderRef, PermissionDecisionSource, PermissionMode, PermissionPromptRequest, PermissionRule, ProviderQuotaState, ReasoningSummary, RemediationAction, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, TaskCompleteData, TaskCompletionOutcome, UsageGetMetricsResult, UserToolSessionApproval, Verbosity } from "./session-events.js";
|
|
7
7
|
/** A value that can be represented losslessly on the SDK JSON wire. */
|
|
8
8
|
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
9
9
|
[key: string]: JsonValue;
|
|
@@ -2569,6 +2569,33 @@ export type SessionLogLevel =
|
|
|
2569
2569
|
| "warning"
|
|
2570
2570
|
/** Error message describing a failure. */
|
|
2571
2571
|
| "error";
|
|
2572
|
+
/** @experimental */
|
|
2573
|
+
export type ManagedPermissionOperation = {
|
|
2574
|
+
/**
|
|
2575
|
+
* Absolute HTTP(S) URL with a host. Invalid URLs reject the entire evaluation batch.
|
|
2576
|
+
*/
|
|
2577
|
+
url: string;
|
|
2578
|
+
/**
|
|
2579
|
+
* Operation to evaluate. Currently only url is supported.
|
|
2580
|
+
*/
|
|
2581
|
+
kind: "url";
|
|
2582
|
+
};
|
|
2583
|
+
/**
|
|
2584
|
+
* Managed-policy verdict only: deny blocks the URL, ask requires approval, allow approves under managed policy, and unmanaged leaves the normal consumer permission flow in effect. No verdict bypasses other security controls.
|
|
2585
|
+
*
|
|
2586
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2587
|
+
* via the `definition` "ManagedPermissionVerdict".
|
|
2588
|
+
*/
|
|
2589
|
+
/** @experimental */
|
|
2590
|
+
export type ManagedPermissionVerdict =
|
|
2591
|
+
/** Managed policy prohibits the operation; do not offer approval. */
|
|
2592
|
+
"deny"
|
|
2593
|
+
/** Managed policy requires the consumer to obtain approval. */
|
|
2594
|
+
| "ask"
|
|
2595
|
+
/** Managed policy allows the operation, subject to other security controls. */
|
|
2596
|
+
| "allow"
|
|
2597
|
+
/** Managed policy does not decide the operation; use the consumer's normal permission flow. */
|
|
2598
|
+
| "unmanaged";
|
|
2572
2599
|
/**
|
|
2573
2600
|
* What retrying did for one plugin required by managed settings.
|
|
2574
2601
|
*
|
|
@@ -3400,6 +3427,18 @@ export type McpSetEnvValueModeDetails =
|
|
|
3400
3427
|
"direct"
|
|
3401
3428
|
/** Treat MCP server environment values as host-side references to resolve before launch. */
|
|
3402
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";
|
|
3403
3442
|
/**
|
|
3404
3443
|
* Per-source context-window attribution, or null if the session has not yet been initialized (no system prompt or tool metadata cached).
|
|
3405
3444
|
*
|
|
@@ -3897,18 +3936,6 @@ export type OptionsUpdateReasoningSummary =
|
|
|
3897
3936
|
| "concise"
|
|
3898
3937
|
/** Request a detailed summary of model reasoning. */
|
|
3899
3938
|
| "detailed";
|
|
3900
|
-
/**
|
|
3901
|
-
* Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set.
|
|
3902
|
-
*
|
|
3903
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3904
|
-
* via the `definition` "OptionsUpdateToolFilterPrecedence".
|
|
3905
|
-
*/
|
|
3906
|
-
/** @experimental */
|
|
3907
|
-
export type OptionsUpdateToolFilterPrecedence =
|
|
3908
|
-
/** If availableTools is set, it is the only constraint that applies (excludedTools is ignored). Preserves CLI / pre-existing client behavior. Default. */
|
|
3909
|
-
"available"
|
|
3910
|
-
/** 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. */
|
|
3911
|
-
| "excluded";
|
|
3912
3939
|
/**
|
|
3913
3940
|
* The client's response to the pending permission prompt
|
|
3914
3941
|
*
|
|
@@ -6721,6 +6748,10 @@ export interface AccountStatus {
|
|
|
6721
6748
|
*/
|
|
6722
6749
|
login: string;
|
|
6723
6750
|
kind: AccountKind;
|
|
6751
|
+
/**
|
|
6752
|
+
* Human-readable credential source used to authenticate this account, such as `gh` or `GITHUB_TOKEN`.
|
|
6753
|
+
*/
|
|
6754
|
+
authSource?: string;
|
|
6724
6755
|
/**
|
|
6725
6756
|
* Opaque id of the account this one was derived from (e.g. an EMU account's base Entra identity); absent for a root account. Matches the base identity account's selectionId, forming the derivation edge.
|
|
6726
6757
|
*/
|
|
@@ -13666,6 +13697,42 @@ export interface ManagedMcpServerConfig {
|
|
|
13666
13697
|
*/
|
|
13667
13698
|
headersRefreshTtlMs?: number;
|
|
13668
13699
|
}
|
|
13700
|
+
/** @experimental */
|
|
13701
|
+
export interface ManagedPermissionEvaluation {
|
|
13702
|
+
operation: ManagedPermissionOperation;
|
|
13703
|
+
verdict: ManagedPermissionVerdict;
|
|
13704
|
+
}
|
|
13705
|
+
/**
|
|
13706
|
+
* Managed policy context and ordered operations for pure, sessionless evaluation.
|
|
13707
|
+
*
|
|
13708
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
13709
|
+
* via the `definition` "ManagedPermissionsEvaluateRequest".
|
|
13710
|
+
*/
|
|
13711
|
+
/** @experimental */
|
|
13712
|
+
export interface ManagedPermissionsEvaluateRequest {
|
|
13713
|
+
context: ManagedPermissionsContext;
|
|
13714
|
+
/**
|
|
13715
|
+
* Operations to evaluate, preserving input order and duplicates. An empty batch is valid.
|
|
13716
|
+
*/
|
|
13717
|
+
operations: ManagedPermissionOperation[];
|
|
13718
|
+
}
|
|
13719
|
+
/**
|
|
13720
|
+
* Ordered managed permission verdicts and the supplied policy's fail-closed posture.
|
|
13721
|
+
*
|
|
13722
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
13723
|
+
* via the `definition` "ManagedPermissionsEvaluateResult".
|
|
13724
|
+
*/
|
|
13725
|
+
/** @experimental */
|
|
13726
|
+
export interface ManagedPermissionsEvaluateResult {
|
|
13727
|
+
/**
|
|
13728
|
+
* One verdict per input operation, in the same order, including duplicates.
|
|
13729
|
+
*/
|
|
13730
|
+
results: ManagedPermissionEvaluation[];
|
|
13731
|
+
/**
|
|
13732
|
+
* Managed permission policy could not be determined; every operation is denied.
|
|
13733
|
+
*/
|
|
13734
|
+
failClosed: boolean;
|
|
13735
|
+
}
|
|
13669
13736
|
/**
|
|
13670
13737
|
* Retry outcome for one plugin required by managed settings.
|
|
13671
13738
|
*
|
|
@@ -13863,6 +13930,7 @@ export interface ManagedSettingsResolveRequest {
|
|
|
13863
13930
|
*/
|
|
13864
13931
|
/** @experimental */
|
|
13865
13932
|
export interface ManagedSettingsResolveResult {
|
|
13933
|
+
permissionsContext?: ManagedPermissionsContext;
|
|
13866
13934
|
/**
|
|
13867
13935
|
* Printable opaque identity of the account the settings were resolved for, suitable for comparison and storage, not an account selectionId. Absent when no account was available, in which case only device policy is reported.
|
|
13868
13936
|
*/
|
|
@@ -21851,6 +21919,36 @@ export interface SandboxMaskedEnvVar {
|
|
|
21851
21919
|
*/
|
|
21852
21920
|
injectHosts: string[];
|
|
21853
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
|
+
}
|
|
21854
21952
|
/**
|
|
21855
21953
|
* Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt.
|
|
21856
21954
|
*
|
|
@@ -29991,6 +30089,37 @@ export interface HostGetConfigurationResult {
|
|
|
29991
30089
|
/** @experimental */
|
|
29992
30090
|
export interface HostReadyResult {
|
|
29993
30091
|
}
|
|
30092
|
+
/**
|
|
30093
|
+
* Ordered managed permission verdicts and the supplied policy's fail-closed posture.
|
|
30094
|
+
*
|
|
30095
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
30096
|
+
* via the `definition` "ManagedSettingsPermissionsEvaluateResult".
|
|
30097
|
+
*/
|
|
30098
|
+
/** @experimental */
|
|
30099
|
+
export interface ManagedSettingsPermissionsEvaluateResult {
|
|
30100
|
+
/**
|
|
30101
|
+
* One verdict per input operation, in the same order, including duplicates.
|
|
30102
|
+
*/
|
|
30103
|
+
results: ManagedPermissionEvaluation[];
|
|
30104
|
+
/**
|
|
30105
|
+
* Managed permission policy could not be determined; every operation is denied.
|
|
30106
|
+
*/
|
|
30107
|
+
failClosed: boolean;
|
|
30108
|
+
}
|
|
30109
|
+
/**
|
|
30110
|
+
* Managed policy context and ordered operations for pure, sessionless evaluation.
|
|
30111
|
+
*
|
|
30112
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
30113
|
+
* via the `definition` "ManagedSettingsPermissionsEvaluateRequest".
|
|
30114
|
+
*/
|
|
30115
|
+
/** @experimental */
|
|
30116
|
+
export interface ManagedSettingsPermissionsEvaluateRequest {
|
|
30117
|
+
context: ManagedPermissionsContext;
|
|
30118
|
+
/**
|
|
30119
|
+
* Operations to evaluate, preserving input order and duplicates. An empty batch is valid.
|
|
30120
|
+
*/
|
|
30121
|
+
operations: ManagedPermissionOperation[];
|
|
30122
|
+
}
|
|
29994
30123
|
/** @experimental */
|
|
29995
30124
|
export interface SessionWorkflowPauseAtCheckpointResult {
|
|
29996
30125
|
action: WorkflowPauseCheckpointAction;
|
|
@@ -31184,6 +31313,17 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
31184
31313
|
* @returns Effective enterprise managed settings for an account, resolved without a session.
|
|
31185
31314
|
*/
|
|
31186
31315
|
resolve: (params: ManagedSettingsResolveRequest) => Promise<ManagedSettingsResolveResult>;
|
|
31316
|
+
/** @experimental */
|
|
31317
|
+
permissions: {
|
|
31318
|
+
/**
|
|
31319
|
+
* Pure, sessionless evaluation of operations against a supplied permissionsContext. Performs no policy discovery, I/O, prompting, navigation, permission grants, or sandbox changes. Obtain the context from managedSettings.resolve or session.managedSettings.get, or reuse an in-memory context. Results preserve input order and duplicates. Consumers must block deny, obtain approval for ask, and use their normal permission flow for unmanaged. Unknown policy returns failClosed with every operation denied. This is not a substitute for user permissions or other security controls.
|
|
31320
|
+
*
|
|
31321
|
+
* @param params Managed policy context and ordered operations for pure, sessionless evaluation.
|
|
31322
|
+
*
|
|
31323
|
+
* @returns Ordered managed permission verdicts and the supplied policy's fail-closed posture.
|
|
31324
|
+
*/
|
|
31325
|
+
evaluate: (params: ManagedSettingsPermissionsEvaluateRequest) => Promise<ManagedSettingsPermissionsEvaluateResult>;
|
|
31326
|
+
};
|
|
31187
31327
|
/**
|
|
31188
31328
|
* Returns the managed-settings authoring JSON schema with descriptive `x-composition` annotations aligned with the shared settings-engine vocabulary. These annotations are not a complete runtime composition contract: model, effortLevel, and contextTier remain coupled. Use `managedSettings.compose` for the runtime's effective result. Performs no I/O.
|
|
31189
31329
|
*
|
|
@@ -31572,6 +31712,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
31572
31712
|
* @returns Managed sandbox enforcement state for a session.
|
|
31573
31713
|
*/
|
|
31574
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>;
|
|
31575
31721
|
/**
|
|
31576
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.
|
|
31577
31723
|
*
|
package/dist/generated/rpc.js
CHANGED
|
@@ -679,6 +679,17 @@ function createServerRpc(connection) {
|
|
|
679
679
|
* @returns Effective enterprise managed settings for an account, resolved without a session.
|
|
680
680
|
*/
|
|
681
681
|
resolve: async (params) => connection.sendRequest("managedSettings.resolve", params),
|
|
682
|
+
/** @experimental */
|
|
683
|
+
permissions: {
|
|
684
|
+
/**
|
|
685
|
+
* Pure, sessionless evaluation of operations against a supplied permissionsContext. Performs no policy discovery, I/O, prompting, navigation, permission grants, or sandbox changes. Obtain the context from managedSettings.resolve or session.managedSettings.get, or reuse an in-memory context. Results preserve input order and duplicates. Consumers must block deny, obtain approval for ask, and use their normal permission flow for unmanaged. Unknown policy returns failClosed with every operation denied. This is not a substitute for user permissions or other security controls.
|
|
686
|
+
*
|
|
687
|
+
* @param params Managed policy context and ordered operations for pure, sessionless evaluation.
|
|
688
|
+
*
|
|
689
|
+
* @returns Ordered managed permission verdicts and the supplied policy's fail-closed posture.
|
|
690
|
+
*/
|
|
691
|
+
evaluate: async (params) => connection.sendRequest("managedSettings.permissions.evaluate", params)
|
|
692
|
+
},
|
|
682
693
|
/**
|
|
683
694
|
* Returns the managed-settings authoring JSON schema with descriptive `x-composition` annotations aligned with the shared settings-engine vocabulary. These annotations are not a complete runtime composition contract: model, effortLevel, and contextTier remain coupled. Use `managedSettings.compose` for the runtime's effective result. Performs no I/O.
|
|
684
695
|
*
|
|
@@ -1040,6 +1051,42 @@ function createInternalServerRpc(connection) {
|
|
|
1040
1051
|
*/
|
|
1041
1052
|
connect: async (params) => connection.sendRequest("connect", params),
|
|
1042
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 */
|
|
1043
1090
|
agents: {
|
|
1044
1091
|
/**
|
|
1045
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.
|
|
@@ -1097,7 +1144,7 @@ function createInternalServerRpc(connection) {
|
|
|
1097
1144
|
*/
|
|
1098
1145
|
loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
|
|
1099
1146
|
/**
|
|
1100
|
-
* 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: `
|
|
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.
|
|
1101
1148
|
*
|
|
1102
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.
|
|
1103
1150
|
*/
|
|
@@ -1327,6 +1374,12 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1327
1374
|
* @returns Managed sandbox enforcement state for a session.
|
|
1328
1375
|
*/
|
|
1329
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 }),
|
|
1330
1383
|
/**
|
|
1331
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.
|
|
1332
1385
|
*
|
|
@@ -435,6 +435,38 @@ export type ProviderQuotaCapacityState =
|
|
|
435
435
|
| "unknown"
|
|
436
436
|
/** Client-only compatibility placeholder when acquisitionStatus is unavailable or failed; not an observed service verdict. */
|
|
437
437
|
| "unavailable";
|
|
438
|
+
/**
|
|
439
|
+
* Identity scope of a monthly usage reading.
|
|
440
|
+
*/
|
|
441
|
+
export type ProviderMonthlyUsageScope =
|
|
442
|
+
/** Consumption of the authenticated user within the parent observation's service and returned cycle. */
|
|
443
|
+
"user"
|
|
444
|
+
/** The service did not establish a recognized usage scope. */
|
|
445
|
+
| "unknown";
|
|
446
|
+
/**
|
|
447
|
+
* Availability of a service's monthly consumption reading.
|
|
448
|
+
*/
|
|
449
|
+
export type ProviderMonthlyUsageState =
|
|
450
|
+
/** The service reported a usable consumption reading, including an explicit zero. */
|
|
451
|
+
"available"
|
|
452
|
+
/** The service found no usage policy; no consumption amount is known. */
|
|
453
|
+
| "no_policy"
|
|
454
|
+
/** The read failed or its data could not be used; consumption is unknown. */
|
|
455
|
+
| "unavailable"
|
|
456
|
+
/** The service reported an unrecognized usage state. */
|
|
457
|
+
| "unknown";
|
|
458
|
+
/**
|
|
459
|
+
* Units explicitly reported by a quota provider.
|
|
460
|
+
*/
|
|
461
|
+
export type ProviderQuotaUnit =
|
|
462
|
+
/** AI credits, not tokens or currency. */
|
|
463
|
+
"ai_credits"
|
|
464
|
+
/** Requests charged against an entitlement. */
|
|
465
|
+
| "requests"
|
|
466
|
+
/** Model tokens. */
|
|
467
|
+
| "tokens"
|
|
468
|
+
/** The observation does not establish a quantity unit. */
|
|
469
|
+
| "unknown";
|
|
438
470
|
/**
|
|
439
471
|
* Timing and purpose of a provider quota observation.
|
|
440
472
|
*/
|
|
@@ -453,18 +485,6 @@ export type ProviderQuotaQuantityKind =
|
|
|
453
485
|
| "advisory_balance"
|
|
454
486
|
/** No quantity measurement, as with admission-only response headers. */
|
|
455
487
|
| "none";
|
|
456
|
-
/**
|
|
457
|
-
* Units explicitly reported by a quota provider.
|
|
458
|
-
*/
|
|
459
|
-
export type ProviderQuotaUnit =
|
|
460
|
-
/** AI credits, not tokens or currency. */
|
|
461
|
-
"ai_credits"
|
|
462
|
-
/** Requests charged against an entitlement. */
|
|
463
|
-
| "requests"
|
|
464
|
-
/** Model tokens. */
|
|
465
|
-
| "tokens"
|
|
466
|
-
/** The observation does not establish a quantity unit. */
|
|
467
|
-
| "unknown";
|
|
468
488
|
/**
|
|
469
489
|
* What initiated a conversation compaction
|
|
470
490
|
*/
|
|
@@ -764,6 +784,16 @@ export type AssistantUsageApiEndpoint =
|
|
|
764
784
|
| "/responses"
|
|
765
785
|
/** WebSocket Responses API endpoint. */
|
|
766
786
|
| "ws:/responses";
|
|
787
|
+
/**
|
|
788
|
+
* Content-Encoding applied to the request body sent on the wire
|
|
789
|
+
*/
|
|
790
|
+
export type ModelCallRequestBodyEncoding =
|
|
791
|
+
/** The request body was sent uncompressed (including every WebSocket request). */
|
|
792
|
+
"identity"
|
|
793
|
+
/** The request body was sent gzip-compressed. */
|
|
794
|
+
| "gzip"
|
|
795
|
+
/** The request body was sent zstd-compressed. */
|
|
796
|
+
| "zstd";
|
|
767
797
|
/**
|
|
768
798
|
* Transport used for a successful model call
|
|
769
799
|
*/
|
|
@@ -772,6 +802,34 @@ export type AssistantUsageTransport =
|
|
|
772
802
|
"http"
|
|
773
803
|
/** WebSocket transport. */
|
|
774
804
|
| "websocket";
|
|
805
|
+
/**
|
|
806
|
+
* Normalized cause of the WebSocket failure that triggered the HTTP fallback
|
|
807
|
+
*/
|
|
808
|
+
export type ModelCallWebSocketFallbackErrorKind =
|
|
809
|
+
/** DNS resolution of the WebSocket host failed. */
|
|
810
|
+
"dns"
|
|
811
|
+
/** The TLS handshake or a TLS record failed. */
|
|
812
|
+
| "tls"
|
|
813
|
+
/** A WebSocket connect or read timed out. */
|
|
814
|
+
| "timeout"
|
|
815
|
+
/** The peer refused the TCP connection. */
|
|
816
|
+
| "connection_refused"
|
|
817
|
+
/** The connection was reset, aborted, or ended mid-stream without a close. */
|
|
818
|
+
| "connection_reset"
|
|
819
|
+
/** The peer closed the WebSocket. */
|
|
820
|
+
| "closed_by_peer"
|
|
821
|
+
/** The runtime closed the WebSocket itself. */
|
|
822
|
+
| "closed_locally"
|
|
823
|
+
/** The socket was already closed before it was used. */
|
|
824
|
+
| "not_connected"
|
|
825
|
+
/** The upgrade or request was rejected with an HTTP status. */
|
|
826
|
+
| "http_status"
|
|
827
|
+
/** A WebSocket protocol violation or an undecodable frame. */
|
|
828
|
+
| "protocol"
|
|
829
|
+
/** The WebSocket request could not be built. */
|
|
830
|
+
| "configuration"
|
|
831
|
+
/** A failure that maps onto none of the other kinds. */
|
|
832
|
+
| "other";
|
|
775
833
|
/**
|
|
776
834
|
* Why a WebSocket-capable model call was carried by the HTTP fallback
|
|
777
835
|
*/
|
|
@@ -3569,6 +3627,7 @@ export interface ProviderQuotaState {
|
|
|
3569
3627
|
* HTTP status from acquisition, when available.
|
|
3570
3628
|
*/
|
|
3571
3629
|
httpStatus?: number;
|
|
3630
|
+
monthlyUsage?: ProviderMonthlyUsage;
|
|
3572
3631
|
observationKind?: ProviderQuotaObservationKind;
|
|
3573
3632
|
/**
|
|
3574
3633
|
* When the runtime observed this reading, not a charge timestamp or guarantee that consumption has settled.
|
|
@@ -3643,6 +3702,31 @@ export interface ProviderQuotaBudgetMetadata {
|
|
|
3643
3702
|
*/
|
|
3644
3703
|
usageAllowedWhenExhausted: boolean;
|
|
3645
3704
|
}
|
|
3705
|
+
/**
|
|
3706
|
+
* An authoritative monthly usage reading for the observation's provider, account, and service.
|
|
3707
|
+
*/
|
|
3708
|
+
/** @experimental */
|
|
3709
|
+
export interface ProviderMonthlyUsage {
|
|
3710
|
+
/**
|
|
3711
|
+
* Nonnegative finite consumption reported by the service, preserving zero and fractions. Present only when state is available; never computed from tokens or balance differences.
|
|
3712
|
+
*/
|
|
3713
|
+
consumedQuantity?: number;
|
|
3714
|
+
/**
|
|
3715
|
+
* Start of the service-reported monthly billing cycle, in UTC RFC 3339.
|
|
3716
|
+
*/
|
|
3717
|
+
cycleStart?: string;
|
|
3718
|
+
/**
|
|
3719
|
+
* Service read time in UTC RFC 3339, not a ledger reconciliation watermark or confirmation of the latest inference charge.
|
|
3720
|
+
*/
|
|
3721
|
+
queriedAt?: string;
|
|
3722
|
+
/**
|
|
3723
|
+
* End of the service-reported monthly billing cycle, in UTC RFC 3339.
|
|
3724
|
+
*/
|
|
3725
|
+
resetOn?: string;
|
|
3726
|
+
scope: ProviderMonthlyUsageScope;
|
|
3727
|
+
state: ProviderMonthlyUsageState;
|
|
3728
|
+
unit: ProviderQuotaUnit;
|
|
3729
|
+
}
|
|
3646
3730
|
/**
|
|
3647
3731
|
* Session event "session.context_changed". Updated working directory and git context after the change
|
|
3648
3732
|
*/
|
|
@@ -6614,9 +6698,14 @@ export interface AssistantUsageData {
|
|
|
6614
6698
|
*/
|
|
6615
6699
|
rejectedPredictionTokens?: number;
|
|
6616
6700
|
/**
|
|
6617
|
-
* Serialized (uncompressed) byte length of the request body. A content-free size signal.
|
|
6701
|
+
* Serialized (uncompressed) byte length of the request body, before any Content-Encoding. A content-free size signal.
|
|
6618
6702
|
*/
|
|
6619
6703
|
requestBodyBytes?: number;
|
|
6704
|
+
requestBodyEncoding?: ModelCallRequestBodyEncoding;
|
|
6705
|
+
/**
|
|
6706
|
+
* Byte length of the request body actually sent on the wire for the attempt that produced this outcome, after any Content-Encoding. Equals requestBodyBytes when the body was not compressed.
|
|
6707
|
+
*/
|
|
6708
|
+
requestBodyWireBytes?: number;
|
|
6620
6709
|
/**
|
|
6621
6710
|
* Per-request treatment/eligibility signal returned by the Copilot API in the `X-GitHub-Copilot-Request-TE` response header for the associated model call; `false` when the header was absent or unparseable.
|
|
6622
6711
|
*/
|
|
@@ -6634,7 +6723,24 @@ export interface AssistantUsageData {
|
|
|
6634
6723
|
* Milliseconds spent on the WebSocket attempt before falling back to HTTP
|
|
6635
6724
|
*/
|
|
6636
6725
|
websocketFallbackAfterMs?: number;
|
|
6726
|
+
/**
|
|
6727
|
+
* WebSocket close code received before the HTTP fallback
|
|
6728
|
+
*/
|
|
6729
|
+
websocketFallbackCloseCode?: number;
|
|
6730
|
+
websocketFallbackErrorKind?: ModelCallWebSocketFallbackErrorKind;
|
|
6637
6731
|
websocketFallbackReason?: ModelCallWebSocketFallbackReason;
|
|
6732
|
+
/**
|
|
6733
|
+
* Whether a WebSocket reconnect was attempted before falling back to HTTP
|
|
6734
|
+
*/
|
|
6735
|
+
websocketFallbackReconnectAttempted?: boolean;
|
|
6736
|
+
/**
|
|
6737
|
+
* Whether the HTTP fallback started during this model call, rather than being inherited from an earlier call
|
|
6738
|
+
*/
|
|
6739
|
+
websocketFallbackStartedThisCall?: boolean;
|
|
6740
|
+
/**
|
|
6741
|
+
* HTTP status of the WebSocket upgrade rejection or WebSocket API error that triggered the HTTP fallback
|
|
6742
|
+
*/
|
|
6743
|
+
websocketFallbackStatusCode?: number;
|
|
6638
6744
|
}
|
|
6639
6745
|
/**
|
|
6640
6746
|
* Ordered accounting identity assigned under the source session's emission lock.
|
|
@@ -6803,9 +6909,14 @@ export interface ModelCallFailureData {
|
|
|
6803
6909
|
*/
|
|
6804
6910
|
reasoningEffort?: string;
|
|
6805
6911
|
/**
|
|
6806
|
-
* Serialized (uncompressed) byte length of the failed request body. A content-free size signal.
|
|
6912
|
+
* Serialized (uncompressed) byte length of the failed request body, before any Content-Encoding. A content-free size signal.
|
|
6807
6913
|
*/
|
|
6808
6914
|
requestBodyBytes?: number;
|
|
6915
|
+
requestBodyEncoding?: ModelCallRequestBodyEncoding;
|
|
6916
|
+
/**
|
|
6917
|
+
* Byte length of the failed request body actually sent on the wire, after any Content-Encoding. Equals requestBodyBytes when the body was not compressed.
|
|
6918
|
+
*/
|
|
6919
|
+
requestBodyWireBytes?: number;
|
|
6809
6920
|
requestFingerprint?: ModelCallFailureRequestFingerprint;
|
|
6810
6921
|
/**
|
|
6811
6922
|
* Zero-based orchestrator retry index of the failed attempt
|
|
@@ -6829,7 +6940,24 @@ export interface ModelCallFailureData {
|
|
|
6829
6940
|
* Milliseconds spent on the WebSocket attempt before falling back to HTTP
|
|
6830
6941
|
*/
|
|
6831
6942
|
websocketFallbackAfterMs?: number;
|
|
6943
|
+
/**
|
|
6944
|
+
* WebSocket close code received before the HTTP fallback
|
|
6945
|
+
*/
|
|
6946
|
+
websocketFallbackCloseCode?: number;
|
|
6947
|
+
websocketFallbackErrorKind?: ModelCallWebSocketFallbackErrorKind;
|
|
6832
6948
|
websocketFallbackReason?: ModelCallWebSocketFallbackReason;
|
|
6949
|
+
/**
|
|
6950
|
+
* Whether a WebSocket reconnect was attempted before falling back to HTTP
|
|
6951
|
+
*/
|
|
6952
|
+
websocketFallbackReconnectAttempted?: boolean;
|
|
6953
|
+
/**
|
|
6954
|
+
* Whether the HTTP fallback started during this model call, rather than being inherited from an earlier call
|
|
6955
|
+
*/
|
|
6956
|
+
websocketFallbackStartedThisCall?: boolean;
|
|
6957
|
+
/**
|
|
6958
|
+
* HTTP status of the WebSocket upgrade rejection or WebSocket API error that triggered the HTTP fallback
|
|
6959
|
+
*/
|
|
6960
|
+
websocketFallbackStatusCode?: number;
|
|
6833
6961
|
}
|
|
6834
6962
|
/**
|
|
6835
6963
|
* Content-free structural summary of the failing request for diagnosing malformed 4xx calls
|
|
@@ -12278,7 +12406,7 @@ export interface ManagedSettingsResolvedEvent {
|
|
|
12278
12406
|
/** @experimental */
|
|
12279
12407
|
export interface ManagedSettingsResolvedData {
|
|
12280
12408
|
/**
|
|
12281
|
-
* Whether enterprise policy disables bypass-permissions ("yolo") mode for this session. Deny-wins across layers
|
|
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.
|
|
12282
12410
|
*/
|
|
12283
12411
|
bypassPermissionsDisabled: boolean;
|
|
12284
12412
|
/**
|
|
@@ -12290,7 +12418,7 @@ export interface ManagedSettingsResolvedData {
|
|
|
12290
12418
|
*/
|
|
12291
12419
|
deviceManaged: boolean;
|
|
12292
12420
|
/**
|
|
12293
|
-
* Whether managed policy could not be determined (e.g. a failed server fetch) and
|
|
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.
|
|
12294
12422
|
*/
|
|
12295
12423
|
failClosed: boolean;
|
|
12296
12424
|
/**
|
|
@@ -12301,6 +12429,7 @@ export interface ManagedSettingsResolvedData {
|
|
|
12301
12429
|
* Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`.
|
|
12302
12430
|
*/
|
|
12303
12431
|
permissionsAllowIntersected?: boolean;
|
|
12432
|
+
permissionsContext?: ManagedPermissionsContext;
|
|
12304
12433
|
/**
|
|
12305
12434
|
* Whether the policy-helper managed-settings layer was present. The policy helper is the weakest channel: it fills keys no enterprise source set and can never replace one.
|
|
12306
12435
|
*/
|
|
@@ -12319,6 +12448,19 @@ export interface ManagedSettingsResolvedData {
|
|
|
12319
12448
|
settings?: JsonValue;
|
|
12320
12449
|
source: ManagedSettingsResolvedSource;
|
|
12321
12450
|
}
|
|
12451
|
+
/**
|
|
12452
|
+
* Reusable managed permission evaluation context. Treat permissions as runtime-owned policy data and retain it verbatim; it includes source-aware composition metadata. This is a snapshot, not a capability or approval token; only use contexts obtained from trusted policy sources.
|
|
12453
|
+
*/
|
|
12454
|
+
export interface ManagedPermissionsContext {
|
|
12455
|
+
/**
|
|
12456
|
+
* Policy could not be determined; evaluation must deny every operation.
|
|
12457
|
+
*/
|
|
12458
|
+
failClosed: boolean;
|
|
12459
|
+
/**
|
|
12460
|
+
* Runtime-owned composed permissions object. Absent when no permission policy is configured.
|
|
12461
|
+
*/
|
|
12462
|
+
permissions?: JsonValue;
|
|
12463
|
+
}
|
|
12322
12464
|
/**
|
|
12323
12465
|
* Session event "session.managed_settings_enforced". Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on bypass permissions or Assisted Permissions while the corresponding policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes.
|
|
12324
12466
|
*/
|
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.
|
|
9
|
-
"copilotCliVersion": "1.0.
|
|
8
|
+
"version": "1.0.20-preview.1",
|
|
9
|
+
"copilotCliVersion": "1.0.96-1",
|
|
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": "
|
|
108
|
-
"version": "1.0.
|
|
107
|
+
"sourceSha": "f225a827d983e1be1e047b1d7baed68d8a509264",
|
|
108
|
+
"version": "1.0.96-1",
|
|
109
109
|
"visibility": "public"
|
|
110
110
|
},
|
|
111
111
|
"optionalDependencies": {
|
|
112
|
-
"@github/copilot-sdk-darwin-arm64": "1.0.
|
|
113
|
-
"@github/copilot-sdk-darwin-x64": "1.0.
|
|
114
|
-
"@github/copilot-sdk-linux-arm64": "1.0.
|
|
115
|
-
"@github/copilot-sdk-linux-x64": "1.0.
|
|
116
|
-
"@github/copilot-sdk-linuxmusl-arm64": "1.0.
|
|
117
|
-
"@github/copilot-sdk-linuxmusl-x64": "1.0.
|
|
118
|
-
"@github/copilot-sdk-win32-arm64": "1.0.
|
|
119
|
-
"@github/copilot-sdk-win32-x64": "1.0.
|
|
112
|
+
"@github/copilot-sdk-darwin-arm64": "1.0.20-preview.1",
|
|
113
|
+
"@github/copilot-sdk-darwin-x64": "1.0.20-preview.1",
|
|
114
|
+
"@github/copilot-sdk-linux-arm64": "1.0.20-preview.1",
|
|
115
|
+
"@github/copilot-sdk-linux-x64": "1.0.20-preview.1",
|
|
116
|
+
"@github/copilot-sdk-linuxmusl-arm64": "1.0.20-preview.1",
|
|
117
|
+
"@github/copilot-sdk-linuxmusl-x64": "1.0.20-preview.1",
|
|
118
|
+
"@github/copilot-sdk-win32-arm64": "1.0.20-preview.1",
|
|
119
|
+
"@github/copilot-sdk-win32-x64": "1.0.20-preview.1"
|
|
120
120
|
}
|
|
121
121
|
}
|