@microsoft/copilot-sdk 2.0.0-preview.0 → 2.0.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6490,30 +6490,6 @@ export type SessionOpenOptionsReasoningSummary =
6490
6490
  | "concise"
6491
6491
  /** Request a detailed summary of model reasoning. */
6492
6492
  | "detailed";
6493
- /**
6494
- * Controls automatic non-interactive profile loading where supported. Explicit initScripts are unaffected.
6495
- *
6496
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6497
- * via the `definition` "ShellInitProfile".
6498
- */
6499
- /** @experimental */
6500
- export type ShellInitProfile =
6501
- /** Disable automatic non-interactive profile loading. Explicit initScripts still run. */
6502
- "none"
6503
- /** Allow automatic non-interactive profile loading when supported. Explicit initScripts still run. */
6504
- | "non-interactive";
6505
- /**
6506
- * Supported built-in shells for initialization scripts.
6507
- *
6508
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6509
- * via the `definition` "ShellInitScriptShell".
6510
- */
6511
- /** @experimental */
6512
- export type ShellInitScriptShell =
6513
- /** Source the script in the built-in Bash shell on macOS and Linux. */
6514
- "bash"
6515
- /** Source the script in the built-in PowerShell shell on Windows. */
6516
- | "powershell";
6517
6493
  /**
6518
6494
  * How MCP server environment values are interpreted.
6519
6495
  *
@@ -6538,6 +6514,30 @@ export type SessionOpenOptionsAdditionalContentExclusionPolicyScope =
6538
6514
  "repo"
6539
6515
  /** The content exclusion policy applies across all repositories. */
6540
6516
  | "all";
6517
+ /**
6518
+ * Controls automatic non-interactive profile loading where supported. Explicit initScripts are unaffected.
6519
+ *
6520
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6521
+ * via the `definition` "ShellInitProfile".
6522
+ */
6523
+ /** @experimental */
6524
+ export type ShellInitProfile =
6525
+ /** Disable automatic non-interactive profile loading. Explicit initScripts still run. */
6526
+ "none"
6527
+ /** Allow automatic non-interactive profile loading when supported. Explicit initScripts still run. */
6528
+ | "non-interactive";
6529
+ /**
6530
+ * Supported built-in shells for initialization scripts.
6531
+ *
6532
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6533
+ * via the `definition` "ShellInitScriptShell".
6534
+ */
6535
+ /** @experimental */
6536
+ export type ShellInitScriptShell =
6537
+ /** Source the script in the built-in Bash shell on macOS and Linux. */
6538
+ "bash"
6539
+ /** Source the script in the built-in PowerShell shell on Windows. */
6540
+ | "powershell";
6541
6541
  /**
6542
6542
  * Open a session by creating, resuming, attaching, connecting to a remote, or handing off.
6543
6543
  *
@@ -10996,6 +10996,12 @@ export interface NamedProviderConfig {
10996
10996
  * Static API key used to authenticate provider requests.
10997
10997
  */
10998
10998
  apiKey?: string;
10999
+ /**
11000
+ * Command run before each request to acquire a fresh API key. Failure
11001
+ * fails the request without static-key or anonymous fallback. Bearer
11002
+ * authentication takes precedence.
11003
+ */
11004
+ apiKeyCommand?: string;
10999
11005
  /**
11000
11006
  * Static bearer token used to authenticate provider requests.
11001
11007
  */
