@github/copilot-sdk 1.0.13-preview.6 → 1.0.14-preview.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.
@@ -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, PermissionDecisionSource, 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
  *
@@ -317,6 +331,124 @@ export type CardDigestValue = string;
317
331
  */
318
332
  /** @experimental */
319
333
  export type CatalogCandidateSource = CatalogCandidateSourceUrl | CatalogCandidateSourceEmbedded;
334
+ /**
335
+ * A versioned, bounded trust observation carried unchanged with a catalog candidate and its private handle context. Current observations require a recognised T1/T2 tier; every non-current state structurally forbids a tier. Eligibility remains `unknown` while Agent Finder supplies no exposure decision, and states absent from its current wire are never inferred from age, relevance, popularity, or a tier transition.
336
+ *
337
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
338
+ * via the `definition` "CatalogTrustSnapshot".
339
+ */
340
+ /** @experimental */
341
+ export type CatalogTrustSnapshot = CatalogTrustSnapshotCurrent | CatalogTrustSnapshotAbsent | CatalogTrustSnapshotStale | CatalogTrustSnapshotDowngraded | CatalogTrustSnapshotRevoked | CatalogTrustSnapshotUnsupported | CatalogTrustSnapshotMalformed;
342
+ /**
343
+ * Schema version of the catalogue trust snapshot envelope
344
+ *
345
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
346
+ * via the `definition` "CatalogTrustSnapshotSchemaVersion".
347
+ */
348
+ /** @experimental */
349
+ export type CatalogTrustSnapshotSchemaVersion =
350
+ /** Initial envelope carrying one bounded service tier or one explicit unavailable state. */
351
+ "v1";
352
+ /**
353
+ * A recognised T1 or T2 service tier was observed.
354
+ *
355
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
356
+ * via the `definition` "CatalogTrustSnapshotCurrentStatus".
357
+ */
358
+ /** @experimental */
359
+ export type CatalogTrustSnapshotCurrentStatus = "current";
360
+ /**
361
+ * Service-computed trust tier currently emitted by Agent Finder. It is independent of search score, popularity, and client-side ranking.
362
+ *
363
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
364
+ * via the `definition` "CatalogTrustTier".
365
+ */
366
+ /** @experimental */
367
+ export type CatalogTrustTier =
368
+ /** Tier one as assigned by the catalogue authority. */
369
+ "T1"
370
+ /** Tier two as assigned by the catalogue authority. */
371
+ | "T2";
372
+ /**
373
+ * Authority-computed exposure eligibility, kept separate from tier. The current tier-only Agent Finder response maps to `unknown`, never to a locally inferred eligibility.
374
+ *
375
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
376
+ * via the `definition` "CatalogTrustEligibility".
377
+ */
378
+ /** @experimental */
379
+ export type CatalogTrustEligibility =
380
+ /** Eligible for default catalogue exposure. */
381
+ "default"
382
+ /** Eligible only when expanded or community results are requested. */
383
+ | "expanded"
384
+ /** Not eligible for normal catalogue exposure. */
385
+ | "hidden"
386
+ /** The authority did not supply an eligibility decision. */
387
+ | "unknown";
388
+ /**
389
+ * Bounded authority that supplied a catalogue trust observation
390
+ *
391
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
392
+ * via the `definition` "CatalogTrustSource".
393
+ */
394
+ /** @experimental */
395
+ export type CatalogTrustSource =
396
+ /** GitHub Agent Finder supplied the trust field on its search result. */
397
+ "agent-finder";
398
+ /**
399
+ * The authority omitted trust metadata.
400
+ *
401
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
402
+ * via the `definition` "CatalogTrustSnapshotAbsentStatus".
403
+ */
404
+ /** @experimental */
405
+ export type CatalogTrustSnapshotAbsentStatus = "absent";
406
+ /**
407
+ * The authority explicitly marked its assessment stale.
408
+ *
409
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
410
+ * via the `definition` "CatalogTrustSnapshotStaleStatus".
411
+ */
412
+ /** @experimental */
413
+ export type CatalogTrustSnapshotStaleStatus = "stale";
414
+ /**
415
+ * The authority explicitly reported a downgraded assessment.
416
+ *
417
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
418
+ * via the `definition` "CatalogTrustSnapshotDowngradedStatus".
419
+ */
420
+ /** @experimental */
421
+ export type CatalogTrustSnapshotDowngradedStatus =
422
+ /** The authority explicitly reported a downgraded assessment. */
423
+ "downgraded";
424
+ /**
425
+ * The authority explicitly revoked its assessment.
426
+ *
427
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
428
+ * via the `definition` "CatalogTrustSnapshotRevokedStatus".
429
+ */
430
+ /** @experimental */
431
+ export type CatalogTrustSnapshotRevokedStatus = "revoked";
432
+ /**
433
+ * The authority supplied a bounded trust value this runtime does not understand.
434
+ *
435
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
436
+ * via the `definition` "CatalogTrustSnapshotUnsupportedStatus".
437
+ */
438
+ /** @experimental */
439
+ export type CatalogTrustSnapshotUnsupportedStatus =
440
+ /** The authority supplied a bounded trust value this runtime does not understand. */
441
+ "unsupported";
442
+ /**
443
+ * The trust field was empty, unbounded, or had the wrong JSON type.
444
+ *
445
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
446
+ * via the `definition` "CatalogTrustSnapshotMalformedStatus".
447
+ */
448
+ /** @experimental */
449
+ export type CatalogTrustSnapshotMalformedStatus =
450
+ /** The trust field was empty, unbounded, or had the wrong JSON type. */
451
+ "malformed";
320
452
  /**
321
453
  * Why the catalog authority did not accept the caller's identity
322
454
  *
@@ -392,7 +524,9 @@ export type CatalogCapability =
392
524
  /** Understands side-effect-free MCP install-plan requests, results, and plan handles; `planning-unavailable` separately reports that planning is not enabled. */
393
525
  | "mcp-install-planning"
394
526
  /** Understands plans that enumerate every eligible transport rather than a single preferred one. */
395
- | "multiple-transport-choice";
527
+ | "multiple-transport-choice"
528
+ /** Understands versioned candidate trust snapshots. Protocol-3 callers must require this capability before the runtime adds the optional snapshot field. */
529
+ | "trust-snapshot";
396
530
  /**
397
531
  * Bounded extensible wire-feature identifier. Known values are described by `CatalogCapability`; newer callers may send future identifiers so an older runtime can return a typed negotiation refusal instead of failing schema validation. Capability negotiation establishes contract understanding, while each operation's result separately reports runtime availability.
398
532
  *
@@ -629,6 +763,18 @@ export type CatalogUnavailableTransportReason =
629
763
  | "transport-not-supported"
630
764
  /** Eligible remotes could not be enumerated, so no explicit choice can be offered. */
631
765
  | "remote-enumeration-unavailable";
766
+ /**
767
+ * Why the runtime requests client-task cancellation.
768
+ *
769
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
770
+ * via the `definition` "ClientTaskCancelReason".
771
+ */
772
+ /** @experimental */
773
+ export type ClientTaskCancelReason =
774
+ /** A caller requested task cancellation. */
775
+ "cancel_requested"
776
+ /** The session is shutting down. */
777
+ | "session_shutdown";
632
778
  /**
633
779
  * Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command
634
780
  *
@@ -708,6 +854,20 @@ export type ConnectedRemoteSessionMetadataKind =
708
854
  "remote-session"
709
855
  /** GitHub Copilot coding agent session. */
710
856
  | "coding-agent";
857
+ /**
858
+ * Closed set of public task kinds a connection can negotiate.
859
+ *
860
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
861
+ * via the `definition` "TaskKind".
862
+ */
863
+ /** @experimental */
864
+ export type TaskKind =
865
+ /** Runtime-owned background agent task. */
866
+ "agent"
867
+ /** Runtime-owned shell task. */
868
+ | "shell"
869
+ /** Client-owned externally executed task. */
870
+ | "client";
711
871
  /**
712
872
  * 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
873
  *
@@ -937,16 +1097,16 @@ export type EventsReadDirection =
937
1097
  /** Tail-first: return the newest events and page toward older events. */
938
1098
  | "backward";
939
1099
  /**
940
- * Cursor status: 'ok' means the cursor was applied successfully; 'expired' means the cursor referred to an event that no longer exists in history (e.g. truncated or compacted away) and the read fell back to a boundary of the remaining history (the beginning for a forward read, the tail for a backward read). The fallback page is a fresh boundary snapshot, not a continuation of the requested cursor, so it may overlap already-rendered events; on 'expired' a consumer should reset/rebase its pagination state (or deduplicate by event id) before continuing from the returned cursor.
1100
+ * Cursor status: 'ok' means the read succeeded against the requested history; 'expired' means the requested continuation is unavailable. Recovery is endpoint-specific: session.eventLog.read returns a boundary window of remaining active history that may overlap prior pages, while sessions.readPersistedEvents returns an empty terminal page and never switches journal generations. An expired persisted read is not successful completion; a complete persisted snapshot requires cursorStatus 'ok' and hasMore false.
941
1101
  *
942
1102
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
943
1103
  * via the `definition` "EventsCursorStatus".
944
1104
  */
945
1105
  /** @experimental */
946
1106
  export type EventsCursorStatus =
947
- /** The cursor was applied successfully. */
1107
+ /** The read succeeded against the requested history. */
948
1108
  "ok"
949
- /** The cursor referred to history that is no longer available. */
1109
+ /** The requested continuation is unavailable; see the endpoint's recovery semantics. */
950
1110
  | "expired";
951
1111
  /**
952
1112
  * Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state/<id>/extensions/)
@@ -1074,6 +1234,8 @@ export type FactoryRunStatus =
1074
1234
  | "completed"
1075
1235
  /** The run was interrupted while resource budget remained. */
1076
1236
  | "halted"
1237
+ /** The current attempt stopped intentionally and the run may be resumed. */
1238
+ | "paused"
1077
1239
  /** The run was cancelled before completion. */
1078
1240
  | "cancelled"
1079
1241
  /** The factory body failed or reached a cumulative resource ceiling. */
