@github/copilot-sdk 1.0.17 → 1.0.18-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.
@@ -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.93";
25
+ const COPILOT_CLI_VERSION = "1.0.94-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 = {
@@ -1389,6 +1389,7 @@ class CopilotClient {
1389
1389
  featureFlags: config.featureFlags,
1390
1390
  expAssignments: config.expAssignments,
1391
1391
  enableManagedSettings: config.enableManagedSettings,
1392
+ enforceManagedModelDefaults: config.enforceManagedModelDefaults,
1392
1393
  managedSettings: config.managedSettings
1393
1394
  });
1394
1395
  const {
@@ -1657,6 +1658,7 @@ class CopilotClient {
1657
1658
  featureFlags: config.featureFlags,
1658
1659
  expAssignments: config.expAssignments,
1659
1660
  enableManagedSettings: config.enableManagedSettings,
1661
+ enforceManagedModelDefaults: config.enforceManagedModelDefaults,
1660
1662
  managedSettings: config.managedSettings,
1661
1663
  ...extensionOptions?.requestedEnvironmentVariables ? {
1662
1664
  requestedEnvironmentVariables: extensionOptions.requestedEnvironmentVariables
@@ -2648,13 +2648,13 @@ function createSessionRpc(connection, sessionId) {
2648
2648
  */
2649
2649
  list: async () => connection.sendRequest("session.extensions.list", { sessionId }),
2650
2650
  /**
2651
- * Enables an extension for the session.
2651
+ * Enables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2652
2652
  *
2653
2653
  * @param params Source-qualified extension identifier to enable for the session.
2654
2654
  */
2655
2655
  enable: async (params) => connection.sendRequest("session.extensions.enable", { ...params, sessionId }),
2656
2656
  /**
2657
- * Disables an extension for the session.
2657
+ * Disables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2658
2658
  *
2659
2659
  * @param params Source-qualified extension identifier to disable for the session.
2660
2660
  */
@@ -2663,6 +2663,12 @@ function createSessionRpc(connection, sessionId) {
2663
2663
  * Reloads extension definitions and processes for the session.
2664
2664
  */
2665
2665
  reload: async () => connection.sendRequest("session.extensions.reload", { sessionId }),
2666
+ /**
2667
+ * Host-only reconciliation of authoritative session-effective extension membership and enablement. Refreshes runtime-owned discovery and preferences without persisting settings, installing plugins, or restarting unchanged activations. Returns ExtensionList only after required starts and process/contribution cleanup settle. Takes no caller inventory or overrides. Missing controllers, unready/incomplete discovery, unavailable workspaces, superseded inputs, and lifecycle failures are errors, not empty membership. Independently proven revocations may be applied before an error; retry converges without restarting healthy activations. Error data contains lifecycleChangesApplied and code: extension_reconciliation_host_required, extension_reconciliation_unavailable, extension_reconciliation_not_ready, extension_reconciliation_discovery_failed, extension_reconciliation_workspace_unavailable, extension_reconciliation_superseded, or extension_reconciliation_lifecycle_failed. Mark host reconciliation state applied only on success. On older runtimes, method-not-found must not fall back to global discovery and persistent extension disables.
2668
+ *
2669
+ * @returns Extensions discovered for the session, with their current status.
2670
+ */
2671
+ reconcile: async () => connection.sendRequest("session.extensions.reconcile", { sessionId }),
2666
2672
  /**
2667
2673
  * Push attachments into the next user-message turn from an extension. The host should surface them as composer pills and forward them via the next session.send call. Callable only by extension-owned connections.
2668
2674
  *
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.93";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.94-1";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.93";
1
+ const COPILOT_CLI_VERSION = "1.0.94-1";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
package/dist/client.js CHANGED
@@ -1369,6 +1369,7 @@ class CopilotClient {
1369
1369
  featureFlags: config.featureFlags,
1370
1370
  expAssignments: config.expAssignments,
1371
1371
  enableManagedSettings: config.enableManagedSettings,
1372
+ enforceManagedModelDefaults: config.enforceManagedModelDefaults,
1372
1373
  managedSettings: config.managedSettings
1373
1374
  });
1374
1375
  const {
@@ -1637,6 +1638,7 @@ class CopilotClient {
1637
1638
  featureFlags: config.featureFlags,
1638
1639
  expAssignments: config.expAssignments,
1639
1640
  enableManagedSettings: config.enableManagedSettings,
1641
+ enforceManagedModelDefaults: config.enforceManagedModelDefaults,
1640
1642
  managedSettings: config.managedSettings,
1641
1643
  ...extensionOptions?.requestedEnvironmentVariables ? {
1642
1644
  requestedEnvironmentVariables: extensionOptions.requestedEnvironmentVariables
@@ -13548,6 +13548,10 @@ export interface ManagedSettingMeta {
13548
13548
  * Channel that supplied this scalar value, matching a `layers[].source`: `device`, `server`, or `policyHelper`. These scalar defaults select one winning channel, not a mixed source. Treat unknown values as additional channels; more may be added.
13549
13549
  */
13550
13550
  source: string;
13551
+ /**
13552
+ * Original managed value when the runtime adjusted it to a supported effective value. Omitted when no adjustment was needed.
13553
+ */
13554
+ requested?: string;
13551
13555
  }
13552
13556
  /**
13553
13557
  * One candidate channel; absent settings represents a channel that delivered no document.
@@ -13605,10 +13609,15 @@ export interface ManagedSettingsComposeResult {
13605
13609
  /** @experimental */
13606
13610
  export interface ManagedSettingsValues {
13607
13611
  /**
13608
- * Managed default model identifier, as configured. New sessions start with it; it can name a model the account cannot use, so hosts match it against the listed models.
13612
+ * Managed default model identifier. When model availability was resolved, aliases and family names are projected to a concrete available model ID; otherwise the configured value is returned.
13609
13613
  */
13610
13614
  model?: string;
13611
13615
  autoTier?: AutoTier;
13616
+ /**
13617
+ * Managed reasoning-effort default for the managed concrete model. The runtime clamps it to an entitled effort when model availability is known.
13618
+ */
13619
+ effortLevel?: string;
13620
+ contextTier?: ContextTier;
13612
13621
  }
13613
13622
  /**
13614
13623
  * Per-key lock state and provenance for `ManagedSettingsValues`, with the same field names. Producers emit each typed key in values and meta together; both outer objects are omitted when no typed key is set.
@@ -13620,6 +13629,8 @@ export interface ManagedSettingsValues {
13620
13629
  export interface ManagedSettingsMeta {
13621
13630
  model?: ManagedSettingMeta;
13622
13631
  autoTier?: ManagedSettingMeta;
13632
+ effortLevel?: ManagedSettingMeta;
13633
+ contextTier?: ManagedSettingMeta;
13623
13634
  }
13624
13635
  /**
13625
13636
  * One managed-settings channel and the document it delivered.
@@ -13687,6 +13698,10 @@ export interface ManagedSettingsResolveRequest {
13687
13698
  * Embedding client identity for server policy requests, as in session creation. Omit for the CLI identity.
13688
13699
  */
13689
13700
  clientName?: string;
13701
+ /**
13702
+ * Working directory used to run an organization policy helper. When omitted, sessionless resolution does not run the helper.
13703
+ */
13704
+ workingDirectory?: string;
13690
13705
  }
13691
13706
  /**
13692
13707
  * Effective enterprise managed settings for an account, resolved without a session.
@@ -23242,6 +23257,10 @@ export interface SessionManagedPermissions {
23242
23257
  * When set to `disable`, prevents bypass/allow-all permission modes. Advisory auto-approval remains available because normal prompt paths stay active. 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.
23243
23258
  */
23244
23259
  disableBypassPermissionsMode?: string;
23260
+ /**
23261
+ * When true, prevents Assisted Permissions from being activated. An actively Assisted session falls back to Manual Approval while the policy is in force. Omit the key or set it to false to impose no restriction.
23262
+ */
23263
+ disableAssistedPermissionsMode?: boolean;
23245
23264
  /**
23246
23265
  * Permission rules that block matching operations. Deny has highest precedence.
23247
23266
  */
@@ -23438,6 +23457,10 @@ export interface SessionOpenOptions {
23438
23457
  * Opt-in: self-fetch and enforce enterprise managed settings, including managed hook policies, at session bootstrap.
23439
23458
  */
23440
23459
  enableManagedSettings?: boolean;
23460
+ /**
23461
+ * Opt in to enforcing non-overridable managed model controls on session model, Auto-tier, reasoning-effort, and context-tier changes. Managed defaults still apply when omitted; this option only turns conflicting changes into errors.
23462
+ */
23463
+ enforceManagedModelDefaults?: boolean;
23441
23464
  managedSettings?: SessionManagedSettings;
23442
23465
  /**
23443
23466
  * Opt in to capturing file changes for session rewind and session diff. Capture cannot reconstruct changes made before it was enabled. On create it starts capture from the first turn. It is also honored on resume: for a session that already has tracked prior turns, tracking continues automatically even if this is omitted; passing it on resume additionally enables tracking for an eligible session that has no prior root turn yet. Resuming a session whose prior root turns were never tracked has no restorable baseline, so tracking stays disabled for it and rewind reports file change tracking as unavailable; the resume itself still succeeds, so sessions that predate tracking remain loadable. The opt-in is only rejected when the session can never track (a subagent session, or one without local session storage). It is intentionally absent from the mutable options update because enabling it after edits have occurred would create an incomplete, misleading baseline. Subagents share the parent session's capture store and are not tracked as separate rewind points: a file a subagent writes is attributed to whichever root user turn was open when the capture was staged, just before the tool body ran. A turn cannot open while a staged capture is still in flight, so a subagent tool that staged under the spawning turn stays attributed to it however late the write lands, while a capture it stages after the user's next message belongs to that later turn. Attribution decides which turn's rewind point counts and file preview include that write; it does not narrow which rewinds revert it, because a rewind restores every capture from the selected turn onward, so the earlier spawning turn reverts it as well.
@@ -32504,13 +32527,13 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
32504
32527
  */
32505
32528
  list: () => Promise<ExtensionList>;
32506
32529
  /**
32507
- * Enables an extension for the session.
32530
+ * Enables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
32508
32531
  *
32509
32532
  * @param params Source-qualified extension identifier to enable for the session.
32510
32533
  */
32511
32534
  enable: (params: ExtensionsEnableRequest) => Promise<void>;
32512
32535
  /**
32513
- * Disables an extension for the session.
32536
+ * Disables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
32514
32537
  *
32515
32538
  * @param params Source-qualified extension identifier to disable for the session.
32516
32539
  */
@@ -32519,6 +32542,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
32519
32542
  * Reloads extension definitions and processes for the session.
32520
32543
  */
32521
32544
  reload: () => Promise<void>;
32545
+ /**
32546
+ * Host-only reconciliation of authoritative session-effective extension membership and enablement. Refreshes runtime-owned discovery and preferences without persisting settings, installing plugins, or restarting unchanged activations. Returns ExtensionList only after required starts and process/contribution cleanup settle. Takes no caller inventory or overrides. Missing controllers, unready/incomplete discovery, unavailable workspaces, superseded inputs, and lifecycle failures are errors, not empty membership. Independently proven revocations may be applied before an error; retry converges without restarting healthy activations. Error data contains lifecycleChangesApplied and code: extension_reconciliation_host_required, extension_reconciliation_unavailable, extension_reconciliation_not_ready, extension_reconciliation_discovery_failed, extension_reconciliation_workspace_unavailable, extension_reconciliation_superseded, or extension_reconciliation_lifecycle_failed. Mark host reconciliation state applied only on success. On older runtimes, method-not-found must not fall back to global discovery and persistent extension disables.
32547
+ *
32548
+ * @returns Extensions discovered for the session, with their current status.
32549
+ */
32550
+ reconcile: () => Promise<ExtensionList>;
32522
32551
  /**
32523
32552
  * Push attachments into the next user-message turn from an extension. The host should surface them as composer pills and forward them via the next session.send call. Callable only by extension-owned connections.
32524
32553
  *
@@ -2620,13 +2620,13 @@ function createSessionRpc(connection, sessionId) {
2620
2620
  */
2621
2621
  list: async () => connection.sendRequest("session.extensions.list", { sessionId }),
2622
2622
  /**
2623
- * Enables an extension for the session.
2623
+ * Enables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2624
2624
  *
2625
2625
  * @param params Source-qualified extension identifier to enable for the session.
2626
2626
  */
2627
2627
  enable: async (params) => connection.sendRequest("session.extensions.enable", { ...params, sessionId }),
2628
2628
  /**
2629
- * Disables an extension for the session.
2629
+ * Disables an extension for the session and persists the preference when the session has a settings store. Hosts synchronizing effective membership should use extensions.reconcile instead.
2630
2630
  *
2631
2631
  * @param params Source-qualified extension identifier to disable for the session.
2632
2632
  */
@@ -2635,6 +2635,12 @@ function createSessionRpc(connection, sessionId) {
2635
2635
  * Reloads extension definitions and processes for the session.
2636
2636
  */
2637
2637
  reload: async () => connection.sendRequest("session.extensions.reload", { sessionId }),
2638
+ /**
2639
+ * Host-only reconciliation of authoritative session-effective extension membership and enablement. Refreshes runtime-owned discovery and preferences without persisting settings, installing plugins, or restarting unchanged activations. Returns ExtensionList only after required starts and process/contribution cleanup settle. Takes no caller inventory or overrides. Missing controllers, unready/incomplete discovery, unavailable workspaces, superseded inputs, and lifecycle failures are errors, not empty membership. Independently proven revocations may be applied before an error; retry converges without restarting healthy activations. Error data contains lifecycleChangesApplied and code: extension_reconciliation_host_required, extension_reconciliation_unavailable, extension_reconciliation_not_ready, extension_reconciliation_discovery_failed, extension_reconciliation_workspace_unavailable, extension_reconciliation_superseded, or extension_reconciliation_lifecycle_failed. Mark host reconciliation state applied only on success. On older runtimes, method-not-found must not fall back to global discovery and persistent extension disables.
2640
+ *
2641
+ * @returns Extensions discovered for the session, with their current status.
2642
+ */
2643
+ reconcile: async () => connection.sendRequest("session.extensions.reconcile", { sessionId }),
2638
2644
  /**
2639
2645
  * Push attachments into the next user-message turn from an extension. The host should surface them as composer pills and forward them via the next session.send call. Callable only by extension-owned connections.
2640
2646
  *
@@ -681,6 +681,20 @@ export type AssistantUsageTransport =
681
681
  "http"
682
682
  /** WebSocket transport. */
683
683
  | "websocket";
684
+ /**
685
+ * Why a WebSocket-capable model call was carried by the HTTP fallback
686
+ */
687
+ export type ModelCallWebSocketFallbackReason =
688
+ /** The WebSocket connection could not be established. */
689
+ "connect_failed"
690
+ /** No usable WebSocket connection was available for the request. */
691
+ | "connection_unavailable"
692
+ /** Sending the request over the WebSocket failed. */
693
+ | "send_failed"
694
+ /** The WebSocket returned a retryable API error. */
695
+ | "api_error"
696
+ /** The WebSocket transport failed before any output reached the consumer. */
697
+ | "transport_failed";
684
698
  /**
685
699
  * For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures.
686
700
  */
@@ -1208,17 +1222,17 @@ export type ManagedSettingsResolvedSource =
1208
1222
  * The category of runtime action that enterprise managed settings governed (blocked or capped)
1209
1223
  */
1210
1224
  export type ManagedSettingsEnforcedAction =
1211
- /** An attempt to turn on a bypass-permissions ("yolo") escalation was refused or capped because policy disables bypass-permissions mode. */
1225
+ /** An attempt to enter a permission mode governed by managed policy was refused or capped. The `setting` and `escalation` fields identify whether this was bypass permissions or Assisted Permissions. */
1212
1226
  "bypass_permissions_blocked";
1213
1227
  /**
1214
- * For a `bypass_permissions_blocked` action, which permission-escalation primitive was refused
1228
+ * For a `bypass_permissions_blocked` action, which permission-mode or escalation primitive was refused
1215
1229
  */
1216
1230
  export type ManagedSettingsEnforcedEscalation =
1217
1231
  /** Full allow-all permissions — automatically approving tools, paths, and URLs. */
1218
1232
  "allow_all"
1219
1233
  /** Automatic approval of all tool permission requests. */
1220
1234
  | "approve_all"
1221
- /** Assisted mode — keeps normal prompt paths and adds an LLM recommendation, distinct from allow-all. */
1235
+ /** Assisted Permissions — uses an LLM review to reduce prompts, distinct from allow-all and not a hard security boundary. */
1222
1236
  | "assisted_approval"
1223
1237
  /** Unrestricted filesystem access outside the session's allowed directories. */
1224
1238
  | "unrestricted_paths"
@@ -1447,11 +1461,19 @@ export interface StartData {
1447
1461
  */
1448
1462
  alreadyInUse?: boolean;
1449
1463
  autoTier?: AutoTier;
1464
+ /**
1465
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
1466
+ */
1467
+ autoTierManaged?: boolean;
1450
1468
  context?: WorkingDirectoryContext;
1451
1469
  /**
1452
1470
  * Context tier selected at session creation time for models with tiered context pricing; null when no tier is selected (e.g., non-tiered model)
1453
1471
  */
1454
1472
  contextTier?: ContextTier | null;
1473
+ /**
1474
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
1475
+ */
1476
+ contextTierManaged?: boolean;
1455
1477
  /**
1456
1478
  * Version string of the Copilot application
1457
1479
  */
@@ -1469,6 +1491,10 @@ export interface StartData {
1469
1491
  * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
1470
1492
  */
1471
1493
  reasoningEffort?: string;
1494
+ /**
1495
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
1496
+ */
1497
+ reasoningEffortManaged?: boolean;
1472
1498
  /**
1473
1499
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
1474
1500
  */
@@ -1604,11 +1630,19 @@ export interface ResumeData {
1604
1630
  */
1605
1631
  alreadyInUse?: boolean;
1606
1632
  autoTier?: AutoTier;
1633
+ /**
1634
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
1635
+ */
1636
+ autoTierManaged?: boolean;
1607
1637
  context?: WorkingDirectoryContext;
1608
1638
  /**
1609
1639
  * Context tier currently selected at resume time; null when no tier is active
1610
1640
  */
1611
1641
  contextTier?: ContextTier | null;
1642
+ /**
1643
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
1644
+ */
1645
+ contextTierManaged?: boolean;
1612
1646
  /**
1613
1647
  * When true, tool calls and permission requests left in flight by the previous session lifetime remain pending after resume and the agentic loop awaits their results. User sends are queued behind the pending work until all such requests reach a terminal state. When false or omitted, pending work is normally marked as interrupted unless the resume passively joined live work owned by another client; sessionWasActive distinguishes that case.
1614
1648
  */
@@ -1625,6 +1659,10 @@ export interface ResumeData {
1625
1659
  * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
1626
1660
  */
1627
1661
  reasoningEffort?: string;
1662
+ /**
1663
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
1664
+ */
1665
+ reasoningEffortManaged?: boolean;
1628
1666
  /**
1629
1667
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
1630
1668
  */
@@ -2204,6 +2242,10 @@ export interface ModelChangeData {
2204
2242
  * Committed Auto preference after the model configuration change, when applicable.
2205
2243
  */
2206
2244
  autoTier?: AutoTier | null;
2245
+ /**
2246
+ * True when autoTier is a managed-policy default. Omitted for user-authored and legacy values.
2247
+ */
2248
+ autoTierManaged?: boolean;
2207
2249
  /**
2208
2250
  * Reason the change happened, when not user-initiated. `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path, or `"refusal_fallback"` when the active model declined a request (content refusal) and the runtime switched to the configured refusal-fallback model. UI clients can use this to render contextual copy.
2209
2251
  */
@@ -2212,6 +2254,10 @@ export interface ModelChangeData {
2212
2254
  * Context tier after the model change; null explicitly clears a previously selected tier
2213
2255
  */
2214
2256
  contextTier?: ContextTier | null;
2257
+ /**
2258
+ * True when contextTier is a managed-policy default. Omitted for user-authored and legacy values.
2259
+ */
2260
+ contextTierManaged?: boolean;
2215
2261
  /**
2216
2262
  * Newly selected model identifier
2217
2263
  */
@@ -2231,6 +2277,10 @@ export interface ModelChangeData {
2231
2277
  * Reasoning effort level after the model change, if applicable
2232
2278
  */
2233
2279
  reasoningEffort?: string | null;
2280
+ /**
2281
+ * True when the reasoning effort is a managed-policy default bound to reasoningEffortModel. Omitted for agent-authored, user-authored, independent, and legacy effort.
2282
+ */
2283
+ reasoningEffortManaged?: boolean;
2234
2284
  /**
2235
2285
  * Model that owns effort embedded in an authored model selection. Omitted for independent reasoning-effort overrides and legacy events.
2236
2286
  */
@@ -6040,6 +6090,10 @@ export interface AssistantUsageData {
6040
6090
  * Number of rejected speculative prediction tokens
6041
6091
  */
6042
6092
  rejectedPredictionTokens?: number;
6093
+ /**
6094
+ * Serialized (uncompressed) byte length of the request body. A content-free size signal.
6095
+ */
6096
+ requestBodyBytes?: number;
6043
6097
  /**
6044
6098
  * 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.
6045
6099
  */
@@ -6053,6 +6107,11 @@ export interface AssistantUsageData {
6053
6107
  */
6054
6108
  timeToFirstTokenMs?: number;
6055
6109
  transport?: AssistantUsageTransport;
6110
+ /**
6111
+ * Milliseconds spent on the WebSocket attempt before falling back to HTTP
6112
+ */
6113
+ websocketFallbackAfterMs?: number;
6114
+ websocketFallbackReason?: ModelCallWebSocketFallbackReason;
6056
6115
  }
6057
6116
  /**
6058
6117
  * Per-request cost and usage data from the CAPI copilot_usage response field
@@ -6208,6 +6267,10 @@ export interface ModelCallFailureData {
6208
6267
  */
6209
6268
  requestBodyBytes?: number;
6210
6269
  requestFingerprint?: ModelCallFailureRequestFingerprint;
6270
+ /**
6271
+ * Zero-based orchestrator retry index of the failed attempt
6272
+ */
6273
+ retryAttempt?: number;
6211
6274
  /**
6212
6275
  * 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.
6213
6276
  */
@@ -6222,11 +6285,24 @@ export interface ModelCallFailureData {
6222
6285
  */
6223
6286
  statusCode?: number;
6224
6287
  transport?: ModelCallFailureTransport;
6288
+ /**
6289
+ * Milliseconds spent on the WebSocket attempt before falling back to HTTP
6290
+ */
6291
+ websocketFallbackAfterMs?: number;
6292
+ websocketFallbackReason?: ModelCallWebSocketFallbackReason;
6225
6293
  }
6226
6294
  /**
6227
6295
  * Content-free structural summary of the failing request for diagnosing malformed 4xx calls
6228
6296
  */
6229
6297
  export interface ModelCallFailureRequestFingerprint {
6298
+ /**
6299
+ * Summed byte length of opaque or encrypted reasoning payloads
6300
+ */
6301
+ encryptedContentBytes?: number;
6302
+ /**
6303
+ * Summed byte length of inline image payloads (data URLs and base64 sources)
6304
+ */
6305
+ imageBytes?: number;
6230
6306
  /**
6231
6307
  * Total number of image content parts
6232
6308
  */
@@ -6247,6 +6323,10 @@ export interface ModelCallFailureRequestFingerprint {
6247
6323
  * Tool calls whose name is missing or empty (rejected by strict providers)
6248
6324
  */
6249
6325
  namelessToolCallCount: number;
6326
+ /**
6327
+ * Number of messages carrying opaque or encrypted reasoning
6328
+ */
6329
+ reasoningItemCount?: number;
6250
6330
  /**
6251
6331
  * Total number of tool calls across assistant messages
6252
6332
  */
@@ -11626,7 +11706,7 @@ export interface ManagedSettingsResolvedData {
11626
11706
  source: ManagedSettingsResolvedSource;
11627
11707
  }
11628
11708
  /**
11629
- * 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 a bypass-permissions escalation while 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.
11709
+ * 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.
11630
11710
  */
11631
11711
  /** @experimental */
11632
11712
  export interface ManagedSettingsEnforcedEvent {
@@ -11657,7 +11737,7 @@ export interface ManagedSettingsEnforcedEvent {
11657
11737
  type: "session.managed_settings_enforced";
11658
11738
  }
11659
11739
  /**
11660
- * 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 a bypass-permissions escalation while 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.
11740
+ * 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.
11661
11741
  */
11662
11742
  /** @experimental */
11663
11743
  export interface ManagedSettingsEnforcedData {
@@ -11672,7 +11752,7 @@ export interface ManagedSettingsEnforcedData {
11672
11752
  */
11673
11753
  message: string;
11674
11754
  /**
11675
- * The managed setting key responsible for the enforcement (e.g. `permissions.disableBypassPermissionsMode`).
11755
+ * The managed setting key responsible for the enforcement (for example `permissions.disableBypassPermissionsMode` or `permissions.disableAssistedPermissionsMode`).
11676
11756
  */
11677
11757
  setting: string;
11678
11758
  }
package/dist/types.d.ts CHANGED
@@ -1871,6 +1871,11 @@ export interface ManagedSettingsPermissions {
1871
1871
  * values are forwarded so newer runtime policies fail closed.
1872
1872
  */
1873
1873
  disableBypassPermissionsMode?: string;
1874
+ /**
1875
+ * When true, prevents Assisted Permissions from being activated. Omit or
1876
+ * set to false to impose no restriction.
1877
+ */
1878
+ disableAssistedPermissionsMode?: boolean;
1874
1879
  /** Operations that must always be denied. Unioned across managed layers. */
1875
1880
  deny?: string[];
1876
1881
  /**
@@ -2453,6 +2458,12 @@ export interface SessionConfigBase {
2453
2458
  * if omitted, the runtime is expected to reject session creation (fail-closed).
2454
2459
  */
2455
2460
  enableManagedSettings?: boolean;
2461
+ /**
2462
+ * When true, locked managed model controls are enforced for this session.
2463
+ * Conflicting model changes are rejected, and locked startup values replace
2464
+ * conflicting session options. Overridable managed defaults remain mutable.
2465
+ */
2466
+ enforceManagedModelDefaults?: boolean;
2456
2467
  /**
2457
2468
  * Host-injected enterprise managed settings for this session.
2458
2469
  *
package/docs/workflows.md CHANGED
@@ -186,7 +186,7 @@ session.workflow.resume(
186
186
 
187
187
  Set `notifyOnComplete` to `true` for workflows that are likely to be invoked by an agent, so the originating session is notified when the workflow completes. Set it to `false` for workflows intended to be invoked programmatically, where the caller awaits the result directly. Set `logPhaseNames` to emit workflow phase names to the session transcript. Both options apply to new and resumed runs.
188
188
 
189
- Both resolve with the run envelope (`WorkflowRunResult`) for **every** outcome—`completed`, `error`, `halted`, `paused`, and `cancelled` alike. Inspect `status` and read `result` only when the run completed; a limit breach carries a typed `failure`. A `paused` envelope means that the current attempt settled, not that the durable run is permanently finished. Resume the same run ID to start another attempt with its journal and accounting intact. SDK-initiated `run` and `resume` do not request permission, so they have no declined outcome. An SDK-initiated run is refused only when the session already has its maximum number of active top-level runs. Pre-execution resume failures throw `WorkflowResumeError`, whose `code` is one of `not_found`, `non_resumable`, `workflow_run_not_resumable`, `already_active`, `workflow_already_running`, `workflow_limits_invalid`, `workflow_session_disposed`, `workflow_storage_unavailable`, or `workflow_storage_corrupt`.
189
+ Both resolve with the run envelope (`WorkflowRunResult`) for **every** outcome—`completed`, `error`, `halted`, `paused`, and `cancelled` alike. Inspect `status` and read `result` only when the run completed; a limit breach carries a typed `failure`. A `paused` envelope means that the current attempt settled, not that the durable run is permanently finished. Resume the same run ID to start another attempt with its journal and accounting intact. SDK-initiated `run` and `resume` do not request permission, so they have no declined outcome. They still enforce execution eligibility, input validation, and active-run limits. Recognized pre-execution resume failures throw `WorkflowResumeError`, whose `code` is one of `not_found`, `non_resumable`, `workflow_run_not_resumable`, `already_active`, `workflow_already_running`, `workflow_limits_invalid`, `workflow_session_disposed`, `workflow_storage_unavailable`, or `workflow_storage_corrupt`.
190
190
 
191
191
  Pause a running attempt from outside its workflow body:
192
192
 
@@ -206,7 +206,13 @@ The first attempt pauses at `"review-ready"` and ends through cooperative cancel
206
206
 
207
207
  ## Observe a run
208
208
 
209
- The calling session can inspect its own workflow runs:
209
+ The calling session can inspect its own workflow runs independently of its current execution eligibility. An empty registry enumerates successfully; losing eligibility does not hide already-admitted runs or terminal history. Observation still requires a valid, non-disposed session, and validation, missing-run, and storage errors still propagate.
210
+
211
+ Workflow storage requires SQLite support from a custom session filesystem. A provider without that capability reports `workflow_storage_unavailable`, not an empty registry or a local-storage fallback.
212
+
213
+ Compaction waits at most five seconds for its optional active-workflow summary. If storage fails or times out, compaction logs a warning and continues without that summary; aborting compaction cancels the wait. This does not change the results or error handling of explicit workflow observation calls.
214
+
215
+ Observation does not restore execution eligibility. Starting, resuming, pausing, or cancelling runs, and workflow-owned agent, log, and journal/checkpoint operations still require eligible credentials (token-based billing or trusted HMAC authentication). Ineligible execution requests fail with JSON-RPC `-32601` and `data.code: "dynamic_workflows_unavailable"`.
210
216
 
211
217
  ```ts
212
218
  const runs = await session.workflow.listRuns();
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.17",
9
- "copilotCliVersion": "1.0.93",
8
+ "version": "1.0.18-preview.1",
9
+ "copilotCliVersion": "1.0.94-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",
@@ -103,18 +103,18 @@
103
103
  "README.md"
104
104
  ],
105
105
  "copilotRuntime": {
106
- "sourceSha": "0e56b9a0033f48e4358ee027a4077cd6ebd61f32",
107
- "version": "1.0.93",
106
+ "sourceSha": "44097658e184184613f404efe56e6c4d3a991656",
107
+ "version": "1.0.94-1",
108
108
  "visibility": "public"
109
109
  },
110
110
  "optionalDependencies": {
111
- "@github/copilot-sdk-darwin-arm64": "1.0.17",
112
- "@github/copilot-sdk-darwin-x64": "1.0.17",
113
- "@github/copilot-sdk-linux-arm64": "1.0.17",
114
- "@github/copilot-sdk-linux-x64": "1.0.17",
115
- "@github/copilot-sdk-linuxmusl-arm64": "1.0.17",
116
- "@github/copilot-sdk-linuxmusl-x64": "1.0.17",
117
- "@github/copilot-sdk-win32-arm64": "1.0.17",
118
- "@github/copilot-sdk-win32-x64": "1.0.17"
111
+ "@github/copilot-sdk-darwin-arm64": "1.0.18-preview.1",
112
+ "@github/copilot-sdk-darwin-x64": "1.0.18-preview.1",
113
+ "@github/copilot-sdk-linux-arm64": "1.0.18-preview.1",
114
+ "@github/copilot-sdk-linux-x64": "1.0.18-preview.1",
115
+ "@github/copilot-sdk-linuxmusl-arm64": "1.0.18-preview.1",
116
+ "@github/copilot-sdk-linuxmusl-x64": "1.0.18-preview.1",
117
+ "@github/copilot-sdk-win32-arm64": "1.0.18-preview.1",
118
+ "@github/copilot-sdk-win32-x64": "1.0.18-preview.1"
119
119
  }
120
120
  }