@@ -11654,6 +11660,13 @@ export interface CanvasSourceCloseRequest {
11654
11660
  */
11655
11661
  /** @experimental */
11656
11662
  export interface CapiSessionOptions {
11663
+ /**
11664
+ * Enables the session's built-in Copilot model catalog, authentication and
11665
+ * inference, including subagent and ancillary model work. Defaults to true
11666
+ * on create; omission on resume preserves the policy. Does not disable
11667
+ * GitHub identity, tools, MCP, managed settings or separate telemetry.
11668
+ */
11669
+ enabled?: boolean;
11657
11670
  /**
11658
11671
  * Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. `fast` is an integrator-only latency preset, not a first-party GitHub Copilot product preference. For Copilot Fusion, prefer `fusionTier`: the `balance`, `hydrafusion` and `hydrafusion-max` identifiers it replaces remain accepted but are deprecated.
11659
11672
  */
@@ -14604,6 +14617,10 @@ export interface EntraAuthConfig {
14604
14617
  * Application (client) ID of the host's Microsoft Entra registration. Must be nonblank. The runtime does not supply a default application.
14605
14618
  */
14606
14619
  clientId: string;
14620
+ /**
14621
+ * Native OneAuth application descriptor ID. Omit or leave blank to use clientId. This does not change the OAuth client ID or isolate accounts from other applications.
14622
+ */
14623
+ oneAuthApplicationId?: string;
14607
14624
  /**
14608
14625
  * Application name reported by OneAuth to Microsoft Auth Telemetry System (MATS). Omit or leave blank to disable MATS telemetry without disabling authentication. OneAuth normalizes the name and may group applications into shared event tables.
14609
14626
  */
@@ -24295,7 +24312,7 @@ export interface MetadataRecomputeContextTokensRequest {
24295
24312
  modelId: string;
24296
24313
  }
24297
24314
  /**
24298
- * Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session.
24315
+ * Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.usage_info` events. Returns zeros for an empty session.
24299
24316
  *
24300
24317
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
24301
24318
  * via the `definition` "MetadataRecomputeContextTokensResult".
@@ -28614,89 +28631,6 @@ export interface ProviderAddResult {
28614
28631
  */
28615
28632
  models: JsonValue[];
28616
28633
  }
28617
- /**
28618
- * Custom model-provider configuration (BYOK).
28619
- *
28620
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
28621
- * via the `definition` "ProviderConfig".
28622
- */
28623
- /** @experimental */
28624
- export interface ProviderConfig {
28625
- /**
28626
- * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.
28627
- */
28628
- type?: ProviderConfigType;
28629
- /**
28630
- * Wire API format (openai/azure only). Defaults to "completions".
28631
- */
28632
- wireApi?: ProviderConfigWireApi;
28633
- /**
28634
- * Provider transport. Defaults to "http".
28635
- */
28636
- transport?: ProviderConfigTransport;
28637
- /**
28638
- * API endpoint URL.
28639
- */
28640
- baseUrl: string;
28641
- /**
28642
- * API key. Optional for local providers like Ollama.
28643
- */
28644
- apiKey?: string;
28645
- /**
28646
- * Command run by the runtime before each provider request to obtain a fresh API key. Credential-command failures fail the turn without sending a model request. Bearer authentication takes precedence.
28647
- */
28648
- apiKeyCommand?: string;
28649
- /**
28650
- * Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set.
28651
- */
28652
- bearerToken?: string;
28653
- /**
28654
- * Azure-specific provider options.
28655
- */
28656
- azure?: ProviderConfigAzure;
28657
- /**
28658
- * Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model.
28659
- */
28660
- modelId?: string;
28661
- /**
28662
- * Overrides for model capabilities when they cannot be inferred from modelId.
28663
- */
28664
- modelCapabilities?: ModelCapabilitiesOverride;
28665
- /**
28666
- * Provider name used for model and telemetry attribution.
28667
- */
28668
- providerName?: string;
28669
- /**
28670
- * The product serving the model, reported in telemetry as `model_provider`. Set it when `type` alone cannot identify the product, such as Ollama or LM Studio behind an OpenAI-compatible endpoint. Only affects telemetry.
28671
- */
28672
- modelProvider?: ProviderConfigModelProvider;
28673
- /**
28674
- * The model identifier sent to the provider API for inference (the "wire" model), as opposed to modelId which is the well-known base.
28675
- */
28676
- wireModel?: string;
28677
- /**
28678
- * Maximum prompt/input tokens for the model.
28679
- */
28680
- maxPromptTokens?: number;
28681
- /**
28682
- * Maximum context window tokens for the model.
28683
- */
28684
- maxContextWindowTokens?: number;
28685
- /**
28686
- * Maximum output tokens for the model.
28687
- */
28688
- maxOutputTokens?: number;
28689
- /**
28690
- * Custom HTTP headers to include in all outbound requests to the provider.
28691
- */
28692
- headers?: {
28693
- [k: string]: string | undefined;
28694
- };
28695
- /**
28696
- * When true, the SDK client supplies bearer tokens on demand: the runtime calls the client-session `providerToken.getToken` callback before each request and applies the returned token as an `Authorization: Bearer <token>` header. This is the bearer/OAuth scheme used by Azure AD / managed-identity tokens and provider OAuth access tokens (including Anthropic's), not a provider-specific API-key header such as Anthropic's `x-api-key`. The token-acquiring function itself stays on the SDK side and is never serialized; only this flag crosses the wire. When set alongside `apiKey`/`bearerToken`, the callback takes precedence: the runtime applies the token returned by `providerToken.getToken` as the `Authorization: Bearer` header for each request and does not send the static credential.
28697
- */
28698
- hasBearerTokenProvider?: boolean;
28699
- }
28700
28634
  /**
28701
28635
  * A snapshot of the provider endpoint the session is currently configured to talk to.
28702
28636
  *
@@ -28825,7 +28759,7 @@ export interface ProviderTokenAcquireRequest {
28825
28759
  */
28826
28760
  sessionId: string;
28827
28761
  /**
28828
- * Name of the BYOK provider needing a token. For the legacy whole-session provider this is the implicit provider name; for named providers it is the configured provider name.
28762
+ * Explicit name of the BYOK connection needing a token, including when it is the default connection.
28829
28763
  */
28830
28764
  providerName: string;
28831
28765
  }
@@ -28877,7 +28811,7 @@ export interface ProviderUpdateProviderRequest {
28877
28811
  /** @experimental */
28878
28812
  export interface ProviderWithdrawRequest {
28879
28813
  /**
28880
- * Provider-qualified selection ids to withdraw. Ids that are not registered are ignored, so withdrawal is idempotent. A provider left with no models referencing it is removed too.
28814
+ * Provider-qualified selection ids to withdraw. Ids that are not registered are ignored, so withdrawal is idempotent. A provider left with no models referencing it is removed too, unless it is the session's default provider.
28881
28815
  */
28882
28816
  models: string[];
28883
28817
  }
@@ -28894,7 +28828,7 @@ export interface ProviderWithdrawResult {
28894
28828
  */
28895
28829
  withdrawn: string[];
28896
28830
  /**
28897
- * Providers removed because one of the withdrawn models was the last entry referencing them. A provider that merely has no models is not removed.
28831
+ * Providers removed because one of the withdrawn models was the last entry referencing them. The default provider and providers that merely have no models are not removed.
28898
28832
  */
28899
28833
  providersRemoved: string[];
28900
28834
  /**
@@ -33200,105 +33134,195 @@ export interface SessionModelPriceCategory {
33200
33134
  priceCategory: ModelPickerPriceCategory;
33201
33135
  }
33202
33136
  /**
33203
- * Session construction options.
33137
+ * Agent definitions, selection, and source filters.
33204
33138
  *
33205
33139
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33206
- * via the `definition` "SessionOpenOptions".
33140
+ * via the `definition` "SessionOpenAgentOptions".
33207
33141
  */
33208
33142
  /** @experimental */
33209
- export interface SessionOpenOptions {
33143
+ export interface SessionOpenAgentOptions {
33210
33144
  /**
33211
- * Optional stable session identifier to use for a new session.
33145
+ * Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available.
33212
33146
  */
33213
- sessionId?: string;
33147
+ includedBuiltinAgents?: string[];
33214
33148
  /**
33215
- * Optional human-friendly session name.
33149
+ * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
33216
33150
  */
33217
- name?: string;
33151
+ excludedBuiltinAgents?: string[];
33218
33152
  /**
33219
- * Initial model identifier.
33153
+ * Explicit discovery-only agent roots, separate from customAgents and filesystem grants. Available without enableConfigDiscovery, subject to managed/source disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33220
33154
  */
33221
- model?: string;
33155
+ directories?: string[];
33222
33156
  /**
33223
- * 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.
33157
+ * Whether custom agents default to local-only execution.
33224
33158
  */
33225
- reasoningEffort?: string;
33159
+ localDiscoveryOnly?: boolean;
33226
33160
  /**
33227
- * Initial reasoning summary mode for supported model clients.
33161
+ * Runtime context discriminator for agent filtering.
33228
33162
  */
33229
- reasoningSummary?: SessionOpenOptionsReasoningSummary;
33163
+ context?: string;
33164
+ }
33165
+ /**
33166
+ * Event delivery and streaming.
33167
+ *
33168
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33169
+ * via the `definition` "SessionOpenEventOptions".
33170
+ */
33171
+ /** @experimental */
33172
+ export interface SessionOpenEventOptions {
33230
33173
  /**
33231
- * Initial output verbosity level for supported models.
33174
+ * Whether model responses stream as delta events.
33232
33175
  */
33233
- verbosity?: Verbosity;
33176
+ streaming?: boolean;
33177
+ }
33178
+ /**
33179
+ * Execution accounting and autonomous continuation.
33180
+ *
33181
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33182
+ * via the `definition` "SessionOpenExecutionOptions".
33183
+ */
33184
+ /** @experimental */
33185
+ export interface SessionOpenExecutionOptions {
33234
33186
  /**
33235
- * Identifier of the client driving the session.
33187
+ * Whether auto-mode continuation is enabled.
33236
33188
  */
33237
- clientName?: string;
33189
+ continueOnAutoMode?: boolean;
33238
33190
  /**
33239
- * OAuth Client ID Metadata Document URL used by this host for MCP authorization.
33191
+ * Initial session limits.
33240
33192
  */
33241
- authClientIdMetadataUrl?: string;
33193
+ limits?: SessionLimitsConfig;
33242
33194
  /**
33243
- * Structured client kind used for runtime behavior gates.
33195
+ * Autopilot policy. Defaults to runtime-owned continuation with at most five automatic continuations. Does not change the session mode.
33244
33196
  */
33245
- clientKind?: string;
33197
+ autopilot?: AutopilotOptions;
33198
+ }
33199
+ /**
33200
+ * Feature experimentation and trusted assignments.
33201
+ *
33202
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33203
+ * via the `definition` "SessionOpenExperimentOptions".
33204
+ */
33205
+ /** @experimental */
33206
+ export interface SessionOpenExperimentOptions {
33246
33207
  /**
33247
- * Identifier sent to LSP-style integrations.
33208
+ * Feature-flag values resolved by the host.
33248
33209
  */
33249
- lspClientName?: string;
33210
+ flags?: {
33211
+ [k: string]: boolean | undefined;
33212
+ };
33250
33213
  /**
33251
- * Stable integration identifier for analytics.
33214
+ * Whether experimental behavior is enabled.
33252
33215
  */
33253
- integrationId?: string;
33216
+ enableExperimentalMode?: boolean;
33217
+ }
33218
+ /**
33219
+ * Project directory access and change tracking.
33220
+ *
33221
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33222
+ * via the `definition` "SessionOpenFilesystemOptions".
33223
+ */
33224
+ /** @experimental */
33225
+ export interface SessionOpenFilesystemOptions {
33254
33226
  /**
33255
- * Opt-in: self-fetch and enforce enterprise managed settings, including managed hook policies, at session bootstrap.
33227
+ * Opt in to capturing file changes for session rewind and session diff. Capture cannot reconstruct changes made before it was enabled. On create it starts capture from the first turn. It is also honored on resume: for a session that already has tracked prior turns, tracking continues automatically even if this is omitted; passing it on resume additionally enables tracking for an eligible session that has no prior root turn yet. Resuming a session whose prior root turns were never tracked has no restorable baseline, so tracking stays disabled for it and rewind reports file change tracking as unavailable; the resume itself still succeeds, so sessions that predate tracking remain loadable. The opt-in is only rejected when the session can never track (a subagent session, or one without local session storage). It is intentionally absent from the mutable options update because enabling it after edits have occurred would create an incomplete, misleading baseline. Subagents share the parent session's capture store and are not tracked as separate rewind points: a file a subagent writes is attributed to whichever root user turn was open when the capture was staged, just before the tool body ran. A turn cannot open while a staged capture is still in flight, so a subagent tool that staged under the spawning turn stays attributed to it however late the write lands, while a capture it stages after the user's next message belongs to that later turn. Attribution decides which turn's rewind point counts and file preview include that write; it does not narrow which rewinds revert it, because a rewind restores every capture from the selected turn onward, so the earlier spawning turn reverts it as well.
33256
33228
  */
33257
- enableManagedSettings?: boolean;
33229
+ trackFileChanges?: boolean;
33258
33230
  /**
33259
- * Managed-setting paths this trusted SDK host enforces externally or does not support, excluded from fetched, device, and policy-helper policy for this session. Exact dotted paths exclude a setting and its descendants (for example sandbox or permissions.disableBypassPermissionsMode); wildcards and array indices are not supported. Host-injected managedSettings and policy availability checks are not excluded. Not persisted; re-supply on resume, where omission restores full enforcement. Requires enableManagedSettings to self-fetch policy.
33231
+ * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories.
33260
33232
  */
33261
- excludedManagedSettings?: string[];
33233
+ additionalDirectories?: string[];
33262
33234
  /**
33263
- * Opt in to enforcing non-overridable managed model controls on session model, Auto-tier, reasoning-effort, and context-tier changes. Managed defaults still apply when omitted; this option only turns conflicting changes into errors.
33235
+ * Pre-resolved working-directory context for session startup.
33264
33236
  */
33265
- enforceManagedModelDefaults?: boolean;
33237
+ workingDirectoryContext?: SessionContext;
33238
+ }
33239
+ /**
33240
+ * GitHub integration and session credentials.
33241
+ *
33242
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33243
+ * via the `definition` "SessionOpenGitHubOptions".
33244
+ */
33245
+ /** @experimental */
33246
+ export interface SessionOpenGitHubOptions {
33266
33247
  /**
33267
- * Permissions-only enterprise policy injected by the SDK host at session create or resume. Composes restrictively with self-fetched and device policy and is not persisted.
33248
+ * Opt-in: self-fetch and enforce enterprise managed settings, including managed hook policies, at session bootstrap.
33268
33249
  */
33269
- managedSettings?: SessionManagedSettings;
33250
+ fetchManagedSettings?: boolean;
33270
33251
  /**
33271
33252
  * Declares that a human drives this session's conversation, enabling user-message analysis (sentiment, task completion criteria, and task analytics) for user-authored messages. Automated messages remain excluded. Defaults to false for SDK sessions. Applied when the session is created or loaded from storage; ignored when resuming a session that is already active, and for cloud sessions.
33272
33253
  */
33273
33254
  interactiveUser?: boolean;
33274
33255
  /**
33275
- * Opt in to capturing file changes for session rewind and session diff. Capture cannot reconstruct changes made before it was enabled. On create it starts capture from the first turn. It is also honored on resume: for a session that already has tracked prior turns, tracking continues automatically even if this is omitted; passing it on resume additionally enables tracking for an eligible session that has no prior root turn yet. Resuming a session whose prior root turns were never tracked has no restorable baseline, so tracking stays disabled for it and rewind reports file change tracking as unavailable; the resume itself still succeeds, so sessions that predate tracking remain loadable. The opt-in is only rejected when the session can never track (a subagent session, or one without local session storage). It is intentionally absent from the mutable options update because enabling it after edits have occurred would create an incomplete, misleading baseline. Subagents share the parent session's capture store and are not tracked as separate rewind points: a file a subagent writes is attributed to whichever root user turn was open when the capture was staged, just before the tool body ran. A turn cannot open while a staged capture is still in flight, so a subagent tool that staged under the spawning turn stays attributed to it however late the write lands, while a capture it stages after the user's next message belongs to that later turn. Attribution decides which turn's rewind point counts and file preview include that write; it does not narrow which rewinds revert it, because a rewind restores every capture from the selected turn onward, so the earlier spawning turn reverts it as well.
33256
+ * Initial authentication info for the session.
33276
33257
  */
33277
- enableFileChangeTracking?: boolean;
33258
+ authInfo?: AuthInfo;
33278
33259
  /**
33279
- * Feature-flag values resolved by the host.
33260
+ * Options scoped to the built-in CAPI (Copilot API) provider.
33280
33261
  */
33281
- featureFlags?: {
33282
- [k: string]: boolean | undefined;
33283
- };
33262
+ capi?: CapiSessionOptions;
33284
33263
  /**
33285
- * Whether experimental behavior is enabled.
33264
+ * Override URL for the Copilot API endpoint.
33286
33265
  */
33287
- isExperimentalMode?: boolean;
33266
+ copilotUrl?: string;
33267
+ }
33268
+ /**
33269
+ * Host Git context and commit attribution.
33270
+ *
33271
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33272
+ * via the `definition` "SessionOpenGitOptions".
33273
+ */
33274
+ /** @experimental */
33275
+ export interface SessionOpenGitOptions {
33288
33276
  /**
33289
- * Initial authentication info for the session.
33277
+ * Whether commit-message coauthor trailers are enabled.
33290
33278
  */
33291
- authInfo?: AuthInfo;
33279
+ coauthorEnabled?: boolean;
33280
+ }
33281
+ /**
33282
+ * Callback and filesystem hook sources.
33283
+ *
33284
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33285
+ * via the `definition` "SessionOpenHookOptions".
33286
+ */
33287
+ /** @experimental */
33288
+ export interface SessionOpenHookOptions {
33292
33289
  /**
33293
- * Custom model-provider configuration (BYOK).
33290
+ * Explicit discovery-only file-hook roots, separate from callback hooks and filesystem grants. Available without enableConfigDiscovery or enableFileHooks, which controls repository-origin hooks only; hook/managed disables still apply. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33294
33291
  */
33295
- provider?: ProviderConfig;
33292
+ directories?: string[];
33296
33293
  /**
33297
- * Options scoped to the built-in CAPI (Copilot API) provider.
33294
+ * Live gate for repository-origin file hooks, including the primary repository, trusted repository-configured roots, and accepted startup additional directories (including CLI --add-dir). False suppresses these hooks; explicit hookDirectories and SDK callbacks are independent. Additional-root eligibility and the DISABLE_ADDITIONAL_DIRECTORY_HOOKS escape hatch are captured at create/cold resume, not expanded by later grants or feature-flag changes. Discovery uses containing Git roots, so supply only trusted repositories: commands and prompts need no further approval. Policy, hook-disable settings, and sandbox rules still apply. Provider-backed sessions skip repository hooks with a warning on omission, skip silently on false, and reject explicit true.
33298
33295
  */
33299
- capi?: CapiSessionOptions;
33296
+ enableRepositoryHooks?: boolean;
33297
+ }
33298
+ /**
33299
+ * Model tuning and provider catalog.
33300
+ *
33301
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33302
+ * via the `definition` "SessionOpenInferenceOptions".
33303
+ */
33304
+ /** @experimental */
33305
+ export interface SessionOpenInferenceOptions {
33306
+ /**
33307
+ * 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.
33308
+ */
33309
+ reasoningEffort?: string;
33310
+ /**
33311
+ * Initial reasoning summary mode for supported model clients.
33312
+ */
33313
+ reasoningSummary?: SessionOpenOptionsReasoningSummary;
33314
+ /**
33315
+ * Initial output verbosity level for supported models.
33316
+ */
33317
+ verbosity?: Verbosity;
33318
+ /**
33319
+ * Connection used for unqualified BYOK selections. Requires effective
33320
+ * `github.capi.enabled: false`. Omission on resume preserves the policy;
33321
+ * explicit null clears it. Does not select an initial model.
33322
+ */
33323
+ defaultProvider?: string | null;
33300
33324
  /**
33301
- * Named BYOK provider connections, additive to CAPI auth. Combining with `provider` is rejected.
33325
+ * Named BYOK connections. Built-in Copilot availability is independently controlled by github.capi.enabled.
33302
33326
  *
33303
33327
  * @experimental
33304
33328
  */
@@ -33310,239 +33334,367 @@ export interface SessionOpenOptions {
33310
33334
  */
33311
33335
  models?: ProviderModelConfig[];
33312
33336
  /**
33313
- * Working directory to anchor the session.
33337
+ * Experimental: enable native model citations for supported Anthropic and OpenAI models, normalized onto the `assistant.message` event. Off by default; may change or be removed while the citations surface is experimental.
33338
+ *
33339
+ * @experimental
33314
33340
  */
33315
- workingDirectory?: string;
33341
+ enableCitations?: boolean;
33316
33342
  /**
33317
- * Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Conventional `.github/skills/` and `.github/agents/` definitions under each directory also join the session's project catalogs when their existing subsystem gates are enabled: added-root skills require both `enableConfigDiscovery` and effective `enableSkills`; added-root agents require `enableConfigDiscovery`. Supplying a directory therefore activates configuration from it and should be treated as a trust decision. Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied during session creation and cold resume and is not persisted, so a cold resume must re-supply the directories.
33343
+ * Whether the model may request multiple tool calls per response. Defaults to true. False sends a provider hint, not an execution guarantee: all returned calls are still handled and handlers may run concurrently. Re-supply on cold resume.
33318
33344
  */
33319
- additionalDirectories?: string[];
33345
+ allowMultipleToolCalls?: boolean;
33320
33346
  /**
33321
- * Pre-resolved working-directory context for session startup.
33347
+ * Initial model capability overrides.
33322
33348
  */
33323
- workingDirectoryContext?: SessionContext;
33349
+ capabilities?: ModelCapabilitiesOverride;
33350
+ }
33351
+ /**
33352
+ * Instruction sources and discovery.
33353
+ *
33354
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33355
+ * via the `definition` "SessionOpenInstructionOptions".
33356
+ */
33357
+ /** @experimental */
33358
+ export interface SessionOpenInstructionOptions {
33324
33359
  /**
33325
- * Whether this session supports remote steering.
33360
+ * Explicit discovery-only instruction roots using existing SDK instruction formats, not filesystem grants. Available without enableConfigDiscovery, subject to instruction/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33326
33361
  */
33327
- remoteSteerable?: boolean;
33362
+ directories?: string[];
33328
33363
  /**
33329
- * Telemetry-only remote exporting flag.
33364
+ * Whether to skip custom instruction sources.
33330
33365
  */
33331
- remoteExporting?: boolean;
33366
+ skipCustomInstructions?: boolean;
33332
33367
  /**
33333
- * Telemetry-only remote-defaulted flag.
33368
+ * Whether to invalidate cached custom-instruction discovery before constructing the session. Use when instruction files may have changed earlier in the same runtime process.
33334
33369
  */
33335
- remoteDefaultedOn?: boolean;
33370
+ refreshCustomInstructions?: boolean;
33336
33371
  /**
33337
- * Parent session ID for detached child telemetry rollup.
33372
+ * Instruction source IDs disabled for this session.
33338
33373
  */
33339
- detachedFromSpawningParentSessionId?: string;
33374
+ disabledSources?: string[];
33340
33375
  /**
33341
- * Parent engagement ID for detached child telemetry rollup.
33376
+ * Whether on-demand custom instruction discovery is enabled.
33342
33377
  */
33343
- detachedFromSpawningParentEngagementId?: string;
33378
+ onDemandDiscovery?: boolean;
33379
+ }
33380
+ /**
33381
+ * Human input and mode-switch callback capabilities.
33382
+ *
33383
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33384
+ * via the `definition` "SessionOpenInteractionOptions".
33385
+ */
33386
+ /** @experimental */
33387
+ export interface SessionOpenInteractionOptions {
33344
33388
  /**
33345
- * Allowlist of available tool names.
33389
+ * Whether ask_user is explicitly disabled.
33346
33390
  */
33347
- availableTools?: string[];
33391
+ askUserDisabled?: boolean;
33348
33392
  /**
33349
- * Denylist of tool names.
33393
+ * Whether the host is an interactive UI.
33350
33394
  */
33351
- excludedTools?: string[];
33395
+ runningInInteractiveMode?: boolean;
33396
+ }
33397
+ /**
33398
+ * MCP servers, OAuth, and renderer capability.
33399
+ *
33400
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33401
+ * via the `definition` "SessionOpenMcpOptions".
33402
+ */
33403
+ /** @experimental */
33404
+ export interface SessionOpenMcpOptions {
33352
33405
  /**
33353
- * Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available.
33406
+ * OAuth Client ID Metadata Document URL used by this host for MCP authorization.
33354
33407
  */
33355
- includedBuiltinAgents?: string[];
33408
+ authClientIdMetadataUrl?: string;
33356
33409
  /**
33357
- * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
33410
+ * How MCP server environment values are interpreted.
33358
33411
  */
33359
- excludedBuiltinAgents?: string[];
33412
+ envValueMode?: SessionOpenOptionsEnvValueMode;
33360
33413
  /**
33361
- * Per-session settings for built-in shell tools.
33414
+ * MCP server names disabled for this session. Disabled servers are not started or authenticated on create or cold resume.
33362
33415
  */
33363
- shell?: ShellOptions;
33416
+ disabledServers?: string[];
33364
33417
  /**
33365
- * PowerShell process flags applied to built-in and user-requested shell commands.
33418
+ * Non-secret host-managed HTTP MCP servers keyed by stable managed identity. Managed provenance is runtime-established from this separate field and credentials are supplied through dynamic-header refresh.
33419
+ *
33420
+ * @experimental
33366
33421
  */
33367
- shellProcessFlags?: string[];
33422
+ managedServers?: {
33423
+ [k: string]: ManagedMcpServerConfig | undefined;
33424
+ };
33368
33425
  /**
33369
- * Resolved sandbox configuration.
33426
+ * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
33370
33427
  */
33371
- sandboxConfig?: SandboxConfig;
33428
+ allowAllServerInstructions?: boolean;
33429
+ }
33430
+ /**
33431
+ * Session construction options.
33432
+ *
33433
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33434
+ * via the `definition` "SessionOpenOptions".
33435
+ */
33436
+ /** @experimental */
33437
+ export interface SessionOpenOptions {
33372
33438
  /**
33373
- * Origin of the sandbox choice. Settings-derived origins (never_configured, user_enabled, user_disabled, repository_policy) let managed policy floor a host preference; explicit below-floor changes remain policy conflicts unless a session opt-out is authorized. Also used for telemetry provenance.
33374
- *
33375
- * @experimental
33439
+ * Optional stable session identifier to use for a new session.
33376
33440
  */
33377
- sandboxConfigSource?: SandboxConfigSource;
33441
+ sessionId?: string;
33378
33442
  /**
33379
- * Whether interactive shell sessions are logged.
33443
+ * Optional human-friendly session name.
33380
33444
  */
33381
- logInteractiveShells?: boolean;
33445
+ name?: string;
33382
33446
  /**
33383
- * How MCP server environment values are interpreted.
33447
+ * Initial model identifier.
33384
33448
  */
33385
- envValueMode?: SessionOpenOptionsEnvValueMode;
33449
+ model?: string;
33386
33450
  /**
33387
- * MCP server names disabled for this session. Disabled servers are not started or authenticated on create or cold resume.
33451
+ * Identifier of the client driving the session.
33388
33452
  */
33389
- disabledMcpServers?: string[];
33453
+ clientName?: string;
33390
33454
  /**
33391
- * Non-secret host-managed HTTP MCP servers keyed by stable managed identity. Managed provenance is runtime-established from this separate field and credentials are supplied through dynamic-header refresh.
33392
- *
33393
- * @experimental
33455
+ * Structured client kind used for runtime behavior gates.
33394
33456
  */
33395
- managedMcpServers?: {
33396
- [k: string]: ManagedMcpServerConfig | undefined;
33397
- };
33457
+ clientKind?: string;
33398
33458
  /**
33399
- * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
33459
+ * Identifier sent to LSP-style integrations.
33400
33460
  */
33401
- allowAllMcpServerInstructions?: boolean;
33461
+ lspClientName?: string;
33402
33462
  /**
33403
- * Explicit discovery-only skill roots, not filesystem grants. Available without enableConfigDiscovery, subject to skill/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33463
+ * Stable integration identifier for analytics.
33404
33464
  */
33405
- skillDirectories?: string[];
33465
+ integrationId?: string;
33406
33466
  /**
33407
- * Explicit discovery-only agent roots, separate from customAgents and filesystem grants. Available without enableConfigDiscovery, subject to managed/source disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33467
+ * Working directory to anchor the session.
33408
33468
  */
33409
- agentDirectories?: string[];
33469
+ workingDirectory?: string;
33410
33470
  /**
33411
- * Explicit discovery-only instruction roots using existing SDK instruction formats, not filesystem grants. Available without enableConfigDiscovery, subject to instruction/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33471
+ * Whether this session supports remote steering.
33412
33472
  */
33413
- instructionDirectories?: string[];
33473
+ remoteSteerable?: boolean;
33414
33474
  /**
33415
- * Explicit discovery-only file-hook roots, separate from callback hooks and filesystem grants. Available without enableConfigDiscovery or enableFileHooks, which controls repository-origin hooks only; hook/managed disables still apply. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33475
+ * Telemetry-only remote exporting flag.
33416
33476
  */
33417
- hookDirectories?: string[];
33477
+ remoteExporting?: boolean;
33418
33478
  /**
33419
- * Skill scan directories and descendants excluded from discovery. Supports `~`-relative paths.
33479
+ * Telemetry-only remote-defaulted flag.
33420
33480
  */
33421
- ignoredSkillsLocations?: string[];
33481
+ remoteDefaultedOn?: boolean;
33422
33482
  /**
33423
- * Whether skill loading is enabled. When omitted, explicit SDK skill roots or an SDK skill provider enable skills independently of enableConfigDiscovery.
33483
+ * Parent session ID for detached child telemetry rollup.
33424
33484
  */
33425
- enableSkills?: boolean;
33485
+ detachedFromSpawningParentSessionId?: string;
33426
33486
  /**
33427
- * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available.
33487
+ * Parent engagement ID for detached child telemetry rollup.
33428
33488
  */
33429
- includedBuiltinSkills?: string[];
33489
+ detachedFromSpawningParentEngagementId?: string;
33430
33490
  /**
33431
- * Skill IDs disabled for this session.
33491
+ * Capabilities enabled for this session.
33432
33492
  */
33433
- disabledSkills?: string[];
33493
+ sessionCapabilities?: SessionCapability[];
33434
33494
  /**
33435
- * Installed plugins visible to the session.
33495
+ * Model tuning and provider catalog.
33436
33496
  */
33437
- installedPlugins?: InstalledPlugin[];
33497
+ inference?: SessionOpenInferenceOptions;
33438
33498
  /**
33439
- * Whether custom agents default to local-only execution.
33499
+ * MCP servers, OAuth, and renderer capability.
33440
33500
  */
33441
- customAgentsLocalOnly?: boolean;
33501
+ mcp?: SessionOpenMcpOptions;
33442
33502
  /**
33443
- * Whether to skip custom instruction sources.
33503
+ * Feature experimentation and trusted assignments.
33444
33504
  */
33445
- skipCustomInstructions?: boolean;
33505
+ experiments?: SessionOpenExperimentOptions;
33446
33506
  /**
33447
- * Whether to invalidate cached custom-instruction discovery before constructing the session. Use when instruction files may have changed earlier in the same runtime process.
33507
+ * GitHub integration and session credentials.
33448
33508
  */
33449
- refreshCustomInstructions?: boolean;
33509
+ github?: SessionOpenGitHubOptions;
33450
33510
  /**
33451
- * Instruction source IDs disabled for this session.
33511
+ * Host-injected session policy.
33452
33512
  */
33453
- disabledInstructionSources?: string[];
33513
+ policy?: SessionOpenPolicyOptions;
33454
33514
  /**
33455
- * Whether commit-message coauthor trailers are enabled.
33515
+ * Project directory access and change tracking.
33456
33516
  */
33457
- coauthorEnabled?: boolean;
33517
+ filesystem?: SessionOpenFilesystemOptions;
33458
33518
  /**
33459
- * Optional trajectory output file path.
33519
+ * Tool declarations, exposure, and behavior.
33460
33520
  */
33461
- trajectoryFile?: string;
33521
+ tools?: SessionOpenToolOptions;
33462
33522
  /**
33463
- * Whether model responses stream as delta events.
33523
+ * Agent definitions, selection, and source filters.
33464
33524
  */
33465
- enableStreaming?: boolean;
33525
+ agents?: SessionOpenAgentOptions;
33466
33526
  /**
33467
- * Experimental: enable native model citations for supported Anthropic and OpenAI models, normalized onto the `assistant.message` event. Off by default; may change or be removed while the citations surface is experimental.
33468
- *
33469
- * @experimental
33527
+ * Permission decisions and sandboxing.
33470
33528
  */
33471
- enableCitations?: boolean;
33529
+ permissions?: SessionOpenPermissionOptions;
33472
33530
  /**
33473
- * Whether the model may request multiple tool calls per response. Defaults to true. False sends a provider hint, not an execution guarantee: all returned calls are still handled and handlers may run concurrently. Re-supply on cold resume.
33531
+ * Skill loading, sources, and provider capability.
33474
33532
  */
33475
- allowMultipleToolCalls?: boolean;
33533
+ skills?: SessionOpenSkillOptions;
33476
33534
  /**
33477
- * Override URL for the Copilot API endpoint.
33535
+ * Instruction sources and discovery.
33478
33536
  */
33479
- copilotUrl?: string;
33537
+ instructions?: SessionOpenInstructionOptions;
33480
33538
  /**
33481
- * Whether ask_user is explicitly disabled.
33539
+ * Callback and filesystem hook sources.
33482
33540
  */
33483
- askUserDisabled?: boolean;
33541
+ hooks?: SessionOpenHookOptions;
33484
33542
  /**
33485
- * Whether auto-mode continuation is enabled.
33543
+ * Explicit plugin sources.
33486
33544
  */
33487
- continueOnAutoMode?: boolean;
33545
+ plugins?: SessionOpenPluginOptions;
33488
33546
  /**
33489
- * Whether the host is an interactive UI.
33547
+ * Host Git context and commit attribution.
33490
33548
  */
33491
- runningInInteractiveMode?: boolean;
33549
+ git?: SessionOpenGitOptions;
33492
33550
  /**
33493
- * Whether on-demand custom instruction discovery is enabled.
33551
+ * Event delivery and streaming.
33494
33552
  */
33495
- enableOnDemandInstructionDiscovery?: boolean;
33553
+ events?: SessionOpenEventOptions;
33496
33554
  /**
33497
- * Maximum decoded byte size of a single inline model-facing binary tool result persisted in session events (default 10 MB).
33555
+ * Human input and mode-switch callback capabilities.
33498
33556
  */
33499
- maxInlineBinaryBytes?: number;
33557
+ interaction?: SessionOpenInteractionOptions;
33500
33558
  /**
33501
- * Initial model capability overrides.
33559
+ * Execution accounting and autonomous continuation.
33502
33560
  */
33503
- modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
33561
+ execution?: SessionOpenExecutionOptions;
33504
33562
  /**
33505
- * Initial session limits.
33563
+ * Context retention and session-state storage.
33506
33564
  */
33507
- sessionLimits?: SessionLimitsConfig;
33565
+ state?: SessionOpenStateOptions;
33508
33566
  /**
33509
- * Autopilot policy. Defaults to runtime-owned continuation with at most five automatic continuations. Does not change the session mode.
33567
+ * Override Copilot configuration directory.
33510
33568
  */
33511
- autopilot?: AutopilotOptions;
33569
+ configDirectory?: string;
33512
33570
  /**
33513
- * Runtime context discriminator for agent filtering.
33571
+ * Enables runtime discovery of supported configuration. Explicitly supplied
33572
+ * configuration takes precedence; explicit feature roots remain independent.
33514
33573
  */
33515
- agentContext?: string;
33574
+ enableConfigDiscovery?: boolean;
33575
+ }
33576
+ /**
33577
+ * Host-injected session policy.
33578
+ *
33579
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33580
+ * via the `definition` "SessionOpenPolicyOptions".
33581
+ */
33582
+ /** @experimental */
33583
+ export interface SessionOpenPolicyOptions {
33516
33584
  /**
33517
- * Override directory for session event logs.
33585
+ * Managed-setting paths this trusted SDK host enforces externally or does not support, excluded from fetched, device, and policy-helper policy for this session. Exact dotted paths exclude a setting and its descendants (for example sandbox or permissions.disableBypassPermissionsMode); wildcards and array indices are not supported. Host-injected managedSettings and policy availability checks are not excluded. Not persisted; re-supply on resume, where omission restores full enforcement. Requires enableManagedSettings to self-fetch policy.
33518
33586
  */
33519
- eventsLogDirectory?: string;
33587
+ excludedManagedSettings?: string[];
33520
33588
  /**
33521
- * Whether subagent callback events should be forwarded into the session event log sink.
33589
+ * Opt in to enforcing non-overridable managed model controls on session model, Auto-tier, reasoning-effort, and context-tier changes. Managed defaults still apply when omitted; this option only turns conflicting changes into errors.
33522
33590
  */
33523
- eventsLogIncludesSubagents?: boolean;
33591
+ enforceManagedModelDefaults?: boolean;
33524
33592
  /**
33525
- * Override Copilot configuration directory.
33593
+ * Permissions-only enterprise policy injected by the SDK host at session create or resume. Composes restrictively with self-fetched and device policy and is not persisted.
33526
33594
  */
33527
- configDir?: string;
33595
+ managedSettings?: SessionManagedSettings;
33528
33596
  /**
33529
33597
  * Additional content-exclusion policies to merge into the session policy set.
33530
33598
  *
33531
33599
  * @experimental
33532
33600
  */
33533
33601
  additionalContentExclusionPolicies?: SessionOpenOptionsAdditionalContentExclusionPolicy[];
33602
+ }
33603
+ /**
33604
+ * Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated data, and scope.
33605
+ *
33606
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33607
+ * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicy".
33608
+ */
33609
+ /** @experimental */
33610
+ export interface SessionOpenOptionsAdditionalContentExclusionPolicy {
33534
33611
  /**
33535
- * Live gate for repository-origin file hooks, including the primary repository, trusted repository-configured roots, and accepted startup additional directories (including CLI --add-dir). False suppresses these hooks; explicit hookDirectories and SDK callbacks are independent. Additional-root eligibility and the DISABLE_ADDITIONAL_DIRECTORY_HOOKS escape hatch are captured at create/cold resume, not expanded by later grants or feature-flag changes. Discovery uses containing Git roots, so supply only trusted repositories: commands and prompts need no further approval. Policy, hook-disable settings, and sandbox rules still apply. Provider-backed sessions skip repository hooks with a warning on omission, skip silently on false, and reject explicit true.
33612
+ * Content-exclusion rules to apply.
33536
33613
  */
33537
- enableFileHooks?: boolean;
33614
+ rules: SessionOpenOptionsAdditionalContentExclusionPolicyRule[];
33538
33615
  /**
33539
- * Memory configuration for this session.
33616
+ * Opaque policy update timestamp supplied by the host.
33540
33617
  */
33541
- memory?: MemoryConfiguration;
33618
+ last_updated_at: JsonValue;
33542
33619
  /**
33543
- * Capabilities enabled for this session.
33620
+ * Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration.
33544
33621
  */
33545
- sessionCapabilities?: SessionCapability[];
33622
+ scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope;
33623
+ }
33624
+ /**
33625
+ * Single content-exclusion rule supplied to `sessions.open` options, with paths, match conditions, and source.
33626
+ *
33627
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33628
+ * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRule".
33629
+ */
33630
+ /** @experimental */
33631
+ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule {
33632
+ /**
33633
+ * Path patterns covered by this rule.
33634
+ */
33635
+ paths: string[];
33636
+ /**
33637
+ * Conditions of which at least one must match.
33638
+ */
33639
+ ifAnyMatch?: string[];
33640
+ /**
33641
+ * Conditions none of which may match.
33642
+ */
33643
+ ifNoneMatch?: string[];
33644
+ /**
33645
+ * Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.
33646
+ */
33647
+ source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource;
33648
+ }
33649
+ /**
33650
+ * Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.
33651
+ *
33652
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33653
+ * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource".
33654
+ */
33655
+ /** @experimental */
33656
+ export interface SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource {
33657
+ /**
33658
+ * Name of the policy source.
33659
+ */
33660
+ name: string;
33661
+ /**
33662
+ * Type of the policy source.
33663
+ */
33664
+ type: string;
33665
+ }
33666
+ /**
33667
+ * Tool declarations, exposure, and behavior.
33668
+ *
33669
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33670
+ * via the `definition` "SessionOpenToolOptions".
33671
+ */
33672
+ /** @experimental */
33673
+ export interface SessionOpenToolOptions {
33674
+ /**
33675
+ * Allowlist of available tool names.
33676
+ */
33677
+ availableTools?: string[];
33678
+ /**
33679
+ * Denylist of tool names.
33680
+ */
33681
+ excludedTools?: string[];
33682
+ /**
33683
+ * Per-session settings for built-in shell tools.
33684
+ */
33685
+ shell?: ShellOptions;
33686
+ /**
33687
+ * PowerShell process flags applied to built-in and user-requested shell commands.
33688
+ */
33689
+ shellProcessFlags?: string[];
33690
+ /**
33691
+ * Whether interactive shell sessions are logged.
33692
+ */
33693
+ logInteractiveShells?: boolean;
33694
+ /**
33695
+ * Maximum decoded byte size of a single inline model-facing binary tool result persisted in session events (default 10 MB).
33696
+ */
33697
+ maxInlineBinaryBytes?: number;
33546
33698
  }
33547
33699
  /**
33548
33700
  * Per-session settings for built-in shell tools.
@@ -33642,67 +33794,90 @@ export interface ShellCredentials {
33642
33794
  gh?: boolean;
33643
33795
  }
33644
33796
  /**
33645
- * Content-exclusion policy supplied to `sessions.open` options, with rules, last-updated data, and scope.
33797
+ * Permission decisions and sandboxing.
33646
33798
  *
33647
33799
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33648
- * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicy".
33800
+ * via the `definition` "SessionOpenPermissionOptions".
33649
33801
  */
33650
33802
  /** @experimental */
33651
- export interface SessionOpenOptionsAdditionalContentExclusionPolicy {
33652
- /**
33653
- * Content-exclusion rules to apply.
33654
- */
33655
- rules: SessionOpenOptionsAdditionalContentExclusionPolicyRule[];
33803
+ export interface SessionOpenPermissionOptions {
33656
33804
  /**
33657
- * Opaque policy update timestamp supplied by the host.
33805
+ * Resolved sandbox configuration.
33658
33806
  */
33659
- last_updated_at: JsonValue;
33807
+ sandbox?: SandboxConfig;
33660
33808
  /**
33661
- * Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` enumeration.
33809
+ * Origin of the sandbox choice. Settings-derived origins (never_configured, user_enabled, user_disabled, repository_policy) let managed policy floor a host preference; explicit below-floor changes remain policy conflicts unless a session opt-out is authorized. Also used for telemetry provenance.
33810
+ *
33811
+ * @experimental
33662
33812
  */
33663
- scope: SessionOpenOptionsAdditionalContentExclusionPolicyScope;
33813
+ sandboxSource?: SandboxConfigSource;
33664
33814
  }
33665
33815
  /**
33666
- * Single content-exclusion rule supplied to `sessions.open` options, with paths, match conditions, and source.
33816
+ * Skill loading, sources, and provider capability.
33667
33817
  *
33668
33818
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33669
- * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRule".
33819
+ * via the `definition` "SessionOpenSkillOptions".
33670
33820
  */
33671
33821
  /** @experimental */
33672
- export interface SessionOpenOptionsAdditionalContentExclusionPolicyRule {
33822
+ export interface SessionOpenSkillOptions {
33673
33823
  /**
33674
- * Path patterns covered by this rule.
33824
+ * Explicit discovery-only skill roots, not filesystem grants. Available without enableConfigDiscovery, subject to skill/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
33675
33825
  */
33676
- paths: string[];
33826
+ directories?: string[];
33677
33827
  /**
33678
- * Conditions of which at least one must match.
33828
+ * Skill scan directories and descendants excluded from discovery. Supports `~`-relative paths.
33679
33829
  */
33680
- ifAnyMatch?: string[];
33830
+ ignoredLocations?: string[];
33681
33831
  /**
33682
- * Conditions none of which may match.
33832
+ * Whether skill loading is enabled. When omitted, explicit SDK skill roots or an SDK skill provider enable skills independently of enableConfigDiscovery.
33683
33833
  */
33684
- ifNoneMatch?: string[];
33834
+ enabled?: boolean;
33685
33835
  /**
33686
- * Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.
33836
+ * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available.
33687
33837
  */
33688
- source: SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource;
33838
+ includedBuiltinSkills?: string[];
33839
+ /**
33840
+ * Skill IDs disabled for this session.
33841
+ */
33842
+ disabledSkills?: string[];
33689
33843
  }
33690
33844
  /**
33691
- * Source descriptor for a `sessions.open` content-exclusion rule, with source name and type.
33845
+ * Explicit plugin sources.
33692
33846
  *
33693
33847
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33694
- * via the `definition` "SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource".
33848
+ * via the `definition` "SessionOpenPluginOptions".
33695
33849
  */
33696
33850
  /** @experimental */
33697
- export interface SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource {
33851
+ export interface SessionOpenPluginOptions {
33698
33852
  /**
33699
- * Name of the policy source.
33853
+ * Installed plugins visible to the session.
33700
33854
  */
33701
- name: string;
33855
+ installed?: InstalledPlugin[];
33856
+ }
33857
+ /**
33858
+ * Context retention and session-state storage.
33859
+ *
33860
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
33861
+ * via the `definition` "SessionOpenStateOptions".
33862
+ */
33863
+ /** @experimental */
33864
+ export interface SessionOpenStateOptions {
33702
33865
  /**
33703
- * Type of the policy source.
33866
+ * Optional trajectory output file path.
33704
33867
  */
33705
- type: string;
33868
+ trajectoryFile?: string;
33869
+ /**
33870
+ * Override directory for session event logs.
33871
+ */
33872
+ eventsLogDirectory?: string;
33873
+ /**
33874
+ * Whether subagent callback events should be forwarded into the session event log sink.
33875
+ */
33876
+ eventsLogIncludesSubagents?: boolean;
33877
+ /**
33878
+ * Memory configuration for this session.
33879
+ */
33880
+ memory?: MemoryConfiguration;
33706
33881
  }
33707
33882
  /**
33708
33883
  * Parameters for creating a new local session.
@@ -35337,118 +35512,234 @@ export interface SessionTelemetryEngagement {
35337
35512
  engagementId?: string;
35338
35513
  }
35339
35514
  /**
35340
- * Patch of mutable session options to apply to the running session.
35515
+ * Agent definitions, selection, and source filters.
35341
35516
  *
35342
35517
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35343
- * via the `definition` "SessionUpdateOptionsParams".
35518
+ * via the `definition` "SessionUpdateAgentOptions".
35344
35519
  */
35345
35520
  /** @experimental */
35346
- export interface SessionUpdateOptionsParams {
35521
+ export interface SessionUpdateAgentOptions {
35347
35522
  /**
35348
- * Session-only user preferences. Omitted preferences keep their current values.
35523
+ * Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. Set to null to remove the allowlist restriction.
35349
35524
  */
35350
- settings?: SessionSettingsPatch;
35525
+ includedBuiltinAgents?: string[] | null;
35351
35526
  /**
35352
- * Enable or disable the native image tool for this session without changing the conversation model.
35353
- * Omitted values preserve the current setting. Re-supply consent on cold resume.
35527
+ * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
35354
35528
  */
35355
- imageGeneration?: ProtocolImageGenerationOptions;
35529
+ excludedBuiltinAgents?: string[];
35356
35530
  /**
35357
- * The model ID to use for assistant turns.
35531
+ * Explicit discovery-only agent roots, separate from customAgents and filesystem grants. Available without enableConfigDiscovery, subject to managed/source disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35358
35532
  */
35359
- model?: string;
35533
+ directories?: string[];
35360
35534
  /**
35361
- * Per-property model capability overrides for the selected model.
35535
+ * Whether to default custom agents to local-only execution.
35362
35536
  */
35363
- modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
35537
+ localDiscoveryOnly?: boolean;
35364
35538
  /**
35365
- * 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.
35539
+ * When true, the selected custom agent's prompt is not injected into the user message (skill context is still injected). Used by automation triggers where the agent prompt is already in the problem statement.
35366
35540
  */
35367
- reasoningEffort?: string;
35541
+ suppressCustomAgentPrompt?: boolean;
35368
35542
  /**
35369
- * Reasoning summary mode for supported model clients.
35543
+ * Runtime context discriminator (e.g., `cli`, `actions`).
35370
35544
  */
35371
- reasoningSummary?: OptionsUpdateReasoningSummary;
35545
+ context?: string;
35546
+ }
35547
+ /**
35548
+ * Event delivery and streaming.
35549
+ *
35550
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35551
+ * via the `definition` "SessionUpdateEventOptions".
35552
+ */
35553
+ /** @experimental */
35554
+ export interface SessionUpdateEventOptions {
35372
35555
  /**
35373
- * Output verbosity level for supported models.
35556
+ * Whether to stream model responses.
35374
35557
  */
35375
- verbosity?: Verbosity;
35558
+ streaming?: boolean;
35559
+ }
35560
+ /**
35561
+ * Execution accounting and autonomous continuation.
35562
+ *
35563
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35564
+ * via the `definition` "SessionUpdateExecutionOptions".
35565
+ */
35566
+ /** @experimental */
35567
+ export interface SessionUpdateExecutionOptions {
35376
35568
  /**
35377
- * Identifier of the client driving the session.
35569
+ * Whether to allow auto-mode continuation across turns.
35378
35570
  */
35379
- clientName?: string;
35571
+ continueOnAutoMode?: boolean;
35380
35572
  /**
35381
- * Identifier sent to LSP-style integrations.
35573
+ * Optional session limits. Pass null to clear the session limits.
35382
35574
  */
35383
- lspClientName?: string;
35575
+ limits?: SessionLimitsConfig | null;
35384
35576
  /**
35385
- * Stable integration identifier used for analytics and rate-limit attribution.
35577
+ * Patch the Autopilot policy. Omitted fields retain their current values; an empty object makes no changes. Does not change the session mode.
35386
35578
  */
35387
- integrationId?: string;
35579
+ autopilot?: AutopilotOptions;
35580
+ }
35581
+ /**
35582
+ * Feature experimentation and trusted assignments.
35583
+ *
35584
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35585
+ * via the `definition` "SessionUpdateExperimentOptions".
35586
+ */
35587
+ /** @experimental */
35588
+ export interface SessionUpdateExperimentOptions {
35388
35589
  /**
35389
35590
  * Map of feature-flag IDs to their boolean enabled state.
35390
35591
  */
35391
- featureFlags?: {
35592
+ flags?: {
35392
35593
  [k: string]: boolean | undefined;
35393
35594
  };
35394
35595
  /**
35395
35596
  * Whether experimental capabilities are enabled.
35396
35597
  */
35397
- isExperimentalMode?: boolean;
35398
- /**
35399
- * Custom model-provider configuration (BYOK).
35400
- */
35401
- provider?: ProviderConfig;
35598
+ enableExperimentalMode?: boolean;
35599
+ }
35600
+ /**
35601
+ * GitHub integration and session credentials.
35602
+ *
35603
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35604
+ * via the `definition` "SessionUpdateGitHubOptions".
35605
+ */
35606
+ /** @experimental */
35607
+ export interface SessionUpdateGitHubOptions {
35402
35608
  /**
35403
35609
  * Options scoped to the built-in CAPI (Copilot API) provider.
35404
35610
  */
35405
35611
  capi?: CapiSessionOptions;
35406
35612
  /**
35407
- * Absolute working-directory path for shell tools.
35613
+ * Override URL for the Copilot API endpoint.
35408
35614
  */
35409
- workingDirectory?: string;
35615
+ copilotUrl?: string;
35616
+ }
35617
+ /**
35618
+ * Host Git context and commit attribution.
35619
+ *
35620
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35621
+ * via the `definition` "SessionUpdateGitOptions".
35622
+ */
35623
+ /** @experimental */
35624
+ export interface SessionUpdateGitOptions {
35410
35625
  /**
35411
- * Allowlist of tool names available to this session.
35626
+ * Whether to include the `Co-authored-by` trailer in commit messages.
35412
35627
  */
35413
- availableTools?: string[];
35628
+ coauthorEnabled?: boolean;
35414
35629
  /**
35415
- * Denylist of tool names for this session.
35630
+ * Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt).
35416
35631
  */
35417
- excludedTools?: string[];
35632
+ enableHostGitOperations?: boolean;
35633
+ }
35634
+ /**
35635
+ * Callback and filesystem hook sources.
35636
+ *
35637
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35638
+ * via the `definition` "SessionUpdateHookOptions".
35639
+ */
35640
+ /** @experimental */
35641
+ export interface SessionUpdateHookOptions {
35418
35642
  /**
35419
- * Built-in subagent names to include in this session. When specified, only these built-ins are available, subject to runtime availability and exclusions. Custom agents with the same name remain available. Set to null to remove the allowlist restriction.
35643
+ * Explicit discovery-only file-hook roots, separate from callback hooks and filesystem grants. Available without enableConfigDiscovery or enableFileHooks, which controls repository-origin hooks only; hook/managed disables still apply. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35420
35644
  */
35421
- includedBuiltinAgents?: string[] | null;
35645
+ directories?: string[];
35422
35646
  /**
35423
- * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
35647
+ * Whether to enable repository-origin file hooks from `.github/hooks/` and trusted repository-configured roots. Does not control explicit hookDirectories or SDK callback hooks.
35424
35648
  */
35425
- excludedBuiltinAgents?: string[];
35649
+ enableRepositoryHooks?: boolean;
35650
+ }
35651
+ /**
35652
+ * Model tuning and provider catalog.
35653
+ *
35654
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35655
+ * via the `definition` "SessionUpdateInferenceOptions".
35656
+ */
35657
+ /** @experimental */
35658
+ export interface SessionUpdateInferenceOptions {
35426
35659
  /**
35427
- * Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set. Omitted updates preserve the current setting; new sessions default to excluded.
35660
+ * Per-property model capability overrides for the selected model.
35428
35661
  */
35429
- toolFilterPrecedence?: OptionsUpdateToolFilterPrecedence;
35662
+ capabilities?: ModelCapabilitiesOverride;
35430
35663
  /**
35431
- * Per-session settings for built-in shell tools.
35664
+ * 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.
35432
35665
  */
35433
- shell?: ShellOptions;
35666
+ reasoningEffort?: string;
35434
35667
  /**
35435
- * PowerShell process flags applied to built-in and user-requested shell commands.
35668
+ * Reasoning summary mode for supported model clients.
35436
35669
  */
35437
- shellProcessFlags?: string[];
35670
+ reasoningSummary?: OptionsUpdateReasoningSummary;
35438
35671
  /**
35439
- * Resolved sandbox configuration.
35672
+ * Output verbosity level for supported models.
35440
35673
  */
35441
- sandboxConfig?: SandboxConfig;
35674
+ verbosity?: Verbosity;
35442
35675
  /**
35443
- * Origin of the sandbox choice. Settings-derived origins (never_configured, user_enabled, user_disabled, repository_policy) let managed policy floor a host preference; explicit below-floor changes remain policy conflicts unless a session opt-out is authorized. Also used for telemetry provenance.
35444
- *
35445
- * @experimental
35676
+ * Connection used for unqualified selections. Omission preserves routing;
35677
+ * null clears it. Requires effective CAPI disablement.
35446
35678
  */
35447
- sandboxConfigSource?: SandboxConfigSource;
35679
+ defaultProvider?: string | null;
35448
35680
  /**
35449
- * Whether interactive shell sessions are logged.
35681
+ * Whether to surface reasoning-summary events from the model.
35450
35682
  */
35451
- logInteractiveShells?: boolean;
35683
+ enableReasoningSummaries?: boolean;
35684
+ /**
35685
+ * Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier.
35686
+ */
35687
+ contextTier?: OptionsUpdateContextTier;
35688
+ }
35689
+ /**
35690
+ * Instruction sources and discovery.
35691
+ *
35692
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35693
+ * via the `definition` "SessionUpdateInstructionOptions".
35694
+ */
35695
+ /** @experimental */
35696
+ export interface SessionUpdateInstructionOptions {
35697
+ /**
35698
+ * Explicit discovery-only instruction roots using existing SDK instruction formats, not filesystem grants. Available without enableConfigDiscovery, subject to instruction/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35699
+ */
35700
+ directories?: string[];
35701
+ /**
35702
+ * Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions`.
35703
+ */
35704
+ onDemandDiscovery?: boolean;
35705
+ /**
35706
+ * Whether to skip loading custom instruction sources.
35707
+ */
35708
+ skipCustomInstructions?: boolean;
35709
+ /**
35710
+ * Instruction source IDs to exclude from the system prompt.
35711
+ */
35712
+ disabledSources?: string[];
35713
+ /**
35714
+ * Organization-level custom instructions to inject into the system prompt.
35715
+ */
35716
+ organizationText?: string;
35717
+ }
35718
+ /**
35719
+ * Human input and mode-switch callback capabilities.
35720
+ *
35721
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35722
+ * via the `definition` "SessionUpdateInteractionOptions".
35723
+ */
35724
+ /** @experimental */
35725
+ export interface SessionUpdateInteractionOptions {
35726
+ /**
35727
+ * Whether to disable the `ask_user` tool (encourages autonomous behavior).
35728
+ */
35729
+ askUserDisabled?: boolean;
35730
+ /**
35731
+ * Whether the session is running in an interactive UI.
35732
+ */
35733
+ runningInInteractiveMode?: boolean;
35734
+ }
35735
+ /**
35736
+ * MCP servers, OAuth, and renderer capability.
35737
+ *
35738
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35739
+ * via the `definition` "SessionUpdateMcpOptions".
35740
+ */
35741
+ /** @experimental */
35742
+ export interface SessionUpdateMcpOptions {
35452
35743
  /**
35453
35744
  * How env values are passed to MCP servers (`direct` inlines literal values; `indirect` resolves at launch).
35454
35745
  */
@@ -35456,157 +35747,263 @@ export interface SessionUpdateOptionsParams {
35456
35747
  /**
35457
35748
  * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
35458
35749
  */
35459
- allowAllMcpServerInstructions?: boolean;
35750
+ allowAllServerInstructions?: boolean;
35751
+ }
35752
+ /**
35753
+ * Patch of mutable session options to apply to the running session.
35754
+ *
35755
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35756
+ * via the `definition` "SessionUpdateOptionsParams".
35757
+ */
35758
+ /** @experimental */
35759
+ export interface SessionUpdateOptionsParams {
35760
+ /**
35761
+ * Session-only user preferences. Omitted preferences keep their current values.
35762
+ */
35763
+ settings?: SessionSettingsPatch;
35460
35764
  /**
35461
- * Explicit discovery-only skill roots, not filesystem grants. Available without enableConfigDiscovery, subject to skill/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35765
+ * The model ID to use for assistant turns.
35462
35766
  */
35463
- skillDirectories?: string[];
35767
+ model?: string;
35464
35768
  /**
35465
- * Explicit discovery-only agent roots, separate from customAgents and filesystem grants. Available without enableConfigDiscovery, subject to managed/source disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35769
+ * Identifier of the client driving the session.
35466
35770
  */
35467
- agentDirectories?: string[];
35771
+ clientName?: string;
35468
35772
  /**
35469
- * Explicit discovery-only instruction roots using existing SDK instruction formats, not filesystem grants. Available without enableConfigDiscovery, subject to instruction/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35773
+ * Identifier sent to LSP-style integrations.
35470
35774
  */
35471
- instructionDirectories?: string[];
35775
+ lspClientName?: string;
35472
35776
  /**
35473
- * Explicit discovery-only file-hook roots, separate from callback hooks and filesystem grants. Available without enableConfigDiscovery or enableFileHooks, which controls repository-origin hooks only; hook/managed disables still apply. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35777
+ * Stable integration identifier used for analytics and rate-limit attribution.
35474
35778
  */
35475
- hookDirectories?: string[];
35779
+ integrationId?: string;
35476
35780
  /**
35477
- * Skill scan directories and descendants excluded from discovery. Supports `~`-relative paths.
35781
+ * Absolute working-directory path for shell tools.
35478
35782
  */
35479
- ignoredSkillsLocations?: string[];
35783
+ workingDirectory?: string;
35480
35784
  /**
35481
- * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction.
35785
+ * Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged.
35482
35786
  */
35483
- includedBuiltinSkills?: string[] | null;
35787
+ sessionCapabilities?: SessionCapability[];
35484
35788
  /**
35485
- * Skill IDs that should be excluded from this session.
35789
+ * Tool declarations, exposure, and behavior.
35486
35790
  */
35487
- disabledSkills?: string[];
35791
+ tools?: SessionUpdateToolOptions;
35488
35792
  /**
35489
- * Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions`.
35793
+ * Model tuning and provider catalog.
35490
35794
  */
35491
- enableOnDemandInstructionDiscovery?: boolean;
35795
+ inference?: SessionUpdateInferenceOptions;
35492
35796
  /**
35493
- * Maximum decoded byte size of a single model-facing binary tool result (e.g. an image) persisted inline in session events and re-presented to the model on later turns / resume. Larger results are persisted as a metadata-only marker and shown to the model as a short text note. Defaults to 10 MB.
35797
+ * Feature experimentation and trusted assignments.
35494
35798
  */
35495
- maxInlineBinaryBytes?: number;
35799
+ experiments?: SessionUpdateExperimentOptions;
35496
35800
  /**
35497
- * Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes.
35801
+ * GitHub integration and session credentials.
35498
35802
  */
35499
- installedPlugins?: SessionInstalledPlugin[];
35803
+ github?: SessionUpdateGitHubOptions;
35500
35804
  /**
35501
- * Whether to default custom agents to local-only execution.
35805
+ * Agent definitions, selection, and source filters.
35502
35806
  */
35503
- customAgentsLocalOnly?: boolean;
35807
+ agents?: SessionUpdateAgentOptions;
35504
35808
  /**
35505
- * When true, the selected custom agent's prompt is not injected into the user message (skill context is still injected). Used by automation triggers where the agent prompt is already in the problem statement.
35809
+ * Permission decisions and sandboxing.
35506
35810
  */
35507
- suppressCustomAgentPrompt?: boolean;
35811
+ permissions?: SessionUpdatePermissionOptions;
35508
35812
  /**
35509
- * Whether to skip loading custom instruction sources.
35813
+ * MCP servers, OAuth, and renderer capability.
35510
35814
  */
35511
- skipCustomInstructions?: boolean;
35815
+ mcp?: SessionUpdateMcpOptions;
35512
35816
  /**
35513
- * Instruction source IDs to exclude from the system prompt.
35817
+ * Skill loading, sources, and provider capability.
35514
35818
  */
35515
- disabledInstructionSources?: string[];
35819
+ skills?: SessionUpdateSkillOptions;
35516
35820
  /**
35517
- * Whether to include the `Co-authored-by` trailer in commit messages.
35821
+ * Instruction sources and discovery.
35518
35822
  */
35519
- coauthorEnabled?: boolean;
35823
+ instructions?: SessionUpdateInstructionOptions;
35520
35824
  /**
35521
- * Optional path for trajectory output.
35825
+ * Callback and filesystem hook sources.
35522
35826
  */
35523
- trajectoryFile?: string;
35827
+ hooks?: SessionUpdateHookOptions;
35524
35828
  /**
35525
- * Whether to stream model responses.
35829
+ * Explicit plugin sources.
35526
35830
  */
35527
- enableStreaming?: boolean;
35831
+ plugins?: SessionUpdatePluginOptions;
35528
35832
  /**
35529
- * Override URL for the Copilot API endpoint.
35833
+ * Host Git context and commit attribution.
35530
35834
  */
35531
- copilotUrl?: string;
35835
+ git?: SessionUpdateGitOptions;
35532
35836
  /**
35533
- * Whether to disable the `ask_user` tool (encourages autonomous behavior).
35837
+ * Context retention and session-state storage.
35534
35838
  */
35535
- askUserDisabled?: boolean;
35839
+ state?: SessionUpdateStateOptions;
35536
35840
  /**
35537
- * Whether to allow auto-mode continuation across turns.
35841
+ * Event delivery and streaming.
35538
35842
  */
35539
- continueOnAutoMode?: boolean;
35843
+ events?: SessionUpdateEventOptions;
35540
35844
  /**
35541
- * Whether the session is running in an interactive UI.
35845
+ * Human input and mode-switch callback capabilities.
35542
35846
  */
35543
- runningInInteractiveMode?: boolean;
35847
+ interaction?: SessionUpdateInteractionOptions;
35544
35848
  /**
35545
- * Whether to surface reasoning-summary events from the model.
35849
+ * Execution accounting and autonomous continuation.
35546
35850
  */
35547
- enableReasoningSummaries?: boolean;
35851
+ execution?: SessionUpdateExecutionOptions;
35548
35852
  /**
35549
- * Runtime context discriminator (e.g., `cli`, `actions`).
35853
+ * Host-injected session policy.
35550
35854
  */
35551
- agentContext?: string;
35855
+ policy?: SessionUpdatePolicyOptions;
35856
+ }
35857
+ /**
35858
+ * Tool declarations, exposure, and behavior.
35859
+ *
35860
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35861
+ * via the `definition` "SessionUpdateToolOptions".
35862
+ */
35863
+ /** @experimental */
35864
+ export interface SessionUpdateToolOptions {
35552
35865
  /**
35553
- * Override directory for the session-events log. When unset, the runtime's default events log directory is used.
35866
+ * Enable or disable the native image tool for this session without changing the conversation model.
35867
+ * Omitted values preserve the current setting. Re-supply consent on cold resume.
35554
35868
  */
35555
- eventsLogDirectory?: string;
35869
+ imageGeneration?: ProtocolImageGenerationOptions;
35556
35870
  /**
35557
- * Whether subagent callback events should be forwarded into the session event log sink.
35871
+ * Allowlist of tool names available to this session.
35558
35872
  */
35559
- eventsLogIncludesSubagents?: boolean;
35873
+ availableTools?: string[];
35560
35874
  /**
35561
- * Additional content-exclusion policies to merge into the session's policy set.
35562
- *
35563
- * @experimental
35875
+ * Denylist of tool names for this session.
35564
35876
  */
35565
- additionalContentExclusionPolicies?: OptionsUpdateAdditionalContentExclusionPolicy[];
35877
+ excludedTools?: string[];
35878
+ /**
35879
+ * Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set. Omitted updates preserve the current setting; new sessions default to excluded.
35880
+ */
35881
+ filterPrecedence?: OptionsUpdateToolFilterPrecedence;
35882
+ /**
35883
+ * Per-session settings for built-in shell tools.
35884
+ */
35885
+ shell?: ShellOptions;
35886
+ /**
35887
+ * PowerShell process flags applied to built-in and user-requested shell commands.
35888
+ */
35889
+ shellProcessFlags?: string[];
35890
+ /**
35891
+ * Whether interactive shell sessions are logged.
35892
+ */
35893
+ logInteractiveShells?: boolean;
35894
+ /**
35895
+ * Maximum decoded byte size of a single model-facing binary tool result (e.g. an image) persisted inline in session events and re-presented to the model on later turns / resume. Larger results are persisted as a metadata-only marker and shown to the model as a short text note. Defaults to 10 MB.
35896
+ */
35897
+ maxInlineBinaryBytes?: number;
35566
35898
  /**
35567
35899
  * Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users).
35568
35900
  */
35569
35901
  manageScheduleEnabled?: boolean;
35902
+ }
35903
+ /**
35904
+ * Permission decisions and sandboxing.
35905
+ *
35906
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35907
+ * via the `definition` "SessionUpdatePermissionOptions".
35908
+ */
35909
+ /** @experimental */
35910
+ export interface SessionUpdatePermissionOptions {
35570
35911
  /**
35571
- * Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged.
35912
+ * Resolved sandbox configuration.
35572
35913
  */
35573
- sessionCapabilities?: SessionCapability[];
35914
+ sandbox?: SandboxConfig;
35574
35915
  /**
35575
- * Whether to skip embedding retrieval pipeline initialization and execution.
35916
+ * Origin of the sandbox choice. Settings-derived origins (never_configured, user_enabled, user_disabled, repository_policy) let managed policy floor a host preference; explicit below-floor changes remain policy conflicts unless a session opt-out is authorized. Also used for telemetry provenance.
35917
+ *
35918
+ * @experimental
35576
35919
  */
35577
- skipEmbeddingRetrieval?: boolean;
35920
+ sandboxSource?: SandboxConfigSource;
35921
+ }
35922
+ /**
35923
+ * Skill loading, sources, and provider capability.
35924
+ *
35925
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35926
+ * via the `definition` "SessionUpdateSkillOptions".
35927
+ */
35928
+ /** @experimental */
35929
+ export interface SessionUpdateSkillOptions {
35578
35930
  /**
35579
- * Organization-level custom instructions to inject into the system prompt.
35931
+ * Explicit discovery-only skill roots, not filesystem grants. Available without enableConfigDiscovery, subject to skill/managed disables. Relative SDK paths resolve once when supplied against the request's effective workingDirectory; retained roots do not move on cwd changes. Null and omission are equivalent; [] clears only the explicit SDK contribution.
35580
35932
  */
35581
- organizationCustomInstructions?: string;
35933
+ directories?: string[];
35582
35934
  /**
35583
- * Whether to enable repository-origin file hooks from `.github/hooks/` and trusted repository-configured roots. Does not control explicit hookDirectories or SDK callback hooks.
35935
+ * Skill scan directories and descendants excluded from discovery. Supports `~`-relative paths.
35584
35936
  */
35585
- enableFileHooks?: boolean;
35937
+ ignoredLocations?: string[];
35586
35938
  /**
35587
- * Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt).
35939
+ * Built-in skill names to include in this session. When specified, only these runtime-bundled skills are available. Skills from other sources with the same name remain available. Set to null to remove the allowlist restriction.
35588
35940
  */
35589
- enableHostGitOperations?: boolean;
35941
+ includedBuiltinSkills?: string[] | null;
35590
35942
  /**
35591
- * Whether to enable cross-session store writes and reads.
35943
+ * Skill IDs that should be excluded from this session.
35592
35944
  */
35593
- enableSessionStore?: boolean;
35945
+ disabledSkills?: string[];
35594
35946
  /**
35595
35947
  * Whether skill loading is enabled. Explicit false disables every source, including explicit SDK roots and a bound SDK provider; changing the value invalidates the loaded skill snapshot. When omitted, creation falls back to enableConfigDiscovery unless explicit SDK skill roots or an SDK skill provider are supplied.
35596
35948
  */
35597
- enableSkills?: boolean;
35949
+ enabled?: boolean;
35950
+ }
35951
+ /**
35952
+ * Explicit plugin sources.
35953
+ *
35954
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35955
+ * via the `definition` "SessionUpdatePluginOptions".
35956
+ */
35957
+ /** @experimental */
35958
+ export interface SessionUpdatePluginOptions {
35598
35959
  /**
35599
- * Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier.
35960
+ * Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes.
35600
35961
  */
35601
- contextTier?: OptionsUpdateContextTier;
35962
+ installed?: SessionInstalledPlugin[];
35963
+ }
35964
+ /**
35965
+ * Context retention and session-state storage.
35966
+ *
35967
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35968
+ * via the `definition` "SessionUpdateStateOptions".
35969
+ */
35970
+ /** @experimental */
35971
+ export interface SessionUpdateStateOptions {
35602
35972
  /**
35603
- * Optional session limits. Pass null to clear the session limits.
35973
+ * Optional path for trajectory output.
35604
35974
  */
35605
- sessionLimits?: SessionLimitsConfig | null;
35975
+ trajectoryFile?: string;
35606
35976
  /**
35607
- * Patch the Autopilot policy. Omitted fields retain their current values; an empty object makes no changes. Does not change the session mode.
35977
+ * Override directory for the session-events log. When unset, the runtime's default events log directory is used.
35608
35978
  */
35609
- autopilot?: AutopilotOptions;
35979
+ eventsLogDirectory?: string;
35980
+ /**
35981
+ * Whether subagent callback events should be forwarded into the session event log sink.
35982
+ */
35983
+ eventsLogIncludesSubagents?: boolean;
35984
+ /**
35985
+ * Whether to skip embedding retrieval pipeline initialization and execution.
35986
+ */
35987
+ skipEmbeddingRetrieval?: boolean;
35988
+ /**
35989
+ * Whether to enable cross-session store writes and reads.
35990
+ */
35991
+ enableCrossSessionStore?: boolean;
35992
+ }
35993
+ /**
35994
+ * Host-injected session policy.
35995
+ *
35996
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
35997
+ * via the `definition` "SessionUpdatePolicyOptions".
35998
+ */
35999
+ /** @experimental */
36000
+ export interface SessionUpdatePolicyOptions {
36001
+ /**
36002
+ * Additional content-exclusion policies to merge into the session's policy set.
36003
+ *
36004
+ * @experimental
36005
+ */
36006
+ additionalContentExclusionPolicies?: OptionsUpdateAdditionalContentExclusionPolicy[];
35610
36007
  }
35611
36008
  /**
35612
36009
  * Indicates whether the session options patch was applied successfully.
@@ -39006,7 +39403,7 @@ export interface UserSettingsGetPathsRequest {
39006
39403
  /** @experimental */
39007
39404
  export interface UserSettingsGetPathsResult {
39008
39405
  /**
39009
- * The user settings file: `settings.json` under the resolved Copilot home. This is the file `user.settings.get`, `user.settings.load`, and `user.settings.set` read and write.
39406
+ * The user settings file: `settings.json` under the resolved Copilot home. This is the file `user.settings.get`, `user.settings.loadWithWarning`, and `user.settings.set` read and write.
39010
39407
  */
39011
39408
  userSettings: string;
39012
39409
  /**
@@ -46987,7 +47384,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
46987
47384
  *
46988
47385
  * @param params Model identifier to use when re-tokenizing the session's existing messages.
46989
47386
  *
46990
- * @returns Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.context_info_changed` events. Returns zeros for an empty session.
47387
+ * @returns Re-tokenize the session's existing messages against `modelId` and return the token totals. Useful for hosts that want an initial estimate of context usage on session resume, before the next agent turn fires `session.usage_info` events. Returns zeros for an empty session.
46991
47388
  */
46992
47389
  recomputeContextTokens: (params: MetadataRecomputeContextTokensRequest) => Promise<MetadataRecomputeContextTokensResult>;
46993
47390
  };