@@ -1091,6 +1253,10 @@ export type FactoryRunFailure = {
1091
1253
  * Approved effective ceiling that was reached.
1092
1254
  */
1093
1255
  value: number;
1256
+ /**
1257
+ * Suggested larger ceiling when the runtime can derive one safely.
1258
+ */
1259
+ suggestedValue?: number;
1094
1260
  /**
1095
1261
  * Factory run identifier.
1096
1262
  */
@@ -1163,6 +1329,28 @@ export type FactoryRunFailureKind =
1163
1329
  | "timeoutSeconds"
1164
1330
  /** The run's settled subagent model usage exceeded the approved AI-credit ceiling, or no headroom remained for another subagent. */
1165
1331
  | "maxAiCredits";
1332
+ /**
1333
+ * Durable metadata describing who initiated a factory pause.
1334
+ *
1335
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1336
+ * via the `definition` "FactoryPauseInfo".
1337
+ */
1338
+ /** @experimental */
1339
+ export type FactoryPauseInfo = {
1340
+ /**
1341
+ * Factory pause initiator discriminator.
1342
+ */
1343
+ type: "user";
1344
+ } | {
1345
+ /**
1346
+ * Stable author-defined checkpoint key that initiated the pause.
1347
+ */
1348
+ key: string;
1349
+ /**
1350
+ * Factory pause initiator discriminator.
1351
+ */
1352
+ type: "checkpoint";
1353
+ };
1166
1354
  /**
1167
1355
  * Kind of factory progress line.
1168
1356
  *
@@ -1175,6 +1363,18 @@ export type FactoryLogLineKind =
1175
1363
  "log"
1176
1364
  /** A named factory phase marker. */
1177
1365
  | "phase";
1366
+ /**
1367
+ * Action the runtime selected for a durable factory pause checkpoint.
1368
+ *
1369
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1370
+ * via the `definition` "FactoryPauseCheckpointAction".
1371
+ */
1372
+ /** @experimental */
1373
+ export type FactoryPauseCheckpointAction =
1374
+ /** The checkpoint was committed by a prior paused attempt, so execution may continue. */
1375
+ "continue"
1376
+ /** This attempt claimed the checkpoint and must cooperatively stop. */
1377
+ | "pause";
1178
1378
  /**
1179
1379
  * Derived lifecycle state of a factory phase.
1180
1380
  *
@@ -2278,6 +2478,18 @@ export type ModelListRequest = {
2278
2478
  */
2279
2479
  skipCache?: boolean;
2280
2480
  };
2481
+ /**
2482
+ * Whether the requested preference was already effective or was accepted for later transactional activation.
2483
+ *
2484
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2485
+ * via the `definition` "ModelSwitchAutoTierStatus".
2486
+ */
2487
+ /** @experimental */
2488
+ export type ModelSwitchAutoTierStatus =
2489
+ /** 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`. */
2490
+ "unchanged"
2491
+ /** 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. */
2492
+ | "pending";
2281
2493
  /**
2282
2494
  * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.
2283
2495
  *
@@ -2416,22 +2628,6 @@ export type PermissionDecisionOutcome =
2416
2628
  | "autopilot_denied"
2417
2629
  /** The response came from an interactive user prompt. */
2418
2630
  | "prompted_user";
2419
- /**
2420
- * Controlled reason or actor responsible for a permission response.
2421
- *
2422
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2423
- * via the `definition` "PermissionDecisionSource".
2424
- */
2425
- /** @experimental */
2426
- export type PermissionDecisionSource =
2427
- /** The response followed the assisted-approval judge recommendation. */
2428
- "assisted_approval"
2429
- /** A human supplied the response through an interactive prompt. */
2430
- | "human_response"
2431
- /** The host applied a standing policy or override rather than a judge recommendation or human decision. */
2432
- | "host_policy"
2433
- /** The host denied the request because no interactive user response was available. */
2434
- | "unattended_fallback";
2435
2631
  /**
2436
2632
  * Client surface that submitted a permission response.
2437
2633
  *
@@ -2544,6 +2740,18 @@ export type PermissionsSetApproveAllSource =
2544
2740
  | "user_setting"
2545
2741
  /** Allow-all was enabled through an RPC caller. */
2546
2742
  | "rpc";
2743
+ /**
2744
+ * Where completed plugin content was staged before atomic promotion.
2745
+ *
2746
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2747
+ * via the `definition` "PluginInstallStagingMode".
2748
+ */
2749
+ /** @experimental */
2750
+ export type PluginInstallStagingMode =
2751
+ /** A sibling of the installed-plugins root, outside the recursively watched tree. */
2752
+ "external"
2753
+ /** A sibling of the destination plugin directory, used when external staging is unavailable. */
2754
+ | "destination_sibling";
2547
2755
  /**
2548
2756
  * Optional flags controlling which side effects the reload performs.
2549
2757
  *
@@ -3150,6 +3358,68 @@ export type SessionsOpenProgressStatus =
3150
3358
  "in-progress"
3151
3359
  /** The step has completed successfully. */
3152
3360
  | "complete";
3361
+ /**
3362
+ * Client metadata outcome for one requested local session.
3363
+ *
3364
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3365
+ * via the `definition` "SessionsClientMetadataEntry".
3366
+ */
3367
+ /** @experimental */
3368
+ export type SessionsClientMetadataEntry = {
3369
+ /**
3370
+ * Requested session ID.
3371
+ */
3372
+ sessionId: string;
3373
+ metadata: ClientMetadata;
3374
+ /**
3375
+ * Client metadata outcome discriminator.
3376
+ */
3377
+ status: "ok";
3378
+ } | {
3379
+ /**
3380
+ * Requested session ID.
3381
+ */
3382
+ sessionId: string;
3383
+ /**
3384
+ * Client metadata outcome discriminator.
3385
+ */
3386
+ status: "notFound";
3387
+ } | {
3388
+ /**
3389
+ * Requested session ID.
3390
+ */
3391
+ sessionId: string;
3392
+ /**
3393
+ * Client metadata outcome discriminator.
3394
+ */
3395
+ status: "corrupt";
3396
+ } | {
3397
+ /**
3398
+ * Requested session ID.
3399
+ */
3400
+ sessionId: string;
3401
+ /**
3402
+ * Client metadata outcome discriminator.
3403
+ */
3404
+ status: "unsupportedVersion";
3405
+ } | {
3406
+ /**
3407
+ * Requested session ID.
3408
+ */
3409
+ sessionId: string;
3410
+ /**
3411
+ * Filesystem or provider error code. Clients should not assume every provider uses operating-system error codes.
3412
+ */
3413
+ code: string;
3414
+ /**
3415
+ * Human-readable diagnostic message. Not stable for programmatic matching.
3416
+ */
3417
+ message: string;
3418
+ /**
3419
+ * Client metadata outcome discriminator.
3420
+ */
3421
+ status: "unavailable";
3422
+ };
3153
3423
  /**
3154
3424
  * Authentication credentials accepted by session.gitHubAuth.setCredentials. Session-owned token-provider identities cannot be installed through this method.
3155
3425
  *
@@ -3204,6 +3474,14 @@ export type SessionSettingsPredicateName =
3204
3474
  | "trivialChangeEnabledForTool"
3205
3475
  /** Whether trivial-change skip behavior is enabled for a specific tool. */
3206
3476
  | "trivialChangeSkipEnabledForTool";
3477
+ /**
3478
+ * Ordered client metadata outcomes for the requested local sessions.
3479
+ *
3480
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3481
+ * via the `definition` "SessionsGetClientMetadataResult".
3482
+ */
3483
+ /** @experimental */
3484
+ export type SessionsGetClientMetadataResult = SessionsClientMetadataEntry[];
3207
3485
  /**
3208
3486
  * Which session sources to include. Defaults to `local` for backward compatibility.
3209
3487
  *
@@ -3340,13 +3618,154 @@ export type TaskExecutionMode =
3340
3618
  /** The task is managed in the background. */
3341
3619
  | "background";
3342
3620
  /**
3343
- * Tracked task union returned by task APIs, containing either an agent task or a shell task.
3621
+ * Active status a client owner may publish with a progress update.
3622
+ *
3623
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3624
+ * via the `definition` "TaskClientActiveStatus".
3625
+ */
3626
+ /** @experimental */
3627
+ export type TaskClientActiveStatus =
3628
+ /** The external owner is actively working. */
3629
+ "running"
3630
+ /** The external owner is connected but waiting. */
3631
+ | "idle";
3632
+ /**
3633
+ * Client-owned tasks always execute outside the runtime in background mode.
3634
+ *
3635
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3636
+ * via the `definition` "TaskClientExecutionMode".
3637
+ */
3638
+ /** @experimental */
3639
+ export type TaskClientExecutionMode = "background";
3640
+ /**
3641
+ * Discriminator for a client-owned task.
3642
+ *
3643
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3644
+ * via the `definition` "TaskClientType".
3645
+ */
3646
+ /** @experimental */
3647
+ export type TaskClientType = "client";
3648
+ /**
3649
+ * Lifecycle status of a client-owned task.
3650
+ *
3651
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3652
+ * via the `definition` "TaskClientStatus".
3653
+ */
3654
+ /** @experimental */
3655
+ export type TaskClientStatus =
3656
+ /** The external owner is actively working. */
3657
+ "running"
3658
+ /** The external owner is connected but waiting. */
3659
+ | "idle"
3660
+ /** The owner reported successful completion. */
3661
+ | "completed"
3662
+ /** The owner reported failure. */
3663
+ | "failed"
3664
+ /** The owner reported or confirmed cancellation. */
3665
+ | "cancelled"
3666
+ /** The bound owner join disappeared; external executor state is unknown. */
3667
+ | "orphaned";
3668
+ /**
3669
+ * Connection class owning a client task.
3670
+ *
3671
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3672
+ * via the `definition` "TaskClientOwnerKind".
3673
+ */
3674
+ /** @experimental */
3675
+ export type TaskClientOwnerKind =
3676
+ /** A discovered extension connection owns the task. */
3677
+ "extension"
3678
+ /** A generic SDK connection owns the task. */
3679
+ | "sdk";
3680
+ /**
3681
+ * Presence of the task's bound join.
3682
+ *
3683
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3684
+ * via the `definition` "TaskClientOwnerPresence".
3685
+ */
3686
+ /** @experimental */
3687
+ export type TaskClientOwnerPresence =
3688
+ /** The bound session join is connected. */
3689
+ "connected"
3690
+ /** The bound session join is disconnected. */
3691
+ | "disconnected";
3692
+ /**
3693
+ * Progress or terminal update for a client-owned task.
3694
+ *
3695
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3696
+ * via the `definition` "TaskClientUpdate".
3697
+ */
3698
+ /** @experimental */
3699
+ export type TaskClientUpdate = {
3700
+ status?: TaskClientActiveStatus;
3701
+ /**
3702
+ * Optional progress message appended to recent activity when nonempty
3703
+ */
3704
+ message?: string;
3705
+ /**
3706
+ * Optional progress phase; null clears the current phase
3707
+ */
3708
+ phase?: string | null;
3709
+ /**
3710
+ * Optional completion percentage; null clears the current percentage
3711
+ */
3712
+ percentage?: number | null;
3713
+ /**
3714
+ * Client task update variant discriminator.
3715
+ */
3716
+ kind: "progress";
3717
+ } | {
3718
+ /**
3719
+ * Optional final progress message
3720
+ */
3721
+ message?: string;
3722
+ /**
3723
+ * Optional opaque successful terminal result
3724
+ */
3725
+ result?: JsonValue;
3726
+ /**
3727
+ * Client task update variant discriminator.
3728
+ */
3729
+ kind: "completed";
3730
+ } | {
3731
+ /**
3732
+ * Optional final progress message
3733
+ */
3734
+ message?: string;
3735
+ /**
3736
+ * Human-readable terminal failure message
3737
+ */
3738
+ error: string;
3739
+ /**
3740
+ * Optional owner-supplied terminal failure code
3741
+ */
3742
+ code?: string;
3743
+ /**
3744
+ * Client task update variant discriminator.
3745
+ */
3746
+ kind: "failed";
3747
+ } | {
3748
+ /**
3749
+ * Optional final progress message
3750
+ */
3751
+ message?: string;
3752
+ /**
3753
+ * Optional human-readable cancellation reason
3754
+ */
3755
+ reason?: string;
3756
+ /**
3757
+ * Client task update variant discriminator.
3758
+ */
3759
+ kind: "cancelled";
3760
+ };
3761
+ /**
3762
+ * Tracked task union returned by task APIs, containing an agent, client, or shell task.
3344
3763
  *
3345
3764
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3346
3765
  * via the `definition` "TaskInfo".
3347
3766
  */
