@github/copilot-sdk 1.0.9-preview.2 → 1.0.9

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.
@@ -398,6 +398,32 @@ export type DebugCollectLogsResultKind =
398
398
  "archive"
399
399
  /** A directory containing redacted files was written. */
400
400
  | "directory";
401
+ /**
402
+ * Persisted extension discovery source
403
+ *
404
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
405
+ * via the `definition` "DiscoveredExtensionSource".
406
+ */
407
+ /** @experimental */
408
+ export type DiscoveredExtensionSource =
409
+ /** Extension discovered from the user's extensions directory. */
410
+ "user"
411
+ /** Extension contributed by an installed plugin. */
412
+ | "plugin";
413
+ /**
414
+ * Effective extension loading and agent-management mode
415
+ *
416
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
417
+ * via the `definition` "DiscoveredExtensionMode".
418
+ */
419
+ /** @experimental */
420
+ export type DiscoveredExtensionMode =
421
+ /** Extensions are not loaded. */
422
+ "disabled"
423
+ /** Extensions are loaded, but the agent cannot create, reload, or manage them. */
424
+ | "load_only"
425
+ /** Extensions are loaded and the agent can create, reload, and manage them. */
426
+ | "load_and_augment";
401
427
  /**
402
428
  * Server transport type: stdio, http, sse (deprecated), or memory
403
429
  *
@@ -435,7 +461,19 @@ export type EventsAgentScope =
435
461
  /** Return events from all agents. */
436
462
  | "all";
437
463
  /**
438
- * 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 started from the beginning of the remaining history.
464
+ * Direction to page through the session's persisted event history. 'forward' pages from the cursor toward newer events; 'backward' returns the newest window first (tail-first) and pages toward older events. Events within a returned batch are always chronological (oldest-to-newest), even for a backward read.
465
+ *
466
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
467
+ * via the `definition` "EventsReadDirection".
468
+ */
469
+ /** @experimental */
470
+ export type EventsReadDirection =
471
+ /** Page from the cursor toward newer events (default). */
472
+ "forward"
473
+ /** Tail-first: return the newest events and page toward older events. */
474
+ | "backward";
475
+ /**
476
+ * 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.
439
477
  *
440
478
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
441
479
  * via the `definition` "EventsCursorStatus".
@@ -1447,7 +1485,7 @@ export type PermissionDecision = PermissionDecisionApproveOnce | PermissionDecis
1447
1485
  * via the `definition` "PermissionDecisionApproveForSessionApproval".
1448
1486
  */
1449
1487
  /** @experimental */
1450
- export type PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMcp | PermissionDecisionApproveForSessionApprovalMcpSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess;
1488
+ export type PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMcp | PermissionDecisionApproveForSessionApprovalMcpSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalFactory | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess;
1451
1489
  /**
1452
1490
  * Approval to persist for this location
1453
1491
  *
@@ -1455,7 +1493,7 @@ export type PermissionDecisionApproveForSessionApproval = PermissionDecisionAppr
1455
1493
  * via the `definition` "PermissionDecisionApproveForLocationApproval".
1456
1494
  */
1457
1495
  /** @experimental */
1458
- export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMcp | PermissionDecisionApproveForLocationApprovalMcpSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess;
1496
+ export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMcp | PermissionDecisionApproveForLocationApprovalMcpSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalFactory | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess;
1459
1497
  /**
1460
1498
  * Tool approval to persist and apply
1461
1499
  *
@@ -1463,7 +1501,7 @@ export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApp
1463
1501
  * via the `definition` "PermissionsLocationsAddToolApprovalDetails".
1464
1502
  */
1465
1503
  /** @experimental */
