@github/copilot-sdk 1.0.1 → 1.0.2

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.
@@ -4,6 +4,18 @@
4
4
  */
5
5
  import type { MessageConnection } from "vscode-jsonrpc/node.js";
6
6
  import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
7
+ /**
8
+ * Which tier this directory belongs to
9
+ *
10
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11
+ * via the `definition` "AgentDiscoveryPathScope".
12
+ */
13
+ /** @experimental */
14
+ export type AgentDiscoveryPathScope =
15
+ /** The user's personal agent configuration directory. */
16
+ "user"
17
+ /** A project's repository agent directory. */
18
+ | "project";
7
19
  /**
8
20
  * Where the agent definition was loaded from
9
21
  *
@@ -299,7 +311,7 @@ export type EventsCursorStatus =
299
311
  /** The cursor referred to history that is no longer available. */
300
312
  | "expired";
301
313
  /**
302
- * Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
314
+ * Discovery source: project (.github/extensions/), user (~/.copilot/extensions/), plugin (installed plugin), or session (session-state/<id>/extensions/)
303
315
  *
304
316
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
305
317
  * via the `definition` "ExtensionSource".
@@ -309,7 +321,11 @@ export type ExtensionSource =
309
321
  /** Extension discovered from the current project's .github/extensions directory. */
310
322
  "project"
311
323
  /** Extension discovered from the user's ~/.copilot/extensions directory. */
312
- | "user";
324
+ | "user"
325
+ /** Extension contributed by an installed plugin. */
326
+ | "plugin"
327
+ /** Extension discovered from the current session's state directory (loaded only for this session). */
328
+ | "session";
313
329
  /**
314
330
  * Current status: running, disabled, failed, or starting
315
331
  *
@@ -391,6 +407,34 @@ export type FilterMapping = {
391
407
  */
392
408
  /** @experimental */
393
409
  export type InstalledPluginSource = string | InstalledPluginSourceGitHub | InstalledPluginSourceUrl | InstalledPluginSourceLocal;
410
+ /**
411
+ * Which tier this target belongs to
412
+ *
413
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
414
+ * via the `definition` "InstructionDiscoveryPathLocation".
415
+ */
416
+ /** @experimental */
417
+ export type InstructionDiscoveryPathLocation =
418
+ /** Instructions live in user-level configuration. */
419
+ "user"
420
+ /** Instructions live in repository-level configuration. */
421
+ | "repository"
422
+ /** Instructions live under the current working directory. */
423
+ | "working-directory"
424
+ /** Instructions live in plugin-provided configuration. */
425
+ | "plugin";
426
+ /**
427
+ * Whether the target is a single file or a directory of instruction files
428
+ *
429
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
430
+ * via the `definition` "InstructionDiscoveryPathKind".
431
+ */
432
+ /** @experimental */
433
+ export type InstructionDiscoveryPathKind =
434
+ /** The target is a single instruction file. */
435
+ "file"
436
+ /** The target is a directory that holds instruction files. */
437
+ | "directory";
394
438
  /**
395
439
  * Category of instruction source — used for merge logic
396
440
  *
@@ -577,6 +621,17 @@ export type McpServerConfig = McpServerConfigStdio | McpServerConfigHttp;
577
621
  * via the `definition` "McpServerAuthConfig".
578
622
  */
579
623
  export type McpServerAuthConfig = boolean | McpServerAuthConfigRedirectPort;
624
+ /**
625
+ * Controls if tools provided by this server can be loaded on demand via tool search (auto) or always included in the initial tool list (never)
626
+ *
627
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
628
+ * via the `definition` "McpServerConfigDeferTools".
629
+ */
630
+ export type McpServerConfigDeferTools =
631
+ /** Tools may be deferred under certain conditions */
632
+ "auto"
633
+ /** Tools are always included in the initial tool list, even when tool search is enabled. */
634
+ | "never";
580
635
  /**
581
636
  * Remote transport type. Defaults to "http" when omitted.
582
637
  *
@@ -753,6 +808,32 @@ export type ModelPickerPriceCategory =
753
808
  | "high"
754
809
  /** Highest relative token cost tier. */
755
810
  | "very_high";
811
+ /**
812
+ * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.
813
+ *
814
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
815
+ * via the `definition` "ProviderConfigType".
816
+ */
817
+ /** @experimental */
818
+ export type ProviderConfigType =
819
+ /** Generic OpenAI-compatible API. */
820
+ "openai"
821
+ /** Azure OpenAI Service endpoint. */
822
+ | "azure"
823
+ /** Anthropic API endpoint. */
824
+ | "anthropic";
825
+ /**
826
+ * Wire API format (openai/azure only). Defaults to "completions".
827
+ *
828
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
829
+ * via the `definition` "ProviderConfigWireApi".
830
+ */
831
+ /** @experimental */
832
+ export type ProviderConfigWireApi =
833
+ /** OpenAI Chat Completions wire format. */
834
+ "completions"
835
+ /** OpenAI Responses API wire format. */
836
+ | "responses";
756
837
  /**
757
838
  * Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration.
758
839
  *
@@ -916,30 +997,30 @@ export type PermissionsSetApproveAllSource =
916
997
  /** Allow-all was enabled through an RPC caller. */
917
998
  | "rpc";