3348
3767
  /** @experimental */
3349
- export type TaskInfo = TaskAgentInfo | TaskShellInfo;
3768
+ export type TaskInfo = TaskAgentInfo | TaskClientInfo | TaskShellInfo;
3350
3769
  /**
3351
3770
  * Whether the shell runs inside a managed PTY session or as an independent background process
3352
3771
  *
@@ -3366,7 +3785,7 @@ export type TaskShellInfoAttachmentMode =
3366
3785
  * via the `definition` "TaskProgress".
3367
3786
  */
3368
3787
  /** @experimental */
3369
- export type TaskProgress = (TaskAgentProgress | TaskShellProgress) | null;
3788
+ export type TaskProgress = TaskAgentProgress | TaskClientProgress | TaskShellProgress | null;
3370
3789
  /**
3371
3790
  * Canonical result returned by a session tool.
3372
3791
  *
@@ -3694,11 +4113,15 @@ export interface CopilotUserResponse {
3694
4113
  */
3695
4114
  organization_login_list?: string[];
3696
4115
  /**
3697
- * Organizations the user belongs to, each with an optional login and display name.
4116
+ * Organizations the user belongs to, each with an optional ID, login, and display name.
3698
4117
  */
3699
4118
  organization_list?: ({
3700
4119
  [k: string]: unknown | undefined;
3701
4120
  } | ({
4121
+ /**
4122
+ * Numeric database ID of the organization.
4123
+ */
4124
+ id?: number;
3702
4125
  /**
3703
4126
  * GitHub login of the organization.
3704
4127
  */
@@ -4377,6 +4800,10 @@ export interface AgentInfo {
4377
4800
  * Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only.
4378
4801
  */
4379
4802
  userInvocable?: boolean;
4803
+ /**
4804
+ * Whether model-driven invocation is disabled for this agent.
4805
+ */
4806
+ disableModelInvocation?: boolean;
4380
4807
  /**
4381
4808
  * Allowed tool names for this agent. Empty array means none; omitted means inherit defaults.
4382
4809
  */
@@ -4741,13 +5168,82 @@ export interface AuthIdentity {
4741
5168
  /** @experimental */
4742
5169
  export interface AuthValidationError {
4743
5170
  /**
4744
- * Authentication validation error message
5171
+ * Authentication validation error message
5172
+ */
5173
+ message: string;
5174
+ /**
5175
+ * Optional message returned by GitHub
5176
+ */
5177
+ githubMessage?: string;
5178
+ }
5179
+ /**
5180
+ * Current per-window credit limit and consumption for an autopilot objective.
5181
+ *
5182
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5183
+ * via the `definition` "AutopilotObjectiveCreditLimit".
5184
+ */
5185
+ /** @experimental */
5186
+ export interface AutopilotObjectiveCreditLimit {
5187
+ /**
5188
+ * Configured AI-credit cap, when one is set.
5189
+ */
5190
+ credits?: number;
5191
+ /**
5192
+ * Window consumption in fractional AI credits, for display.
5193
+ */
5194
+ creditsUsed: number;
5195
+ /**
5196
+ * Exact window consumption in non-negative integer nano-AIU, encoded as a decimal string.
5197
+ */
5198
+ creditsUsedNanoAiu: string;
5199
+ }
5200
+ /**
5201
+ * Canonical runtime state for the session's current autopilot objective.
5202
+ *
5203
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5204
+ * via the `definition` "AutopilotObjectiveGetStateResult".
5205
+ */
5206
+ /** @experimental */
5207
+ export interface AutopilotObjectiveGetStateResult {
5208
+ /**
5209
+ * Current objective state, or `null` when the session has no objective.
5210
+ */
5211
+ state: AutopilotObjectiveState | null;
5212
+ }
5213
+ /**
5214
+ * Public, persistence-independent projection of an autopilot objective.
5215
+ *
5216
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5217
+ * via the `definition` "AutopilotObjectiveState".
5218
+ */
5219
+ /** @experimental */
5220
+ export interface AutopilotObjectiveState {
5221
+ /**
5222
+ * Session-local objective identifier.
5223
+ */
5224
+ id: number;
5225
+ /**
5226
+ * User-provided objective text.
5227
+ */
5228
+ objective: string;
5229
+ status: AutopilotObjectiveStatus;
5230
+ /**
5231
+ * Number of objective turns started.
4745
5232
  */
4746
- message: string;
5233
+ turnCount: number;
4747
5234
  /**
4748
- * Optional message returned by GitHub
5235
+ * Optional reason the objective is paused.
4749
5236
  */
4750
- githubMessage?: string;
5237
+ pauseReason?: string;
5238
+ /**
5239
+ * Optional summary recorded when the objective completed.
5240
+ */
5241
+ completionSummary?: string;
5242
+ /**
5243
+ * Exact lifetime AI-credit consumption in non-negative integer nano-AIU, encoded as a decimal string.
5244
+ */
5245
+ creditCountNanoAiu: string;
5246
+ creditLimit?: AutopilotObjectiveCreditLimit;
4751
5247
  }
4752
5248
  /**
4753
5249
  * The running runtime's complete catalog of well-known built-in model IDs, including supported models and additional IDs with built-in metadata.
@@ -5317,6 +5813,7 @@ export interface CatalogAiSkillCandidate {
5317
5813
  publisher?: string;
5318
5814
  source: CatalogCandidateSource;
5319
5815
  provenance: CatalogAiSkillCandidateProvenance;
5816
+ trust?: CatalogTrustSnapshot;
5320
5817
  }
5321
5818
  /**
5322
5819
  * Candidate whose card is retrieved from a URL through the runtime's hardened fetch boundary.
@@ -5369,6 +5866,112 @@ export interface CatalogAiSkillCandidateProvenance {
5369
5866
  */
5370
5867
  mediaType: "application/ai-skill";
5371
5868
  }
5869
+ /**
5870
+ * A recognised current Agent Finder T1 or T2 trust tier.
5871
+ *
5872
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5873
+ * via the `definition` "CatalogTrustSnapshotCurrent".
5874
+ */
5875
+ /** @experimental */
5876
+ export interface CatalogTrustSnapshotCurrent {
5877
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5878
+ status: CatalogTrustSnapshotCurrentStatus;
5879
+ tier: CatalogTrustTier;
5880
+ eligibility: CatalogTrustEligibility;
5881
+ provenance: CatalogTrustProvenance;
5882
+ }
5883
+ /**
5884
+ * Where and when the runtime observed the trust metadata. Observation time is not the authority's evaluation time and must not be used to infer staleness.
5885
+ *
5886
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5887
+ * via the `definition` "CatalogTrustProvenance".
5888
+ */
5889
+ /** @experimental */
5890
+ export interface CatalogTrustProvenance {
5891
+ source: CatalogTrustSource;
5892
+ /**
5893
+ * ISO 8601 timestamp with a timezone offset at which the runtime observed the search result carrying this trust field.
5894
+ */
5895
+ observedAt: string;
5896
+ }
5897
+ /**
5898
+ * Discriminator: the authority omitted trust metadata.
5899
+ *
5900
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5901
+ * via the `definition` "CatalogTrustSnapshotAbsent".
5902
+ */
5903
+ /** @experimental */
5904
+ export interface CatalogTrustSnapshotAbsent {
5905
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5906
+ status: CatalogTrustSnapshotAbsentStatus;
5907
+ eligibility: CatalogTrustEligibility;
5908
+ provenance: CatalogTrustProvenance;
5909
+ }
5910
+ /**
5911
+ * Discriminator: the authority explicitly marked the assessment stale.
5912
+ *
5913
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5914
+ * via the `definition` "CatalogTrustSnapshotStale".
5915
+ */
5916
+ /** @experimental */
5917
+ export interface CatalogTrustSnapshotStale {
5918
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5919
+ status: CatalogTrustSnapshotStaleStatus;
5920
+ eligibility: CatalogTrustEligibility;
5921
+ provenance: CatalogTrustProvenance;
5922
+ }
5923
+ /**
5924
+ * Discriminator: the authority explicitly reported a downgraded assessment.
5925
+ *
5926
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5927
+ * via the `definition` "CatalogTrustSnapshotDowngraded".
5928
+ */
5929
+ /** @experimental */
5930
+ export interface CatalogTrustSnapshotDowngraded {
5931
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5932
+ status: CatalogTrustSnapshotDowngradedStatus;
5933
+ eligibility: CatalogTrustEligibility;
5934
+ provenance: CatalogTrustProvenance;
5935
+ }
5936
+ /**
5937
+ * Discriminator: the authority explicitly revoked the assessment.
5938
+ *
5939
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5940
+ * via the `definition` "CatalogTrustSnapshotRevoked".
5941
+ */
5942
+ /** @experimental */
5943
+ export interface CatalogTrustSnapshotRevoked {
5944
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5945
+ status: CatalogTrustSnapshotRevokedStatus;
5946
+ eligibility: CatalogTrustEligibility;
5947
+ provenance: CatalogTrustProvenance;
5948
+ }
5949
+ /**
5950
+ * Discriminator: the authority supplied a bounded trust value this runtime does not understand.
5951
+ *
5952
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5953
+ * via the `definition` "CatalogTrustSnapshotUnsupported".
5954
+ */
5955
+ /** @experimental */
5956
+ export interface CatalogTrustSnapshotUnsupported {
5957
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5958
+ status: CatalogTrustSnapshotUnsupportedStatus;
5959
+ eligibility: CatalogTrustEligibility;
5960
+ provenance: CatalogTrustProvenance;
5961
+ }
5962
+ /**
5963
+ * Discriminator: the trust field was empty, unbounded, or had the wrong JSON type.
5964
+ *
5965
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5966
+ * via the `definition` "CatalogTrustSnapshotMalformed".
5967
+ */
5968
+ /** @experimental */
5969
+ export interface CatalogTrustSnapshotMalformed {
5970
+ schemaVersion: CatalogTrustSnapshotSchemaVersion;
5971
+ status: CatalogTrustSnapshotMalformedStatus;
5972
+ eligibility: CatalogTrustEligibility;
5973
+ provenance: CatalogTrustProvenance;
5974
+ }
5372
5975
  /**
5373
5976
  * An optional catalog authentication exchange did not establish the caller's identity. Anonymous search remains supported; this refusal is reserved for an operation that cannot continue after the attempted exchange. It is distinct from `policy-rejected` and from a network failure, and the reason identifies the recovery action.
5374
5977
  *
@@ -5423,6 +6026,7 @@ export interface CatalogMcpServerCandidate {
5423
6026
  publisher?: string;
5424
6027
  source: CatalogCandidateSource;
5425
6028
  provenance: CatalogMcpServerCandidateProvenance;
6029
+ trust?: CatalogTrustSnapshot;
5426
6030
  }
5427
6031
  /**
5428
6032
  * Where and when an MCP server catalog reference was observed. Discovery provenance deliberately carries no content digest because search does not establish the exact validated content a later plan will bind.
@@ -5574,9 +6178,11 @@ export interface CatalogNegotiationRefusedError {
5574
6178
  */
5575
6179
  minimumSupportedProtocolVersion: number;
5576
6180
  /**
5577
- * Every wire feature this runtime understands, so the caller can retry within that contract. This list does not imply that every deployment has enabled every operation.
6181
+ * Capabilities this runtime can safely advertise to this caller. The complete five-capability protocol-3 legacy set is always present; every capability added after that baseline appears only when the caller required it, so an older closed-enum decoder can still consume a refusal. This list does not imply that every deployment has enabled every operation.
6182
+ *
6183
+ * @maxItems 32
5578
6184
  */
5579
- supportedCapabilities: CatalogCapability[];
6185
+ supportedCapabilities: CatalogCapabilityId[];
5580
6186
  /**
5581
6187
  * The subset of the caller's bounded extensible capability identifiers this runtime cannot honour.
5582
6188
  *
@@ -5782,6 +6388,55 @@ export interface CatalogUnavailableTransportError {
5782
6388
  */
5783
6389
  message: string;
5784
6390
  }
6391
+ /**
6392
+ * Client-owned, case-sensitive string metadata persisted with a local session. Clients should namespace keys by owner. Keys must be non-empty and at most 256 UTF-8 bytes; keys under `copilot/` and `github/` are reserved. Values may contain at most 16 KiB of UTF-8 data. A bag may contain at most 128 entries and its serialized sidecar may contain at most 64 KiB. The runtime stores but never interprets these values.
6393
+ *
6394
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6395
+ * via the `definition` "ClientMetadata".
6396
+ */
6397
+ /** @experimental */
6398
+ export interface ClientMetadata {
6399
+ [k: string]: string | undefined;
6400
+ }
6401
+ /**
6402
+ * Runtime-to-owner cancellation request for a client-owned task.
6403
+ *
6404
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6405
+ * via the `definition` "ClientTaskCancelRequest".
6406
+ */
6407
+ /** @experimental */
6408
+ export interface ClientTaskCancelRequest {
6409
+ /**
6410
+ * Session that owns the client task
6411
+ */
6412
+ sessionId: string;
6413
+ /**
6414
+ * Canonical runtime-generated task identifier
6415
+ */
6416
+ id: string;
6417
+ /**
6418
+ * Owner-scoped task key included for correlation
6419
+ */
6420
+ clientTaskId: string;
6421
+ /**
6422
+ * Opaque identifier shared by coalesced cancellation callers
6423
+ */
6424
+ cancellationId: string;
6425
+ reason: ClientTaskCancelReason;
6426
+ }
6427
+ /**
6428
+ * Whether the client authoritatively confirmed its external work stopped.
6429
+ *
6430
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6431
+ * via the `definition` "ClientTaskCancelResult".
6432
+ */
6433
+ /** @experimental */
6434
+ export interface ClientTaskCancelResult {
6435
+ /**
6436
+ * True only when the owner confirms that external work stopped before responding
6437
+ */
6438
+ cancelled: boolean;
6439
+ }
5785
6440
  /**
5786
6441
  * Slash commands available in the session, after applying any include/exclude filters.
5787
6442
  *
@@ -6235,7 +6890,7 @@ export interface ContextHeaviestMessage {
6235
6890
  tokens: number;
6236
6891
  }
6237
6892
  /**
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.
6893
+ * 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
6894
  *
6240
6895
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6241
6896
  * via the `definition` "CurrentModel".
@@ -6251,6 +6906,15 @@ export interface CurrentModel {
6251
6906
  */
6252
6907
  reasoningEffort?: string;
6253
6908
  contextTier?: ContextTier;
6909
+ autoTier?: AutoTier;
6910
+ /**
6911
+ * Latest unclaimed Auto preference waiting for a future user turn. Null means the pending request is returning to provider-default routing.
6912
+ */
6913
+ pendingAutoTier?: AutoTier | null;
6914
+ /**
6915
+ * Auto preference currently claimed by an in-progress activation. Null means the activation is returning to provider-default routing.
6916
+ */
6917
+ activatingAutoTier?: AutoTier | null;
6254
6918
  }
6255
6919
  /**
6256
6920
  * Lightweight metadata for a currently initialized session tool
@@ -6560,11 +7224,73 @@ export interface DiscoveredMcpServer {
6560
7224
  * Plugin version that provided this server, when source is plugin.
6561
7225
  */
6562
7226
  sourcePluginVersion?: string;
7227
+ effectiveSource?: McpSourceRef;
6563
7228
  /**
6564
7229
  * Whether the server is enabled (not in the disabled list)
6565
7230
  */
6566
7231
  enabled: boolean;
6567
7232
  }
7233
+ /**
7234
+ * Canonical identity and location of the effective MCP server declaration. The declaration is uniquely addressed by this source id together with the discovered server name.
7235
+ *
7236
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7237
+ * via the `definition` "McpSourceRef".
7238
+ */
7239
+ /** @experimental */
7240
+ export interface McpSourceRef {
7241
+ /**
7242
+ * Open source-kind identifier. Known values include user, workspace, invocation, plugin, builtin, and device-registry.
7243
+ */
7244
+ kind: string;
7245
+ /**
7246
+ * Opaque stable identity for the configuration source. Clients must not parse this value.
7247
+ */
7248
+ id: string;
7249
+ /**
7250
+ * Open semantic editability identifier. Known values are editable and read-only.
7251
+ */
7252
+ editability: string;
7253
+ file?: McpSourceFile;
7254
+ plugin?: McpSourcePlugin;
7255
+ }
7256
+ /**
7257
+ * Concrete configuration file containing an MCP server declaration.
7258
+ *
7259
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7260
+ * via the `definition` "McpSourceFile".
7261
+ */
7262
+ /** @experimental */
7263
+ export interface McpSourceFile {
7264
+ /**
7265
+ * Canonical file URI for the configuration document
7266
+ */
7267
+ uri: string;
7268
+ /**
7269
+ * RFC 6901 JSON Pointer to the server declaration, when known
7270
+ */
7271
+ jsonPointer?: string;
7272
+ }
7273
+ /**
7274
+ * Plugin identity associated with an MCP server declaration.
7275
+ *
7276
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7277
+ * via the `definition` "McpSourcePlugin".
7278
+ */
7279
+ /** @experimental */
7280
+ export interface McpSourcePlugin {
7281
+ /**
7282
+ * Canonical plugin identity
7283
+ */
7284
+ id: string;
7285
+ /**
7286
+ * Human-readable plugin name, when available
7287
+ */
7288
+ name?: string;
7289
+ /**
7290
+ * Plugin version, when available
7291
+ */
7292
+ version?: string;
7293
+ }
6568
7294
  /**
6569
7295
  * Slash-prefixed command string to enqueue for FIFO processing.
6570
7296
  *
@@ -6672,7 +7398,7 @@ export interface EventsReadResult {
6672
7398
  */
6673
7399
  cursor: string;
6674
7400
  /**
6675
- * True when more events are available in the read's direction. For a forward read, true means the batch returned `max` events and more are available immediately. For a backward read, true means older persisted events remain before the returned window.
7401
+ * True when more events are available in the read's direction. For a backward read, true means older persisted events remain before the returned window. A persisted-event page may contain fewer than `max` events because of its byte budget while still reporting hasMore true; continue according to this flag rather than the event count.
6676
7402
  */
6677
7403
  hasMore: boolean;
6678
7404
  cursorStatus: EventsCursorStatus;
@@ -7130,6 +7856,10 @@ export interface FactoryAbortRequest {
7130
7856
  * Factory run identifier.
7131
7857
  */
7132
7858
  runId: string;
7859
+ /**
7860
+ * Opaque token identifying the execution attempt to abort.
7861
+ */
7862
+ executionToken: string;
7133
7863
  }
7134
7864
  /**
7135
7865
  * Acknowledgement that a factory request was accepted.
@@ -7161,12 +7891,12 @@ export interface FactoryAgentOptions {
7161
7891
  */
7162
7892
  model?: string;
7163
7893
  /**
7164
- * Optional reasoning effort for the subagent. This field is accepted but not yet honored.
7894
+ * Optional reasoning effort override for the subagent.
7165
7895
  */
7166
7896
  reasoningEffort?: string;
7167
7897
  contextTier?: ContextTier;
7168
7898
  /**
7169
- * Optional custom agent name for the subagent. This field is accepted but not yet honored.
7899
+ * Optional built-in or custom agent name whose definition configures the subagent.
7170
7900
  */
7171
7901
  agent?: string;
7172
7902
  }
