@github/copilot-sdk 1.0.4 → 1.0.5-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,20 +98,20 @@ const DEFAULT_PROVIDER_NAME = "default";
98
98
  function extractBearerTokenProviders(provider, providers) {
99
99
  const callbacks = /* @__PURE__ */ new Map();
100
100
  let wireProvider = provider;
101
- if (provider?.getBearerToken) {
102
- const { getBearerToken, ...rest } = provider;
103
- callbacks.set(DEFAULT_PROVIDER_NAME, getBearerToken);
101
+ if (provider?.bearerTokenProvider) {
102
+ const { bearerTokenProvider, ...rest } = provider;
103
+ callbacks.set(DEFAULT_PROVIDER_NAME, bearerTokenProvider);
104
104
  wireProvider = {
105
105
  ...rest,
106
106
  hasBearerTokenProvider: true
107
107
  };
108
108
  }
109
109
  let wireProviders = providers;
110
- if (providers?.some((p) => p.getBearerToken)) {
110
+ if (providers?.some((p) => p.bearerTokenProvider)) {
111
111
  wireProviders = providers.map((p) => {
112
- if (!p.getBearerToken) return p;
113
- const { getBearerToken, ...rest } = p;
114
- callbacks.set(p.name, getBearerToken);
112
+ if (!p.bearerTokenProvider) return p;
113
+ const { bearerTokenProvider, ...rest } = p;
114
+ callbacks.set(p.name, bearerTokenProvider);
115
115
  return {
116
116
  ...rest,
117
117
  hasBearerTokenProvider: true
@@ -655,13 +655,13 @@ function createSessionRpc(connection, sessionId) {
655
655
  */
656
656
  shutdown: async (params) => connection.sendRequest("session.shutdown", { sessionId, ...params }),
657
657
  /** @experimental */
658
- auth: {
658
+ gitHubAuth: {
659
659
  /**
660
660
  * Gets authentication status and account metadata for the session.
661
661
  *
662
662
  * @returns Authentication status and account metadata for the session.
663
663
  */
664
- getStatus: async () => connection.sendRequest("session.auth.getStatus", { sessionId }),
664
+ getStatus: async () => connection.sendRequest("session.gitHubAuth.getStatus", { sessionId }),
665
665
  /**
666
666
  * Updates the session's auth credentials used for outbound model and API requests.
667
667
  *
@@ -669,7 +669,7 @@ function createSessionRpc(connection, sessionId) {
669
669
  *
670
670
  * @returns Indicates whether the credential update succeeded.
671
671
  */
672
- setCredentials: async (params) => connection.sendRequest("session.auth.setCredentials", { sessionId, ...params })
672
+ setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params })
673
673
  },
674
674
  /** @experimental */
675
675
  canvas: {
@@ -1139,6 +1139,17 @@ function createSessionRpc(connection, sessionId) {
1139
1139
  login: async (params) => connection.sendRequest("session.mcp.oauth.login", { sessionId, ...params })
1140
1140
  },
1141
1141
  /** @experimental */
1142
+ headers: {
1143
+ /**
1144
+ * Responds to a pending MCP dynamic headers refresh request. Hosts that subscribe to `mcp.headers_refresh_required` use this to provide short-lived per-server headers or to indicate that no dynamic headers are available for this refresh.
1145
+ *
1146
+ * @param params MCP headers refresh request id and the host response.
1147
+ *
1148
+ * @returns Indicates whether the pending MCP headers refresh response was accepted.
1149
+ */
1150
+ handlePendingHeadersRefreshRequest: async (params) => connection.sendRequest("session.mcp.headers.handlePendingHeadersRefreshRequest", { sessionId, ...params })
1151
+ },
1152
+ /** @experimental */
1142
1153
  apps: {
1143
1154
  /**
1144
1155
  * Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
@@ -1317,7 +1328,7 @@ function createSessionRpc(connection, sessionId) {
1317
1328
  *
1318
1329
  * @param params Slash command name and optional raw input string to invoke.
1319
1330
  *
1320
- * @returns Result of invoking the slash command (text output, prompt to send to the agent, or completion).
1331
+ * @returns Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
1321
1332
  */
1322
1333
  invoke: async (params) => connection.sendRequest("session.commands.invoke", { sessionId, ...params }),
1323
1334
  /**
@@ -533,7 +533,7 @@ class CopilotSession {
533
533
  };
534
534
  }
535
535
  /**
536
- * Registers per-provider {@link GetBearerToken} callbacks for BYOK providers
536
+ * Registers per-provider {@link BearerTokenProvider} callbacks for BYOK providers
537
537
  * configured with managed-identity / on-demand bearer-token auth.
538
538
  *
539
539
  * The runtime never receives the callback itself; the SDK strips it from the
@@ -563,7 +563,8 @@ class CopilotSession {
563
563
  );
564
564
  }
565
565
  const token = await callback({
566
- providerName: params.providerName
566
+ providerName: params.providerName,
567
+ sessionId: params.sessionId
567
568
  });
568
569
  return { token };
569
570
  }
package/dist/client.js CHANGED
@@ -85,20 +85,20 @@ const DEFAULT_PROVIDER_NAME = "default";
85
85
  function extractBearerTokenProviders(provider, providers) {
86
86
  const callbacks = /* @__PURE__ */ new Map();
87
87
  let wireProvider = provider;
88
- if (provider?.getBearerToken) {
89
- const { getBearerToken, ...rest } = provider;
90
- callbacks.set(DEFAULT_PROVIDER_NAME, getBearerToken);
88
+ if (provider?.bearerTokenProvider) {
89
+ const { bearerTokenProvider, ...rest } = provider;
90
+ callbacks.set(DEFAULT_PROVIDER_NAME, bearerTokenProvider);
91
91
  wireProvider = {
92
92
  ...rest,
93
93
  hasBearerTokenProvider: true
94
94
  };
95
95
  }
96
96
  let wireProviders = providers;
97
- if (providers?.some((p) => p.getBearerToken)) {
97
+ if (providers?.some((p) => p.bearerTokenProvider)) {
98
98
  wireProviders = providers.map((p) => {
99
- if (!p.getBearerToken) return p;
100
- const { getBearerToken, ...rest } = p;
101
- callbacks.set(p.name, getBearerToken);
99
+ if (!p.bearerTokenProvider) return p;
100
+ const { bearerTokenProvider, ...rest } = p;
101
+ callbacks.set(p.name, bearerTokenProvider);
102
102
  return {
103
103
  ...rest,
104
104
  hasBearerTokenProvider: true
@@ -3,7 +3,7 @@
3
3
  * Generated from: api.schema.json
4
4
  */
5
5
  import type { MessageConnection } from "vscode-jsonrpc/node.js";
6
- import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
6
+ import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, ResponseBudgetConfig, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
7
7
  /**
8
8
  * Initial authentication info for the session.
9
9
  *
@@ -653,6 +653,24 @@ export type McpServerConfigHttpOauthGrantType =
653
653
  "authorization_code"
654
654
  /** Headless client credentials flow using the configured OAuth client. */
655
655
  | "client_credentials";
656
+ /**
657
+ * Host response: supply dynamic headers or decline this refresh.
658
+ *
659
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
660
+ * via the `definition` "McpHeadersHandlePendingHeadersRefreshRequest".
661
+ */
662
+ /** @experimental */
663
+ export type McpHeadersHandlePendingHeadersRefreshRequest = {
664
+ /**
665
+ * Headers to overlay onto the MCP request. Dynamic headers override static config headers but do not replace SDK-managed request headers.
666
+ */
667
+ headers: {
668
+ [k: string]: string | undefined;
669
+ };
670
+ kind: "headers";
671
+ } | {
672
+ kind: "none";
673
+ };
656
674
  /**
657
675
  * Host response to the pending OAuth request.
658
676
  *
@@ -669,10 +687,6 @@ export type McpOauthPendingRequestResponse = {
669
687
  * OAuth token type. Defaults to Bearer when omitted.
670
688
  */
671
689
  tokenType?: string;
672
- /**
673
- * Refresh token supplied by the host, if available.
674
- */
675
- refreshToken?: string;
676
690
  /**
677
691
  * Token lifetime in seconds, if known.
678
692
  */
@@ -1092,7 +1106,7 @@ export type ProviderEndpointTransport =
1092
1106
  * via the `definition` "PushAttachment".
1093
1107
  */
1094
1108
  /** @experimental */
1095
- export type PushAttachment = PushAttachmentFile | PushAttachmentDirectory | PushAttachmentSelection | PushAttachmentGitHubReference | PushAttachmentBlob | ExtensionContextPushInput;
1109
+ export type PushAttachment = PushAttachmentFile | PushAttachmentDirectory | PushAttachmentSelection | PushAttachmentGitHubReference | PushAttachmentGitHubCommit | PushAttachmentGitHubRelease | PushAttachmentGitHubActionsJob | PushAttachmentGitHubRepository | PushAttachmentGitHubFileDiff | PushAttachmentGitHubTreeComparison | PushAttachmentGitHubUrl | PushAttachmentGitHubFile | PushAttachmentGitHubSnippet | PushAttachmentBlob | ExtensionContextPushInput;
1096
1110
  /**
1097
1111
  * Type of GitHub reference
1098
1112
  *
@@ -1487,7 +1501,7 @@ export type SkillDiscoveryScope =
1487
1501
  /** A configured custom skill directory. */
1488
1502
  | "custom";
1489
1503
  /**
1490
- * Result of invoking the slash command (text output, prompt to send to the agent, or completion).
1504
+ * Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
1491
1505
  *
1492
1506
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1493
1507
  * via the `definition` "SlashCommandInvocationResult".
@@ -1512,6 +1526,14 @@ export type SubagentSettings = {
1512
1526
  * Names of subagents the user has turned off; they cannot be dispatched
1513
1527
  */
1514
1528
  disabledSubagents?: string[];
1529
+ /**
1530
+ * Maximum number of subagents that can run concurrently; applies to usage-based billing users only
1531
+ */
1532
+ maxConcurrency?: number;
1533
+ /**
1534
+ * Maximum subagent nesting depth; applies to usage-based billing users only
1535
+ */
1536
+ maxDepth?: number;
1515
1537
  } | null;
1516
1538
  /**
1517
1539
  * Context tier override for matching subagents
@@ -4115,6 +4137,10 @@ export interface InstalledPluginInfo {
4115
4137
  * Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs.
4116
4138
  */
4117
4139
  marketplace: string;
4140
+ /**
4141
+ * Opaque, stable hash identifying a direct (non-marketplace) install source. Present only for direct repo / URL / local installs; absent for marketplace plugins. Same source yields the same id; distinct sources never collide.
4142
+ */
4143
+ directSourceId?: string;
4118
4144
  /**
4119
4145
  * Installed version (when reported by the plugin manifest)
4120
4146
  */
@@ -5323,6 +5349,33 @@ export interface McpFilteredServer {
5323
5349
  */
5324
5350
  enterpriseName?: string;
5325
5351
  }
5352
+ /**
5353
+ * MCP headers refresh request id and the host response.
5354
+ *
5355
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5356
+ * via the `definition` "McpHeadersHandlePendingHeadersRefreshRequestRequest".
5357
+ */
5358
+ /** @experimental */
5359
+ export interface McpHeadersHandlePendingHeadersRefreshRequestRequest {
5360
+ /**
5361
+ * Headers refresh request identifier from mcp.headers_refresh_required
5362
+ */
5363
+ requestId: string;
5364
+ result: McpHeadersHandlePendingHeadersRefreshRequest;
5365
+ }
5366
+ /**
5367
+ * Indicates whether the pending MCP headers refresh response was accepted.
5368
+ *
5369
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5370
+ * via the `definition` "McpHeadersHandlePendingHeadersRefreshRequestResult".
5371
+ */
5372
+ /** @experimental */
5373
+ export interface McpHeadersHandlePendingHeadersRefreshRequestResult {
5374
+ /**
5375
+ * Whether the response was accepted. False if the request was unknown, timed out, or already resolved.
5376
+ */
5377
+ success: boolean;
5378
+ }
5326
5379
  /**
5327
5380
  * Host-level state, omitted when no MCP host is initialized.
5328
5381
  *
@@ -6007,6 +6060,10 @@ export interface ModelBilling {
6007
6060
  */
6008
6061
  multiplier?: number;
6009
6062
  tokenPrices?: ModelBillingTokenPrices;
6063
+ /**
6064
+ * Whole-number percentage discount (0-100) applied to usage billed through this model. Populated for the synthetic `auto` model, where requests routed by auto-mode are billed at a reduced rate; absent for concrete models.
6065
+ */
6066
+ discountPercent?: number;
6010
6067
  }
6011
6068
  /**
6012
6069
  * Token-level pricing information for this model
@@ -8043,6 +8100,10 @@ export interface PluginsUninstallRequest {
8043
8100
  * Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec.
8044
8101
  */
8045
8102
  name: string;
8103
+ /**
8104
+ * Stable source identity for a direct (non-marketplace) install. Disambiguates uninstall when multiple installed plugins share the same name.
8105
+ */
8106
+ directSourceId?: string | null;
8046
8107
  }
8047
8108
  /**
8048
8109
  * Name (or spec) of the plugin to update.
@@ -8541,6 +8602,279 @@ export interface PushAttachmentGitHubReference {
8541
8602
  */
8542
8603
  url: string;
8543
8604
  }
8605
+ /**
8606
+ * Pointer to a GitHub commit.
8607
+ *
8608
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8609
+ * via the `definition` "PushAttachmentGitHubCommit".
8610
+ */
8611
+ /** @experimental */
8612
+ export interface PushAttachmentGitHubCommit {
8613
+ /**
8614
+ * Attachment type discriminator
8615
+ */
8616
+ type: "github_commit";
8617
+ repo: PushGitHubRepoRef;
8618
+ /**
8619
+ * Full commit SHA
8620
+ */
8621
+ oid: string;
8622
+ /**
8623
+ * First line of the commit message
8624
+ */
8625
+ message: string;
8626
+ /**
8627
+ * URL to the commit on GitHub
8628
+ */
8629
+ url: string;
8630
+ }
8631
+ /**
8632
+ * Pointer to a GitHub repository.
8633
+ *
8634
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8635
+ * via the `definition` "PushGitHubRepoRef".
8636
+ */
8637
+ /** @experimental */
8638
+ export interface PushGitHubRepoRef {
8639
+ /**
8640
+ * Numeric GitHub repository id
8641
+ */
8642
+ id?: number;
8643
+ /**
8644
+ * Repository name (without owner)
8645
+ */
8646
+ name: string;
8647
+ /**
8648
+ * Repository owner login (user or organization)
8649
+ */
8650
+ owner: string;
8651
+ }
8652
+ /**
8653
+ * Pointer to a GitHub release.
8654
+ *
8655
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8656
+ * via the `definition` "PushAttachmentGitHubRelease".
8657
+ */
8658
+ /** @experimental */
8659
+ export interface PushAttachmentGitHubRelease {
8660
+ /**
8661
+ * Attachment type discriminator
8662
+ */
8663
+ type: "github_release";
8664
+ repo: PushGitHubRepoRef;
8665
+ /**
8666
+ * Git tag the release is anchored to
8667
+ */
8668
+ tagName: string;
8669
+ /**
8670
+ * Human-readable release name
8671
+ */
8672
+ name: string;
8673
+ /**
8674
+ * URL to the release on GitHub
8675
+ */
8676
+ url: string;
8677
+ }
8678
+ /**
8679
+ * Pointer to a GitHub Actions job.
8680
+ *
8681
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8682
+ * via the `definition` "PushAttachmentGitHubActionsJob".
8683
+ */
8684
+ /** @experimental */
8685
+ export interface PushAttachmentGitHubActionsJob {
8686
+ /**
8687
+ * Attachment type discriminator
8688
+ */
8689
+ type: "github_actions_job";
8690
+ repo: PushGitHubRepoRef;
8691
+ /**
8692
+ * Job id within the workflow run
8693
+ */
8694
+ jobId: number;
8695
+ /**
8696
+ * Display name of the job
8697
+ */
8698
+ jobName: string;
8699
+ /**
8700
+ * Display name of the workflow the job ran in
8701
+ */
8702
+ workflowName: string;
8703
+ /**
8704
+ * URL to the job on GitHub
8705
+ */
8706
+ url: string;
8707
+ /**
8708
+ * Terminal conclusion of the job when finished (e.g., success, failure, cancelled). Absent for in-progress jobs.
8709
+ */
8710
+ conclusion?: string;
8711
+ }
8712
+ /**
8713
+ * Pointer to a GitHub repository.
8714
+ *
8715
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8716
+ * via the `definition` "PushAttachmentGitHubRepository".
8717
+ */
8718
+ /** @experimental */
8719
+ export interface PushAttachmentGitHubRepository {
8720
+ /**
8721
+ * Attachment type discriminator
8722
+ */
8723
+ type: "github_repository";
8724
+ repo: PushGitHubRepoRef;
8725
+ /**
8726
+ * URL to the repository on GitHub
8727
+ */
8728
+ url: string;
8729
+ /**
8730
+ * Short description of the repository
8731
+ */
8732
+ description?: string;
8733
+ /**
8734
+ * Git ref this attachment is anchored at (branch, tag, or commit). When absent the default branch is implied.
8735
+ */
8736
+ ref?: string;
8737
+ }
8738
+ /**
8739
+ * Pointer to a single-file diff. At least one of `head` and `base` must be present.
8740
+ *
8741
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8742
+ * via the `definition` "PushAttachmentGitHubFileDiff".
8743
+ */
8744
+ /** @experimental */
8745
+ export interface PushAttachmentGitHubFileDiff {
8746
+ /**
8747
+ * Attachment type discriminator
8748
+ */
8749
+ type: "github_file_diff";
8750
+ /**
8751
+ * URL to the diff on GitHub (e.g., a commit, compare, or PR-file URL)
8752
+ */
8753
+ url: string;
8754
+ head?: PushAttachmentGitHubFileDiffSide;
8755
+ base?: PushAttachmentGitHubFileDiffSide;
8756
+ }
8757
+ /**
8758
+ * One side of a file diff (head or base)
8759
+ *
8760
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8761
+ * via the `definition` "PushAttachmentGitHubFileDiffSide".
8762
+ */
8763
+ /** @experimental */
8764
+ export interface PushAttachmentGitHubFileDiffSide {
8765
+ repo: PushGitHubRepoRef;
8766
+ /**
8767
+ * Git ref (branch, tag, or commit SHA) the file is read at
8768
+ */
8769
+ ref: string;
8770
+ /**
8771
+ * Repository-relative path to the file
8772
+ */
8773
+ path: string;
8774
+ }
8775
+ /**
8776
+ * Pointer to a comparison between two git revisions.
8777
+ *
8778
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8779
+ * via the `definition` "PushAttachmentGitHubTreeComparison".
8780
+ */
8781
+ /** @experimental */
8782
+ export interface PushAttachmentGitHubTreeComparison {
8783
+ /**
8784
+ * Attachment type discriminator
8785
+ */
8786
+ type: "github_tree_comparison";
8787
+ /**
8788
+ * URL to the comparison on GitHub
8789
+ */
8790
+ url: string;
8791
+ base: PushAttachmentGitHubTreeComparisonSide;
8792
+ head: PushAttachmentGitHubTreeComparisonSide;
8793
+ }
8794
+ /**
8795
+ * One side of a tree comparison (head or base)
8796
+ *
8797
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8798
+ * via the `definition` "PushAttachmentGitHubTreeComparisonSide".
8799
+ */
8800
+ /** @experimental */
8801
+ export interface PushAttachmentGitHubTreeComparisonSide {
8802
+ repo: PushGitHubRepoRef;
8803
+ /**
8804
+ * Git revision (branch, tag, or commit SHA)
8805
+ */
8806
+ revision: string;
8807
+ }
8808
+ /**
8809
+ * Generic GitHub URL reference.
8810
+ *
8811
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8812
+ * via the `definition` "PushAttachmentGitHubUrl".
8813
+ */
8814
+ /** @experimental */
8815
+ export interface PushAttachmentGitHubUrl {
8816
+ /**
8817
+ * Attachment type discriminator
8818
+ */
8819
+ type: "github_url";
8820
+ /**
8821
+ * URL to the GitHub resource
8822
+ */
8823
+ url: string;
8824
+ }
8825
+ /**
8826
+ * Pointer to a file in a GitHub repository at a specific ref.
8827
+ *
8828
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8829
+ * via the `definition` "PushAttachmentGitHubFile".
8830
+ */
8831
+ /** @experimental */
8832
+ export interface PushAttachmentGitHubFile {
8833
+ /**
8834
+ * Attachment type discriminator
8835
+ */
8836
+ type: "github_file";
8837
+ repo: PushGitHubRepoRef;
8838
+ /**
8839
+ * Git ref the file is read at (branch, tag, or commit SHA)
8840
+ */
8841
+ ref: string;
8842
+ /**
8843
+ * Repository-relative path to the file
8844
+ */
8845
+ path: string;
8846
+ /**
8847
+ * URL to the file on GitHub
8848
+ */
8849
+ url: string;
8850
+ }
8851
+ /**
8852
+ * Pointer to a line range inside a file in a GitHub repository.
8853
+ *
8854
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8855
+ * via the `definition` "PushAttachmentGitHubSnippet".
8856
+ */
8857
+ /** @experimental */
8858
+ export interface PushAttachmentGitHubSnippet {
8859
+ /**
8860
+ * Attachment type discriminator
8861
+ */
8862
+ type: "github_snippet";
8863
+ repo: PushGitHubRepoRef;
8864
+ /**
8865
+ * Git ref the file is read at (branch, tag, or commit SHA)
8866
+ */
8867
+ ref: string;
8868
+ /**
8869
+ * Repository-relative path to the file
8870
+ */
8871
+ path: string;
8872
+ /**
8873
+ * URL to the snippet on GitHub (with line anchor)
8874
+ */
8875
+ url: string;
8876
+ lineRange: PushAttachmentFileLineRange;
8877
+ }
8544
8878
  /**
8545
8879
  * Blob attachment with inline base64-encoded data
8546
8880
  *
@@ -10195,6 +10529,10 @@ export interface SessionOpenOptions {
10195
10529
  */
10196
10530
  logInteractiveShells?: boolean;
10197
10531
  envValueMode?: SessionOpenOptionsEnvValueMode;
10532
+ /**
10533
+ * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
10534
+ */
10535
+ allowAllMcpServerInstructions?: boolean;
10198
10536
  /**
10199
10537
  * Additional directories to search for skills.
10200
10538
  */
@@ -10262,6 +10600,7 @@ export interface SessionOpenOptions {
10262
10600
  */
10263
10601
  maxInlineBinaryBytes?: number;
10264
10602
  modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
10603
+ responseBudget?: ResponseBudgetConfig;
10265
10604
  /**
10266
10605
  * Runtime context discriminator for agent filtering.
10267
10606
  */
@@ -10623,6 +10962,10 @@ export interface SessionSetCredentialsResult {
10623
10962
  * Whether the operation succeeded
10624
10963
  */
10625
10964
  success: boolean;
10965
+ /**
10966
+ * Whether the session ended up with a populated `copilotUser` for the installed credentials. `true` when the supplied credential already carried `copilotUser` or it was successfully re-resolved server-side. `false` when the credential is installed without `copilotUser` — either re-resolution failed, or the variant cannot be re-resolved from the credential alone (only the raw-token variants `token`, `env`, and `gh-cli` can). In both `false` cases the token swap still applied, but plan/quota/billing metadata is degraded. Present whenever a credential was supplied; omitted only when no credential was supplied (no-op call).
10967
+ */
10968
+ copilotUserResolved?: boolean;
10626
10969
  }
10627
10970
  /**
10628
10971
  * UUID prefix to resolve to a unique session ID.
@@ -11135,6 +11478,10 @@ export interface SessionUpdateOptionsParams {
11135
11478
  */
11136
11479
  logInteractiveShells?: boolean;
11137
11480
  envValueMode?: OptionsUpdateEnvValueMode;
11481
+ /**
11482
+ * Whether to include instructions from every MCP server in the system prompt instead of only allowlisted servers.
11483
+ */
11484
+ allowAllMcpServerInstructions?: boolean;
11138
11485
  /**
11139
11486
  * Additional directories to search for skills.
11140
11487
  */
@@ -11250,6 +11597,10 @@ export interface SessionUpdateOptionsParams {
11250
11597
  */
11251
11598
  enableSkills?: boolean;
11252
11599
  contextTier?: OptionsUpdateContextTier;
11600
+ /**
11601
+ * Optional response budget limits. Pass null to clear the response budget.
11602
+ */
11603
+ responseBudget?: ResponseBudgetConfig | null;
11253
11604
  }
11254
11605
  /**
11255
11606
  * Indicates whether the session options patch was applied successfully.
@@ -13862,7 +14213,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
13862
14213
  */
13863
14214
  shutdown: (params: ShutdownRequest) => Promise<void>;
13864
14215
  /** @experimental */
13865
- auth: {
14216
+ gitHubAuth: {
13866
14217
  /**
13867
14218
  * Gets authentication status and account metadata for the session.
13868
14219
  *
@@ -14346,6 +14697,17 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
14346
14697
  login: (params: McpOauthLoginRequest) => Promise<McpOauthLoginResult>;
14347
14698
  };
14348
14699
  /** @experimental */
14700
+ headers: {
14701
+ /**
14702
+ * Responds to a pending MCP dynamic headers refresh request. Hosts that subscribe to `mcp.headers_refresh_required` use this to provide short-lived per-server headers or to indicate that no dynamic headers are available for this refresh.
14703
+ *
14704
+ * @param params MCP headers refresh request id and the host response.
14705
+ *
14706
+ * @returns Indicates whether the pending MCP headers refresh response was accepted.
14707
+ */
14708
+ handlePendingHeadersRefreshRequest: (params: McpHeadersHandlePendingHeadersRefreshRequestRequest) => Promise<McpHeadersHandlePendingHeadersRefreshRequestResult>;
14709
+ };
14710
+ /** @experimental */
14349
14711
  apps: {
14350
14712
  /**
14351
14713
  * Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
@@ -14524,7 +14886,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
14524
14886
  *
14525
14887
  * @param params Slash command name and optional raw input string to invoke.
14526
14888
  *
14527
- * @returns Result of invoking the slash command (text output, prompt to send to the agent, or completion).
14889
+ * @returns Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
14528
14890
  */
14529
14891
  invoke: (params: CommandsInvokeRequest) => Promise<SlashCommandInvocationResult>;
14530
14892
  /**
@@ -627,13 +627,13 @@ function createSessionRpc(connection, sessionId) {
627
627
  */
628
628
  shutdown: async (params) => connection.sendRequest("session.shutdown", { sessionId, ...params }),
629
629
  /** @experimental */
630
- auth: {
630
+ gitHubAuth: {
631
631
  /**
632
632
  * Gets authentication status and account metadata for the session.
633
633
  *
634
634
  * @returns Authentication status and account metadata for the session.
635
635
  */
636
- getStatus: async () => connection.sendRequest("session.auth.getStatus", { sessionId }),
636
+ getStatus: async () => connection.sendRequest("session.gitHubAuth.getStatus", { sessionId }),
637
637
  /**
638
638
  * Updates the session's auth credentials used for outbound model and API requests.
639
639
  *
@@ -641,7 +641,7 @@ function createSessionRpc(connection, sessionId) {
641
641
  *
642
642
  * @returns Indicates whether the credential update succeeded.
643
643
  */
644
- setCredentials: async (params) => connection.sendRequest("session.auth.setCredentials", { sessionId, ...params })
644
+ setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params })
645
645
  },
646
646
  /** @experimental */
647
647
  canvas: {
@@ -1111,6 +1111,17 @@ function createSessionRpc(connection, sessionId) {
1111
1111
  login: async (params) => connection.sendRequest("session.mcp.oauth.login", { sessionId, ...params })
1112
1112
  },
1113
1113
  /** @experimental */
1114
+ headers: {
1115
+ /**
1116
+ * Responds to a pending MCP dynamic headers refresh request. Hosts that subscribe to `mcp.headers_refresh_required` use this to provide short-lived per-server headers or to indicate that no dynamic headers are available for this refresh.
1117
+ *
1118
+ * @param params MCP headers refresh request id and the host response.
1119
+ *
1120
+ * @returns Indicates whether the pending MCP headers refresh response was accepted.
1121
+ */
1122
+ handlePendingHeadersRefreshRequest: async (params) => connection.sendRequest("session.mcp.headers.handlePendingHeadersRefreshRequest", { sessionId, ...params })
1123
+ },
1124
+ /** @experimental */
1114
1125
  apps: {
1115
1126
  /**
1116
1127
  * Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
@@ -1289,7 +1300,7 @@ function createSessionRpc(connection, sessionId) {
1289
1300
  *
1290
1301
  * @param params Slash command name and optional raw input string to invoke.
1291
1302
  *
1292
- * @returns Result of invoking the slash command (text output, prompt to send to the agent, or completion).
1303
+ * @returns Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
1293
1304
  */
1294
1305
  invoke: async (params) => connection.sendRequest("session.commands.invoke", { sessionId, ...params }),
1295
1306
  /**