918
999
  /**
919
- * Provider type. Defaults to "openai" for generic OpenAI-compatible APIs.
1000
+ * Provider family. Matches the `type` field of a BYOK provider config.
920
1001
  *
921
1002
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
922
- * via the `definition` "ProviderConfigType".
1003
+ * via the `definition` "ProviderEndpointType".
923
1004
  */
924
1005
  /** @experimental */
925
- export type ProviderConfigType =
926
- /** Generic OpenAI-compatible API. */
1006
+ export type ProviderEndpointType =
1007
+ /** OpenAI-compatible endpoint (use the OpenAI client library). */
927
1008
  "openai"
928
- /** Azure OpenAI Service endpoint. */
1009
+ /** Azure OpenAI endpoint (use the OpenAI client library with the Azure base URL). */
929
1010
  | "azure"
930
- /** Anthropic API endpoint. */
1011
+ /** Anthropic endpoint (use the Anthropic client library). */
931
1012
  | "anthropic";
932
1013
  /**
933
- * Wire API format (openai/azure only). Defaults to "completions".
1014
+ * Wire API to be used, when required for the provider type.
934
1015
  *
935
1016
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
936
- * via the `definition` "ProviderConfigWireApi".
1017
+ * via the `definition` "ProviderEndpointWireApi".
937
1018
  */
938
1019
  /** @experimental */
939
- export type ProviderConfigWireApi =
940
- /** OpenAI Chat Completions wire format. */
1020
+ export type ProviderEndpointWireApi =
1021
+ /** Classic chat-completions request shape. */
941
1022
  "completions"
942
- /** OpenAI Responses API wire format. */
1023
+ /** Newer responses request shape. */
943
1024
  | "responses";
944
1025
  /**
945
1026
  * Schema for the `PushAttachment` type.
@@ -1326,6 +1407,22 @@ export type ShellKillSignal =
1326
1407
  | "SIGKILL"
1327
1408
  /** Send an interrupt signal to the process. */
1328
1409
  | "SIGINT";
1410
+ /**
1411
+ * Which tier this directory belongs to
1412
+ *
1413
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1414
+ * via the `definition` "SkillDiscoveryScope".
1415
+ */
1416
+ /** @experimental */
1417
+ export type SkillDiscoveryScope =
1418
+ /** A project's repository skill directory. */
1419
+ "project"
1420
+ /** The user's personal Copilot skill directory. */
1421
+ | "personal-copilot"
1422
+ /** The user's personal agents skill directory. */
1423
+ | "personal-agents"
1424
+ /** A configured custom skill directory. */
1425
+ | "custom";
1329
1426
  /**
1330
1427
  * Result of invoking the slash command (text output, prompt to send to the agent, or completion).
1331
1428
  *
@@ -1334,6 +1431,39 @@ export type ShellKillSignal =
1334
1431
  */
1335
1432
  /** @experimental */
1336
1433
  export type SlashCommandInvocationResult = SlashCommandTextResult | SlashCommandAgentPromptResult | SlashCommandCompletedResult | SlashCommandSelectSubcommandResult;
1434
+ /**
1435
+ * Subagent settings to apply, or null to clear the live session override
1436
+ *
1437
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1438
+ * via the `definition` "SubagentSettings".
1439
+ */
1440
+ /** @experimental */
1441
+ export type SubagentSettings = {
1442
+ /**
1443
+ * Per-agent settings keyed by subagent agent_type
1444
+ */
1445
+ agents?: {
1446
+ [k: string]: SubagentSettingsEntry | undefined;
1447
+ };
1448
+ /**
1449
+ * Names of subagents the user has turned off; they cannot be dispatched
1450
+ */
1451
+ disabledSubagents?: string[];
1452
+ } | null;
1453
+ /**
1454
+ * Context tier override for matching subagents
1455
+ *
1456
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1457
+ * via the `definition` "SubagentSettingsEntryContextTier".
1458
+ */
1459
+ /** @experimental */
1460
+ export type SubagentSettingsEntryContextTier =
1461
+ /** Inherit the parent session's effective context tier at dispatch time. */
1462
+ "inherit"
1463
+ /** Use the model's default context window. */
1464
+ | "default"
1465
+ /** Pin the subagent to the long-context tier when supported. */
1466
+ | "long_context";
1337
1467
  /**
1338
1468
  * Current lifecycle status of the task
1339
1469
  *
@@ -1607,6 +1737,41 @@ export interface AccountQuotaSnapshot {
1607
1737
  */
1608
1738
  resetDate?: string;
1609
1739
  }
1740
+ /**
1741
+ * Schema for the `AgentDiscoveryPath` type.
1742
+ *
1743
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1744
+ * via the `definition` "AgentDiscoveryPath".
1745
+ */
1746
+ /** @experimental */
1747
+ export interface AgentDiscoveryPath {
1748
+ /**
1749
+ * Absolute path of the search/create directory (may not exist on disk yet)
1750
+ */
1751
+ path: string;
1752
+ scope: AgentDiscoveryPathScope;
1753
+ /**
1754
+ * Whether this is the canonical directory to create a new agent in its tier. At most one entry per tier is preferred.
1755
+ */
1756
+ preferredForCreation: boolean;
1757
+ /**
1758
+ * The input project path this directory was derived from (only for project scope)
1759
+ */
1760
+ projectPath?: string;
1761
+ }
1762
+ /**
1763
+ * Canonical locations where custom agents can be created so the runtime will recognize them.
1764
+ *
1765
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1766
+ * via the `definition` "AgentDiscoveryPathList".
1767
+ */
1768
+ /** @experimental */
1769
+ export interface AgentDiscoveryPathList {
1770
+ /**
1771
+ * Canonical agent create/discovery directories, in priority order
1772
+ */
1773
+ paths: AgentDiscoveryPath[];
1774
+ }
1610
1775
  /**
1611
1776
  * The currently selected custom agent, or null when using the default agent.
1612
1777
  *
@@ -1911,7 +2076,7 @@ export interface AgentsDiscoverRequest {
1911
2076
  */
