@github/copilot-sdk 1.0.13-preview.6 → 1.0.13

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.
@@ -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, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerSource, McpServerStatus, ModelChangeSource, PermissionMode, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, TaskCompleteData, TaskCompletionOutcome, UserToolSessionApproval, Verbosity } from "./session-events.js";
6
+ import type { AbortReason, AgentModelPolicy, Attachment, AutoTier, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpOauthHttpResponse, McpOauthWWWAuthenticateParams, McpServerMetadata, McpServerSource, McpServerStatus, ModelChangeSource, PermissionMode, PermissionPromptRequest, PermissionRule, ReasoningSummary, RemediationAction, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, TaskCompleteData, TaskCompletionOutcome, 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;
@@ -253,6 +253,20 @@ export type AuthInfoType =
253
253
  */
254
254
  /** @experimental */
255
255
  export type AuthValidationErrors = AuthValidationError[];
256
+ /**
257
+ * Current normalized autopilot objective lifecycle status.
258
+ *
259
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
260
+ * via the `definition` "AutopilotObjectiveStatus".
261
+ */
262
+ /** @experimental */
263
+ export type AutopilotObjectiveStatus =
264
+ /** The objective is actively running. */
265
+ "active"
266
+ /** The objective is paused and may be resumed. */
267
+ | "paused"
268
+ /** The objective completed. */
269
+ | "completed";
256
270
  /**
257
271
  * Root JSON Schema type for a built-in tool input.
258
272
  *
@@ -629,6 +643,18 @@ export type CatalogUnavailableTransportReason =
629
643
  | "transport-not-supported"
630
644
  /** Eligible remotes could not be enumerated, so no explicit choice can be offered. */
631
645
  | "remote-enumeration-unavailable";
646
+ /**
647
+ * Why the runtime requests client-task cancellation.
648
+ *
649
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
650
+ * via the `definition` "ClientTaskCancelReason".
651
+ */
652
+ /** @experimental */
653
+ export type ClientTaskCancelReason =
654
+ /** A caller requested task cancellation. */
655
+ "cancel_requested"
656
+ /** The session is shutting down. */
657
+ | "session_shutdown";
632
658
  /**
633
659
  * Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command
634
660
  *
@@ -708,6 +734,20 @@ export type ConnectedRemoteSessionMetadataKind =
708
734
  "remote-session"
709
735
  /** GitHub Copilot coding agent session. */
710
736
  | "coding-agent";
737
+ /**
738
+ * Closed set of public task kinds a connection can negotiate.
739
+ *
740
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
741
+ * via the `definition` "TaskKind".
742
+ */
743
+ /** @experimental */
744
+ export type TaskKind =
745
+ /** Runtime-owned background agent task. */
746
+ "agent"
747
+ /** Runtime-owned shell task. */
748
+ | "shell"
749
+ /** Client-owned externally executed task. */
750
+ | "client";
711
751
  /**
712
752
  * Controls how MCP tool result content is filtered: none leaves content unchanged, markdown sanitizes HTML while preserving Markdown-friendly output, and hidden_characters removes characters that can hide directives.
713
753
  *
@@ -2278,6 +2318,18 @@ export type ModelListRequest = {
2278
2318
  */
2279
2319
  skipCache?: boolean;
2280
2320
  };
2321
+ /**
2322
+ * Whether the requested preference was already effective or was accepted for later transactional activation.
2323
+ *
2324
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2325
+ * via the `definition` "ModelSwitchAutoTierStatus".
2326
+ */
2327
+ /** @experimental */
2328
+ export type ModelSwitchAutoTierStatus =
2329
+ /** The requested preference is already effective. No activation is pending for it, although this request may have cancelled an earlier unclaimed preference reported in `supersededAutoTier`. */
2330
+ "unchanged"
2331
+ /** The request was accepted but has not committed. A later user turn using the `auto` model must mint and validate the replacement before it becomes effective. */
2332
+ | "pending";
2281
2333
  /**
2282
2334
  * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.
2283
2335
  *
@@ -2544,6 +2596,18 @@ export type PermissionsSetApproveAllSource =
2544
2596
  | "user_setting"
2545
2597
  /** Allow-all was enabled through an RPC caller. */
2546
2598
  | "rpc";
2599
+ /**
2600
+ * Where completed plugin content was staged before atomic promotion.
2601
+ *
2602
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2603
+ * via the `definition` "PluginInstallStagingMode".
2604
+ */
2605
+ /** @experimental */
2606
+ export type PluginInstallStagingMode =
2607
+ /** A sibling of the installed-plugins root, outside the recursively watched tree. */
2608
+ "external"
2609
+ /** A sibling of the destination plugin directory, used when external staging is unavailable. */
2610
+ | "destination_sibling";
2547
2611
  /**
2548
2612
  * Optional flags controlling which side effects the reload performs.
2549
2613
  *
@@ -3340,13 +3404,154 @@ export type TaskExecutionMode =
3340
3404
  /** The task is managed in the background. */