1466
- export type PermissionsLocationsAddToolApprovalDetails = PermissionsLocationsAddToolApprovalDetailsCommands | PermissionsLocationsAddToolApprovalDetailsRead | PermissionsLocationsAddToolApprovalDetailsWrite | PermissionsLocationsAddToolApprovalDetailsMcp | PermissionsLocationsAddToolApprovalDetailsMcpSampling | PermissionsLocationsAddToolApprovalDetailsMemory | PermissionsLocationsAddToolApprovalDetailsCustomTool | PermissionsLocationsAddToolApprovalDetailsExtensionManagement | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess;
1504
+ export type PermissionsLocationsAddToolApprovalDetails = PermissionsLocationsAddToolApprovalDetailsCommands | PermissionsLocationsAddToolApprovalDetailsRead | PermissionsLocationsAddToolApprovalDetailsWrite | PermissionsLocationsAddToolApprovalDetailsMcp | PermissionsLocationsAddToolApprovalDetailsMcpSampling | PermissionsLocationsAddToolApprovalDetailsMemory | PermissionsLocationsAddToolApprovalDetailsCustomTool | PermissionsLocationsAddToolApprovalDetailsExtensionManagement | PermissionsLocationsAddToolApprovalDetailsFactory | PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess;
1467
1505
  /**
1468
1506
  * Whether the location is a git repo or directory
1469
1507
  *
@@ -2666,6 +2704,7 @@ export interface CopilotUserResponseEndpoints {
2666
2704
  "origin-tracker"?: string;
2667
2705
  proxy?: string;
2668
2706
  telemetry?: string;
2707
+ exp?: string;
2669
2708
  }
2670
2709
  /**
2671
2710
  * Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries.
@@ -3508,6 +3547,23 @@ export interface AgentSelectRequest {
3508
3547
  export interface AgentSelectResult {
3509
3548
  agent: AgentInfo;
3510
3549
  }
3550
+ /**
3551
+ * An in-memory authored prompt override for an available agent.
3552
+ *
3553
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3554
+ * via the `definition` "AgentSetPromptRequest".
3555
+ */
3556
+ /** @experimental */
3557
+ export interface AgentSetPromptRequest {
3558
+ /**
3559
+ * Stable effective agent id. Plugin namespace separators are normalized.
3560
+ */
3561
+ id: string;
3562
+ /**
3563
+ * Replacement authored prompt. Empty text is valid.
3564
+ */
3565
+ prompt: string;
3566
+ }
3511
3567
  /**
3512
3568
  * Optional project paths to include when enumerating agent discovery directories.
3513
3569
  *
@@ -4588,6 +4644,86 @@ export interface DebugCollectLogsSkippedEntry {
4588
4644
  */
4589
4645
  reason: string;
4590
4646
  }
4647
+ /**
4648
+ * Discovered extension metadata and persistent enablement state.
4649
+ *
4650
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4651
+ * via the `definition` "DiscoveredExtension".
4652
+ */
4653
+ /** @experimental */
4654
+ export interface DiscoveredExtension {
4655
+ /**
4656
+ * Source-qualified ID accepted by both server and session extension enablement methods
4657
+ */
4658
+ id: string;
4659
+ /**
4660
+ * Human-readable extension name
4661
+ */
4662
+ name: string;
4663
+ /**
4664
+ * Absolute path to the extension entry module, suitable for revealing it in a file manager
4665
+ */
4666
+ path: string;
4667
+ source: DiscoveredExtensionSource;
4668
+ /**
4669
+ * Whether this extension's persistent per-ID preference is enabled
4670
+ */
4671
+ enabled: boolean;
4672
+ plugin?: DiscoveredExtensionPlugin;
4673
+ }
4674
+ /**
4675
+ * Installed plugin that contributes a discovered extension.
4676
+ *
4677
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4678
+ * via the `definition` "DiscoveredExtensionPlugin".
4679
+ */
4680
+ /** @experimental */
4681
+ export interface DiscoveredExtensionPlugin {
4682
+ /**
4683
+ * Installed plugin name
4684
+ */
4685
+ name: string;
4686
+ }
4687
+ /**
4688
+ * Extensions discovered from persisted Copilot home state and their effective loading mode. Launch-scoped additional plugins are not included.
4689
+ *
4690
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4691
+ * via the `definition` "DiscoveredExtensions".
4692
+ */
4693
+ /** @experimental */
4694
+ export interface DiscoveredExtensions {
4695
+ /**
4696
+ * Discovered user and enabled installed-plugin extensions from persisted Copilot home state
4697
+ */
4698
+ extensions: DiscoveredExtension[];
4699
+ mode: DiscoveredExtensionMode;
4700
+ }
4701
+ /**
4702
+ * Source-qualified extension identifiers to persistently disable for future sessions.
4703
+ *
4704
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4705
+ * via the `definition` "DiscoveredExtensionsDisableRequest".
4706
+ */
4707
+ /** @experimental */
4708
+ export interface DiscoveredExtensionsDisableRequest {
4709
+ /**
4710
+ * Source-qualified user or plugin extension IDs to disable
4711
+ */
4712
+ ids: string[];
4713
+ }
4714
+ /**
4715
+ * Source-qualified extension identifiers to persistently enable for future sessions.
4716
+ *
4717
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4718
+ * via the `definition` "DiscoveredExtensionsEnableRequest".
4719
+ */
4720
+ /** @experimental */
4721
+ export interface DiscoveredExtensionsEnableRequest {
4722
+ /**
4723
+ * Source-qualified user or plugin extension IDs to enable
4724
+ */
4725
+ ids: string[];
4726
+ }
4591
4727
  /**
4592
4728
  * MCP server discovered by `mcp.discover`, with config source, optional plugin source, transport type, and enabled state.
4593
4729
  *
@@ -4658,13 +4794,20 @@ export interface EventLogReadRequest {
4658
4794
  */