1912
2077
  projectPaths?: string[];
1913
2078
  /**
1914
- * When true, omit the host's agents (the `<COPILOT_HOME>/agents` directory and all plugin agents), leaving only project and remote agents. For multitenant deployments.
2079
+ * When true, omit the host's agents (the user-level agent directory and all plugin agents), leaving only project and remote agents. For multitenant deployments.
1915
2080
  */
1916
2081
  excludeHostAgents?: boolean;
1917
2082
  }
@@ -1938,6 +2103,23 @@ export interface AgentSelectRequest {
1938
2103
  export interface AgentSelectResult {
1939
2104
  agent: AgentInfo;
1940
2105
  }
2106
+ /**
2107
+ * Optional project paths to include when enumerating agent discovery directories.
2108
+ *
2109
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2110
+ * via the `definition` "AgentsGetDiscoveryPathsRequest".
2111
+ */
2112
+ /** @experimental */
2113
+ export interface AgentsGetDiscoveryPathsRequest {
2114
+ /**
2115
+ * Optional list of project directory paths. When omitted or empty, only the user-level directory is returned.
2116
+ */
2117
+ projectPaths?: string[];
2118
+ /**
2119
+ * When true, omit the host's user-level agent directory, leaving only project directories. For multitenant deployments (mirrors `discover`'s `excludeHostAgents`).
2120
+ */
2121
+ excludeHostAgents?: boolean;
2122
+ }
1941
2123
  /**
1942
2124
  * Indicates whether the operation succeeded and reports the post-mutation state.
1943
2125
  *
@@ -2027,7 +2209,9 @@ export interface CopilotUserResponse {
2027
2209
  quota_reset_date?: string;
2028
2210
  quota_snapshots?: CopilotUserResponseQuotaSnapshots;
2029
2211
  restricted_telemetry?: boolean;
2212
+ is_staff?: boolean;
2030
2213
  token_based_billing?: boolean;
2214
+ can_upgrade_plan?: boolean;
2031
2215
  quota_reset_date_utc?: string;
2032
2216
  limited_user_quotas?: {
2033
2217
  [k: string]: number | undefined;
@@ -2700,6 +2884,10 @@ export interface SlashCommandInfo {
2700
2884
  * Whether the command is experimental
2701
2885
  */
2702
2886
  experimental?: boolean;
2887
+ /**
2888
+ * Whether the command may be the target of `/every` / `/after` schedules. Resolution happens at every tick, so only set this when the command is safe to re-invoke and produces an agent prompt.
2889
+ */
2890
+ schedulable?: boolean;
2703
2891
  }
2704
2892
  /**
2705
2893
  * Optional unstructured input hint
@@ -2999,6 +3187,14 @@ export interface DiscoveredMcpServer {
2999
3187
  name: string;
3000
3188
  type?: DiscoveredMcpServerType;
3001
3189
  source: McpServerSource;
3190
+ /**
3191
+ * Plugin name that provided this server, when source is plugin.
3192
+ */
3193
+ sourcePlugin?: string;
3194
+ /**
3195
+ * Plugin version that provided this server, when source is plugin.
3196
+ */
3197
+ sourcePluginVersion?: string;
3002
3198
  /**
3003
3199
  * Whether the server is enabled (not in the disabled list)
3004
3200
  */
@@ -3140,7 +3336,7 @@ export interface ExecuteCommandResult {
3140
3336
  /** @experimental */
3141
3337
  export interface Extension {
3142
3338
  /**
3143
- * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
3339
+ * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper', 'plugin:my-plugin:my-ext')
3144
3340
  */
3145
3341
  id: string;
3146
3342
  /**
@@ -3783,6 +3979,42 @@ export interface InstalledPluginInfo {
3783
3979
  */
3784
3980
  enabled: boolean;
3785
3981
  }
3982
+ /**
3983
+ * Schema for the `InstructionDiscoveryPath` type.
3984
+ *
3985
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3986
+ * via the `definition` "InstructionDiscoveryPath".
3987
+ */
3988
+ /** @experimental */
3989
+ export interface InstructionDiscoveryPath {
3990
+ /**
3991
+ * Absolute path of the file or directory (may not exist on disk yet)
3992
+ */
3993
+ path: string;
3994
+ location: InstructionDiscoveryPathLocation;
3995
+ kind: InstructionDiscoveryPathKind;
3996
+ /**
3997
+ * Whether this is the canonical target to create new instructions in its tier. At most one entry per tier is preferred.
3998
+ */
3999
+ preferredForCreation: boolean;
4000
+ /**
4001
+ * The input project path this target was derived from (only for repository targets)
4002
+ */
4003
+ projectPath?: string;
4004
+ }
4005
+ /**
4006
+ * Canonical files and directories where custom instructions can be created so the runtime will recognize them.
4007
+ *
4008
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4009
+ * via the `definition` "InstructionDiscoveryPathList".
4010
+ */
4011
+ /** @experimental */
4012
+ export interface InstructionDiscoveryPathList {
4013
+ /**
4014
+ * Canonical instruction create/discovery files and directories, in priority order
4015
+ */
4016
+ paths: InstructionDiscoveryPath[];
4017
+ }
3786
4018
  /**
3787
4019
  * Optional project paths to include in instruction discovery.
3788
4020
  *
@@ -3800,6 +4032,23 @@ export interface InstructionsDiscoverRequest {
3800
4032
  */
3801
4033
  excludeHostInstructions?: boolean;
3802
4034
  }