3341
3405
  | "background";
3342
3406
  /**
3343
- * Tracked task union returned by task APIs, containing either an agent task or a shell task.
3407
+ * Active status a client owner may publish with a progress update.
3408
+ *
3409
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3410
+ * via the `definition` "TaskClientActiveStatus".
3411
+ */
3412
+ /** @experimental */
3413
+ export type TaskClientActiveStatus =
3414
+ /** The external owner is actively working. */
3415
+ "running"
3416
+ /** The external owner is connected but waiting. */
3417
+ | "idle";
3418
+ /**
3419
+ * Client-owned tasks always execute outside the runtime in background mode.
3420
+ *
3421
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3422
+ * via the `definition` "TaskClientExecutionMode".
3423
+ */
3424
+ /** @experimental */
3425
+ export type TaskClientExecutionMode = "background";
3426
+ /**
3427
+ * Discriminator for a client-owned task.
3428
+ *
3429
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3430
+ * via the `definition` "TaskClientType".
3431
+ */
3432
+ /** @experimental */
3433
+ export type TaskClientType = "client";
3434
+ /**
3435
+ * Lifecycle status of a client-owned task.
3436
+ *
3437
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3438
+ * via the `definition` "TaskClientStatus".
3439
+ */
3440
+ /** @experimental */
3441
+ export type TaskClientStatus =
3442
+ /** The external owner is actively working. */
3443
+ "running"
3444
+ /** The external owner is connected but waiting. */
3445
+ | "idle"
3446
+ /** The owner reported successful completion. */
3447
+ | "completed"
3448
+ /** The owner reported failure. */
3449
+ | "failed"
3450
+ /** The owner reported or confirmed cancellation. */
3451
+ | "cancelled"
3452
+ /** The bound owner join disappeared; external executor state is unknown. */
3453
+ | "orphaned";
3454
+ /**
3455
+ * Connection class owning a client task.
3456
+ *
3457
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3458
+ * via the `definition` "TaskClientOwnerKind".
3459
+ */
3460
+ /** @experimental */
3461
+ export type TaskClientOwnerKind =
3462
+ /** A discovered extension connection owns the task. */
3463
+ "extension"
3464
+ /** A generic SDK connection owns the task. */
3465
+ | "sdk";
3466
+ /**
3467
+ * Presence of the task's bound join.
3468
+ *
3469
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3470
+ * via the `definition` "TaskClientOwnerPresence".
3471
+ */
3472
+ /** @experimental */
3473
+ export type TaskClientOwnerPresence =
3474
+ /** The bound session join is connected. */
3475
+ "connected"
3476
+ /** The bound session join is disconnected. */
3477
+ | "disconnected";
3478
+ /**
3479
+ * Progress or terminal update for a client-owned task.
3480
+ *
3481
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3482
+ * via the `definition` "TaskClientUpdate".
3483
+ */
3484
+ /** @experimental */
3485
+ export type TaskClientUpdate = {
3486
+ status?: TaskClientActiveStatus;
3487
+ /**
3488
+ * Optional progress message appended to recent activity when nonempty
3489
+ */
3490
+ message?: string;
3491
+ /**
3492
+ * Optional progress phase; null clears the current phase
3493
+ */
3494
+ phase?: string | null;
3495
+ /**
3496
+ * Optional completion percentage; null clears the current percentage
3497
+ */
3498
+ percentage?: number | null;
3499
+ /**
3500
+ * Client task update variant discriminator.
3501
+ */
3502
+ kind: "progress";
3503
+ } | {
3504
+ /**
3505
+ * Optional final progress message
3506
+ */
3507
+ message?: string;
3508
+ /**
3509
+ * Optional opaque successful terminal result
3510
+ */
3511
+ result?: JsonValue;
3512
+ /**
3513
+ * Client task update variant discriminator.
3514
+ */
3515
+ kind: "completed";
3516
+ } | {
3517
+ /**
3518
+ * Optional final progress message
3519
+ */
3520
+ message?: string;
3521
+ /**
3522
+ * Human-readable terminal failure message
3523
+ */
3524
+ error: string;
3525
+ /**
3526
+ * Optional owner-supplied terminal failure code
3527
+ */
3528
+ code?: string;
3529
+ /**
3530
+ * Client task update variant discriminator.
3531
+ */
3532
+ kind: "failed";
3533
+ } | {
3534
+ /**
3535
+ * Optional final progress message
3536
+ */
3537
+ message?: string;
3538
+ /**
3539
+ * Optional human-readable cancellation reason
3540
+ */
3541
+ reason?: string;
3542
+ /**
3543
+ * Client task update variant discriminator.
3544
+ */
3545
+ kind: "cancelled";
3546
+ };
3547
+ /**
3548
+ * Tracked task union returned by task APIs, containing an agent, client, or shell task.
3344
3549
  *
3345
3550
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3346
3551
  * via the `definition` "TaskInfo".
3347
3552
  */