@@ -7597,6 +8327,10 @@ export interface FactoryRunSummary {
7597
8327
  * Terminal run outcome, or null while nonterminal.
7598
8328
  */
7599
8329
  terminal: FactoryRunTerminal | null;
8330
+ /**
8331
+ * Whether the durable run state currently passes runtime resume eligibility checks.
8332
+ */
8333
+ canResume: boolean;
7600
8334
  }
7601
8335
  /**
7602
8336
  * Durable factory resource consumption.
@@ -7640,6 +8374,10 @@ export interface FactoryRunTerminal {
7640
8374
  * Prompt-safe preview of the completed result.
7641
8375
  */
7642
8376
  resultPreview?: string;
8377
+ /**
8378
+ * Pause initiator metadata, or null when the run did not pause.
8379
+ */
8380
+ pauseInfo: FactoryPauseInfo | null;
7643
8381
  }
7644
8382
  /**
7645
8383
  * One ordered factory progress line.
@@ -7680,6 +8418,44 @@ export interface FactoryLogRequest {
7680
8418
  */
7681
8419
  lines: FactoryLogLine[];
7682
8420
  }
8421
+ /**
8422
+ * Parameters for an owned durable pause checkpoint.
8423
+ *
8424
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8425
+ * via the `definition` "FactoryPauseCheckpointRequest".
8426
+ */
8427
+ /** @experimental */
8428
+ export interface FactoryPauseCheckpointRequest {
8429
+ /**
8430
+ * Factory run identifier.
8431
+ */
8432
+ runId: string;
8433
+ /**
8434
+ * Opaque token identifying the execution attempt that reached the checkpoint.
8435
+ */
8436
+ executionToken: string;
8437
+ /**
8438
+ * Stable author-defined checkpoint key.
8439
+ */
8440
+ key: string;
8441
+ }
8442
+ /** @experimental */
8443
+ export interface FactoryPauseCheckpointResult {
8444
+ action: FactoryPauseCheckpointAction;
8445
+ }
8446
+ /**
8447
+ * Parameters for pausing a running factory.
8448
+ *
8449
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8450
+ * via the `definition` "FactoryPauseRequest".
8451
+ */
8452
+ /** @experimental */
8453
+ export interface FactoryPauseRequest {
8454
+ /**
8455
+ * Factory run identifier.
8456
+ */
8457
+ runId: string;
8458
+ }
7683
8459
  /**
7684
8460
  * Durable lifecycle and timing for one factory phase.
7685
8461
  *
@@ -7834,19 +8610,19 @@ export interface FactoryRunLimits {
7834
8610
  /**
7835
8611
  * Maximum number of factory subagents that may run concurrently.
7836
8612
  */