4035
+ /**
4036
+ * Optional project paths to include when enumerating instruction discovery targets.
4037
+ *
4038
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4039
+ * via the `definition` "InstructionsGetDiscoveryPathsRequest".
4040
+ */
4041
+ /** @experimental */
4042
+ export interface InstructionsGetDiscoveryPathsRequest {
4043
+ /**
4044
+ * Optional list of project directory paths. When omitted or empty, only the user-level targets are returned.
4045
+ */
4046
+ projectPaths?: string[];
4047
+ /**
4048
+ * When true, omit the host's user-level instruction targets, leaving only repository targets. For multitenant deployments (mirrors `discover`'s `excludeHostInstructions`).
4049
+ */
4050
+ excludeHostInstructions?: boolean;
4051
+ }
3803
4052
  /**
3804
4053
  * Instruction sources loaded for the session, in merge order.
3805
4054
  *
@@ -4466,6 +4715,7 @@ export interface McpServerConfigStdio {
4466
4715
  timeout?: number;
4467
4716
  oidc?: McpServerAuthConfig;
4468
4717
  auth?: McpServerAuthConfig;
4718
+ deferTools?: McpServerConfigDeferTools;
4469
4719
  /**
4470
4720
  * Executable command used to start the Stdio MCP server process.
4471
4721
  */