3348
3553
  /** @experimental */
3349
- export type TaskInfo = TaskAgentInfo | TaskShellInfo;
3554
+ export type TaskInfo = TaskAgentInfo | TaskClientInfo | TaskShellInfo;
3350
3555
  /**
3351
3556
  * Whether the shell runs inside a managed PTY session or as an independent background process
3352
3557
  *
@@ -3366,7 +3571,7 @@ export type TaskShellInfoAttachmentMode =
3366
3571
  * via the `definition` "TaskProgress".
3367
3572
  */
3368
3573
  /** @experimental */
3369
- export type TaskProgress = (TaskAgentProgress | TaskShellProgress) | null;
3574
+ export type TaskProgress = TaskAgentProgress | TaskClientProgress | TaskShellProgress | null;
3370
3575
  /**
3371
3576
  * Canonical result returned by a session tool.
3372
3577
  *
@@ -4749,6 +4954,75 @@ export interface AuthValidationError {
4749
4954
  */
4750
4955
  githubMessage?: string;
4751
4956
  }
4957
+ /**
4958
+ * Current per-window credit limit and consumption for an autopilot objective.
4959
+ *
4960
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4961
+ * via the `definition` "AutopilotObjectiveCreditLimit".
4962
+ */
4963
+ /** @experimental */
4964
+ export interface AutopilotObjectiveCreditLimit {
4965
+ /**
4966
+ * Configured AI-credit cap, when one is set.
4967
+ */
4968
+ credits?: number;
4969
+ /**
4970
+ * Window consumption in fractional AI credits, for display.
4971
+ */
4972
+ creditsUsed: number;
4973
+ /**
4974
+ * Exact window consumption in non-negative integer nano-AIU, encoded as a decimal string.
4975
+ */
4976
+ creditsUsedNanoAiu: string;
4977
+ }
4978
+ /**
4979
+ * Canonical runtime state for the session's current autopilot objective.
4980
+ *
4981
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4982
+ * via the `definition` "AutopilotObjectiveGetStateResult".
4983
+ */
4984
+ /** @experimental */
4985
+ export interface AutopilotObjectiveGetStateResult {
4986
+ /**
4987
+ * Current objective state, or `null` when the session has no objective.
4988
+ */
4989
+ state: AutopilotObjectiveState | null;
4990
+ }
4991
+ /**
4992
+ * Public, persistence-independent projection of an autopilot objective.
4993
+ *
4994
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4995
+ * via the `definition` "AutopilotObjectiveState".
4996
+ */
4997
+ /** @experimental */
4998
+ export interface AutopilotObjectiveState {
4999
+ /**
5000
+ * Session-local objective identifier.
5001
+ */
5002
+ id: number;
5003
+ /**
5004
+ * User-provided objective text.
5005
+ */
5006
+ objective: string;
5007
+ status: AutopilotObjectiveStatus;
5008
+ /**
5009
+ * Number of objective turns started.
5010
+ */
5011
+ turnCount: number;
5012
+ /**
5013
+ * Optional reason the objective is paused.
5014
+ */
5015
+ pauseReason?: string;
5016
+ /**
5017
+ * Optional summary recorded when the objective completed.
5018
+ */
5019
+ completionSummary?: string;
5020
+ /**
5021
+ * Exact lifetime AI-credit consumption in non-negative integer nano-AIU, encoded as a decimal string.
5022
+ */
5023
+ creditCountNanoAiu: string;
5024
+ creditLimit?: AutopilotObjectiveCreditLimit;
5025
+ }
4752
5026
  /**
4753
5027
  * The running runtime's complete catalog of well-known built-in model IDs, including supported models and additional IDs with built-in metadata.
4754
5028
  *
@@ -5782,6 +6056,45 @@ export interface CatalogUnavailableTransportError {
5782
6056
  */
5783
6057
  message: string;
5784
6058
  }