7837
- maxConcurrentSubagents?: number;
8613
+ maxConcurrentSubagents?: number | null;
7838
8614
  /**
7839
8615
  * Maximum total number of factory subagents that may be admitted.
7840
8616
  */
7841
- maxTotalSubagents?: number;
8617
+ maxTotalSubagents?: number | null;
7842
8618
  /**
7843
8619
  * Maximum accumulated active-execution time in seconds. Active execution includes the entire extension body, subprocess waits, queued-agent waits, and sleeps; time between resumed attempts is not counted.
7844
8620
  */
7845
- timeoutSeconds?: number;
8621
+ timeoutSeconds?: number | null;
7846
8622
  /**
7847
8623
  * Maximum AI credits consumed by factory subagents and their descendants. The post-paid ceiling is soft: parallel turns can settle beyond it before the run stops.
7848
8624
  */
7849
- maxAiCredits?: number;
8625
+ maxAiCredits?: number | null;
7850
8626
  }
7851
8627
  /**
7852
8628
  * Resolved persisted factory identity and resumed run envelope.
@@ -7896,6 +8672,7 @@ export interface FactoryRunResult {
7896
8672
  * Partial journal and progress snapshot for a halted, cancelled, or errored run.
7897
8673
  */
7898
8674
  snapshot?: JsonValue;
8675
+ pauseInfo?: FactoryPauseInfo;
7899
8676
  }
7900
8677
  /**
7901
8678
  * Full factory run observability detail.
@@ -7972,6 +8749,10 @@ export interface FactoryRunDetail {
7972
8749
  * Terminal run outcome, or null while nonterminal.
7973
8750
  */
7974
8751
  terminal: FactoryRunTerminal | null;
8752
+ /**
8753
+ * Whether the durable run state currently passes runtime resume eligibility checks.
8754
+ */
8755
+ canResume: boolean;
7975
8756
  /**
7976
8757
  * Lifecycle and timing observations for each factory phase.
7977
8758
  */
@@ -8023,7 +8804,7 @@ export interface RunOptions {
8023
8804
  resumeFromRunId?: string;
8024
8805
  }
8025
8806
  /**
8026
- * Optional user prompt to combine with the fleet orchestration instructions.
8807
+ * Parameters for starting fleet orchestration: an optional user prompt combined with the fleet instructions, plus the send options forwarded to the resulting turn.
8027
8808
  *
8028
8809
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8029
8810
  * via the `definition` "FleetStartRequest".
@@ -8034,6 +8815,14 @@ export interface FleetStartRequest {
8034
8815
  * Optional user prompt to combine with fleet instructions
8035
8816
  */
8036
8817
  prompt?: string;
8818
+ /**
8819
+ * Optional attachments (files, directories, selections, blobs, GitHub references) to include with the fleet request
8820
+ */
8821
+ attachments?: Attachment[];
8822
+ /**
8823
+ * If true, await completion of the agentic loop for this fleet request before returning. Defaults to false.
8824
+ */
8825
+ wait?: boolean;
8037
8826
  }
8038
8827
  /**
8039
8828
  * Indicates whether fleet mode was successfully activated.
@@ -10025,6 +10814,10 @@ export interface McpConfigRemoveRequest {
10025
10814
  * Name of the MCP server to remove
10026
10815
  */
10027
10816
  name: string;
10817
+ /**
10818
+ * OAuth Client ID Metadata Document URL whose persisted credentials should also be removed.
10819
+ */
10820
+ authClientIdMetadataUrl?: string;
10028
10821
  }
10029
10822
  /**
10030
10823
  * MCP server name and replacement configuration to write to user configuration.
@@ -10078,6 +10871,10 @@ export interface McpDiscoverRequest {
10078
10871
  * Working directory used as context for discovery (e.g., plugin resolution)
10079
10872
  */
10080
10873
  workingDirectory?: string;
10874
+ /**
10875
+ * Whether to include canonical effectiveSource metadata for each discovered server. Callers must opt in so protocol-3 clients retain the legacy closed response shape.
10876
+ */
10877
+ includeEffectiveSource?: boolean;
10081
10878
  }
10082
10879
  /**
10083
10880
  * MCP servers discovered from user, workspace, plugin, and built-in sources.
@@ -11240,6 +12037,7 @@ export interface McpServer {
11240
12037
  * Error message if the server failed to connect
11241
12038
  */
11242
12039
  error?: string;
12040
+ serverMetadata?: McpServerMetadata;
11243
12041
  }
11244
12042
  /**
11245
12043
  * MCP servers configured for the session, with their connection status and host-level state.
@@ -11596,6 +12394,31 @@ export interface MetadataSnapshotRemoteMetadataRepository {
11596
12394
  */
11597
12395
  branch: string;
11598
12396
  }
12397
+ /**
12398
+ * Atomic patch for client-owned session metadata. Operations apply in clear, remove, then set order. The resulting bag must satisfy the ClientMetadata entry and serialized-size limits. Local storage coordinates concurrent runtime processes; custom SessionFs providers must serialize writers that access the same session from multiple processes.
12399
+ *
12400
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12401
+ * via the `definition` "MetadataUpdateClientMetadataRequest".
12402
+ */
12403
+ /** @experimental */
12404
+ export interface MetadataUpdateClientMetadataRequest {
12405
+ /**
12406
+ * Remove every existing client metadata entry before applying remove and set. Defaults to false.
12407
+ */
12408
+ clear?: boolean;
12409
+ /**
12410
+ * Case-sensitive keys to remove. Missing keys are ignored. Each key must be non-empty, at most 256 UTF-8 bytes, and outside the reserved `copilot/` and `github/` namespaces.
12411
+ *
12412
+ * @maxItems 128
12413
+ */
12414
+ remove?: string[];
12415
+ /**
12416
+ * String entries to add or replace. Set wins when a key also appears in remove. Each key must be non-empty, at most 256 UTF-8 bytes, and outside the reserved `copilot/` and `github/` namespaces. Each value may contain at most 16 KiB of UTF-8 data.
12417
+ */
12418
+ set?: {
12419
+ [k: string]: string | undefined;
12420
+ };
12421
+ }
11599
12422
  /**
11600
12423
  * Copilot model metadata, including identifier, display name, capabilities, policy, billing, reasoning efforts, and picker categories.
11601
12424
  *
@@ -11613,6 +12436,12 @@ export interface Model {
11613
12436
  */
11614
12437
  name: string;
11615
12438
  capabilities: ModelCapabilities;
12439
+ /**
12440
+ * 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.
12441
+ */
12442
+ metadata?: {
12443
+ [k: string]: JsonValue | undefined;
12444
+ };
11616
12445
  policy?: ModelPolicy;
11617
12446
  billing?: ModelBilling;
11618
12447
  /**
@@ -11926,6 +12755,10 @@ export interface ModelApplyStartupOverlayRequest {
11926
12755
  * Context tier selected by repository settings, when configured.
11927
12756
  */
11928
12757
  repoContextTier?: string;
12758
+ /**
12759
+ * Auto routing preference selected by repository settings, when configured. Applied only when the overlay selects the Auto model; beside a concrete model it stays dormant.
12760
+ */
12761
+ repoAutoTier?: string;
11929
12762
  /**
11930
12763
  * Model explicitly selected by the CLI, when provided.
11931
12764
  */
@@ -12053,6 +12886,44 @@ export interface ModelPickerSettingsContext {
12053
12886
  */
12054
12887
  environment: {};
12055
12888
  }
12889
+ /**
12890
+ * Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error.
12891
+ *
12892
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12893
+ * via the `definition` "ModelSetAllowedModelsRequest".
12894
+ */
12895
+ /** @experimental */
12896
+ export interface ModelSetAllowedModelsRequest {
12897
+ /**
12898
+ * Exact model IDs to permit, or null to clear the host restriction.
12899
+ */
12900
+ allowedModels?: string[] | null;
12901
+ }
12902
+ /**
12903
+ * The applied host allowlist and effective session model policy after intersection.
12904
+ *
12905
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12906
+ * via the `definition` "ModelSetAllowedModelsResult".
12907
+ */
12908
+ /** @experimental */
12909
+ export interface ModelSetAllowedModelsResult {
12910
+ /**
12911
+ * Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy.
12912
+ */
12913
+ allowedModels?: string[];
12914
+ /**
12915
+ * Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy.
12916
+ */
12917
+ effectiveAllowedModels?: string[];
12918
+ /**
12919
+ * Effective deterministic fallback model, when the policy defines one.
12920
+ */
12921
+ fallbackModel?: string;
12922
+ /**
12923
+ * Selected session model after reconciling a now-disallowed concrete selection.
12924
+ */
12925
+ modelId?: string;
12926
+ }
12056
12927
  /**
12057
12928
  * Reasoning effort level to apply to the currently selected model.
12058
12929
  *
@@ -12080,15 +12951,52 @@ export interface ModelSetReasoningEffortResult {
12080
12951
  reasoningEffort: string;
12081
12952
  }
12082
12953
  /** @experimental */