4659
4795
  max?: number;
4660
4796
  /**
4661
- * Milliseconds to wait for new events when the cursor is at the tail of history. 0 (default) returns immediately even if no events are available. Capped at 30000ms. Ephemeral events that arrive during the wait are delivered in this batch but are NOT replayable on a subsequent read (use a non-zero waitMs in your next call to capture future ephemerals as they happen).
4797
+ * Milliseconds to wait for new events when the cursor is at the tail of history. 0 (default) returns immediately even if no events are available. Capped at 30000ms. Ephemeral events that arrive during the wait are delivered in this batch but are NOT replayable on a subsequent read (use a non-zero waitMs in your next call to capture future ephemerals as they happen). This applies to forward reads only: a backward read always returns immediately and ignores `waitMs`, because backward paging covers persisted history only while new events append at the tail (the opposite end from a backward page), so no blocking or ephemeral delivery can occur.
4662
4798
  */
4663
4799
  waitMs?: number;
4664
4800
  types?: EventLogTypes;
4665
4801
  agentScope?: EventsAgentScope;
4666
4802
  /**
4667
- * When false, skip ephemeral events entirely and return only durable (persisted) events. History-backfill callers that discard ephemerals anyway should set this so the read is bounded by the durable log length instead of racing the ephemeral ring on a busy session. Defaults to true (ephemerals are interleaved with durable events in creation order).
4803
+ * Optional non-empty list of subagent identifiers. When provided, only events owned by one of these agents are returned; ownership recognizes the event envelope's agentId plus legacy data.agentId and data.parentToolCallId markers. This filter takes precedence over agentScope.
4804
+ *
4805
+ * @minItems 1
4806
+ */
4807
+ agentIds?: [string, ...string[]];
4808
+ direction?: EventsReadDirection;
4809
+ /**
4810
+ * When false, skip ephemeral events entirely and return only durable (persisted) events. History-backfill callers that discard ephemerals anyway should set this so the read is bounded by the durable log length instead of racing the ephemeral ring on a busy session. Defaults to true (ephemerals are interleaved with durable events in creation order). Ignored by backward reads, which always cover persisted history only.
4668
4811
  */
4669
4812
  includeEphemeral?: boolean;
4670
4813
  }