@@ -4521,6 +4771,7 @@ export interface McpServerConfigHttp {
4521
4771
  timeout?: number;
4522
4772
  oidc?: McpServerAuthConfig;
4523
4773
  auth?: McpServerAuthConfig;
4774
+ deferTools?: McpServerConfigDeferTools;
4524
4775
  /**
4525
4776
  * URL of the remote MCP server endpoint.
4526
4777
  */
@@ -4963,6 +5214,14 @@ export interface McpServer {
4963
5214
  name: string;
4964
5215
  status: McpServerStatus;
4965
5216
  source?: McpServerSource;
5217
+ /**
5218
+ * Plugin name that provided this server, when source is plugin.
5219
+ */
5220
+ sourcePlugin?: string;
5221
+ /**
5222
+ * Plugin version that provided this server, when source is plugin.
5223
+ */
5224
+ sourcePluginVersion?: string;
4966
5225
  /**
4967
5226
  * Error message if the server failed to connect
4968
5227
  */
@@ -5032,6 +5291,19 @@ export interface McpStopServerRequest {
5032
5291
  */
5033
5292
  serverName: string;
5034
5293
  }
5294
+ /**
5295
+ * Memory configuration for this session.
5296
+ *
5297
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5298
+ * via the `definition` "MemoryConfiguration".
5299
+ */
5300
+ /** @experimental */
5301
+ export interface MemoryConfiguration {
5302
+ /**
5303
+ * Whether memory is enabled for the session.
5304
+ */
5305
+ enabled: boolean;
5306
+ }
5035
5307
  /**
5036
5308
  * Model identifier and token limits used to compute the context-info breakdown.
5037
5309
  *
@@ -5412,7 +5684,7 @@ export interface ModelBillingTokenPricesLongContext {
5412
5684
  contextMax?: number;
5413
5685
  }
5414
5686
  /**
5415
- * Initial model capability overrides.
5687
+ * Optional capability overrides (vision, tool_calls, reasoning, etc.).
5416
5688
  *
5417
5689
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5418
5690
  * via the `definition` "ModelCapabilitiesOverride".
@@ -5548,7 +5820,7 @@ export interface ModelsListRequest {
5548
5820
  /** @experimental */
5549
5821
  export interface ModelSwitchToRequest {
5550
5822
  /**
5551
- * Model identifier to switch to
5823
+ * Model selection id to switch to, as returned by `list`. A bare id (e.g. `claude-sonnet-4.6`) names a Copilot (CAPI) model; a provider-qualified id (`provider/id`, e.g. `acme/claude-sonnet`) targets a registry BYOK model.
5552
5824
  */
5553
5825
  modelId: string;
5554
5826
  /**
@@ -5582,6 +5854,53 @@ export interface ModelSwitchToResult {
5582
5854
  export interface ModeSetRequest {
5583
5855
  mode: SessionMode;
5584
5856
  }
5857
+ /**
5858
+ * A named BYOK provider connection (transport + credentials).
5859
+ *
5860
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5861
+ * via the `definition` "NamedProviderConfig".
5862
+ */
5863
+ /** @experimental */
5864
+ export interface NamedProviderConfig {
5865
+ /**
5866
+ * Stable identifier referenced by BYOK model definitions. Must not contain '/'.
5867
+ */
5868
+ name: string;
5869
+ type?: ProviderConfigType;
5870
+ wireApi?: ProviderConfigWireApi;
5871
+ /**
5872
+ * API endpoint URL.
5873
+ */
5874
+ baseUrl: string;
5875
+ /**
5876
+ * API key. Optional for local providers like Ollama.
5877
+ */
5878
+ apiKey?: string;
5879
+ /**
5880
+ * Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set.
5881
+ */
5882
+ bearerToken?: string;
5883
+ azure?: ProviderConfigAzure;
5884
+ /**
5885
+ * Custom HTTP headers to include in all outbound requests to the provider.
5886
+ */
5887
+ headers?: {
5888
+ [k: string]: string | undefined;
5889
+ };
5890
+ }
5891
+ /**
5892
+ * Azure-specific provider options.
5893
+ *
5894
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5895
+ * via the `definition` "ProviderConfigAzure".
5896
+ */
5897
+ /** @experimental */
5898
+ export interface ProviderConfigAzure {
5899
+ /**
5900
+ * API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route.
5901
+ */
5902
+ apiVersion?: string;
5903
+ }
5585
5904
  /**
5586
5905
  * The session's friendly name, or null when not yet set.
5587
5906
  *
@@ -7043,7 +7362,7 @@ export interface PlanReadSqlTodosResult {
7043
7362
  rows: PlanSqlTodosRow[];
7044
7363
  }
7045
7364
  /**
7046
- * Schema for the `PlanSqlTodosRow` type.
7365
+ * A single todo row read from the session SQL `todos` table. All fields are optional because the SQL schema is best-effort and the agent may not have populated every column.
7047
7366
  *
7048
7367
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7049
7368
  * via the `definition` "PlanSqlTodosRow".
@@ -7067,6 +7386,40 @@ export interface PlanSqlTodosRow {
7067
7386
  */
7068
7387
  status?: string;
7069
7388
  }
7389
+ /**
7390
+ * Todo rows + dependency edges read from the session SQL database.
7391
+ *
7392
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7393
+ * via the `definition` "PlanReadSqlTodosWithDependenciesResult".
7394
+ */
7395
+ /** @experimental */
7396
+ export interface PlanReadSqlTodosWithDependenciesResult {
7397
+ /**
7398
+ * Rows from the session SQL todos table, ordered by creation time and id. Empty when no database, no todos table, or the SELECT failed.
7399
+ */
7400
+ rows: PlanSqlTodosRow[];
7401
+ /**
7402
+ * Edges from the session SQL todo_deps table. Empty when no database, no todo_deps table, or the SELECT failed. Read independently from `rows`, so a broken todo_deps table does not affect the rows result and vice versa.
7403
+ */
7404
+ dependencies: PlanSqlTodoDependency[];
7405
+ }
7406
+ /**
7407
+ * A single dependency edge read from the session SQL `todo_deps` table, indicating that one todo must complete before another.
7408
+ *
7409
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7410
+ * via the `definition` "PlanSqlTodoDependency".
7411
+ */
7412
+ /** @experimental */
7413
+ export interface PlanSqlTodoDependency {
7414
+ /**
7415
+ * ID of the todo that has the dependency.
7416
+ */
7417
+ todoId: string;
7418
+ /**
7419
+ * ID of the todo it depends on.
7420
+ */
7421
+ dependsOn: string;
7422
+ }
7070
7423
  /**
7071
7424
  * Replacement contents to write to the session plan file.
7072
7425
  *
@@ -7449,17 +7802,110 @@ export interface ProviderConfig {
7449
7802
  };
7450
7803
  }
7451
7804
  /**
7452
- * Azure-specific provider options.
7805
+ * A snapshot of the provider endpoint the session is currently configured to talk to.
7453
7806
  *
7454
7807
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7455
- * via the `definition` "ProviderConfigAzure".
7808
+ * via the `definition` "ProviderEndpoint".
7456
7809
  */
7457
7810
  /** @experimental */
7458
- export interface ProviderConfigAzure {
7811
+ export interface ProviderEndpoint {
7812
+ type: ProviderEndpointType;
7813
+ wireApi?: ProviderEndpointWireApi;
7459
7814
  /**
7460
- * API version. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route.
7815
+ * Base URL to pass to the LLM client library.
7461
7816
  */
7462
- apiVersion?: string;
7817
+ baseUrl: string;
7818
+ /**
7819
+ * A credential the caller should use with this endpoint. Omitted only when the endpoint accepts unauthenticated requests.
7820
+ */
7821
+ apiKey?: string;
7822
+ /**
7823
+ * HTTP headers the caller must include on every outbound request.
7824
+ */
7825
+ headers: {
7826
+ [k: string]: string | undefined;
7827
+ };
7828
+ sessionToken?: ProviderSessionToken;
7829
+ }
7830
+ /**
7831
+ * Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one.
7832
+ *
7833
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7834
+ * via the `definition` "ProviderSessionToken".
7835
+ */
7836
+ /** @experimental */
7837
+ export interface ProviderSessionToken {
7838
+ /**
7839
+ * The short-lived token value.
7840
+ */
7841
+ token: string;
7842
+ /**
7843
+ * HTTP header name the token must be sent under.
7844
+ */
7845
+ header: string;
7846
+ /**
7847
+ * The model the token is bound to, when applicable. When set, the token is only valid for requests against this model.
7848
+ */
7849
+ model?: string;
7850
+ /**
7851
+ * When the token expires, if known. Callers should refresh by calling `getEndpoint` again before this time, or reactively on any 401/403 response from `baseUrl`.
7852
+ */
7853
+ expiresAt?: string;
7854
+ }
7855
+ /**
7856
+ * Optional model identifier to scope the endpoint snapshot to.
7857
+ *
7858
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7859
+ * via the `definition` "ProviderGetEndpointRequest".
7860
+ */
7861
+ /** @experimental */
7862
+ export interface ProviderGetEndpointRequest {
7863
+ /**
7864
+ * Model identifier the caller intends to use against the returned endpoint. Used to pick the correct wire shape. Omit to use whichever model the session is currently using.
7865
+ */
7866
+ modelId?: string;
7867
+ }
7868
+ /**
7869
+ * A BYOK model definition referencing a named provider.
7870
+ *
7871
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
7872
+ * via the `definition` "ProviderModelConfig".
7873
+ */
7874
+ /** @experimental */
7875
+ export interface ProviderModelConfig {
7876
+ /**
7877
+ * Provider-local model id, unique within its provider. The session-wide selection id (shown in the model list and passed to switchTo) is the provider-qualified `provider/id`.
7878
+ */
7879
+ id: string;
7880
+ /**
7881
+ * Name of the NamedProviderConfig that serves this model.
7882
+ */
7883
+ provider: string;
7884
+ /**
7885
+ * The model name sent to the provider API for inference. Defaults to `id`.
7886
+ */
7887
+ wireModel?: string;
7888
+ /**
7889
+ * Well-known base model id used for behavior/capability/config lookup. Defaults to `id`.
7890
+ */
7891
+ modelId?: string;
7892
+ /**
7893
+ * Display name for model pickers. Defaults to the provider-qualified selection id (`provider/id`).
7894
+ */
7895
+ name?: string;
7896
+ /**
7897
+ * Maximum prompt/input tokens for the model.
7898
+ */
7899
+ maxPromptTokens?: number;
7900
+ /**
7901
+ * Maximum context window tokens for the model.
7902
+ */
7903
+ maxContextWindowTokens?: number;
7904
+ /**
7905
+ * Maximum output tokens for the model.
7906
+ */
7907
+ maxOutputTokens?: number;
7908
+ capabilities?: ModelCapabilitiesOverride;
7463
7909
  }
7464
7910
  /**
7465
7911
  * File attachment
@@ -9133,7 +9579,7 @@ export interface SessionMetadataSnapshot {
9133
9579
  /** @experimental */
9134
9580
  export interface SessionModelList {
9135
9581
  /**
9136
- * Available models, ordered with the most preferred default first.
9582
+ * Available models, ordered with the most preferred default first. Includes both Copilot (CAPI) models and any registry BYOK models; a BYOK model appears under its provider-qualified selection id (`provider/id`).
9137
9583
  */
9138
9584
  list: unknown[];
9139
9585
  /**
@@ -9196,6 +9642,18 @@ export interface SessionOpenOptions {
9196
9642
  isExperimentalMode?: boolean;
9197
9643
  authInfo?: AuthInfo;
9198
9644
  provider?: ProviderConfig;
9645
+ /**
9646
+ * Named BYOK provider connections, additive to CAPI auth. Combining with `provider` is rejected.
9647
+ *
9648
+ * @experimental
9649
+ */
9650
+ providers?: NamedProviderConfig[];
9651
+ /**
9652
+ * BYOK model definitions added to the selectable model list, each referencing a provider name.
9653
+ *
9654
+ * @experimental
9655
+ */
9656
+ models?: ProviderModelConfig[];
9199
9657
  /**
9200
9658
  * Working directory to anchor the session.
9201
9659
  */
@@ -9303,6 +9761,10 @@ export interface SessionOpenOptions {
9303
9761
  * Whether on-demand custom instruction discovery is enabled.
9304
9762
  */
9305
9763
  enableOnDemandInstructionDiscovery?: boolean;
9764
+ /**
9765
+ * Maximum decoded byte size of a single inline model-facing binary tool result persisted in session events (default 10 MB).
9766
+ */
9767
+ maxInlineBinaryBytes?: number;
9306
9768
  modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
9307
9769
  /**
9308
9770
  * Runtime context discriminator for agent filtering.
@@ -9322,6 +9784,7 @@ export interface SessionOpenOptions {
9322
9784
  * @experimental
9323
9785
  */
9324
9786
  additionalContentExclusionPolicies?: SessionOpenOptionsAdditionalContentExclusionPolicy[];
9787
+ memory?: MemoryConfiguration;
9325
9788
  /**
9326
9789
  * Capabilities enabled for this session.
9327
9790
  */
@@ -10189,6 +10652,10 @@ export interface SessionUpdateOptionsParams {
10189
10652
  * Whether to discover custom instructions on demand after successful file views (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing). Combined with `skipCustomInstructions` and the runtime-side `ON_DEMAND_INSTRUCTIONS` feature flag.
10190
10653
  */
10191
10654
  enableOnDemandInstructionDiscovery?: boolean;
10655
+ /**
10656
+ * 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.
10657
+ */
10658
+ maxInlineBinaryBytes?: number;
10192
10659
  /**
10193
10660
  * Full set of installed plugins for the session. Replaces the existing list; the runtime invalidates the skills cache only when the list materially changes.
10194
10661
  */
@@ -10441,6 +10908,41 @@ export interface Skill {
10441
10908
  */
10442
10909
  pluginName?: string;
10443
10910
  }
10911
+ /**
10912
+ * Schema for the `SkillDiscoveryPath` type.
10913
+ *
10914
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10915
+ * via the `definition` "SkillDiscoveryPath".
10916
+ */
10917
+ /** @experimental */
10918
+ export interface SkillDiscoveryPath {
10919
+ /**
10920
+ * Absolute path of the create/discovery target (may not exist on disk yet)
10921
+ */
10922
+ path: string;
10923
+ scope: SkillDiscoveryScope;
10924
+ /**
10925
+ * Whether this is the canonical directory to create a new skill in its tier. At most one entry per tier is preferred; the `personal-agents` and `custom` scopes are never preferred.
10926
+ */
10927
+ preferredForCreation: boolean;
10928
+ /**
10929
+ * The input project path this directory was derived from (only for project scope)
10930
+ */
10931
+ projectPath?: string;
10932
+ }
10933
+ /**
10934
+ * Canonical locations where skills can be created so the runtime will recognize them.
10935
+ *
10936
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
10937
+ * via the `definition` "SkillDiscoveryPathList".
10938
+ */
10939
+ /** @experimental */
10940
+ export interface SkillDiscoveryPathList {
10941
+ /**
10942
+ * Canonical skill create/discovery directories, in priority order
10943
+ */
10944
+ paths: SkillDiscoveryPath[];
10945
+ }
10444
10946
  /**
10445
10947
  * Skills available to the session, with their enabled state.
10446
10948
  *
@@ -10494,6 +10996,10 @@ export interface SkillsDiscoverRequest {
10494
10996
  * Optional list of additional skill directory paths to include
10495
10997
  */
10496
10998
  skillDirectories?: string[];
10999
+ /**
11000
+ * When true, omit skills from the host's global sources (personal, custom, plugin, and built-in), returning only project-scoped skills. For multitenant deployments.
11001
+ */
11002
+ excludeHostSkills?: boolean;
10497
11003
  }
10498
11004
  /**
10499
11005
  * Name of the skill to enable for the session.
@@ -10508,6 +11014,23 @@ export interface SkillsEnableRequest {
10508
11014
  */
10509
11015
  name: string;
10510
11016
  }
11017
+ /**
11018
+ * Optional project paths to enumerate.
11019
+ *
11020
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11021
+ * via the `definition` "SkillsGetDiscoveryPathsRequest".
11022
+ */
11023
+ /** @experimental */
11024
+ export interface SkillsGetDiscoveryPathsRequest {
11025
+ /**
11026
+ * Optional list of project directory paths. When omitted or empty, only personal and custom directories are returned.
11027
+ */
11028
+ projectPaths?: string[];
11029
+ /**
11030
+ * When true, omit the host's personal and custom skill directories, leaving only project directories. For multitenant deployments.
11031
+ */
11032
+ excludeHostSkills?: boolean;
11033
+ }
10511
11034
  /**
10512
11035
  * Skills invoked during this session, ordered by invocation time (most recent last).
10513
11036
  *
@@ -10693,6 +11216,24 @@ export interface SlashCommandSelectSubcommandOption {
10693
11216
  */
10694
11217
  group?: string;
10695
11218
  }
11219
+ /**
11220
+ * Subagent model, reasoning effort, and context tier settings
11221
+ *
11222
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11223
+ * via the `definition` "SubagentSettingsEntry".
11224
+ */
11225
+ /** @experimental */
11226
+ export interface SubagentSettingsEntry {
11227
+ /**
11228
+ * Model override for matching subagents
11229
+ */
11230
+ model?: string;
11231
+ /**
11232
+ * Reasoning effort override for matching subagents
11233
+ */
11234
+ effortLevel?: string;
11235
+ contextTier?: SubagentSettingsEntryContextTier;
11236
+ }
10696
11237
  /**
10697
11238
  * Schema for the `TaskAgentInfo` type.
10698
11239
  *
@@ -11205,6 +11746,15 @@ export interface ToolsListRequest {
11205
11746
  */
11206
11747
  model?: string;
11207
11748
  }
11749
+ /**
11750
+ * Empty result after applying subagent settings
11751
+ *
11752
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
11753
+ * via the `definition` "ToolsUpdateSubagentSettingsResult".
11754
+ */
11755
+ /** @experimental */
11756
+ export interface ToolsUpdateSubagentSettingsResult {
11757
+ }
11208
11758
  /**
11209
11759
  * Multi-select string field where each option pairs a value with a display label.
11210
11760
  *
@@ -11756,6 +12306,19 @@ export interface UIUnregisterDirectAutoModeSwitchHandlerResult {
11756
12306
  */
11757
12307
  unregistered: boolean;
11758
12308
  }
12309
+ /**
12310
+ * Subagent settings to apply to the current session
12311
+ *
12312
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
12313
+ * via the `definition` "UpdateSubagentSettingsRequest".
12314
+ */
12315
+ /** @experimental */
12316
+ export interface UpdateSubagentSettingsRequest {
12317
+ /**
12318
+ * Subagent settings to apply, or null to clear the live session override
12319
+ */
12320
+ subagents?: SubagentSettings | null;
12321
+ }
11759
12322
  /**
11760
12323
  * Accumulated session usage metrics, including premium request cost, token counts, model breakdown, and code-change totals.
11761
12324
  *
@@ -12053,6 +12616,10 @@ export interface WorkspacesCreateFileRequest {
12053
12616
  /** @experimental */
12054
12617
  export interface WorkspacesDiffRequest {
12055
12618
  mode: WorkspaceDiffMode;
12619
+ /**
12620
+ * When true, ignore whitespace-only changes (git `--ignore-all-space`). Defaults to false.
12621
+ */
12622
+ ignoreWhitespace?: boolean;
12056
12623
  }
12057
12624
  /**
12058
12625
  * Current workspace metadata for the session, including its absolute filesystem path when available.
@@ -12438,6 +13005,16 @@ export declare function createServerRpc(connection: MessageConnection): {
12438
13005
  * @returns Skills discovered across global and project sources.
12439
13006
  */
12440
13007
  discover: (params: SkillsDiscoverRequest) => Promise<ServerSkillList>;
13008
+ /**
13009
+ * Returns the canonical directories where a client may create skills that the runtime will recognize, including ones that do not exist yet. Project directories become active once created.
13010
+ *
13011
+ * @param params Optional project paths to enumerate.
13012
+ *
13013
+ * @returns Canonical locations where skills can be created so the runtime will recognize them.
13014
+ *
13015
+ * @experimental
13016
+ */
13017
+ getDiscoveryPaths: (params: SkillsGetDiscoveryPathsRequest) => Promise<SkillDiscoveryPathList>;
12441
13018
  };