12083
- export interface ModelsListRequest {
12954
+ export interface ModelsListRequest {
12955
+ /**
12956
+ * Opaque account identifier returned by `account.getAllUsers`. When omitted, the current account is used.
12957
+ */
12958
+ selectionId?: string;
12959
+ /**
12960
+ * GitHub token accepted for compatibility with existing SDK clients. When provided, resolves this token instead of using the current account.
12961
+ */
12962
+ gitHubToken?: string;
12963
+ }
12964
+ /**
12965
+ * An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.
12966
+ *
12967
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12968
+ * via the `definition` "ModelSwitchAutoTierRequest".
12969
+ */
12970
+ /** @experimental */
12971
+ export interface ModelSwitchAutoTierRequest {
12972
+ /**
12973
+ * 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.
12974
+ */
12975
+ autoTier: AutoTier | null;
12976
+ source?: ModelChangeSource;
12977
+ }
12978
+ /**
12979
+ * Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
12980
+ *
12981
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12982
+ * via the `definition` "ModelSwitchAutoTierResult".
12983
+ */
12984
+ /** @experimental */
12985
+ export interface ModelSwitchAutoTierResult {
12986
+ status: ModelSwitchAutoTierStatus;
12987
+ effectiveAutoTier?: AutoTier;
12084
12988
  /**
12085
- * Opaque account identifier returned by `account.getAllUsers`. When omitted, the current account is used.
12989
+ * Latest unclaimed Auto preference waiting for a future user turn.
12086
12990
  */
12087
- selectionId?: string;
12991
+ pendingAutoTier?: AutoTier | null;
12088
12992
  /**
12089
- * GitHub token accepted for compatibility with existing SDK clients. When provided, resolves this token instead of using the current account.
12993
+ * Auto preference currently claimed by an in-progress activation. Null means the activation is returning to provider-default routing.
12090
12994
  */
12091
- gitHubToken?: string;
12995
+ activatingAutoTier?: AutoTier | null;
12996
+ /**
12997
+ * Earlier unclaimed preference replaced by this request. This can be present with either status, including when selecting the effective preference cancels pending work.
12998
+ */
12999
+ supersededAutoTier?: AutoTier | null;
12092
13000
  }
12093
13001
  /** @experimental */
12094
13002
  export interface ModelSwitchConfirmation {
@@ -12117,6 +13025,10 @@ export interface ModelSwitchToRequest {
12117
13025
  * 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
13026
  */
12119
13027
  modelId: string;
13028
+ /**
13029
+ * 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`.
13030
+ */
13031
+ autoTier?: AutoTier | null;
12120
13032
  /**
12121
13033
  * 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
13034
  */
@@ -12189,6 +13101,7 @@ export interface ModelSwitchToResult {
12189
13101
  * Deprecation warnings associated with the selected model or options.
12190
13102
  */
12191
13103
  deprecationWarnings?: string[];
13104
+ modelState?: CurrentModel;
12192
13105
  }
12193
13106
  /**
12194
13107
  * Agent interaction mode to apply to the session.
@@ -12199,6 +13112,7 @@ export interface ModelSwitchToResult {
12199
13112
  /** @experimental */
12200
13113
  export interface ModeSetRequest {
12201
13114
  mode: SessionMode;
13115
+ expectedMode?: SessionMode;
12202
13116
  /**
12203
13117
  * Session whose plan-mode base state should be inherited.
12204
13118
  */
@@ -12253,6 +13167,10 @@ export interface ModeSetResult {
12253
13167
  * Whether applying the mode changed the active model.
12254
13168
  */
12255
13169
  modelChanged: boolean;
13170
+ /**
13171
+ * Whether the requested mode was applied to the session. False only when an 'expectedMode' precondition did not hold, in which case any model change reported alongside it was still applied.
13172
+ */
13173
+ modeApplied?: boolean;
12256
13174
  confirmation?: ModelSwitchConfirmation;
12257
13175
  /**
12258
13176
  * User-facing warning produced while applying the mode change.
@@ -14125,6 +15043,7 @@ export interface PluginInstallResult {
14125
15043
  * Number of skills discovered and installed from the plugin
14126
15044
  */
14127
15045
  skillsInstalled: number;
15046
+ stagingMode?: PluginInstallStagingMode;
14128
15047
  /**
14129
15048
  * Optional post-install message provided by the plugin (e.g. setup instructions)
14130
15049
  */
@@ -14176,7 +15095,7 @@ export interface PluginsBuiltinSetRequest {
14176
15095
  paths: string[];
14177
15096
  }
14178
15097
  /**
14179
- * Plugin names (or specs) to disable.
15098
+ * Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against.
14180
15099
  *
14181
15100
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
14182
15101
  * via the `definition` "PluginsDisableRequest".
@@ -14187,9 +15106,13 @@ export interface PluginsDisableRequest {
14187
15106
  * Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins.
14188
15107
  */
14189
15108
  names: string[];
15109
+ /**
15110
+ * Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory.
15111
+ */
15112
+ workingDirectory?: string;
14190
15113
  }
14191
15114
  /**
14192
- * Plugin names (or specs) to enable.
15115
+ * Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against.
14193
15116
  *
14194
15117
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
14195
15118
  * via the `definition` "PluginsEnableRequest".
@@ -14200,6 +15123,10 @@ export interface PluginsEnableRequest {
14200
15123
  * Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API.
14201
15124
  */
14202
15125
  names: string[];
15126
+ /**
15127
+ * Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory.
15128
+ */
15129
+ workingDirectory?: string;
14203
15130
  }
14204
15131
  /**
14205
15132
  * Plugin source and optional working directory for relative-path resolution.
@@ -15913,6 +16840,18 @@ export interface SandboxConfig {
15913
16840
  * Whether to auto-add the current working directory to readwritePaths. Default: true.
15914
16841
  */
15915
16842
  addCurrentWorkingDirectory?: boolean;
16843
+ /**
16844
+ * 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).
16845
+ */
16846
+ sandboxMcpServers?: boolean;
16847
+ /**
16848
+ * 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).
16849
+ */
16850
+ sandboxLspServers?: boolean;
16851
+ /**
16852
+ * 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).
16853
+ */
16854
+ allowBypass?: boolean;
15916
16855
  auth?: SandboxConfigAuth;
15917
16856
  /**
15918
16857
  * 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).
@@ -16049,6 +16988,37 @@ export interface SandboxConfigAuth {
16049
16988
  */
16050
16989
  gh?: boolean;
16051
16990
  }
16991
+ /**
16992
+ * Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt.
16993
+ *
16994
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
16995
+ * via the `definition` "SandboxDisableForSessionRequest".
16996
+ */
16997
+ /** @experimental */
16998
+ export interface SandboxDisableForSessionRequest {
16999
+ /**
17000
+ * Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out.
17001
+ */
17002
+ requestId: string;
17003
+ decisionContext?: PermissionDecisionContext;
17004
+ }
17005
+ /**
17006
+ * Result of attempting to disable sandboxing for the current session.
17007
+ *
17008
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
17009
+ * via the `definition` "SandboxDisableForSessionResult".
17010
+ */
17011
+ /** @experimental */
17012
+ export interface SandboxDisableForSessionResult {
17013
+ /**
17014
+ * Whether this call resolved the pending request and applied the session opt-out.
17015
+ */
17016
+ success: boolean;
17017
+ /**
17018
+ * The authoritative sandbox enabled state after the operation.
17019
+ */
17020
+ enabled: boolean;
17021
+ }
16052
17022
  /**
16053
17023
  * Managed sandbox enforcement state for a session.
16054
17024
  *
@@ -16710,7 +17680,7 @@ export interface SessionEnrichMetadataResult {
16710
17680
  sessions: LocalSessionMetadataValue[];
16711
17681
  }
16712
17682
  /**
16713
- * File path, content to append, and optional mode for the client-provided session filesystem.
17683
+ * File path, content to append, and optional mode for the client-provided session filesystem. Implementations create parent directories as needed.
16714
17684
  *
16715
17685
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
16716
17686
  * via the `definition` "SessionFsAppendFileRequest".
@@ -17604,6 +18574,10 @@ export interface SessionOpenOptions {
17604
18574
  * Identifier of the client driving the session.
17605
18575
  */
17606
18576
  clientName?: string;
18577
+ /**
18578
+ * OAuth Client ID Metadata Document URL used by this host for MCP authorization.
18579
+ */
18580
+ authClientIdMetadataUrl?: string;
17607
18581
  /**
17608
18582
  * Structured client kind used for runtime behavior gates.
17609
18583
  */
@@ -17751,6 +18725,10 @@ export interface SessionOpenOptions {
17751
18725
  * Whether to skip custom instruction sources.
17752
18726
  */
17753
18727
  skipCustomInstructions?: boolean;
18728
+ /**
18729
+ * Whether to invalidate cached custom-instruction discovery before constructing the session. Use when instruction files may have changed earlier in the same runtime process.
18730
+ */
18731
+ refreshCustomInstructions?: boolean;
17754
18732
  /**
17755
18733
  * Instruction source IDs disabled for this session.
17756
18734
  */
@@ -18669,6 +19647,27 @@ export interface SessionsGetBoardEntryCountResult {
18669
19647
  */
18670
19648
  count?: number;
18671
19649
  }
19650
+ /**
19651
+ * Bounded batch request for client-owned metadata from persisted local sessions.
19652
+ *
19653
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
19654
+ * via the `definition` "SessionsGetClientMetadataRequest".
19655
+ */
19656
+ /** @experimental */
19657
+ export interface SessionsGetClientMetadataRequest {
19658
+ /**
19659
+ * Session IDs to inspect. Results preserve this order.
19660
+ *
19661
+ * @maxItems 1000
19662
+ */
19663
+ sessionIds: string[];
19664
+ /**
19665
+ * Case-sensitive keys to project from each valid bag. Each key must be non-empty, at most 256 UTF-8 bytes, and outside the reserved `copilot/` and `github/` namespaces. Omit to return every entry.
19666
+ *
19667
+ * @maxItems 128
19668
+ */
19669
+ keys?: string[];
19670
+ }
18672
19671
  /**
18673
19672
  * Session ID whose event-log file path to compute.
18674
19673
  *
@@ -18882,11 +19881,11 @@ export interface SessionsReadPersistedEventsRequest {
18882
19881
  */
18883
19882
  sessionId: string;
18884
19883
  /**
18885
- * Opaque cursor returned by a previous persisted-event read. Omit on the first call.
19884
+ * Opaque, process-local, single-use cursor returned by the previous persisted-event read. Omit on the first call and issue continuations sequentially; reusing the same cursor returns an expired terminal page.
18886
19885
  */
18887
19886
  cursor?: string;
18888
19887
  /**
18889
- * Maximum number of events to return in this batch (1–1000, default 200).
19888
+ * Maximum number of events to return in this batch (1–1000, default 200). Pages may contain fewer events to keep the serialized event array within a soft 1 MiB budget including resolved binary assets; one oversized event is returned alone to guarantee progress.
18890
19889
  */
18891
19890
  max?: number;
18892
19891
  direction?: EventsReadDirection;
@@ -19695,6 +20694,7 @@ export interface SlashCommandTimelineEntry {
19695
20694
  * Optional URL associated with the timeline entry.
19696
20695
  */
19697
20696
  url?: string;
20697
+ remediation?: RemediationAction;
19698
20698
  }
19699
20699
  /**
19700
20700
  * Slash-command invocation result that submits an agent prompt, with display prompt, optional mode, optional user-facing notice, and settings-change flag.
@@ -19913,7 +20913,7 @@ export interface SlashCommandSetPlanModelResult {
19913
20913
  runtimeSettingsChanged?: boolean;
19914
20914
  }
19915
20915
  /**
19916
- * Subagent model, reasoning effort, and context tier settings
20916
+ * Subagent model, reasoning effort, context tier, and auto-invocation settings
19917
20917
  *
19918
20918
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
19919
20919
  * via the `definition` "SubagentSettingsEntry".
@@ -19930,6 +20930,10 @@ export interface SubagentSettingsEntry {
19930
20930
  */
19931
20931
  effortLevel?: string;
19932
20932
  contextTier?: SubagentSettingsEntryContextTier;
20933
+ /**
20934
+ * Whether this agent's runtime-defined proactive invocation prompting is enabled, if supported. Currently consumed by the built-in rubber-duck agent.
20935
+ */
20936
+ autoInvoke?: boolean;
19933
20937
  }
19934
20938
  /**
19935
20939
  * Tracked background agent task metadata, including IDs, status, timing, agent type, prompt, model, result, and latest response.
@@ -20052,6 +21056,157 @@ export interface TaskProgressLine {
20052
21056
  */
20053
21057
  timestamp: string;
20054
21058
  }
21059
+ /**
21060
+ * Tracked client-owned task metadata.
21061
+ *
21062
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21063
+ * via the `definition` "TaskClientInfo".
21064
+ */
21065
+ /** @experimental */
21066
+ export interface TaskClientInfo {
21067
+ type: TaskClientType;
21068
+ /**
21069
+ * Canonical runtime-generated task identifier
21070
+ */
21071
+ id: string;
21072
+ /**
21073
+ * Owner-scoped registration and reclaim key
21074
+ */
21075
+ clientTaskId: string;
21076
+ /**
21077
+ * Optional task display name
21078
+ */
21079
+ displayName?: string;
21080
+ /**
21081
+ * Task description
21082
+ */
21083
+ description: string;
21084
+ status: TaskClientStatus;
21085
+ owner: TaskClientOwner;
21086
+ /**
21087
+ * ISO 8601 timestamp when the task started
21088
+ */
21089
+ startedAt: string;
21090
+ /**
21091
+ * ISO 8601 timestamp of the latest accepted lifecycle change
21092
+ */
21093
+ updatedAt: string;
21094
+ /**
21095
+ * ISO 8601 timestamp when the task reached a terminal status
21096
+ */
21097
+ completedAt?: string;
21098
+ /**
21099
+ * Accumulated active execution time in milliseconds
21100
+ */
21101
+ activeTimeMs: number;
21102
+ /**
21103
+ * ISO 8601 timestamp when the current active segment started
21104
+ */
21105
+ activeStartedAt?: string;
21106
+ /**
21107
+ * ISO 8601 timestamp when the connected owner entered idle status
21108
+ */
21109
+ idleSince?: string;
21110
+ /**
21111
+ * ISO 8601 timestamp of the most recent orphan transition
21112
+ */
21113
+ orphanedAt?: string;
21114
+ /**
21115
+ * ISO 8601 timestamp of the most recent successful reclaim
21116
+ */
21117
+ reclaimedAt?: string;
21118
+ executionMode: TaskClientExecutionMode;
21119
+ /**
21120
+ * Whether the currently bound owner can receive a cancellation request
21121
+ */
21122
+ canCancel: boolean;
21123
+ /**
21124
+ * Sequence number of the latest accepted owner update
21125
+ */
21126
+ sequence: number;
21127
+ /**
21128
+ * Opaque successful terminal result supplied by the task owner
21129
+ */
21130
+ result?: JsonValue;
21131
+ /**
21132
+ * Human-readable terminal failure message
21133
+ */
21134
+ error?: string;
21135
+ /**
21136
+ * Optional owner-supplied terminal failure code
21137
+ */
21138
+ errorCode?: string;
21139
+ /**
21140
+ * Human-readable reason for terminal cancellation
21141
+ */
21142
+ cancellationReason?: string;
21143
+ }
21144
+ /**
21145
+ * Public owner attribution for a client-owned task. Identifiers are opaque and never authorize requests.
21146
+ *
21147
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21148
+ * via the `definition` "TaskClientOwner".
21149
+ */
21150
+ /** @experimental */
21151
+ export interface TaskClientOwner {
21152
+ /**
21153
+ * Opaque session-scoped participant identity
21154
+ */
21155
+ participantId: string;
21156
+ /**
21157
+ * Opaque identity of the currently or most recently bound session join
21158
+ */
21159
+ joinId: string;
21160
+ kind: TaskClientOwnerKind;
21161
+ /**
21162
+ * Display-only owner name
21163
+ */
21164
+ displayName?: string;
21165
+ /**
21166
+ * Display-only owner source
21167
+ */
21168
+ source?: string;
21169
+ presence: TaskClientOwnerPresence;
21170
+ /**
21171
+ * ISO 8601 timestamp when the bound join disconnected
21172
+ */
21173
+ disconnectedAt?: string;
21174
+ }
21175
+ /**
21176
+ * Generic progress for a client-owned task.
21177
+ *
21178
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21179
+ * via the `definition` "TaskClientProgress".
21180
+ */
21181
+ /** @experimental */
21182
+ export interface TaskClientProgress {
21183
+ type: TaskClientType;
21184
+ status: TaskClientStatus;
21185
+ /**
21186
+ * Sequence number of the latest accepted owner update
21187
+ */
21188
+ sequence: number;
21189
+ /**
21190
+ * ISO 8601 timestamp of the latest accepted lifecycle change
21191
+ */
21192
+ updatedAt: string;
21193
+ /**
21194
+ * Current owner-defined progress phase
21195
+ */
21196
+ phase?: string;
21197
+ /**
21198
+ * Current completion percentage from zero through one hundred
21199
+ */
21200
+ percentage?: number;
21201
+ /**
21202
+ * Most recent nonempty progress message
21203
+ */
21204
+ lastMessage?: string;
21205
+ /**
21206
+ * Recent server-timestamped progress messages
21207
+ */
21208
+ recentActivity: TaskProgressLine[];
21209
+ }
20055
21210
  /** @experimental */
20056
21211
  export interface TaskCompletionDecision {
20057
21212
  outcome: TaskCompletionOutcome;
@@ -20269,6 +21424,54 @@ export interface TasksPromoteToBackgroundResult {
20269
21424
  /** @experimental */
20270
21425
  export interface TasksRefreshResult {
20271
21426
  }
21427
+ /**
21428
+ * Registers or reclaims a client-owned task.
21429
+ *
21430
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21431
+ * via the `definition` "TasksRegisterRequest".
21432
+ */
21433
+ /** @experimental */
21434
+ export interface TasksRegisterRequest {
21435
+ type: TaskClientType;
21436
+ /**
21437
+ * Owner-scoped idempotency key used for registration and reclaim
21438
+ */
21439
+ clientTaskId: string;
21440
+ /**
21441
+ * Human-readable description of the external work
21442
+ */
21443
+ description: string;
21444
+ /**
21445
+ * Optional short display name for the external work
21446
+ */
21447
+ displayName?: string;
21448
+ /**
21449
+ * Whether the owner supports runtime cancellation requests
21450
+ */
21451
+ cancellable: boolean;
21452
+ /**
21453
+ * Expected current sequence for idempotent registration or orphan reclaim
21454
+ */
21455
+ expectedSequence?: number;
21456
+ }
21457
+ /**
21458
+ * Result of registering or reclaiming a client-owned task.
21459
+ *
21460
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21461
+ * via the `definition` "TasksRegisterResult".
21462
+ */
21463
+ /** @experimental */
21464
+ export interface TasksRegisterResult {
21465
+ task: TaskClientInfo;
21466
+ /**
21467
+ * True only when this invocation created a new task
21468
+ */
21469
+ created: boolean;
21470
+ /**
21471
+ * True only when this invocation reclaimed an orphaned task
21472
+ */
21473
+ reclaimed: boolean;
21474
+ }
20272
21475
  /**
20273
21476
  * Identifier of the completed or cancelled task to remove from tracking.
20274
21477
  *
@@ -20375,6 +21578,42 @@ export interface TasksStartAgentResult {
20375
21578
  */
20376
21579
  agentId: string;
20377
21580
  }
21581
+ /**
21582
+ * Updates a client-owned task.
21583
+ *
21584
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21585
+ * via the `definition` "TasksUpdateRequest".
21586
+ */
21587
+ /** @experimental */
21588
+ export interface TasksUpdateRequest {
21589
+ /**
21590
+ * Canonical runtime-generated task identifier
21591
+ */
21592
+ id: string;
21593
+ /**
21594
+ * Owner update sequence to apply
21595
+ */
21596
+ sequence: number;
21597
+ update: TaskClientUpdate;
21598
+ }
21599
+ /**
21600
+ * Result of publishing a client-owned task update.
21601
+ *
21602
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
21603
+ * via the `definition` "TasksUpdateResult".
21604
+ */
21605
+ /** @experimental */
21606
+ export interface TasksUpdateResult {
21607
+ task: TaskClientInfo;
21608
+ /**
21609
+ * Whether this invocation changed task state
21610
+ */
21611
+ applied: boolean;
21612
+ /**
21613
+ * Whether this invocation repeated the latest accepted update
21614
+ */
21615
+ duplicate: boolean;
21616
+ }
20378
21617
  /**
20379
21618
  * 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
21619
  *
@@ -22130,6 +23369,10 @@ export interface WorkspacesWriteAutopilotObjectiveResult {
22130
23369
  operation: string;
22131
23370
  }
22132
23371
  /** @experimental */
23372
+ export interface SessionFactoryPauseAtCheckpointResult {
23373
+ action: FactoryPauseCheckpointAction;
23374
+ }
23375
+ /** @experimental */
22133
23376
  export interface SessionModelListRequest {
22134
23377
  /**
22135
23378
  * If true, bypasses the per-session model list cache and re-fetches from CAPI.
@@ -22493,13 +23736,13 @@ export declare function createServerRpc(connection: MessageConnection): {
22493
23736
  /**
22494
23737
  * Enables installed plugins for new sessions.
22495
23738
  *
22496
- * @param params Plugin names (or specs) to enable.
23739
+ * @param params Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against.
22497
23740
  */
22498
23741
  enable: (params: PluginsEnableRequest) => Promise<void>;
22499
23742
  /**
22500
23743
  * Disables installed plugins for new sessions.
22501
23744
  *
22502
- * @param params Plugin names (or specs) to disable.
23745
+ * @param params Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against.
22503
23746
  */
22504
23747
  disable: (params: PluginsDisableRequest) => Promise<void>;
22505
23748
  /** @experimental */
@@ -22666,6 +23909,10 @@ export declare function createServerRpc(connection: MessageConnection): {
22666
23909
  * @returns Validated device-managed settings discovered before a session exists.
22667
23910
  */
22668
23911
  read: () => Promise<ManagedSettingsReadResult>;
23912
+ /**
23913
+ * 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.
23914
+ */
23915
+ clearCache: () => Promise<void>;
22669
23916
  };
22670
23917
  /** @experimental */
22671
23918
  runtime: {
@@ -22745,7 +23992,15 @@ export declare function createServerRpc(connection: MessageConnection): {
22745
23992
  */
22746
23993
  list: (params: SessionsListRequest) => Promise<SessionList>;
22747
23994
  /**
22748
- * Reads a page of durable events directly from a local session's persisted journal without creating, resuming, or activating the session. The initial backward read uses a bounded tail scan for fast first paint; cursor continuations preserve the session event-log paging semantics. Persisted events may omit payloads that are reconstructed only for an active session.
23995
+ * Reads client-owned metadata for multiple persisted local sessions without opening them. Results preserve request order and report missing, corrupt, unsupported, or temporarily unavailable sessions independently.
23996
+ *
23997
+ * @param params Bounded batch request for client-owned metadata from persisted local sessions.
23998
+ *
23999
+ * @returns Ordered client metadata outcomes for the requested local sessions.
24000
+ */
24001
+ getClientMetadata: (params: SessionsGetClientMetadataRequest) => Promise<SessionsGetClientMetadataResult>;
24002
+ /**
24003
+ * Reads a page of durable events directly from a local session's persisted journal without creating, resuming, or activating the session. The first read pins the currently opened journal generation and its byte-length boundary; opaque cursor continuations remain on that generation across runtime-owned compaction, truncation, and rewrite operations, which replace the live path atomically, and events appended after the boundary are excluded. For cold hydration, await the first successful page before activation and establish lossless live-event buffering before resume; merge subsequent live events by ID, preserving persisted order and letting live payloads win. Continuations are process-local, single-use capabilities bound to the originating session and storage context and must be paged sequentially; concurrent or repeated use of the same cursor expires that duplicate read rather than reading the generation twice. A complete snapshot has cursorStatus 'ok' and hasMore false. Snapshots expire after five idle minutes, with at most eight retained per process and idle-only eviction under pressure; completion and cancelled-worker exit release their handles. No transcript copy is created, but retained handles may keep replaced files' disk blocks alive until release. Pages have a soft 1 MiB serialized event-array budget including resolved binary assets; one oversized event is returned alone to guarantee progress. Working memory also includes a record/lookahead and asset resolution; resolving the first binary reference may scan the full pinned generation to build a bounded offset index. If the snapshot expires, is evicted, is cancelled before a continuation is established, or becomes unreadable after an observable unsupported in-place shortening, the continuation returns cursorStatus 'expired' with an empty terminal page and never falls back to a different generation. A missing or initially unreadable journal is an RPC error. Persisted history excludes ephemeral events and may omit payloads that are reconstructed only for an active session; use the active session event stream for post-resume live events.
22749
24004
  *
22750
24005
  * @param params Pagination options for reading an inactive or active local session's persisted event journal.
22751
24006
  *
@@ -22949,6 +24204,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
22949
24204
  * @returns Managed sandbox enforcement state for a session.
22950
24205
  */
22951
24206
  getEnforcementStatus: () => Promise<SandboxEnforcementStatus>;
24207
+ /**
24208
+ * Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass.
24209
+ *
24210
+ * @param params Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt.
24211
+ *
24212
+ * @returns Result of attempting to disable sandboxing for the current session.
24213
+ */
24214
+ disableForSession: (params: SandboxDisableForSessionRequest) => Promise<SandboxDisableForSessionResult>;
22952
24215
  };
22953
24216
  /**
22954
24217
  * Aborts the current agent turn.
@@ -23112,6 +24375,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23112
24375
  * @returns Complete current or terminal factory run envelope.
23113
24376
  */
23114
24377
  cancel: (params: FactoryCancelRequest) => Promise<FactoryRunResult>;
24378
+ /**
24379
+ * Pauses a running factory and returns its settled run envelope.
24380
+ *
24381
+ * @param params Parameters for pausing a running factory.
24382
+ *
24383
+ * @returns Complete current or terminal factory run envelope.
24384
+ */
24385
+ pause: (params: FactoryPauseRequest) => Promise<FactoryRunResult>;
23115
24386
  /**
23116
24387
  * Records a batch of ordered factory progress lines.
23117
24388
  *
@@ -23151,9 +24422,9 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23151
24422
  /** @experimental */
23152
24423
  model: {
23153
24424
  /**
23154
- * Gets the currently selected model for the session.
24425
+ * 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
24426
  *
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.
24427
+ * @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
24428
  */
23158
24429
  getCurrent: () => Promise<CurrentModel>;
23159
24430
  /**
@@ -23164,6 +24435,22 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23164
24435
  * @returns The model identifier active on the session after the switch.
23165
24436
  */
23166
24437
  switchTo: (params: ModelSwitchToRequest) => Promise<ModelSwitchToResult>;
24438
+ /**
24439
+ * 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`.
24440
+ *
24441
+ * @param params An Auto preference request for the session. This updates Auto configuration only; it does not change the selected model to `auto`.
24442
+ *
24443
+ * @returns Immediate acknowledgement and Auto preference snapshot after a switch request. This result never implies that a pending preference committed.
24444
+ */
24445
+ switchAutoTier: (params: ModelSwitchAutoTierRequest) => Promise<ModelSwitchAutoTierResult>;
24446
+ /**
24447
+ * Replaces or clears the host-supplied model allowlist for a running session.
24448
+ *
24449
+ * @param params Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error.
24450
+ *
24451
+ * @returns The applied host allowlist and effective session model policy after intersection.
24452
+ */
24453
+ setAllowedModels: (params: ModelSetAllowedModelsRequest) => Promise<ModelSetAllowedModelsResult>;
23167
24454
  /**
23168
24455
  * Updates the session's reasoning effort without changing the selected model.
23169
24456
  *
@@ -23370,6 +24657,15 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23370
24657
  diff: (params: WorkspacesDiffRequest) => Promise<WorkspaceDiffResult>;
23371
24658
  };
23372
24659
  /** @experimental */
24660
+ autopilotObjective: {
24661
+ /**
24662
+ * Reads the current canonical autopilot objective state for this session.
24663
+ *
24664
+ * @returns Canonical runtime state for the session's current autopilot objective.
24665
+ */
24666
+ getState: () => Promise<AutopilotObjectiveGetStateResult>;
24667
+ };
24668
+ /** @experimental */
23373
24669
  completions: {
23374
24670
  /**
23375
24671
  * 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).
@@ -23400,7 +24696,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23400
24696
  /**
23401
24697
  * Starts fleet mode by submitting the fleet orchestration prompt to the session.
23402
24698
  *
23403
- * @param params Optional user prompt to combine with the fleet orchestration instructions.
24699
+ * @param params Parameters for starting fleet orchestration: an optional user prompt combined with the fleet instructions, plus the send options forwarded to the resulting turn.
23404
24700
  *
23405
24701
  * @returns Indicates whether fleet mode was successfully activated.
23406
24702
  */
@@ -23463,6 +24759,22 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23463
24759
  * @returns Background tasks currently tracked by the session.
23464
24760
  */
23465
24761
  list: () => Promise<TaskList>;
24762
+ /**
24763
+ * Registers a client-owned task, or reclaims an orphaned task belonging to the same extension principal.
24764
+ *
24765
+ * @param params Registers or reclaims a client-owned task.
24766
+ *
24767
+ * @returns Result of registering or reclaiming a client-owned task.
24768
+ */
24769
+ register: (params: TasksRegisterRequest) => Promise<TasksRegisterResult>;
24770
+ /**
24771
+ * Publishes generic progress or a terminal outcome for a client-owned task.
24772
+ *
24773
+ * @param params Updates a client-owned task.
24774
+ *
24775
+ * @returns Result of publishing a client-owned task update.
24776
+ */
24777
+ update: (params: TasksUpdateRequest) => Promise<TasksUpdateResult>;
23466
24778
  /**
23467
24779
  * Refreshes metadata for any detached background shells the runtime knows about.
23468
24780
  *
@@ -23926,7 +25238,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
23926
25238
  */
23927
25239
  set: (params: ToolsSetRequest) => Promise<ToolsSetResult>;
23928
25240
  /**
23929
- * Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions.
25241
+ * Sets the current session's live subagent settings override, which takes precedence over persisted user settings until cleared. Persisted user settings remain the source of truth for future sessions.
23930
25242
  *
23931
25243
  * @param params Subagent settings to apply to the current session
23932
25244
  *
@@ -24276,6 +25588,20 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
24276
25588
  * @returns Point-in-time snapshot of slow-changing session identifier and state fields
24277
25589
  */
24278
25590
  snapshot: () => Promise<SessionMetadataSnapshot>;
25591
+ /**
25592
+ * Returns the client-owned string metadata persisted with this local session. The metadata is not included in model context, events, telemetry, snapshots, or remote exports.
25593
+ *
25594
+ * @returns Client-owned, case-sensitive string metadata persisted with a local session. Clients should namespace keys by owner. Keys must be non-empty and at most 256 UTF-8 bytes; keys under `copilot/` and `github/` are reserved. Values may contain at most 16 KiB of UTF-8 data. A bag may contain at most 128 entries and its serialized sidecar may contain at most 64 KiB. The runtime stores but never interprets these values.
25595
+ */
25596
+ getClientMetadata: () => Promise<ClientMetadata>;
25597
+ /**
25598
+ * Atomically patches the client-owned string metadata persisted with this local session and returns the committed bag.
25599
+ *
25600
+ * @param params Atomic patch for client-owned session metadata. Operations apply in clear, remove, then set order. The resulting bag must satisfy the ClientMetadata entry and serialized-size limits. Local storage coordinates concurrent runtime processes; custom SessionFs providers must serialize writers that access the same session from multiple processes.
25601
+ *
25602
+ * @returns Client-owned, case-sensitive string metadata persisted with a local session. Clients should namespace keys by owner. Keys must be non-empty and at most 256 UTF-8 bytes; keys under `copilot/` and `github/` are reserved. Values may contain at most 16 KiB of UTF-8 data. A bag may contain at most 128 entries and its serialized sidecar may contain at most 64 KiB. The runtime stores but never interprets these values.
25603
+ */
25604
+ updateClientMetadata: (params: MetadataUpdateClientMetadataRequest) => Promise<ClientMetadata>;
24279
25605
  /**
24280
25606
  * Reports whether the local session is currently processing user/agent messages.
24281
25607
  *
@@ -24664,6 +25990,18 @@ export interface FactoryHandler {
24664
25990
  */
24665
25991
  abort(params: FactoryAbortRequest): Promise<FactoryAckResult>;
24666
25992
  }
25993
+ /** Handler for `tasks` client session API methods. */
25994
+ /** @experimental */
25995
+ export interface TasksHandler {
25996
+ /**
25997
+ * Asks the client currently bound to a client-owned session task to confirm that its external work stopped.
25998
+ *
25999
+ * @param params Runtime-to-owner cancellation request for a client-owned task.
26000
+ *
26001
+ * @returns Whether the client authoritatively confirmed its external work stopped.
26002
+ */
26003
+ cancel(params: ClientTaskCancelRequest): Promise<ClientTaskCancelResult>;
26004
+ }
24667
26005
  /** Handler for `sessionFs` client session API methods. */
24668
26006
  /** @experimental */
24669
26007
  export interface SessionFsHandler {
@@ -24684,9 +26022,9 @@ export interface SessionFsHandler {
24684
26022
  */
24685
26023
  writeFile(params: SessionFsWriteFileRequest): Promise<SessionFsError | undefined>;
24686
26024
  /**
24687
- * Appends content to a file in the client-provided session filesystem.
26025
+ * Appends content to a file in the client-provided session filesystem, creating parent directories as needed.
24688
26026
  *
24689
- * @param params File path, content to append, and optional mode for the client-provided session filesystem.
26027
+ * @param params File path, content to append, and optional mode for the client-provided session filesystem. Implementations create parent directories as needed.
24690
26028
  *
24691
26029
  * @returns Describes a filesystem error.
24692
26030
  */
@@ -24802,6 +26140,7 @@ export interface CanvasHandler {
24802
26140
  export interface ClientSessionApiHandlers {
24803
26141
  providerToken?: ProviderTokenHandler;
24804
26142
  factory?: FactoryHandler;
26143
+ tasks?: TasksHandler;
24805
26144
  sessionFs?: SessionFsHandler;
24806
26145
  canvas?: CanvasHandler;
24807
26146
  }