@@ -4703,15 +4846,15 @@ export interface EventLogTailResult {
4703
4846
  /** @experimental */
4704
4847
  export interface EventsReadResult {
4705
4848
  /**
4706
- * Session events for this batch, merged into a single stream in creation order: durable (persisted) events and ephemeral events interleave exactly as they were emitted. Set `includeEphemeral: false` to receive only durable events. Ephemeral events are never replayable once pruned from the in-memory ring, so a consumer that needs them should keep reading with a non-zero `waitMs`.
4849
+ * Session events for this batch, merged into a single stream in creation order: durable (persisted) events and ephemeral events interleave exactly as they were emitted. Set `includeEphemeral: false` to receive only durable events. Ephemeral events are never replayable once pruned from the in-memory ring, so a consumer that needs them should keep reading with a non-zero `waitMs`. For a backward (tail-first) read, the returned window contains persisted events only, still in chronological (oldest-to-newest) append order.
4707
4850
  */
4708
4851
  events: SessionEvent[];
4709
4852
  /**
4710
- * Opaque cursor for the next read. Pass back unchanged in the next read.cursor to continue from where this read left off. Always present, even when no events were returned.
4853
+ * Opaque cursor for the next read. Pass back unchanged in the next read.cursor to continue from where this read left off. Always present, even when no events were returned. For a backward read this cursor pages toward OLDER events; keep passing `direction: backward` with it (the cursor is also self-describing, so backward paging continues correctly).
4711
4854
  */
4712
4855
  cursor: string;
4713
4856
  /**
4714
- * True when the read returned `max` events and more events are available immediately. When false, the next read with a non-zero `waitMs` will block until a new event arrives or the wait expires.
4857
+ * 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.
4715
4858
  */
4716
4859
  hasMore: boolean;
4717
4860
  cursorStatus: EventsCursorStatus;
@@ -5971,6 +6114,32 @@ export interface HistoryCancelBackgroundCompactionResult {
5971
6114
  */
5972
6115
  cancelled: boolean;
5973
6116
  }
6117
+ /**
6118
+ * Parameters for clearing the conversation and seeding the window that replaces it.
6119
+ *
6120
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6121
+ * via the `definition` "HistoryClearContextRequest".
6122
+ */
6123
+ /** @experimental */
6124
+ export interface HistoryClearContextRequest {
6125
+ /**
6126
+ * First user message of the fresh context window. Required: a cleared window holding only system and developer messages is not a conversation a model can answer, so every clear seeds the window it creates. Delivered by the enclosing turn driver once the agentic loop exits, which is why the call must be made from inside a tool handler.
6127
+ */
6128
+ prompt: string;
6129
+ }
6130
+ /**
6131
+ * What a successful clear removed. A clear that could not be applied rejects instead of reporting a count.
6132
+ *
6133
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6134
+ * via the `definition` "HistoryClearContextResult".
6135
+ */
6136
+ /** @experimental */
6137
+ export interface HistoryClearContextResult {
6138
+ /**
6139
+ * Number of non-system, non-developer messages that were removed from the conversation. Zero only when the window already held no conversation.
6140
+ */
6141
+ messagesCleared: number;
6142
+ }
5974
6143
  /**
5975
6144
  * Post-compaction context window usage breakdown
5976
6145
  *
@@ -6284,6 +6453,10 @@ export interface InstalledPlugin {
6284
6453
  */
6285
6454
  cache_path?: string;
6286
6455
  source?: InstalledPluginSource;
6456
+ /**
6457
+ * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
6458
+ */
6459
+ source_sha?: string;
6287
6460
  }
6288
6461
  /**
6289
6462
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -7818,6 +7991,23 @@ export interface McpToolUi {
7818
7991
  */
7819
7992
  visibility?: McpToolUiVisibility[];
7820
7993
  }
7994
+ /**
7995
+ * Identifies the MCP server whose persisted OAuth credentials were updated.
7996
+ *
7997
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7998
+ * via the `definition` "McpOauthAuthenticationStateChangedRequest".
7999
+ */
8000
+ /** @experimental */
8001
+ export interface McpOauthAuthenticationStateChangedRequest {
8002
+ /**
8003
+ * Name of the MCP server whose OAuth credentials were updated. Omit only when the host cannot identify the server.
8004
+ */
8005
+ serverName?: string;
8006
+ /**
8007
+ * Whether the target session must mint a session-scoped access token instead of reusing a shared access token persisted by another session.
8008
+ */
8009
+ refreshSessionToken?: boolean;
8010
+ }
7821
8011
  /**
7822
8012
  * Pending MCP OAuth request ID and host-provided token or cancellation response.
7823
8013
  *
@@ -8635,10 +8825,6 @@ export interface Model {
8635
8825
  * Supported reasoning effort levels (only present if model supports reasoning effort)
8636
8826
  */