6059
+ /**
6060
+ * Runtime-to-owner cancellation request for a client-owned task.
6061
+ *
6062
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6063
+ * via the `definition` "ClientTaskCancelRequest".
6064
+ */
6065
+ /** @experimental */
6066
+ export interface ClientTaskCancelRequest {
6067
+ /**
6068
+ * Session that owns the client task
6069
+ */
6070
+ sessionId: string;
6071
+ /**
6072
+ * Canonical runtime-generated task identifier
6073
+ */
6074
+ id: string;
6075
+ /**
6076
+ * Owner-scoped task key included for correlation
6077
+ */
6078
+ clientTaskId: string;
6079
+ /**
6080
+ * Opaque identifier shared by coalesced cancellation callers
6081
+ */
6082
+ cancellationId: string;
6083
+ reason: ClientTaskCancelReason;
6084
+ }
6085
+ /**
6086
+ * Whether the client authoritatively confirmed its external work stopped.
6087
+ *
6088
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6089
+ * via the `definition` "ClientTaskCancelResult".
6090
+ */
6091
+ /** @experimental */
6092
+ export interface ClientTaskCancelResult {
6093
+ /**
6094
+ * True only when the owner confirms that external work stopped before responding
6095
+ */
6096
+ cancelled: boolean;
6097
+ }
5785
6098
  /**
5786
6099
  * Slash commands available in the session, after applying any include/exclude filters.
5787
6100
  *
@@ -6235,7 +6548,7 @@ export interface ContextHeaviestMessage {
6235
6548
  tokens: number;
6236
6549
  }
6237
6550
  /**
6238
- * The currently selected model, reasoning effort, and context tier for the session. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
6551
+ * The session's authoritative model snapshot. Auto preference fields are configuration for the virtual `auto` model and do not change the selected model identifier. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
6239
6552
  *
6240
6553
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6241
6554
  * via the `definition` "CurrentModel".
@@ -6251,6 +6564,15 @@ export interface CurrentModel {
6251
6564
  */
6252
6565
  reasoningEffort?: string;
6253
6566
  contextTier?: ContextTier;
6567
+ autoTier?: AutoTier;
6568
+ /**
6569
+ * Latest unclaimed Auto preference waiting for a future user turn. Null means the pending request is returning to provider-default routing.
6570
+ */
6571
+ pendingAutoTier?: AutoTier | null;
6572
+ /**
6573
+ * Auto preference currently claimed by an in-progress activation. Null means the activation is returning to provider-default routing.
6574
+ */
6575
+ activatingAutoTier?: AutoTier | null;
6254
6576
  }
6255
6577
  /**
6256
6578
  * Lightweight metadata for a currently initialized session tool
@@ -10025,6 +10347,10 @@ export interface McpConfigRemoveRequest {
10025
10347
  * Name of the MCP server to remove
10026
10348
  */
10027
10349
  name: string;
10350
+ /**
10351
+ * OAuth Client ID Metadata Document URL whose persisted credentials should also be removed.
10352
+ */
10353
+ authClientIdMetadataUrl?: string;
10028
10354
  }
10029
10355
  /**
10030
10356
  * MCP server name and replacement configuration to write to user configuration.
@@ -11240,6 +11566,7 @@ export interface McpServer {
11240
11566
  * Error message if the server failed to connect
11241
11567
  */
11242
11568
  error?: string;
11569
+ serverMetadata?: McpServerMetadata;
11243
11570
  }
11244
11571
  /**
11245
11572
  * MCP servers configured for the session, with their connection status and host-level state.
@@ -11613,6 +11940,12 @@ export interface Model {
11613
11940
  */
11614
11941
  name: string;
11615
11942
  capabilities: ModelCapabilities;
11943
+ /**
11944
+ * Provider-supplied model metadata. Keys and JSON-compatible values are preserved unchanged. This is factual metadata published by the model provider; it carries no picker or UX semantics.
11945
+ */
11946
+ metadata?: {
11947
+ [k: string]: JsonValue | undefined;
11948
+ };
11616
11949
  policy?: ModelPolicy;
11617
11950
  billing?: ModelBilling;
11618
11951
  /**
@@ -12090,6 +12423,43 @@ export interface ModelsListRequest {
12090
12423
  */
12091
12424
  gitHubToken?: string;
12092
12425
  }
12426
+ /**
12427
+ * An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.
12428
+ *
12429
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12430
+ * via the `definition` "ModelSwitchAutoTierRequest".
12431
+ */
12432
+ /** @experimental */
12433
+ export interface ModelSwitchAutoTierRequest {
12434
+ /**
12435
+ * Auto preference to activate when a future user turn using the `auto` model safely mints a replacement model and token pair. Pass null to return to provider-default Auto routing.
12436
+ */
12437
+ autoTier: AutoTier | null;
12438
+ source?: ModelChangeSource;
12439
+ }
12440
+ /**
12441
+ * Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
12442
+ *
12443
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12444
+ * via the `definition` "ModelSwitchAutoTierResult".
12445
+ */
12446
+ /** @experimental */
12447
+ export interface ModelSwitchAutoTierResult {
12448
+ status: ModelSwitchAutoTierStatus;
12449
+ effectiveAutoTier?: AutoTier;
12450
+ /**
12451
+ * Latest unclaimed Auto preference waiting for a future user turn.
12452
+ */
12453
+ pendingAutoTier?: AutoTier | null;
12454
+ /**
12455
+ * Auto preference currently claimed by an in-progress activation. Null means the activation is returning to provider-default routing.
12456
+ */
12457
+ activatingAutoTier?: AutoTier | null;
12458
+ /**
12459
+ * Earlier unclaimed preference replaced by this request. This can be present with either status, including when selecting the effective preference cancels pending work.
12460
+ */
12461
+ supersededAutoTier?: AutoTier | null;
12462
+ }
12093
12463
  /** @experimental */
