@github/copilot-sdk 1.0.12-preview.0 → 1.0.12-unstable.0

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.
@@ -1412,12 +1412,6 @@ class CopilotClient {
1412
1412
  session["_workspacePath"] = workspacePath;
1413
1413
  session.setCapabilities(capabilities);
1414
1414
  session.setOpenCanvases(openCanvases ?? []);
1415
- if (config.mcpServers) {
1416
- await this.connection.sendRequest("session.mcp.reloadWithConfig", {
1417
- sessionId,
1418
- config: { mcpServers: toWireMcpServers(config.mcpServers) }
1419
- });
1420
- }
1421
1415
  if (config.onMcpAuthRequest) {
1422
1416
  await this.connection.sendRequest("session.eventLog.registerInterest", {
1423
1417
  sessionId,
@@ -89,9 +89,9 @@ function createServerRpc(connection) {
89
89
  */
90
90
  getAllUsers: async () => connection.sendRequest("account.getAllUsers", {}),
91
91
  /**
92
- * Stores authentication credentials after successful login (e.g., device code flow).
92
+ * Validates and stores authentication credentials. When login is omitted, resolves the authenticated user from the token before persistence.
93
93
  *
94
- * @param params Credentials to store after successful authentication
94
+ * @param params Credentials to validate and store. Omit login to resolve the authenticated user from the token.
95
95
  *
96
96
  * @returns Result of a successful login; throws on failure
97
97
  */
@@ -1991,7 +1991,7 @@ function createSessionRpc(connection, sessionId) {
1991
1991
  */
1992
1992
  list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
1993
1993
  /**
1994
- * Adds a directory to the session's allow-list.
1994
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
1995
1995
  *
1996
1996
  * @param params Directory path to add to the session's allowed directories.
1997
1997
  *
package/dist/client.js CHANGED
@@ -1389,12 +1389,6 @@ class CopilotClient {
1389
1389
  session["_workspacePath"] = workspacePath;
1390
1390
  session.setCapabilities(capabilities);
1391
1391
  session.setOpenCanvases(openCanvases ?? []);
1392
- if (config.mcpServers) {
1393
- await this.connection.sendRequest("session.mcp.reloadWithConfig", {
1394
- sessionId,
1395
- config: { mcpServers: toWireMcpServers(config.mcpServers) }
1396
- });
1397
- }
1398
1392
  if (config.onMcpAuthRequest) {
1399
1393
  await this.connection.sendRequest("session.eventLog.registerInterest", {
1400
1394
  sessionId,
@@ -796,8 +796,6 @@ export type DebugCollectLogsResultKind =
796
796
  "archive"
797
797
  /** A directory containing redacted files was written. */
798
798
  | "directory";
799
- /** @experimental */
800
- export type DisableBypassPermissionsMode = "disable";
801
799
  /**
802
800
  * Persisted extension discovery source
803
801
  *
@@ -2367,6 +2365,8 @@ export type PermissionModeSource =
2367
2365
  | "slash_command"
2368
2366
  /** The mode was set by confirming autopilot behavior. */
2369
2367
  | "autopilot_confirmation"
2368
+ /** The mode was set at startup by the `defaultPermissionMode` user setting. */
2369
+ | "user_setting"
2370
2370
  /** The mode was set through an RPC caller. */
2371
2371
  | "rpc";
2372
2372
  /**
@@ -2407,6 +2407,8 @@ export type PermissionsSetApproveAllSource =
2407
2407
  | "slash_command"
2408
2408
  /** Allow-all was enabled by confirming autopilot behavior. */
2409
2409
  | "autopilot_confirmation"
2410
+ /** Allow-all was enabled at startup by the `defaultPermissionMode` user setting. */
2411
+ | "user_setting"
2410
2412
  /** Allow-all was enabled through an RPC caller. */
2411
2413
  | "rpc";
2412
2414
  /**
@@ -4081,7 +4083,7 @@ export interface AccountQuotaSnapshot {
4081
4083
  resetDate?: string;
4082
4084
  }
4083
4085
  /**
4084
- * Credentials to store after successful authentication
4086
+ * Credentials to validate and store. Omit login to resolve the authenticated user from the token.
4085
4087
  *
4086
4088
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4087
4089
  * via the `definition` "AccountLoginRequest".
@@ -4093,9 +4095,9 @@ export interface AccountLoginRequest {
4093
4095
  */
4094
4096
  host: string;
4095
4097
  /**
4096
- * User login/username
4098
+ * User login/username. When omitted, the runtime validates the token and resolves the login from GitHub.
4097
4099
  */
4098
- login: string;
4100
+ login?: string;
4099
4101
  /**
4100
4102
  * GitHub authentication token
4101
4103
  */
@@ -8364,6 +8366,10 @@ export interface InstalledPlugin {
8364
8366
  * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
8365
8367
  */
8366
8368
  source_sha?: string;
8369
+ /**
8370
+ * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
8371
+ */
8372
+ installed_from?: string;
8367
8373
  }
8368
8374
  /**
8369
8375
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -8468,6 +8474,10 @@ export interface InstalledPluginInfo {
8468
8474
  * Whether the plugin is currently enabled for new sessions
8469
8475
  */
8470
8476
  enabled: boolean;
8477
+ /**
8478
+ * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed".
8479
+ */
8480
+ installedFrom?: string;
8471
8481
  }
8472
8482
  /**
8473
8483
  * Canonical file or directory where custom instructions can be discovered or created, with location, kind, preference, and project path.
@@ -11311,6 +11321,15 @@ export interface Model {
11311
11321
  supportedContextTiers?: string[];
11312
11322
  modelPickerCategory?: ModelPickerCategory;
11313
11323
  modelPickerPriceCategory?: ModelPickerPriceCategory;
11324
+ warningText?: ModelWarningText;
11325
+ /**
11326
+ * Informational notices the service published for this model, such as an upcoming change or a recommended alternative. Present only when the service published at least one notice. Hosts should surface these without implying anything is wrong with the model.
11327
+ */
11328
+ infoMessages?: ModelMessage[];
11329
+ /**
11330
+ * Warnings the service published for this model, such as a deprecated client version. Present only when the service published at least one warning. The model remains usable; hosts should surface these as advisory rather than blocking.
11331
+ */
11332
+ warningMessages?: ModelMessage[];
11314
11333
  }
11315
11334
  /**
11316
11335
  * Model capabilities and limits
@@ -11533,6 +11552,36 @@ export interface ModelBillingPromo {
11533
11552
  */
11534
11553
  message?: string;
11535
11554
  }
11555
+ /**
11556
+ * Service-published warning text that hosts should display when presenting a model.
11557
+ *
11558
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11559
+ * via the `definition` "ModelWarningText".
11560
+ */
11561
+ /** @experimental */
11562
+ export interface ModelWarningText {
11563
+ /**
11564
+ * Data-retention warning for the model. The text may contain Markdown links and should be rendered as Markdown when supported.
11565
+ */
11566
+ dataRetention?: string;
11567
+ }
11568
+ /**
11569
+ * A service-published message about a model, carrying a stable machine-readable code alongside human-readable text.
11570
+ *
11571
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11572
+ * via the `definition` "ModelMessage".
11573
+ */
11574
+ /** @experimental */
11575
+ export interface ModelMessage {
11576
+ /**
11577
+ * Stable machine-readable identifier for the message, such as `client_version_deprecated`. Hosts can key custom presentation off this; unrecognized codes should fall back to displaying `message`.
11578
+ */
11579
+ code: string;
11580
+ /**
11581
+ * Human-readable message text intended for display to the user.
11582
+ */
11583
+ message: string;
11584
+ }
11536
11585
  /**
11537
11586
  * Managed, repository, and CLI model overrides to overlay onto the session at startup.
11538
11587
  *
@@ -13041,7 +13090,7 @@ export interface PermissionLocationResolveResult {
13041
13090
  /** @experimental */
13042
13091
  export interface PermissionPathsAddParams {
13043
13092
  /**
13044
- * Directory to add to the allow-list. The runtime resolves and validates the path before adding.
13093
+ * Directory to add to the allow-list. The runtime resolves and validates the path before adding, then loads conventional `.github/skills/` and `.github/agents/` definitions under it when their subsystem gates are enabled. Adding the directory is therefore also a trust decision for configuration stored there.
13045
13094
  */
13046
13095
  path: string;
13047
13096
  }
@@ -13084,7 +13133,7 @@ export interface PermissionPathsConfig {
13084
13133
  */
13085
13134
  unrestricted?: boolean;
13086
13135
  /**
13087
- * Additional directories to allow tool access to (in addition to the session's working directory). When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion).
13136
+ * Additional directories to allow tool access to (in addition to the session's working directory). Conventional `.github/skills/` and `.github/agents/` definitions under them also join the session catalogs when their subsystem gates are enabled, so supplying a directory is a trust decision for configuration stored there. When `unrestricted` is true, these are still pre-populated on the UnrestrictedPathManager so they remain visible via getDirectories() (e.g. for @-mention completion).
13088
13137
  */
13089
13138
  additionalDirectories?: string[];
13090
13139
  /**
@@ -15009,6 +15058,10 @@ export interface QueuePendingItemsResult {
15009
15058
  * Display text for messages currently in the immediate steering queue (interjections sent during a running turn).
15010
15059
  */
15011
15060
  steeringMessages: string[];
15061
+ /**
15062
+ * How many leading entries of `steeringMessages` have already been folded into the running turn (and so have an emitted `user.message`), as opposed to still waiting for one. Absent for hosts that do not distinguish the two.
15063
+ */
15064
+ inFlightSteeringCount?: number;
15012
15065
  }
15013
15066
  /**
15014
15067
  * Parameters for removing a queued item by stable id.
@@ -15541,7 +15594,7 @@ export interface SandboxConfig {
15541
15594
  addCurrentWorkingDirectory?: boolean;
15542
15595
  auth?: SandboxConfigAuth;
15543
15596
  /**
15544
- * Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out).
15597
+ * Whether to auto-grant read access to the tool directories discovered on PATH and in toolchain environment variables (GOROOT, CARGO_HOME, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Set to false to disable every grant listed above: user-installed toolchains (rustup, nvm, pyenv, conda, pipx) then need explicit userPolicy.filesystem entries — readonlyPaths to read them, plus readwriteFiles for a relocated CARGO_HOME's .package-cache and .global-cache, which Cargo locks on every build. Only these developer-tool grants are affected: the working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted, so commands still run. Default: true (enabled by default; set to false to opt out).
15545
15598
  */
15546
15599
  allowDevToolAccess?: boolean;
15547
15600
  }
@@ -16845,6 +16898,10 @@ export interface SessionInstalledPlugin {
16845
16898
  * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
16846
16899
  */
16847
16900
  source_sha?: string;
16901
+ /**
16902
+ * Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — those synthesized at session start for a directory/local marketplace, whose cache_path points at the real plugin directory on disk rather than a copy under the installed-plugins cache. Its presence is what marks a record as live, and no record carrying it is ever written to the persisted installedPlugins key.
16903
+ */
16904
+ installed_from?: string;
16848
16905
  }
16849
16906
  /**
16850
16907
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -17048,7 +17105,10 @@ export interface SessionLoadDeferredRepoHooksResult {
17048
17105
  */
17049
17106
  /** @experimental */
17050
17107
  export interface SessionManagedPermissions {
17051
- disableBypassPermissionsMode?: DisableBypassPermissionsMode;
17108
+ /**
17109
+ * When set to `disable`, prevents bypass/allow-all permission modes. `allow-auto-only` blocks full allow-all but permits advisory auto-approval. Any other value is accepted rather than failing the session, but is enforced as `disable`: the key is only present to restrict something, so a mode this runtime cannot interpret fails closed to the most restrictive one it knows. Omit the key entirely to impose no restriction.
17110
+ */
17111
+ disableBypassPermissionsMode?: string;
17052
17112
  /**
17053
17113
  * Permission rules that block matching operations. Deny has highest precedence.
17054
17114
  */
@@ -17253,7 +17313,7 @@ export interface SessionOpenOptions {
17253
17313
  */
17254
17314
  workingDirectory?: string;
17255
17315
  /**
17256
- * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`).
17316
+ * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories.
17257
17317
  */
17258
17318
  additionalDirectories?: string[];
17259
17319
  workingDirectoryContext?: SessionContext;
@@ -21818,9 +21878,9 @@ export declare function createServerRpc(connection: MessageConnection): {
21818
21878
  */
21819
21879
  getAllUsers: () => Promise<AccountGetAllUsersResult>;
21820
21880
  /**
21821
- * Stores authentication credentials after successful login (e.g., device code flow).
21881
+ * Validates and stores authentication credentials. When login is omitted, resolves the authenticated user from the token before persistence.
21822
21882
  *
21823
- * @param params Credentials to store after successful authentication
21883
+ * @param params Credentials to validate and store. Omit login to resolve the authenticated user from the token.
21824
21884
  *
21825
21885
  * @returns Result of a successful login; throws on failure
21826
21886
  */
@@ -23642,7 +23702,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23642
23702
  */
23643
23703
  list: () => Promise<PermissionPathsList>;
23644
23704
  /**
23645
- * Adds a directory to the session's allow-list.
23705
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
23646
23706
  *
23647
23707
  * @param params Directory path to add to the session's allowed directories.
23648
23708
  *
@@ -61,9 +61,9 @@ function createServerRpc(connection) {
61
61
  */
62
62
  getAllUsers: async () => connection.sendRequest("account.getAllUsers", {}),
63
63
  /**
64
- * Stores authentication credentials after successful login (e.g., device code flow).
64
+ * Validates and stores authentication credentials. When login is omitted, resolves the authenticated user from the token before persistence.
65
65
  *
66
- * @param params Credentials to store after successful authentication
66
+ * @param params Credentials to validate and store. Omit login to resolve the authenticated user from the token.
67
67
  *
68
68
  * @returns Result of a successful login; throws on failure
69
69
  */
@@ -1963,7 +1963,7 @@ function createSessionRpc(connection, sessionId) {
1963
1963
  */
1964
1964
  list: async () => connection.sendRequest("session.permissions.paths.list", { sessionId }),
1965
1965
  /**
1966
- * Adds a directory to the session's allow-list.
1966
+ * Adds a directory to the session's allow-list and activates conventional skill and agent definitions under it.
1967
1967
  *
1968
1968
  * @param params Directory path to add to the session's allowed directories.
1969
1969
  *
@@ -9,7 +9,7 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
9
9
  /**
10
10
  * Union of all session event variants emitted by the Copilot CLI runtime.
11
11
  */
12
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
12
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
14
  * Hosting platform type of the repository (github or ado)
15
15
  */
@@ -303,6 +303,18 @@ export type ModelCallFailureTransport =
303
303
  "http"
304
304
  /** WebSocket transport. */
305
305
  | "websocket";
306
+ /**
307
+ * Final outcome of one logical model dispatch after response acceptance processing
308
+ */
309
+ export type ModelCallFinishedOutcome =
310
+ /** The provider response was accepted for continued agent processing. */
311
+ "success"
312
+ /** The dispatch ended with a provider or transport error. */
313
+ | "error"
314
+ /** The dispatch was cancelled before an accepted response was produced. */
315
+ | "cancelled"
316
+ /** The provider response was rejected during post-response acceptance processing. */
317
+ | "rejected";
306
318
  /**
307
319
  * Finite reason code describing why the current turn was aborted
308
320
  */
@@ -665,7 +677,9 @@ export type ManagedSettingsEnforcedEscalation =
665
677
  /** Unrestricted filesystem access outside the session's allowed directories. */
666
678
  | "unrestricted_paths"
667
679
  /** Unrestricted URL fetch access. */
668
- | "unrestricted_urls";
680
+ | "unrestricted_urls"
681
+ /** A server-wide MCP "Always Allow" (or `--allow-tool <server>`) blanket that would auto-approve every tool from an MCP server. Capped to per-tool approval; each tool still prompts. */
682
+ | "server_wide_mcp_approval";
669
683
  /**
670
684
  * Exit plan mode action
671
685
  */
@@ -4105,6 +4119,10 @@ export interface AssistantUsageData {
4105
4119
  * Number of output tokens produced
4106
4120
  */
4107
4121
  outputTokens?: number;
4122
+ /**
4123
+ * Time to first observable model output in milliseconds. Includes text, reasoning, and tool-call output; only available for streaming requests that produce observable output.
4124
+ */
4125
+ outputTtftMs?: number;
4108
4126
  /**
4109
4127
  * @deprecated
4110
4128
  * Parent tool call ID when this usage originates from a sub-agent
@@ -4313,6 +4331,62 @@ export interface ModelCallFailureRequestFingerprint {
4313
4331
  */
4314
4332
  toolResultMessageCount: number;
4315
4333
  }
4334
+ /**
4335
+ * Session event "model.call_finished". Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count.
4336
+ */
4337
+ export interface ModelCallFinishedEvent {
4338
+ /**
4339
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
4340
+ */
4341
+ agentId?: string;
4342
+ data: ModelCallFinishedData;
4343
+ /**
4344
+ * Always true for events that are transient and not persisted to the session event log on disk.
4345
+ */
4346
+ ephemeral: true;
4347
+ /**
4348
+ * Unique event identifier (UUID v4), generated when the event is emitted
4349
+ */
4350
+ id: string;
4351
+ /**
4352
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
4353
+ */
4354
+ parentId: string | null;
4355
+ /**
4356
+ * ISO 8601 timestamp when the event was created
4357
+ */
4358
+ timestamp: string;
4359
+ /**
4360
+ * Type discriminator. Always "model.call_finished".
4361
+ */
4362
+ type: "model.call_finished";
4363
+ }
4364
+ /**
4365
+ * Final lifecycle outcome for one logical model dispatch. A logical dispatch may include internal reconnect or fallback work, so event count is not provider HTTP-request count.
4366
+ */
4367
+ export interface ModelCallFinishedData {
4368
+ /**
4369
+ * Whether an accepted successful response requested the exact name and command semantics of a built-in file edit tool, including an external tool explicitly replacing that built-in name. Absent when the logical dispatch did not produce an accepted response.
4370
+ */
4371
+ containsBuiltInFileEditRequest?: boolean;
4372
+ /**
4373
+ * Monotonic elapsed time spent in the logical model dispatch, including any internal transport reconnect or fallback and excluding orchestrator retry backoff, tool execution, confirmations, and post-response processing
4374
+ */
4375
+ dispatchDurationMs: number;
4376
+ /**
4377
+ * Version of the built-in file-edit semantic classifier used for this event
4378
+ */
4379
+ editClassifierVersion: number;
4380
+ /**
4381
+ * Identifier of the user interaction that owns the model dispatch, matching assistant.turn_start.interactionId when available
4382
+ */
4383
+ interactionId?: string;
4384
+ outcome: ModelCallFinishedOutcome;
4385
+ /**
4386
+ * Agent-loop iteration within the interaction that initiated the model dispatch
4387
+ */
4388
+ turnId: string;
4389
+ }
4316
4390
  /**
4317
4391
  * Session event "abort". Turn abort information including the reason for termination
4318
4392
  */
@@ -6784,6 +6858,10 @@ export interface PermissionPromptRequestMcp {
6784
6858
  * @experimental
6785
6859
  */
6786
6860
  assistedApproval?: PermissionAssistedApproval;
6861
+ /**
6862
+ * Whether the host may offer a server-wide "approve all tools from this server" blanket. Absent is treated as true; the runtime sends false when managed policy disables bypass-permissions mode, which forbids the server-wide escalation while still allowing per-tool approval.
6863
+ */
6864
+ canOfferServerWideApproval?: boolean;
6787
6865
  /**
6788
6866
  * Prompt kind discriminator
6789
6867
  */
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/github/copilot-sdk.git"
6
6
  },
7
- "version": "1.0.12-preview.0",
7
+ "version": "1.0.12-unstable.0",
8
8
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
9
9
  "main": "./dist/cjs/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "author": "GitHub",
57
57
  "license": "MIT",
58
58
  "dependencies": {
59
- "@github/copilot": "^1.0.81-5",
59
+ "@github/copilot": "^1.0.81-9",
60
60
  "koffi": "^3.1.0",
61
61
  "vscode-jsonrpc": "^8.2.1",
62
62
  "zod": "^4.3.6"