8637
8827
  supportedReasoningEfforts?: string[];
8638
- /**
8639
- * Default reasoning effort level (only present if model supports reasoning effort)
8640
- */
8641
- defaultReasoningEffort?: string;
8642
8828
  modelPickerCategory?: ModelPickerCategory;
8643
8829
  modelPickerPriceCategory?: ModelPickerPriceCategory;
8644
8830
  }
@@ -8986,7 +9172,7 @@ export interface ModelSwitchToRequest {
8986
9172
  */
8987
9173
  modelId: string;
8988
9174
  /**
8989
- * Reasoning effort level to use for the model. "none" disables reasoning.
9175
+ * 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.
8990
9176
  */
8991
9177
  reasoningEffort?: string;
8992
9178
  reasoningSummary?: ReasoningSummary;
@@ -9355,6 +9541,23 @@ export interface PermissionDecisionApproveForSessionApprovalExtensionManagement
9355
9541
  */
9356
9542
  operation?: string;
9357
9543
  }
9544
+ /**
9545
+ * Session-scoped factory approval, optionally narrowed by approval key.
9546
+ *
9547
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9548
+ * via the `definition` "PermissionDecisionApproveForSessionApprovalFactory".
9549
+ */
9550
+ /** @experimental */
9551
+ export interface PermissionDecisionApproveForSessionApprovalFactory {
9552
+ /**
9553
+ * Approval covering factory operations.
9554
+ */
9555
+ kind: "factory";
9556
+ /**
9557
+ * Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
9558
+ */
9559
+ approvalKey?: string;
9560
+ }
9358
9561
  /**
9359
9562
  * Session-scoped approval details for an extension's permission-gated capability access, keyed by extension name.
9360
9563
  *
@@ -9518,6 +9721,23 @@ export interface PermissionDecisionApproveForLocationApprovalExtensionManagement
9518
9721
  */
9519
9722
  operation?: string;
9520
9723
  }
9724
+ /**
9725
+ * Location-scoped factory approval, optionally narrowed by approval key.
9726
+ *
9727
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9728
+ * via the `definition` "PermissionDecisionApproveForLocationApprovalFactory".
9729
+ */
9730
+ /** @experimental */
9731
+ export interface PermissionDecisionApproveForLocationApprovalFactory {
9732
+ /**
9733
+ * Approval covering factory operations.
9734
+ */
9735
+ kind: "factory";
9736
+ /**
9737
+ * Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
9738
+ */
9739
+ approvalKey?: string;
9740
+ }
9521
9741
  /**
9522
9742
  * Location-scoped approval details for an extension's permission-gated capability access, keyed by extension name.
9523
9743
  *
@@ -9893,6 +10113,23 @@ export interface PermissionsLocationsAddToolApprovalDetailsExtensionManagement {
9893
10113
  */
9894
10114
  operation?: string;
9895
10115
  }
10116
+ /**
10117
+ * Location-persisted factory approval, optionally narrowed by approval key.
10118
+ *
10119
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10120
+ * via the `definition` "PermissionsLocationsAddToolApprovalDetailsFactory".
10121
+ */
10122
+ /** @experimental */
10123
+ export interface PermissionsLocationsAddToolApprovalDetailsFactory {
10124
+ /**
10125
+ * Approval covering factory operations.
10126
+ */
10127
+ kind: "factory";
10128
+ /**
10129
+ * Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
10130
+ */
10131
+ approvalKey?: string;
10132
+ }
9896
10133
  /**
9897
10134
  * Location-persisted tool approval details for an extension's permission-gated capability access, keyed by extension name.
9898
10135
  *
@@ -10400,7 +10637,7 @@ export interface PermissionsSetAllowAllRequest {
10400
10637
  */
10401
10638
  enabled?: boolean;