12442
13019
  /** @experimental */
12443
13020
  agents: {
@@ -12449,6 +13026,14 @@ export declare function createServerRpc(connection: MessageConnection): {
12449
13026
  * @returns Agents discovered across user, project, plugin, and remote sources.
12450
13027
  */
12451
13028
  discover: (params: AgentsDiscoverRequest) => Promise<ServerAgentList>;
13029
+ /**
13030
+ * Returns the canonical directories where a client may create custom agents that the runtime will recognize, including ones that do not exist yet. Project directories become active once created.
13031
+ *
13032
+ * @param params Optional project paths to include when enumerating agent discovery directories.
13033
+ *
13034
+ * @returns Canonical locations where custom agents can be created so the runtime will recognize them.
13035
+ */
13036
+ getDiscoveryPaths: (params: AgentsGetDiscoveryPathsRequest) => Promise<AgentDiscoveryPathList>;
12452
13037
  };
12453
13038
  /** @experimental */
12454
13039
  instructions: {
@@ -12460,6 +13045,14 @@ export declare function createServerRpc(connection: MessageConnection): {
12460
13045
  * @returns Instruction sources discovered across user, repository, and plugin sources.
12461
13046
  */
12462
13047
  discover: (params: InstructionsDiscoverRequest) => Promise<ServerInstructionSourceList>;
13048
+ /**
13049
+ * Returns the canonical files and directories where a client may create custom instructions that the runtime will recognize, including ones that do not exist yet. Repository targets become active once created.
13050
+ *
13051
+ * @param params Optional project paths to include when enumerating instruction discovery targets.
13052
+ *
13053
+ * @returns Canonical files and directories where custom instructions can be created so the runtime will recognize them.
13054
+ */
13055
+ getDiscoveryPaths: (params: InstructionsGetDiscoveryPathsRequest) => Promise<InstructionDiscoveryPathList>;
12463
13056
  };
12464
13057
  user: {
12465
13058
  settings: {
@@ -12868,6 +13461,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
12868
13461
  * @returns Todo rows read from the session SQL database. Empty when no session database is available.
12869
13462
  */
12870
13463
  readSqlTodos: () => Promise<PlanReadSqlTodosResult>;
13464
+ /**
13465
+ * Reads todo rows AND dependency edges from the session SQL database for structured progress UI. Same defensive behavior as readSqlTodos — returns empty arrays when the database, tables, or columns aren't available. Clients should call this on session start and after every `session.todos_changed` event to refresh structured-UI rendering.
13466
+ *
13467
+ * @returns Todo rows + dependency edges read from the session SQL database.
13468
+ */
13469
+ readSqlTodosWithDependencies: () => Promise<PlanReadSqlTodosWithDependenciesResult>;
12871
13470
  };
12872
13471
  /** @experimental */
12873
13472
  workspaces: {
@@ -13250,6 +13849,17 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
13250
13849
  reload: (params?: PluginsReloadRequest) => Promise<void>;
13251
13850
  };
13252
13851
  /** @experimental */
13852
+ provider: {
13853
+ /**
13854
+ * Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.
13855
+ *
13856
+ * @param params Optional model identifier to scope the endpoint snapshot to.
13857
+ *
13858
+ * @returns A snapshot of the provider endpoint the session is currently configured to talk to.
13859
+ */
13860
+ getEndpoint: (params?: ProviderGetEndpointRequest) => Promise<ProviderEndpoint>;
13861
+ };
13862
+ /** @experimental */
13253
13863
  options: {
13254
13864
  /**
13255
13865
  * Patches the genuinely-mutable subset of session options.
@@ -13322,6 +13932,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
13322
13932
  * @returns Current lightweight tool metadata snapshot for the session.
13323
13933
  */
13324
13934
  getCurrentMetadata: () => Promise<ToolsGetCurrentMetadataResult>;
13935
+ /**
13936
+ * Updates the current session's live subagent settings after user settings change. The persisted user settings remain the source of truth for future sessions.
13937
+ *
13938
+ * @param params Subagent settings to apply to the current session
13939
+ *
13940
+ * @returns Empty result after applying subagent settings
13941
+ */
13942
+ updateSubagentSettings: (params: UpdateSubagentSettingsRequest) => Promise<ToolsUpdateSubagentSettingsResult>;
13325
13943
  };
13326
13944
  /** @experimental */
13327
13945
  commands: {