12094
12464
  export interface ModelSwitchConfirmation {
12095
12465
  /**
@@ -12117,6 +12487,10 @@ export interface ModelSwitchToRequest {
12117
12487
  * Model selection id to switch to, as returned by `list`. A bare id (e.g. `claude-sonnet-4.6`) names a Copilot (CAPI) model; a provider-qualified id (`provider/id`, e.g. `acme/claude-sonnet`) targets a registry BYOK model.
12118
12488
  */
12119
12489
  modelId: string;
12490
+ /**
12491
+ * Optional Auto routing preference to stage atomically with selecting `auto`. Pass null to return to provider-default Auto routing. This field is rejected when `modelId` is not `auto`.
12492
+ */
12493
+ autoTier?: AutoTier | null;
12120
12494
  /**
12121
12495
  * Reasoning effort level to use for the model. CAPI values are model-defined and validated against the selected model; BYOK providers may define additional values. "none" disables reasoning. When omitted, no effort override is applied.
12122
12496
  */
@@ -12189,6 +12563,7 @@ export interface ModelSwitchToResult {
12189
12563
  * Deprecation warnings associated with the selected model or options.
12190
12564
  */
12191
12565
  deprecationWarnings?: string[];
12566
+ modelState?: CurrentModel;
12192
12567
  }
12193
12568
  /**
12194
12569
  * Agent interaction mode to apply to the session.
@@ -14125,6 +14500,7 @@ export interface PluginInstallResult {
14125
14500
  * Number of skills discovered and installed from the plugin
14126
14501
  */
14127
14502
  skillsInstalled: number;
14503
+ stagingMode?: PluginInstallStagingMode;
14128
14504
  /**
14129
14505
  * Optional post-install message provided by the plugin (e.g. setup instructions)
14130
14506
  */
@@ -15913,6 +16289,18 @@ export interface SandboxConfig {
15913
16289
  * Whether to auto-add the current working directory to readwritePaths. Default: true.
15914
16290
  */
15915
16291
  addCurrentWorkingDirectory?: boolean;
16292
+ /**
16293
+ * Whether MCP servers the session launches are confined by the sandbox. Only an explicit `false` opts out; doing so also lets remote-MCP egress leave the sandbox, so the flag and `enabled` are always read together. Ignored while `enabled` is false. Default: true (enabled by default; set to false to opt out).
16294
+ */
16295
+ sandboxMcpServers?: boolean;
16296
+ /**
16297
+ * Whether language servers the session launches are confined by the sandbox. Only an explicit `false` opts out. Ignored while `enabled` is false. Default: true (enabled by default; set to false to opt out).
16298
+ */
16299
+ sandboxLspServers?: boolean;
16300
+ /**
16301
+ * Whether the agent may request that an individual command run outside the sandbox, which the host then approves or denies through the usual permission flow. A host capability flag rather than part of the policy: it is stripped from the effective spawn policy and only has an effect while `enabled` is true. Fail-closed, unlike the opt-out flags on this object: omitting it offers no bypass. Default: false (opt-in).
16302
+ */
16303
+ allowBypass?: boolean;
15916
16304
  auth?: SandboxConfigAuth;
15917
16305
  /**
15918
16306
  * Whether to auto-grant read access to tool directories discovered on PATH and in toolchain environment variables (GOROOT, JAVA_HOME, VIRTUAL_ENV, and similar), and to common developer-tool caches, config, and toolchains. Writable grants cover scratch caches, the Unix GitHub CLI cache, and Cargo's registry, git store, and lock/tracker files. A relocated CARGO_HOME gets the same narrow split: registry and git are read-write; bin is read-only; the home root, config.toml, and credentials.toml stay ungranted. Set to false to disable every grant listed above; user-installed toolchains and caches then need explicit userPolicy.filesystem readonlyPaths and readwritePaths entries. The working directory (see addCurrentWorkingDirectory), temporary storage, session log paths, and system locations follow their own rules and stay granted. Default: true (enabled by default; set to false to opt out).
@@ -17604,6 +17992,10 @@ export interface SessionOpenOptions {
17604
17992
  * Identifier of the client driving the session.
17605
17993
  */
17606
17994
  clientName?: string;
17995
+ /**
17996
+ * OAuth Client ID Metadata Document URL used by this host for MCP authorization.
17997
+ */
17998
+ authClientIdMetadataUrl?: string;
17607
17999
  /**
17608
18000
  * Structured client kind used for runtime behavior gates.
17609
18001
  */
@@ -19695,6 +20087,7 @@ export interface SlashCommandTimelineEntry {
19695
20087
  * Optional URL associated with the timeline entry.
19696
20088
  */
19697
20089
  url?: string;
20090
+ remediation?: RemediationAction;
19698
20091
  }
19699
20092
  /**
19700
20093
  * Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, optional user-facing notice, and settings-change flag.
@@ -20052,6 +20445,157 @@ export interface TaskProgressLine {
20052
20445
  */
20053
20446
  timestamp: string;
20054
20447
  }
20448
+ /**
20449
+ * Tracked client-owned task metadata.
20450
+ *
20451
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20452
+ * via the `definition` "TaskClientInfo".
20453
+ */
20454
+ /** @experimental */
20455
+ export interface TaskClientInfo {
20456
+ type: TaskClientType;
20457
+ /**
20458
+ * Canonical runtime-generated task identifier
20459
+ */
20460
+ id: string;
20461
+ /**
20462
+ * Owner-scoped registration and reclaim key
20463
+ */
20464
+ clientTaskId: string;
20465
+ /**
20466
+ * Optional task display name
20467
+ */
20468
+ displayName?: string;
20469
+ /**
20470
+ * Task description
20471
+ */
20472
+ description: string;
20473
+ status: TaskClientStatus;
20474
+ owner: TaskClientOwner;
20475
+ /**
20476
+ * ISO 8601 timestamp when the task started
20477
+ */
20478
+ startedAt: string;
20479
+ /**
20480
+ * ISO 8601 timestamp of the latest accepted lifecycle change
20481
+ */
20482
+ updatedAt: string;
20483
+ /**
20484
+ * ISO 8601 timestamp when the task reached a terminal status
20485
+ */
20486
+ completedAt?: string;
20487
+ /**
20488
+ * Accumulated active execution time in milliseconds
20489
+ */
20490
+ activeTimeMs: number;
20491
+ /**
20492
+ * ISO 8601 timestamp when the current active segment started
20493
+ */
20494
+ activeStartedAt?: string;
20495
+ /**
20496
+ * ISO 8601 timestamp when the connected owner entered idle status
20497
+ */
20498
+ idleSince?: string;
20499
+ /**
20500
+ * ISO 8601 timestamp of the most recent orphan transition
20501
+ */
20502
+ orphanedAt?: string;
20503
+ /**
20504
+ * ISO 8601 timestamp of the most recent successful reclaim
20505
+ */
20506
+ reclaimedAt?: string;
20507
+ executionMode: TaskClientExecutionMode;
20508
+ /**
20509
+ * Whether the currently bound owner can receive a cancellation request
20510
+ */
20511
+ canCancel: boolean;
20512
+ /**
20513
+ * Sequence number of the latest accepted owner update
20514
+ */
20515
+ sequence: number;
20516
+ /**
20517
+ * Opaque successful terminal result supplied by the task owner
20518
+ */
20519
+ result?: JsonValue;
20520
+ /**
20521
+ * Human-readable terminal failure message
20522
+ */
20523
+ error?: string;
20524
+ /**
20525
+ * Optional owner-supplied terminal failure code
20526
+ */
20527
+ errorCode?: string;
20528
+ /**
20529
+ * Human-readable reason for terminal cancellation
20530
+ */
20531
+ cancellationReason?: string;
20532
+ }
20533
+ /**
20534
+ * Public owner attribution for a client-owned task. Identifiers are opaque and never authorize requests.
20535
+ *
20536
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20537
+ * via the `definition` "TaskClientOwner".
20538
+ */
20539
+ /** @experimental */
20540
+ export interface TaskClientOwner {
20541
+ /**
20542
+ * Opaque session-scoped participant identity
20543
+ */
20544
+ participantId: string;
20545
+ /**
20546
+ * Opaque identity of the currently or most recently bound session join
20547
+ */
20548
+ joinId: string;
20549
+ kind: TaskClientOwnerKind;
20550
+ /**
20551
+ * Display-only owner name
20552
+ */
20553
+ displayName?: string;
20554
+ /**
20555
+ * Display-only owner source
20556
+ */
20557
+ source?: string;
20558
+ presence: TaskClientOwnerPresence;
20559
+ /**
20560
+ * ISO 8601 timestamp when the bound join disconnected
20561
+ */
20562
+ disconnectedAt?: string;
20563
+ }
20564
+ /**
20565
+ * Generic progress for a client-owned task.
20566
+ *
20567
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20568
+ * via the `definition` "TaskClientProgress".
20569
+ */
20570
+ /** @experimental */
20571
+ export interface TaskClientProgress {
20572
+ type: TaskClientType;
20573
+ status: TaskClientStatus;
20574
+ /**
20575
+ * Sequence number of the latest accepted owner update
20576
+ */
20577
+ sequence: number;
20578
+ /**
20579
+ * ISO 8601 timestamp of the latest accepted lifecycle change
20580
+ */
20581
+ updatedAt: string;
20582
+ /**
20583
+ * Current owner-defined progress phase
20584
+ */
20585
+ phase?: string;
20586
+ /**
20587
+ * Current completion percentage from zero through one hundred
20588
+ */
20589
+ percentage?: number;
20590
+ /**
20591
+ * Most recent nonempty progress message
20592
+ */
20593
+ lastMessage?: string;
20594
+ /**
20595
+ * Recent server-timestamped progress messages
20596
+ */
20597
+ recentActivity: TaskProgressLine[];
20598
+ }
20055
20599
  /** @experimental */
20056
20600
  export interface TaskCompletionDecision {
20057
20601
  outcome: TaskCompletionOutcome;
@@ -20269,6 +20813,54 @@ export interface TasksPromoteToBackgroundResult {
20269
20813
  /** @experimental */
20270
20814
  export interface TasksRefreshResult {
20271
20815
  }
20816
+ /**
20817
+ * Registers or reclaims a client-owned task.
20818
+ *
20819
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20820
+ * via the `definition` "TasksRegisterRequest".
20821
+ */
20822
+ /** @experimental */
20823
+ export interface TasksRegisterRequest {
20824
+ type: TaskClientType;
20825
+ /**
20826
+ * Owner-scoped idempotency key used for registration and reclaim
20827
+ */
20828
+ clientTaskId: string;
20829
+ /**
20830
+ * Human-readable description of the external work
20831
+ */
20832
+ description: string;
20833
+ /**
20834
+ * Optional short display name for the external work
20835
+ */
20836
+ displayName?: string;
20837
+ /**
20838
+ * Whether the owner supports runtime cancellation requests
20839
+ */
20840
+ cancellable: boolean;
20841
+ /**
20842
+ * Expected current sequence for idempotent registration or orphan reclaim
20843
+ */
20844
+ expectedSequence?: number;
20845
+ }
20846
+ /**
20847
+ * Result of registering or reclaiming a client-owned task.
20848
+ *
20849
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20850
+ * via the `definition` "TasksRegisterResult".
20851
+ */
20852
+ /** @experimental */
20853
+ export interface TasksRegisterResult {
20854
+ task: TaskClientInfo;
20855
+ /**
20856
+ * True only when this invocation created a new task
20857
+ */
20858
+ created: boolean;
20859
+ /**
20860
+ * True only when this invocation reclaimed an orphaned task
20861
+ */
20862
+ reclaimed: boolean;
20863
+ }
20272
20864
  /**
20273
20865
  * Identifier of the completed or cancelled task to remove from tracking.
20274
20866
  *
@@ -20375,6 +20967,42 @@ export interface TasksStartAgentResult {
20375
20967
  */
20376
20968
  agentId: string;
20377
20969
  }
20970
+ /**
20971
+ * Updates a client-owned task.
20972
+ *
20973
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20974
+ * via the `definition` "TasksUpdateRequest".
20975
+ */
20976
+ /** @experimental */
20977
+ export interface TasksUpdateRequest {
20978
+ /**
20979
+ * Canonical runtime-generated task identifier
20980
+ */
20981
+ id: string;
20982
+ /**
20983
+ * Owner update sequence to apply
20984
+ */
20985
+ sequence: number;
20986
+ update: TaskClientUpdate;
20987
+ }
20988
+ /**
20989
+ * Result of publishing a client-owned task update.
20990
+ *
20991
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
20992
+ * via the `definition` "TasksUpdateResult".
20993
+ */
20994
+ /** @experimental */
20995
+ export interface TasksUpdateResult {
20996
+ task: TaskClientInfo;
20997
+ /**
20998
+ * Whether this invocation changed task state
20999
+ */
21000
+ applied: boolean;
21001
+ /**
21002
+ * Whether this invocation repeated the latest accepted update
21003
+ */
21004
+ duplicate: boolean;
21005
+ }
20378
21006
  /**
20379
21007
  * Wait until all in-flight background tasks (agents + shells) and any follow-up turns scheduled by their completions have settled. Returns when the runtime is fully drained or after an internal timeout (default 10 minutes; configurable via COPILOT_TASK_WAIT_TIMEOUT_SECONDS).
20380
21008
  *
@@ -22666,6 +23294,10 @@ export declare function createServerRpc(connection: MessageConnection): {
22666
23294
  * @returns Validated device-managed settings discovered before a session exists.
22667
23295
  */
22668
23296
  read: () => Promise<ManagedSettingsReadResult>;
23297
+ /**
23298
+ * Force-refreshes enterprise managed settings for every account: wipes the persistent server-policy cache (the whole `<cacheHome>/managed-settings` directory) and drops this runtime process's in-memory retained server policy. It does not itself fetch policy — the effect is that the next time a session resolves managed settings for an account, that resolution re-fetches the account's org policy from the network instead of serving a cached response. Note that `managedSettings.read` returns only device/MDM settings and never triggers the account server-policy fetch, so a host implementing "sync account policy" should start a fresh session resolution rather than treat a subsequent `managedSettings.read` as the refreshed org policy. Mirrors the invalidation a sign-out performs, broadened from the one signing-out account to all of them; device/MDM layers describe the machine, not the account, and are left untouched. Rejects if the on-disk cache cannot be removed.
23299
+ */
23300
+ clearCache: () => Promise<void>;
22669
23301
  };
22670
23302
  /** @experimental */
22671
23303
  runtime: {
@@ -23151,9 +23783,9 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23151
23783
  /** @experimental */
23152
23784
  model: {
23153
23785
  /**
23154
- * Gets the currently selected model for the session.
23786
+ * Gets the session's authoritative model snapshot, including the committed Auto preference and any newer unclaimed Auto preference waiting for a future user turn.
23155
23787
  *
23156
- * @returns The currently selected model, reasoning effort, and context tier for the session. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
23788
+ * @returns The session's authoritative model snapshot. Auto preference fields are configuration for the virtual `auto` model and do not change the selected model identifier. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
23157
23789
  */
23158
23790
  getCurrent: () => Promise<CurrentModel>;
23159
23791
  /**
@@ -23164,6 +23796,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23164
23796
  * @returns The model identifier active on the session after the switch.
23165
23797
  */
23166
23798
  switchTo: (params: ModelSwitchToRequest) => Promise<ModelSwitchToResult>;
23799
+ /**
23800
+ * Requests an Auto preference change without changing the session's selected model. The latest unclaimed request wins; the runtime commits it only after a later prompt using the `auto` model mints a usable model and token pair. A `pending` response confirms that the request was accepted, not that it committed. Observe eventual success through `session.model_change`, failure through the ephemeral `session.auto_tier_switch_failed` event, or current unclaimed state through `session.model.getCurrent`.
23801
+ *
23802
+ * @param params An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.
23803
+ *
23804
+ * @returns Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
23805
+ */
23806
+ switchAutoTier: (params: ModelSwitchAutoTierRequest) => Promise<ModelSwitchAutoTierResult>;
23167
23807
  /**
23168
23808
  * Updates the session's reasoning effort without changing the selected model.
23169
23809
  *
@@ -23370,6 +24010,15 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23370
24010
  diff: (params: WorkspacesDiffRequest) => Promise<WorkspaceDiffResult>;
23371
24011
  };
23372
24012
  /** @experimental */
24013
+ autopilotObjective: {
24014
+ /**
24015
+ * Reads the current canonical autopilot objective state for this session.
24016
+ *
24017
+ * @returns Canonical runtime state for the session's current autopilot objective.
24018
+ */
24019
+ getState: () => Promise<AutopilotObjectiveGetStateResult>;
24020
+ };
24021
+ /** @experimental */
23373
24022
  completions: {
23374
24023
  /**
23375
24024
  * Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).
@@ -23463,6 +24112,22 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23463
24112
  * @returns Background tasks currently tracked by the session.
23464
24113
  */
23465
24114
  list: () => Promise<TaskList>;
24115
+ /**
24116
+ * Registers a client-owned task, or reclaims an orphaned task belonging to the same extension principal.
24117
+ *
24118
+ * @param params Registers or reclaims a client-owned task.
24119
+ *
24120
+ * @returns Result of registering or reclaiming a client-owned task.
24121
+ */
24122
+ register: (params: TasksRegisterRequest) => Promise<TasksRegisterResult>;
24123
+ /**
24124
+ * Publishes generic progress or a terminal outcome for a client-owned task.
24125
+ *
24126
+ * @param params Updates a client-owned task.
24127
+ *
24128
+ * @returns Result of publishing a client-owned task update.
24129
+ */
24130
+ update: (params: TasksUpdateRequest) => Promise<TasksUpdateResult>;
23466
24131
  /**
23467
24132
  * Refreshes metadata for any detached background shells the runtime knows about.
23468
24133
  *
@@ -24664,6 +25329,18 @@ export interface FactoryHandler {
24664
25329
  */
24665
25330
  abort(params: FactoryAbortRequest): Promise<FactoryAckResult>;
24666
25331
  }
25332
+ /** Handler for `tasks` client session API methods. */
25333
+ /** @experimental */
25334
+ export interface TasksHandler {
25335
+ /**
25336
+ * Asks the client currently bound to a client-owned session task to confirm that its external work stopped.
25337
+ *
25338
+ * @param params Runtime-to-owner cancellation request for a client-owned task.
25339
+ *
25340
+ * @returns Whether the client authoritatively confirmed its external work stopped.
25341
+ */
25342
+ cancel(params: ClientTaskCancelRequest): Promise<ClientTaskCancelResult>;
25343
+ }
24667
25344
  /** Handler for `sessionFs` client session API methods. */
24668
25345
  /** @experimental */
24669
25346
  export interface SessionFsHandler {
@@ -24802,6 +25479,7 @@ export interface CanvasHandler {
24802
25479
  export interface ClientSessionApiHandlers {
24803
25480
  providerToken?: ProviderTokenHandler;
24804
25481
  factory?: FactoryHandler;
25482
+ tasks?: TasksHandler;
24805
25483
  sessionFs?: SessionFsHandler;
24806
25484
  canvas?: CanvasHandler;
24807
25485
  }