10402
10639
  /**
10403
- * Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session's active model is used.
10640
+ * Optional model id for the `auto` mode auto-approval LLM judging. Only meaningful when `mode` is `auto`; ignored otherwise. When omitted, the session resolves a default judge model: `gpt-5.5` for CAPI sessions and the session's active model for BYOK sessions.
10404
10641
  */
10405
10642
  model?: string;
10406
10643
  source?: PermissionsSetAllowAllSource;
@@ -12360,6 +12597,10 @@ export interface SandboxConfig {
12360
12597
  * Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in).
12361
12598
  */
12362
12599
  ghAuth?: boolean;
12600
+ /**
12601
+ * Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without exporting CARGO_HOME/GOPATH/etc. Default: true (enabled by default; set to false to opt out).
12602
+ */
12603
+ allowDevToolCaches?: boolean;
12363
12604
  }
12364
12605
  /**
12365
12606
  * User-managed sandbox policy fragment merged into the auto-discovered base policy.
@@ -13582,6 +13823,10 @@ export interface SessionInstalledPlugin {
13582
13823
  */
13583
13824
  cache_path?: string;
13584
13825
  source?: SessionInstalledPluginSource;
13826
+ /**
13827
+ * Per-plugin source fingerprint (a SHA-256 hash of the plugin's catalog source spec plus its resolved source subtree — NOT a Git commit SHA) captured at marketplace install/update time. Auto-update compares it against the freshly recomputed fingerprint to detect a content change that does not bump the version. Absent for pre-existing installs and for direct (non-marketplace) installs.
13828
+ */
13829
+ source_sha?: string;
13585
13830
  }
13586
13831
  /**
13587
13832
  * Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or full commit SHA, and optional subpath.
@@ -13874,7 +14119,7 @@ export interface SessionOpenOptions {
13874
14119
  */
13875
14120
  model?: string;
13876
14121
  /**
13877
- * Initial reasoning effort level.
14122
+ * Initial reasoning effort level. CAPI values are model-defined and validated against the selected model; BYOK providers may define additional values. When omitted, no effort override is applied.
13878
14123
  */
13879
14124
  reasoningEffort?: string;
13880
14125
  reasoningSummary?: SessionOpenOptionsReasoningSummary;
@@ -15112,7 +15357,7 @@ export interface SessionUpdateOptionsParams {
15112
15357
  model?: string;
15113
15358
  modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
15114
15359
  /**
15115
- * Reasoning effort for the selected model (model-defined enum).
15360
+ * Reasoning effort for the selected model. CAPI values are model-defined and validated against the selected model; BYOK providers may define additional values. When omitted, no effort override is applied.
15116
15361
  */
15117
15362
  reasoningEffort?: string;
15118
15363
  reasoningSummary?: OptionsUpdateReasoningSummary;
@@ -17896,6 +18141,27 @@ export declare function createServerRpc(connection: MessageConnection): {
17896
18141
  discover: (params: McpDiscoverRequest) => Promise<McpDiscoverResult>;
17897
18142
  };
17898
18143
  /** @experimental */
18144
+ extensions: {
18145
+ /**
18146
+ * Discovers user and enabled installed-plugin extensions from persisted Copilot home state, including enablement preferences. Launch-scoped additional plugins are not included.
18147
+ *
18148
+ * @returns Extensions discovered from persisted Copilot home state and their effective loading mode. Launch-scoped additional plugins are not included.
18149
+ */
18150
+ discover: () => Promise<DiscoveredExtensions>;
18151
+ /**
18152
+ * Persistently enables extension IDs for future sessions. Active sessions are unchanged; use session.extensions.enable to update them.
18153
+ *
18154
+ * @param params Source-qualified extension identifiers to persistently enable for future sessions.
18155
+ */
18156
+ enable: (params: DiscoveredExtensionsEnableRequest) => Promise<void>;
18157
+ /**
18158
+ * Persistently disables extension IDs for future sessions. Active sessions are unchanged; use session.extensions.disable to update them.
18159
+ *
18160
+ * @param params Source-qualified extension identifiers to persistently disable for future sessions.
18161
+ */
18162
+ disable: (params: DiscoveredExtensionsDisableRequest) => Promise<void>;
18163
+ };
18164
+ /** @experimental */
17899
18165
  plugins: {
17900
18166
  /**
17901
18167
  * Lists plugins installed in user/global state.
@@ -18812,6 +19078,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
18812
19078
  * @returns Agents available to the session.
18813
19079
  */
18814
19080
  list: (params?: SessionAgentListRequest) => Promise<AgentList>;
19081
+ /**
19082
+ * Sets an in-memory authored prompt override for an available agent. For built-in agents, this replaces only the static base prompt while preserving runtime-owned dynamic prompt composition and behavior. The special `general-purpose` agent is not overrideable. Overrides are not persisted; resumed and forked sessions start without them, so the host must re-apply them.
19083
+ *
19084
+ * @param params An in-memory authored prompt override for an available agent.
19085
+ */
19086
+ setPrompt: (params: AgentSetPromptRequest) => Promise<void>;
18815
19087
  /**
18816
19088
  * Gets the currently selected custom agent for the session.
18817
19089
  *
@@ -19053,6 +19325,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
19053
19325
  * @returns Indicates whether the pending MCP OAuth response was accepted.
19054
19326
  */
19055
19327
  handlePendingRequest: (params: McpOauthHandlePendingRequest) => Promise<McpOauthHandlePendingResult>;
19328
+ /**
19329
+ * Notifies the session that MCP OAuth authentication succeeded and updated credentials were persisted, so cached tool definitions can be refreshed.
19330
+ *
19331
+ * @param params Identifies the MCP server whose persisted OAuth credentials were updated.
19332
+ */
19333
+ authenticationStateChanged: (params: McpOauthAuthenticationStateChangedRequest) => Promise<void>;
19056
19334
  /**
19057
19335
  * Starts OAuth authentication for a remote MCP server.
19058
19336
  *
@@ -19777,6 +20055,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
19777
20055
  * @returns Markdown summary of the conversation context (empty when not available).
19778
20056
  */
19779
20057
  summarizeForHandoff: () => Promise<HistorySummarizeForHandoffResult>;
20058
+ /**
20059
+ * Clears the session's conversation history, keeping only system and developer messages, and seeds the fresh context window with a first user message. Must be called from inside a tool handler: the clear has to drop the results of the tool calls its wipe orphans, and it rejects when no tool call is in flight.
20060
+ *
20061
+ * @param params Parameters for clearing the conversation and seeding the window that replaces it.
20062
+ *
20063
+ * @returns What a successful clear removed. A clear that could not be applied rejects instead of reporting a count.
20064
+ */
20065
+ clearContext: (params: HistoryClearContextRequest) => Promise<HistoryClearContextResult>;
19780
20066
  };
19781
20067
  /** @experimental */
19782
20068
  queue: {
@@ -19854,7 +20140,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
19854
20140
  /** @experimental */
19855
20141
  eventLog: {
19856
20142
  /**
19857
- * Reads a batch of session events from a cursor, optionally waiting for new events.
20143
+ * Reads a batch of session events from a cursor, optionally waiting for new events. Supports tail-first reads via `direction: backward`.
19858
20144
  *
19859
20145
  * @param params Cursor, batch size, and optional long-poll/filter parameters for reading session events.
19860
20146
  *
@@ -143,6 +143,27 @@ function createServerRpc(connection) {
143
143
  discover: async (params) => connection.sendRequest("mcp.discover", params)
144
144
  },
145
145
  /** @experimental */
146
+ extensions: {
147
+ /**
148
+ * Discovers user and enabled installed-plugin extensions from persisted Copilot home state, including enablement preferences. Launch-scoped additional plugins are not included.
149
+ *
150
+ * @returns Extensions discovered from persisted Copilot home state and their effective loading mode. Launch-scoped additional plugins are not included.
151
+ */
152
+ discover: async () => connection.sendRequest("extensions.discover", {}),
153
+ /**
154
+ * Persistently enables extension IDs for future sessions. Active sessions are unchanged; use session.extensions.enable to update them.
155
+ *
156
+ * @param params Source-qualified extension identifiers to persistently enable for future sessions.
157
+ */
158
+ enable: async (params) => connection.sendRequest("extensions.enable", params),
159
+ /**
160
+ * Persistently disables extension IDs for future sessions. Active sessions are unchanged; use session.extensions.disable to update them.
161
+ *
162
+ * @param params Source-qualified extension identifiers to persistently disable for future sessions.
163
+ */
164
+ disable: async (params) => connection.sendRequest("extensions.disable", params)
165
+ },
166
+ /** @experimental */
146
167
  plugins: {
147
168
  /**
148
169
  * Lists plugins installed in user/global state.
@@ -1137,6 +1158,12 @@ function createSessionRpc(connection, sessionId) {
1137
1158
  * @returns Agents available to the session.
1138
1159
  */
1139
1160
  list: async (params) => connection.sendRequest("session.agent.list", { sessionId, ...params }),
1161
+ /**
1162
+ * Sets an in-memory authored prompt override for an available agent. For built-in agents, this replaces only the static base prompt while preserving runtime-owned dynamic prompt composition and behavior. The special `general-purpose` agent is not overrideable. Overrides are not persisted; resumed and forked sessions start without them, so the host must re-apply them.
1163
+ *
1164
+ * @param params An in-memory authored prompt override for an available agent.
1165
+ */
1166
+ setPrompt: async (params) => connection.sendRequest("session.agent.setPrompt", { sessionId, ...params }),
1140
1167
  /**
1141
1168
  * Gets the currently selected custom agent for the session.
1142
1169
  *
@@ -1378,6 +1405,12 @@ function createSessionRpc(connection, sessionId) {
1378
1405
  * @returns Indicates whether the pending MCP OAuth response was accepted.
1379
1406
  */
1380
1407
  handlePendingRequest: async (params) => connection.sendRequest("session.mcp.oauth.handlePendingRequest", { sessionId, ...params }),
1408
+ /**
1409
+ * Notifies the session that MCP OAuth authentication succeeded and updated credentials were persisted, so cached tool definitions can be refreshed.
1410
+ *
1411
+ * @param params Identifies the MCP server whose persisted OAuth credentials were updated.
1412
+ */
1413
+ authenticationStateChanged: async (params) => connection.sendRequest("session.mcp.oauth.authenticationStateChanged", { sessionId, ...params }),
1381
1414
  /**
1382
1415
  * Starts OAuth authentication for a remote MCP server.
1383
1416
  *
@@ -2101,7 +2134,15 @@ function createSessionRpc(connection, sessionId) {
2101
2134
  *
2102
2135
  * @returns Markdown summary of the conversation context (empty when not available).
2103
2136
  */
2104
- summarizeForHandoff: async () => connection.sendRequest("session.history.summarizeForHandoff", { sessionId })
2137
+ summarizeForHandoff: async () => connection.sendRequest("session.history.summarizeForHandoff", { sessionId }),
2138
+ /**
2139
+ * Clears the session's conversation history, keeping only system and developer messages, and seeds the fresh context window with a first user message. Must be called from inside a tool handler: the clear has to drop the results of the tool calls its wipe orphans, and it rejects when no tool call is in flight.
2140
+ *
2141
+ * @param params Parameters for clearing the conversation and seeding the window that replaces it.
2142
+ *
2143
+ * @returns What a successful clear removed. A clear that could not be applied rejects instead of reporting a count.
2144
+ */
2145
+ clearContext: async (params) => connection.sendRequest("session.history.clearContext", { sessionId, ...params })
2105
2146
  },
2106
2147
  /** @experimental */
2107
2148
  queue: {
@@ -2179,7 +2220,7 @@ function createSessionRpc(connection, sessionId) {
2179
2220
  /** @experimental */
2180
2221
  eventLog: {
2181
2222
  /**
2182
- * Reads a batch of session events from a cursor, optionally waiting for new events.
2223
+ * Reads a batch of session events from a cursor, optionally waiting for new events. Supports tail-first reads via `direction: backward`.
2183
2224
  *
2184
2225
  * @param params Cursor, batch size, and optional long-poll/filter parameters for reading session events.
2185
2226
  *