@github/copilot-sdk 1.0.0-beta.9 → 1.0.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.
- package/README.md +12 -8
- package/dist/canvas.d.ts +26 -3
- package/dist/cjs/client.js +118 -40
- package/dist/cjs/extension.js +3 -1
- package/dist/cjs/generated/rpc.js +57 -16
- package/dist/cjs/session.js +32 -5
- package/dist/client.js +118 -40
- package/dist/extension.d.ts +1 -1
- package/dist/extension.js +3 -1
- package/dist/generated/rpc.d.ts +513 -297
- package/dist/generated/rpc.js +57 -16
- package/dist/generated/session-events.d.ts +114 -22
- package/dist/index.d.ts +2 -2
- package/dist/session.d.ts +9 -5
- package/dist/session.js +32 -5
- package/dist/types.d.ts +172 -2
- package/docs/examples.md +7 -4
- package/package.json +3 -3
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -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, 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, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
|
|
7
7
|
/**
|
|
8
8
|
* Where the agent definition was loaded from
|
|
9
9
|
*
|
|
@@ -390,7 +390,7 @@ export type FilterMapping = {
|
|
|
390
390
|
* via the `definition` "InstalledPluginSource".
|
|
391
391
|
*/
|
|
392
392
|
/** @experimental */
|
|
393
|
-
export type InstalledPluginSource = string |
|
|
393
|
+
export type InstalledPluginSource = string | InstalledPluginSourceGitHub | InstalledPluginSourceUrl | InstalledPluginSourceLocal;
|
|
394
394
|
/**
|
|
395
395
|
* Category of instruction source — used for merge logic
|
|
396
396
|
*
|
|
@@ -637,6 +637,10 @@ export type SessionContextInfo = {
|
|
|
637
637
|
* Tokens consumed by tool definitions sent to the model (excludes deferred tools)
|
|
638
638
|
*/
|
|
639
639
|
toolDefinitionsTokens: number;
|
|
640
|
+
/**
|
|
641
|
+
* Tokens consumed by MCP tool definitions (subset of toolDefinitionsTokens, excludes deferred tools)
|
|
642
|
+
*/
|
|
643
|
+
mcpToolsTokens: number;
|
|
640
644
|
/**
|
|
641
645
|
* Sum of system, conversation and tool-definition tokens
|
|
642
646
|
*/
|
|
@@ -650,7 +654,7 @@ export type SessionContextInfo = {
|
|
|
650
654
|
*/
|
|
651
655
|
compactionThreshold: number;
|
|
652
656
|
/**
|
|
653
|
-
* Total context limit for /context display
|
|
657
|
+
* Total context limit for /context display: promptTokenLimit + outputTokenLimit (the model's full max_output_tokens reserved on top of the prompt budget).
|
|
654
658
|
*/
|
|
655
659
|
limit: number;
|
|
656
660
|
/**
|
|
@@ -829,6 +833,22 @@ export type PermissionsModifyRulesScope =
|
|
|
829
833
|
"session"
|
|
830
834
|
/** Persist the rule change for this project location. */
|
|
831
835
|
| "location";
|
|
836
|
+
/**
|
|
837
|
+
* Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers.
|
|
838
|
+
*
|
|
839
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
840
|
+
* via the `definition` "PermissionsSetAllowAllSource".
|
|
841
|
+
*/
|
|
842
|
+
/** @experimental */
|
|
843
|
+
export type PermissionsSetAllowAllSource =
|
|
844
|
+
/** Allow-all was enabled from a CLI command-line flag. */
|
|
845
|
+
"cli_flag"
|
|
846
|
+
/** Allow-all was enabled by a slash command. */
|
|
847
|
+
| "slash_command"
|
|
848
|
+
/** Allow-all was enabled by confirming autopilot behavior. */
|
|
849
|
+
| "autopilot_confirmation"
|
|
850
|
+
/** Allow-all was enabled through an RPC caller. */
|
|
851
|
+
| "rpc";
|
|
832
852
|
/**
|
|
833
853
|
* Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers.
|
|
834
854
|
*
|
|
@@ -845,6 +865,28 @@ export type PermissionsSetApproveAllSource =
|
|
|
845
865
|
| "autopilot_confirmation"
|
|
846
866
|
/** Allow-all was enabled through an RPC caller. */
|
|
847
867
|
| "rpc";
|
|
868
|
+
/**
|
|
869
|
+
* Schema for the `PushAttachment` type.
|
|
870
|
+
*
|
|
871
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
872
|
+
* via the `definition` "PushAttachment".
|
|
873
|
+
*/
|
|
874
|
+
/** @experimental */
|
|
875
|
+
export type PushAttachment = PushAttachmentFile | PushAttachmentDirectory | PushAttachmentSelection | PushAttachmentGitHubReference | PushAttachmentBlob | ExtensionContextPushInput;
|
|
876
|
+
/**
|
|
877
|
+
* Type of GitHub reference
|
|
878
|
+
*
|
|
879
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
880
|
+
* via the `definition` "PushAttachmentGitHubReferenceType".
|
|
881
|
+
*/
|
|
882
|
+
/** @experimental */
|
|
883
|
+
export type PushAttachmentGitHubReferenceType =
|
|
884
|
+
/** GitHub issue reference. */
|
|
885
|
+
"issue"
|
|
886
|
+
/** GitHub pull request reference. */
|
|
887
|
+
| "pr"
|
|
888
|
+
/** GitHub discussion reference. */
|
|
889
|
+
| "discussion";
|
|
848
890
|
/**
|
|
849
891
|
* Whether this item is a queued user message or a queued slash command / model change
|
|
850
892
|
*
|
|
@@ -887,28 +929,6 @@ export type SendAgentMode =
|
|
|
887
929
|
| "autopilot"
|
|
888
930
|
/** The agent is in shell-focused UI mode. */
|
|
889
931
|
| "shell";
|
|
890
|
-
/**
|
|
891
|
-
* A user message attachment — a file, directory, code selection, blob, or GitHub reference
|
|
892
|
-
*
|
|
893
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
894
|
-
* via the `definition` "SendAttachment".
|
|
895
|
-
*/
|
|
896
|
-
/** @experimental */
|
|
897
|
-
export type SendAttachment = SendAttachmentFile | SendAttachmentDirectory | SendAttachmentSelection | SendAttachmentGithubReference | SendAttachmentBlob;
|
|
898
|
-
/**
|
|
899
|
-
* Type of GitHub reference
|
|
900
|
-
*
|
|
901
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
902
|
-
* via the `definition` "SendAttachmentGithubReferenceType".
|
|
903
|
-
*/
|
|
904
|
-
/** @experimental */
|
|
905
|
-
export type SendAttachmentGithubReferenceType =
|
|
906
|
-
/** GitHub issue reference. */
|
|
907
|
-
"issue"
|
|
908
|
-
/** GitHub pull request reference. */
|
|
909
|
-
| "pr"
|
|
910
|
-
/** GitHub discussion reference. */
|
|
911
|
-
| "discussion";
|
|
912
932
|
/**
|
|
913
933
|
* How to deliver the message. `enqueue` (default) appends to the message queue. `immediate` interjects during an in-progress turn.
|
|
914
934
|
*
|
|
@@ -989,7 +1009,7 @@ export type SessionFsSqliteQueryType =
|
|
|
989
1009
|
* via the `definition` "SessionInstalledPluginSource".
|
|
990
1010
|
*/
|
|
991
1011
|
/** @experimental */
|
|
992
|
-
export type SessionInstalledPluginSource = string |
|
|
1012
|
+
export type SessionInstalledPluginSource = string | SessionInstalledPluginSourceGitHub | SessionInstalledPluginSourceUrl | SessionInstalledPluginSourceLocal;
|
|
993
1013
|
/**
|
|
994
1014
|
* Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags).
|
|
995
1015
|
*
|
|
@@ -2025,73 +2045,73 @@ export interface CanvasJsonSchema {
|
|
|
2025
2045
|
[k: string]: unknown | undefined;
|
|
2026
2046
|
}
|
|
2027
2047
|
/**
|
|
2028
|
-
* Canvas
|
|
2048
|
+
* Canvas action invocation parameters.
|
|
2029
2049
|
*
|
|
2030
2050
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2031
|
-
* via the `definition` "
|
|
2051
|
+
* via the `definition` "CanvasActionInvokeRequest".
|
|
2032
2052
|
*/
|
|
2033
2053
|
/** @experimental */
|
|
2034
|
-
export interface
|
|
2054
|
+
export interface CanvasActionInvokeRequest {
|
|
2035
2055
|
/**
|
|
2036
2056
|
* Open canvas instance identifier
|
|
2037
2057
|
*/
|
|
2038
2058
|
instanceId: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* Action name to invoke
|
|
2061
|
+
*/
|
|
2062
|
+
actionName: string;
|
|
2063
|
+
/**
|
|
2064
|
+
* Action input
|
|
2065
|
+
*/
|
|
2066
|
+
input?: {
|
|
2067
|
+
[k: string]: unknown | undefined;
|
|
2068
|
+
};
|
|
2039
2069
|
}
|
|
2040
2070
|
/**
|
|
2041
|
-
*
|
|
2071
|
+
* Provider-supplied action result.
|
|
2042
2072
|
*
|
|
2043
2073
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2044
|
-
* via the `definition` "
|
|
2074
|
+
* via the `definition` "CanvasActionInvokeResult".
|
|
2045
2075
|
*/
|
|
2046
2076
|
/** @experimental */
|
|
2047
|
-
export interface
|
|
2048
|
-
|
|
2077
|
+
export interface CanvasActionInvokeResult {
|
|
2078
|
+
[k: string]: unknown | undefined;
|
|
2049
2079
|
}
|
|
2050
2080
|
/**
|
|
2051
|
-
*
|
|
2081
|
+
* Canvas close parameters.
|
|
2052
2082
|
*
|
|
2053
2083
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2054
|
-
* via the `definition` "
|
|
2084
|
+
* via the `definition` "CanvasCloseRequest".
|
|
2055
2085
|
*/
|
|
2056
2086
|
/** @experimental */
|
|
2057
|
-
export interface
|
|
2087
|
+
export interface CanvasCloseRequest {
|
|
2058
2088
|
/**
|
|
2059
|
-
*
|
|
2089
|
+
* Open canvas instance identifier
|
|
2060
2090
|
*/
|
|
2061
|
-
|
|
2091
|
+
instanceId: string;
|
|
2062
2092
|
}
|
|
2063
2093
|
/**
|
|
2064
|
-
*
|
|
2094
|
+
* Host context supplied by the runtime.
|
|
2065
2095
|
*
|
|
2066
2096
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2067
|
-
* via the `definition` "
|
|
2097
|
+
* via the `definition` "CanvasHostContext".
|
|
2068
2098
|
*/
|
|
2069
2099
|
/** @experimental */
|
|
2070
|
-
export interface
|
|
2071
|
-
|
|
2072
|
-
* Open canvas instance identifier
|
|
2073
|
-
*/
|
|
2074
|
-
instanceId: string;
|
|
2075
|
-
/**
|
|
2076
|
-
* Action name to invoke
|
|
2077
|
-
*/
|
|
2078
|
-
actionName: string;
|
|
2079
|
-
/**
|
|
2080
|
-
* Action input
|
|
2081
|
-
*/
|
|
2082
|
-
input?: {
|
|
2083
|
-
[k: string]: unknown | undefined;
|
|
2084
|
-
};
|
|
2100
|
+
export interface CanvasHostContext {
|
|
2101
|
+
capabilities?: CanvasHostContextCapabilities;
|
|
2085
2102
|
}
|
|
2086
2103
|
/**
|
|
2087
|
-
*
|
|
2104
|
+
* Host capabilities
|
|
2088
2105
|
*
|
|
2089
2106
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2090
|
-
* via the `definition` "
|
|
2107
|
+
* via the `definition` "CanvasHostContextCapabilities".
|
|
2091
2108
|
*/
|
|
2092
2109
|
/** @experimental */
|
|
2093
|
-
export interface
|
|
2094
|
-
|
|
2110
|
+
export interface CanvasHostContextCapabilities {
|
|
2111
|
+
/**
|
|
2112
|
+
* Whether canvas rendering is supported
|
|
2113
|
+
*/
|
|
2114
|
+
canvases?: boolean;
|
|
2095
2115
|
}
|
|
2096
2116
|
/**
|
|
2097
2117
|
* Declared canvases available in this session.
|
|
@@ -2632,7 +2652,7 @@ export interface ConnectRemoteSessionParams {
|
|
|
2632
2652
|
sessionId: string;
|
|
2633
2653
|
}
|
|
2634
2654
|
/**
|
|
2635
|
-
* The currently selected model
|
|
2655
|
+
* The currently selected model, reasoning effort, and context tier for the session. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
|
|
2636
2656
|
*
|
|
2637
2657
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2638
2658
|
* via the `definition` "CurrentModel".
|
|
@@ -2647,6 +2667,46 @@ export interface CurrentModel {
|
|
|
2647
2667
|
* Reasoning effort level currently applied to the active model, when one is set. Reads `Session.getReasoningEffort()` synchronously after `getSelectedModel()` resolves so the two values are reported as a snapshot.
|
|
2648
2668
|
*/
|
|
2649
2669
|
reasoningEffort?: string;
|
|
2670
|
+
contextTier?: ContextTier;
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* Lightweight metadata for a currently initialized session tool
|
|
2674
|
+
*
|
|
2675
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2676
|
+
* via the `definition` "CurrentToolMetadata".
|
|
2677
|
+
*/
|
|
2678
|
+
/** @experimental */
|
|
2679
|
+
export interface CurrentToolMetadata {
|
|
2680
|
+
/**
|
|
2681
|
+
* Model-facing tool name
|
|
2682
|
+
*/
|
|
2683
|
+
name: string;
|
|
2684
|
+
/**
|
|
2685
|
+
* Optional MCP/config namespaced tool name
|
|
2686
|
+
*/
|
|
2687
|
+
namespacedName?: string;
|
|
2688
|
+
/**
|
|
2689
|
+
* MCP server name for MCP-backed tools
|
|
2690
|
+
*/
|
|
2691
|
+
mcpServerName?: string;
|
|
2692
|
+
/**
|
|
2693
|
+
* Raw MCP tool name for MCP-backed tools
|
|
2694
|
+
*/
|
|
2695
|
+
mcpToolName?: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* Tool description
|
|
2698
|
+
*/
|
|
2699
|
+
description: string;
|
|
2700
|
+
/**
|
|
2701
|
+
* JSON Schema for tool input
|
|
2702
|
+
*/
|
|
2703
|
+
input_schema?: {
|
|
2704
|
+
[k: string]: unknown | undefined;
|
|
2705
|
+
};
|
|
2706
|
+
/**
|
|
2707
|
+
* Whether the tool is loaded on demand via tool search
|
|
2708
|
+
*/
|
|
2709
|
+
deferLoading?: boolean;
|
|
2650
2710
|
}
|
|
2651
2711
|
/**
|
|
2652
2712
|
* Schema for the `DiscoveredMcpServer` type.
|
|
@@ -2816,6 +2876,29 @@ export interface Extension {
|
|
|
2816
2876
|
*/
|
|
2817
2877
|
pid?: number;
|
|
2818
2878
|
}
|
|
2879
|
+
/**
|
|
2880
|
+
* Slim input shape for extension_context attachments; identity fields are runtime-derived.
|
|
2881
|
+
*
|
|
2882
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2883
|
+
* via the `definition` "ExtensionContextPushInput".
|
|
2884
|
+
*/
|
|
2885
|
+
/** @experimental */
|
|
2886
|
+
export interface ExtensionContextPushInput {
|
|
2887
|
+
/**
|
|
2888
|
+
* Attachment type discriminator
|
|
2889
|
+
*/
|
|
2890
|
+
type: "extension_context";
|
|
2891
|
+
/**
|
|
2892
|
+
* Human-readable composer pill label
|
|
2893
|
+
*/
|
|
2894
|
+
title: string;
|
|
2895
|
+
/**
|
|
2896
|
+
* Caller-supplied JSON payload (required, may be null but not undefined)
|
|
2897
|
+
*/
|
|
2898
|
+
payload: {
|
|
2899
|
+
[k: string]: unknown | undefined;
|
|
2900
|
+
};
|
|
2901
|
+
}
|
|
2819
2902
|
/**
|
|
2820
2903
|
* Extensions discovered for the session, with their current status.
|
|
2821
2904
|
*
|
|
@@ -3352,13 +3435,13 @@ export interface InstalledPlugin {
|
|
|
3352
3435
|
source?: InstalledPluginSource;
|
|
3353
3436
|
}
|
|
3354
3437
|
/**
|
|
3355
|
-
* Schema for the `
|
|
3438
|
+
* Schema for the `InstalledPluginSourceGitHub` type.
|
|
3356
3439
|
*
|
|
3357
3440
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3358
|
-
* via the `definition` "
|
|
3441
|
+
* via the `definition` "InstalledPluginSourceGitHub".
|
|
3359
3442
|
*/
|
|
3360
3443
|
/** @experimental */
|
|
3361
|
-
export interface
|
|
3444
|
+
export interface InstalledPluginSourceGitHub {
|
|
3362
3445
|
/**
|
|
3363
3446
|
* Constant value. Always "github".
|
|
3364
3447
|
*/
|
|
@@ -4540,7 +4623,7 @@ export interface ModelBillingTokenPrices {
|
|
|
4540
4623
|
*/
|
|
4541
4624
|
batchSize?: number;
|
|
4542
4625
|
/**
|
|
4543
|
-
*
|
|
4626
|
+
* Prompt token budget (max_prompt_tokens) for the default tier. The total context window is this value plus the model's max_output_tokens.
|
|
4544
4627
|
*/
|
|
4545
4628
|
contextMax?: number;
|
|
4546
4629
|
longContext?: ModelBillingTokenPricesLongContext;
|
|
@@ -4565,7 +4648,7 @@ export interface ModelBillingTokenPricesLongContext {
|
|
|
4565
4648
|
*/
|
|
4566
4649
|
cachePrice?: number;
|
|
4567
4650
|
/**
|
|
4568
|
-
*
|
|
4651
|
+
* Prompt token budget (max_prompt_tokens) for the long context tier. The total context window is this value plus the model's max_output_tokens.
|
|
4569
4652
|
*/
|
|
4570
4653
|
contextMax?: number;
|
|
4571
4654
|
}
|
|
@@ -4652,6 +4735,19 @@ export interface ModelList {
|
|
|
4652
4735
|
*/
|
|
4653
4736
|
models: Model[];
|
|
4654
4737
|
}
|
|
4738
|
+
/**
|
|
4739
|
+
* Optional listing options.
|
|
4740
|
+
*
|
|
4741
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4742
|
+
* via the `definition` "ModelListRequest".
|
|
4743
|
+
*/
|
|
4744
|
+
/** @experimental */
|
|
4745
|
+
export interface ModelListRequest {
|
|
4746
|
+
/**
|
|
4747
|
+
* If true, bypasses the per-session model list cache and re-fetches from CAPI.
|
|
4748
|
+
*/
|
|
4749
|
+
skipCache?: boolean;
|
|
4750
|
+
}
|
|
4655
4751
|
/**
|
|
4656
4752
|
* Reasoning effort level to apply to the currently selected model.
|
|
4657
4753
|
*
|
|
@@ -4685,7 +4781,7 @@ export interface ModelsListRequest {
|
|
|
4685
4781
|
gitHubToken?: string;
|
|
4686
4782
|
}
|
|
4687
4783
|
/**
|
|
4688
|
-
* Target model identifier and optional reasoning effort, summary, and
|
|
4784
|
+
* Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
|
|
4689
4785
|
*
|
|
4690
4786
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
4691
4787
|
* via the `definition` "ModelSwitchToRequest".
|
|
@@ -4702,6 +4798,7 @@ export interface ModelSwitchToRequest {
|
|
|
4702
4798
|
reasoningEffort?: string;
|
|
4703
4799
|
reasoningSummary?: ReasoningSummary;
|
|
4704
4800
|
modelCapabilities?: ModelCapabilitiesOverride;
|
|
4801
|
+
contextTier?: ContextTier;
|
|
4705
4802
|
}
|
|
4706
4803
|
/**
|
|
4707
4804
|
* The model identifier active on the session after the switch.
|
|
@@ -6001,6 +6098,7 @@ export interface PermissionsSetAllowAllRequest {
|
|
|
6001
6098
|
* Whether to enable full allow-all permissions
|
|
6002
6099
|
*/
|
|
6003
6100
|
enabled: boolean;
|
|
6101
|
+
source?: PermissionsSetAllowAllSource;
|
|
6004
6102
|
}
|
|
6005
6103
|
/**
|
|
6006
6104
|
* Allow-all toggle for tool permission requests, with an optional telemetry source.
|
|
@@ -6186,100 +6284,286 @@ export interface PluginList {
|
|
|
6186
6284
|
plugins: Plugin[];
|
|
6187
6285
|
}
|
|
6188
6286
|
/**
|
|
6189
|
-
*
|
|
6287
|
+
* File attachment
|
|
6190
6288
|
*
|
|
6191
6289
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6192
|
-
* via the `definition` "
|
|
6290
|
+
* via the `definition` "PushAttachmentFile".
|
|
6193
6291
|
*/
|
|
6194
6292
|
/** @experimental */
|
|
6195
|
-
export interface
|
|
6196
|
-
kind: QueuePendingItemsKind;
|
|
6293
|
+
export interface PushAttachmentFile {
|
|
6197
6294
|
/**
|
|
6198
|
-
*
|
|
6295
|
+
* Attachment type discriminator
|
|
6199
6296
|
*/
|
|
6200
|
-
|
|
6297
|
+
type: "file";
|
|
6298
|
+
/**
|
|
6299
|
+
* Absolute file path
|
|
6300
|
+
*/
|
|
6301
|
+
path: string;
|
|
6302
|
+
/**
|
|
6303
|
+
* User-facing display name for the attachment
|
|
6304
|
+
*/
|
|
6305
|
+
displayName: string;
|
|
6306
|
+
lineRange?: PushAttachmentFileLineRange;
|
|
6201
6307
|
}
|
|
6202
6308
|
/**
|
|
6203
|
-
*
|
|
6309
|
+
* Optional line range to scope the attachment to a specific section of the file
|
|
6204
6310
|
*
|
|
6205
6311
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6206
|
-
* via the `definition` "
|
|
6312
|
+
* via the `definition` "PushAttachmentFileLineRange".
|
|
6207
6313
|
*/
|
|
6208
6314
|
/** @experimental */
|
|
6209
|
-
export interface
|
|
6315
|
+
export interface PushAttachmentFileLineRange {
|
|
6210
6316
|
/**
|
|
6211
|
-
*
|
|
6317
|
+
* Start line number (1-based)
|
|
6212
6318
|
*/
|
|
6213
|
-
|
|
6319
|
+
start: number;
|
|
6214
6320
|
/**
|
|
6215
|
-
*
|
|
6321
|
+
* End line number (1-based, inclusive)
|
|
6216
6322
|
*/
|
|
6217
|
-
|
|
6323
|
+
end: number;
|
|
6218
6324
|
}
|
|
6219
6325
|
/**
|
|
6220
|
-
*
|
|
6326
|
+
* Directory attachment
|
|
6221
6327
|
*
|
|
6222
6328
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6223
|
-
* via the `definition` "
|
|
6329
|
+
* via the `definition` "PushAttachmentDirectory".
|
|
6224
6330
|
*/
|
|
6225
6331
|
/** @experimental */
|
|
6226
|
-
export interface
|
|
6332
|
+
export interface PushAttachmentDirectory {
|
|
6227
6333
|
/**
|
|
6228
|
-
*
|
|
6334
|
+
* Attachment type discriminator
|
|
6229
6335
|
*/
|
|
6230
|
-
|
|
6336
|
+
type: "directory";
|
|
6337
|
+
/**
|
|
6338
|
+
* Absolute directory path
|
|
6339
|
+
*/
|
|
6340
|
+
path: string;
|
|
6341
|
+
/**
|
|
6342
|
+
* User-facing display name for the attachment
|
|
6343
|
+
*/
|
|
6344
|
+
displayName: string;
|
|
6231
6345
|
}
|
|
6232
6346
|
/**
|
|
6233
|
-
*
|
|
6347
|
+
* Code selection attachment from an editor
|
|
6234
6348
|
*
|
|
6235
6349
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6236
|
-
* via the `definition` "
|
|
6350
|
+
* via the `definition` "PushAttachmentSelection".
|
|
6237
6351
|
*/
|
|
6238
6352
|
/** @experimental */
|
|
6239
|
-
export interface
|
|
6353
|
+
export interface PushAttachmentSelection {
|
|
6240
6354
|
/**
|
|
6241
|
-
*
|
|
6355
|
+
* Attachment type discriminator
|
|
6242
6356
|
*/
|
|
6243
|
-
|
|
6357
|
+
type: "selection";
|
|
6358
|
+
/**
|
|
6359
|
+
* Absolute path to the file containing the selection
|
|
6360
|
+
*/
|
|
6361
|
+
filePath: string;
|
|
6362
|
+
/**
|
|
6363
|
+
* User-facing display name for the selection
|
|
6364
|
+
*/
|
|
6365
|
+
displayName: string;
|
|
6366
|
+
/**
|
|
6367
|
+
* The selected text content
|
|
6368
|
+
*/
|
|
6369
|
+
text: string;
|
|
6370
|
+
selection: PushAttachmentSelectionDetails;
|
|
6244
6371
|
}
|
|
6245
6372
|
/**
|
|
6246
|
-
*
|
|
6373
|
+
* Position range of the selection within the file
|
|
6247
6374
|
*
|
|
6248
6375
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6249
|
-
* via the `definition` "
|
|
6376
|
+
* via the `definition` "PushAttachmentSelectionDetails".
|
|
6250
6377
|
*/
|
|
6251
6378
|
/** @experimental */
|
|
6252
|
-
export interface
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
*/
|
|
6256
|
-
handle: string;
|
|
6379
|
+
export interface PushAttachmentSelectionDetails {
|
|
6380
|
+
start: PushAttachmentSelectionDetailsStart;
|
|
6381
|
+
end: PushAttachmentSelectionDetailsEnd;
|
|
6257
6382
|
}
|
|
6258
6383
|
/**
|
|
6259
|
-
*
|
|
6384
|
+
* Start position of the selection
|
|
6260
6385
|
*
|
|
6261
6386
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6262
|
-
* via the `definition` "
|
|
6387
|
+
* via the `definition` "PushAttachmentSelectionDetailsStart".
|
|
6263
6388
|
*/
|
|
6264
6389
|
/** @experimental */
|
|
6265
|
-
export interface
|
|
6390
|
+
export interface PushAttachmentSelectionDetailsStart {
|
|
6266
6391
|
/**
|
|
6267
|
-
*
|
|
6392
|
+
* Start line number (0-based)
|
|
6268
6393
|
*/
|
|
6269
|
-
|
|
6394
|
+
line: number;
|
|
6395
|
+
/**
|
|
6396
|
+
* Start character offset within the line (0-based)
|
|
6397
|
+
*/
|
|
6398
|
+
character: number;
|
|
6270
6399
|
}
|
|
6271
6400
|
/**
|
|
6272
|
-
*
|
|
6401
|
+
* End position of the selection
|
|
6273
6402
|
*
|
|
6274
6403
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6275
|
-
* via the `definition` "
|
|
6404
|
+
* via the `definition` "PushAttachmentSelectionDetailsEnd".
|
|
6276
6405
|
*/
|
|
6277
6406
|
/** @experimental */
|
|
6278
|
-
export interface
|
|
6279
|
-
|
|
6407
|
+
export interface PushAttachmentSelectionDetailsEnd {
|
|
6408
|
+
/**
|
|
6409
|
+
* End line number (0-based)
|
|
6410
|
+
*/
|
|
6411
|
+
line: number;
|
|
6412
|
+
/**
|
|
6413
|
+
* End character offset within the line (0-based)
|
|
6414
|
+
*/
|
|
6415
|
+
character: number;
|
|
6280
6416
|
}
|
|
6281
6417
|
/**
|
|
6282
|
-
* GitHub
|
|
6418
|
+
* GitHub issue, pull request, or discussion reference
|
|
6419
|
+
*
|
|
6420
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6421
|
+
* via the `definition` "PushAttachmentGitHubReference".
|
|
6422
|
+
*/
|
|
6423
|
+
/** @experimental */
|
|
6424
|
+
export interface PushAttachmentGitHubReference {
|
|
6425
|
+
/**
|
|
6426
|
+
* Attachment type discriminator
|
|
6427
|
+
*/
|
|
6428
|
+
type: "github_reference";
|
|
6429
|
+
/**
|
|
6430
|
+
* Issue, pull request, or discussion number
|
|
6431
|
+
*/
|
|
6432
|
+
number: number;
|
|
6433
|
+
/**
|
|
6434
|
+
* Title of the referenced item
|
|
6435
|
+
*/
|
|
6436
|
+
title: string;
|
|
6437
|
+
referenceType: PushAttachmentGitHubReferenceType;
|
|
6438
|
+
/**
|
|
6439
|
+
* Current state of the referenced item (e.g., open, closed, merged)
|
|
6440
|
+
*/
|
|
6441
|
+
state: string;
|
|
6442
|
+
/**
|
|
6443
|
+
* URL to the referenced item on GitHub
|
|
6444
|
+
*/
|
|
6445
|
+
url: string;
|
|
6446
|
+
}
|
|
6447
|
+
/**
|
|
6448
|
+
* Blob attachment with inline base64-encoded data
|
|
6449
|
+
*
|
|
6450
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6451
|
+
* via the `definition` "PushAttachmentBlob".
|
|
6452
|
+
*/
|
|
6453
|
+
/** @experimental */
|
|
6454
|
+
export interface PushAttachmentBlob {
|
|
6455
|
+
/**
|
|
6456
|
+
* Attachment type discriminator
|
|
6457
|
+
*/
|
|
6458
|
+
type: "blob";
|
|
6459
|
+
/**
|
|
6460
|
+
* Base64-encoded content
|
|
6461
|
+
*/
|
|
6462
|
+
data: string;
|
|
6463
|
+
/**
|
|
6464
|
+
* MIME type of the inline data
|
|
6465
|
+
*/
|
|
6466
|
+
mimeType: string;
|
|
6467
|
+
/**
|
|
6468
|
+
* User-facing display name for the attachment
|
|
6469
|
+
*/
|
|
6470
|
+
displayName?: string;
|
|
6471
|
+
}
|
|
6472
|
+
/**
|
|
6473
|
+
* Schema for the `QueuePendingItems` type.
|
|
6474
|
+
*
|
|
6475
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6476
|
+
* via the `definition` "QueuePendingItems".
|
|
6477
|
+
*/
|
|
6478
|
+
/** @experimental */
|
|
6479
|
+
export interface QueuePendingItems {
|
|
6480
|
+
kind: QueuePendingItemsKind;
|
|
6481
|
+
/**
|
|
6482
|
+
* Human-readable text to display for this queue entry in the UI
|
|
6483
|
+
*/
|
|
6484
|
+
displayText: string;
|
|
6485
|
+
}
|
|
6486
|
+
/**
|
|
6487
|
+
* Snapshot of the session's pending queued items and immediate-steering messages.
|
|
6488
|
+
*
|
|
6489
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6490
|
+
* via the `definition` "QueuePendingItemsResult".
|
|
6491
|
+
*/
|
|
6492
|
+
/** @experimental */
|
|
6493
|
+
export interface QueuePendingItemsResult {
|
|
6494
|
+
/**
|
|
6495
|
+
* Pending queued items in submission order. Includes user messages, queued slash commands, and queued model changes; omits internal system items.
|
|
6496
|
+
*/
|
|
6497
|
+
items: QueuePendingItems[];
|
|
6498
|
+
/**
|
|
6499
|
+
* Display text for messages currently in the immediate steering queue (interjections sent during a running turn).
|
|
6500
|
+
*/
|
|
6501
|
+
steeringMessages: string[];
|
|
6502
|
+
}
|
|
6503
|
+
/**
|
|
6504
|
+
* Indicates whether a user-facing pending item was removed.
|
|
6505
|
+
*
|
|
6506
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6507
|
+
* via the `definition` "QueueRemoveMostRecentResult".
|
|
6508
|
+
*/
|
|
6509
|
+
/** @experimental */
|
|
6510
|
+
export interface QueueRemoveMostRecentResult {
|
|
6511
|
+
/**
|
|
6512
|
+
* True if a user-facing pending item was removed (LIFO across both queues); false when no removable items remained.
|
|
6513
|
+
*/
|
|
6514
|
+
removed: boolean;
|
|
6515
|
+
}
|
|
6516
|
+
/**
|
|
6517
|
+
* Event type to register consumer interest for, used by runtime gating logic.
|
|
6518
|
+
*
|
|
6519
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6520
|
+
* via the `definition` "RegisterEventInterestParams".
|
|
6521
|
+
*/
|
|
6522
|
+
/** @experimental */
|
|
6523
|
+
export interface RegisterEventInterestParams {
|
|
6524
|
+
/**
|
|
6525
|
+
* The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`.
|
|
6526
|
+
*/
|
|
6527
|
+
eventType: string;
|
|
6528
|
+
}
|
|
6529
|
+
/**
|
|
6530
|
+
* Opaque handle representing an event-type interest registration.
|
|
6531
|
+
*
|
|
6532
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6533
|
+
* via the `definition` "RegisterEventInterestResult".
|
|
6534
|
+
*/
|
|
6535
|
+
/** @experimental */
|
|
6536
|
+
export interface RegisterEventInterestResult {
|
|
6537
|
+
/**
|
|
6538
|
+
* Opaque handle for this registration. Pass to releaseInterest to release. Each call to registerInterest produces a fresh handle, even when the same eventType is registered multiple times.
|
|
6539
|
+
*/
|
|
6540
|
+
handle: string;
|
|
6541
|
+
}
|
|
6542
|
+
/**
|
|
6543
|
+
* Opaque handle previously returned by `registerInterest` to release.
|
|
6544
|
+
*
|
|
6545
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6546
|
+
* via the `definition` "ReleaseEventInterestParams".
|
|
6547
|
+
*/
|
|
6548
|
+
/** @experimental */
|
|
6549
|
+
export interface ReleaseEventInterestParams {
|
|
6550
|
+
/**
|
|
6551
|
+
* Handle returned by a previous `registerInterest` call. Idempotent: releasing an unknown or already-released handle is a no-op (returns success). When the last outstanding handle for an event type is released, the runtime reverts to its 'no consumer' code path for that event type.
|
|
6552
|
+
*/
|
|
6553
|
+
handle: string;
|
|
6554
|
+
}
|
|
6555
|
+
/**
|
|
6556
|
+
* Optional remote session mode ("off", "export", or "on"); defaults to enabling both export and remote steering.
|
|
6557
|
+
*
|
|
6558
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6559
|
+
* via the `definition` "RemoteEnableRequest".
|
|
6560
|
+
*/
|
|
6561
|
+
/** @experimental */
|
|
6562
|
+
export interface RemoteEnableRequest {
|
|
6563
|
+
mode?: RemoteSessionMode;
|
|
6564
|
+
}
|
|
6565
|
+
/**
|
|
6566
|
+
* GitHub URL for the session and a flag indicating whether remote steering is enabled.
|
|
6283
6567
|
*
|
|
6284
6568
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6285
6569
|
* via the `definition` "RemoteEnableResult".
|
|
@@ -6425,190 +6709,21 @@ export interface SecretsAddFilterValuesResult {
|
|
|
6425
6709
|
ok: true;
|
|
6426
6710
|
}
|
|
6427
6711
|
/**
|
|
6428
|
-
*
|
|
6429
|
-
*
|
|
6430
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6431
|
-
* via the `definition` "SendAttachmentFile".
|
|
6432
|
-
*/
|
|
6433
|
-
/** @experimental */
|
|
6434
|
-
export interface SendAttachmentFile {
|
|
6435
|
-
/**
|
|
6436
|
-
* Attachment type discriminator
|
|
6437
|
-
*/
|
|
6438
|
-
type: "file";
|
|
6439
|
-
/**
|
|
6440
|
-
* Absolute file path
|
|
6441
|
-
*/
|
|
6442
|
-
path: string;
|
|
6443
|
-
/**
|
|
6444
|
-
* User-facing display name for the attachment
|
|
6445
|
-
*/
|
|
6446
|
-
displayName: string;
|
|
6447
|
-
lineRange?: SendAttachmentFileLineRange;
|
|
6448
|
-
}
|
|
6449
|
-
/**
|
|
6450
|
-
* Optional line range to scope the attachment to a specific section of the file
|
|
6451
|
-
*
|
|
6452
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6453
|
-
* via the `definition` "SendAttachmentFileLineRange".
|
|
6454
|
-
*/
|
|
6455
|
-
/** @experimental */
|
|
6456
|
-
export interface SendAttachmentFileLineRange {
|
|
6457
|
-
/**
|
|
6458
|
-
* Start line number (1-based)
|
|
6459
|
-
*/
|
|
6460
|
-
start: number;
|
|
6461
|
-
/**
|
|
6462
|
-
* End line number (1-based, inclusive)
|
|
6463
|
-
*/
|
|
6464
|
-
end: number;
|
|
6465
|
-
}
|
|
6466
|
-
/**
|
|
6467
|
-
* Directory attachment
|
|
6468
|
-
*
|
|
6469
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6470
|
-
* via the `definition` "SendAttachmentDirectory".
|
|
6471
|
-
*/
|
|
6472
|
-
/** @experimental */
|
|
6473
|
-
export interface SendAttachmentDirectory {
|
|
6474
|
-
/**
|
|
6475
|
-
* Attachment type discriminator
|
|
6476
|
-
*/
|
|
6477
|
-
type: "directory";
|
|
6478
|
-
/**
|
|
6479
|
-
* Absolute directory path
|
|
6480
|
-
*/
|
|
6481
|
-
path: string;
|
|
6482
|
-
/**
|
|
6483
|
-
* User-facing display name for the attachment
|
|
6484
|
-
*/
|
|
6485
|
-
displayName: string;
|
|
6486
|
-
}
|
|
6487
|
-
/**
|
|
6488
|
-
* Code selection attachment from an editor
|
|
6489
|
-
*
|
|
6490
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6491
|
-
* via the `definition` "SendAttachmentSelection".
|
|
6492
|
-
*/
|
|
6493
|
-
/** @experimental */
|
|
6494
|
-
export interface SendAttachmentSelection {
|
|
6495
|
-
/**
|
|
6496
|
-
* Attachment type discriminator
|
|
6497
|
-
*/
|
|
6498
|
-
type: "selection";
|
|
6499
|
-
/**
|
|
6500
|
-
* Absolute path to the file containing the selection
|
|
6501
|
-
*/
|
|
6502
|
-
filePath: string;
|
|
6503
|
-
/**
|
|
6504
|
-
* User-facing display name for the selection
|
|
6505
|
-
*/
|
|
6506
|
-
displayName: string;
|
|
6507
|
-
/**
|
|
6508
|
-
* The selected text content
|
|
6509
|
-
*/
|
|
6510
|
-
text: string;
|
|
6511
|
-
selection: SendAttachmentSelectionDetails;
|
|
6512
|
-
}
|
|
6513
|
-
/**
|
|
6514
|
-
* Position range of the selection within the file
|
|
6515
|
-
*
|
|
6516
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6517
|
-
* via the `definition` "SendAttachmentSelectionDetails".
|
|
6518
|
-
*/
|
|
6519
|
-
/** @experimental */
|
|
6520
|
-
export interface SendAttachmentSelectionDetails {
|
|
6521
|
-
start: SendAttachmentSelectionDetailsStart;
|
|
6522
|
-
end: SendAttachmentSelectionDetailsEnd;
|
|
6523
|
-
}
|
|
6524
|
-
/**
|
|
6525
|
-
* Start position of the selection
|
|
6526
|
-
*
|
|
6527
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6528
|
-
* via the `definition` "SendAttachmentSelectionDetailsStart".
|
|
6529
|
-
*/
|
|
6530
|
-
/** @experimental */
|
|
6531
|
-
export interface SendAttachmentSelectionDetailsStart {
|
|
6532
|
-
/**
|
|
6533
|
-
* Start line number (0-based)
|
|
6534
|
-
*/
|
|
6535
|
-
line: number;
|
|
6536
|
-
/**
|
|
6537
|
-
* Start character offset within the line (0-based)
|
|
6538
|
-
*/
|
|
6539
|
-
character: number;
|
|
6540
|
-
}
|
|
6541
|
-
/**
|
|
6542
|
-
* End position of the selection
|
|
6543
|
-
*
|
|
6544
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6545
|
-
* via the `definition` "SendAttachmentSelectionDetailsEnd".
|
|
6546
|
-
*/
|
|
6547
|
-
/** @experimental */
|
|
6548
|
-
export interface SendAttachmentSelectionDetailsEnd {
|
|
6549
|
-
/**
|
|
6550
|
-
* End line number (0-based)
|
|
6551
|
-
*/
|
|
6552
|
-
line: number;
|
|
6553
|
-
/**
|
|
6554
|
-
* End character offset within the line (0-based)
|
|
6555
|
-
*/
|
|
6556
|
-
character: number;
|
|
6557
|
-
}
|
|
6558
|
-
/**
|
|
6559
|
-
* GitHub issue, pull request, or discussion reference
|
|
6560
|
-
*
|
|
6561
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6562
|
-
* via the `definition` "SendAttachmentGithubReference".
|
|
6563
|
-
*/
|
|
6564
|
-
/** @experimental */
|
|
6565
|
-
export interface SendAttachmentGithubReference {
|
|
6566
|
-
/**
|
|
6567
|
-
* Attachment type discriminator
|
|
6568
|
-
*/
|
|
6569
|
-
type: "github_reference";
|
|
6570
|
-
/**
|
|
6571
|
-
* Issue, pull request, or discussion number
|
|
6572
|
-
*/
|
|
6573
|
-
number: number;
|
|
6574
|
-
/**
|
|
6575
|
-
* Title of the referenced item
|
|
6576
|
-
*/
|
|
6577
|
-
title: string;
|
|
6578
|
-
referenceType: SendAttachmentGithubReferenceType;
|
|
6579
|
-
/**
|
|
6580
|
-
* Current state of the referenced item (e.g., open, closed, merged)
|
|
6581
|
-
*/
|
|
6582
|
-
state: string;
|
|
6583
|
-
/**
|
|
6584
|
-
* URL to the referenced item on GitHub
|
|
6585
|
-
*/
|
|
6586
|
-
url: string;
|
|
6587
|
-
}
|
|
6588
|
-
/**
|
|
6589
|
-
* Blob attachment with inline base64-encoded data
|
|
6712
|
+
* Parameters for session.extensions.sendAttachmentsToMessage.
|
|
6590
6713
|
*
|
|
6591
6714
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
6592
|
-
* via the `definition` "
|
|
6715
|
+
* via the `definition` "SendAttachmentsToMessageParams".
|
|
6593
6716
|
*/
|
|
6594
6717
|
/** @experimental */
|
|
6595
|
-
export interface
|
|
6718
|
+
export interface SendAttachmentsToMessageParams {
|
|
6596
6719
|
/**
|
|
6597
|
-
*
|
|
6720
|
+
* Optional canvas instance binding the push for provenance. When supplied, the runtime resolves the canvas, verifies it is owned by the calling extension, and stamps canvasId/instanceId onto each extension_context entry. When omitted, no resolution runs and those fields stay unset on the attachment.
|
|
6598
6721
|
*/
|
|
6599
|
-
|
|
6722
|
+
instanceId?: string;
|
|
6600
6723
|
/**
|
|
6601
|
-
*
|
|
6724
|
+
* Attachments to push into the next user-message turn. extension_context entries take the slim shape; standard variants take their full AttachmentSchema shape.
|
|
6602
6725
|
*/
|
|
6603
|
-
|
|
6604
|
-
/**
|
|
6605
|
-
* MIME type of the inline data
|
|
6606
|
-
*/
|
|
6607
|
-
mimeType: string;
|
|
6608
|
-
/**
|
|
6609
|
-
* User-facing display name for the attachment
|
|
6610
|
-
*/
|
|
6611
|
-
displayName?: string;
|
|
6726
|
+
attachments: PushAttachment[];
|
|
6612
6727
|
}
|
|
6613
6728
|
/**
|
|
6614
6729
|
* Parameters for sending a user message to the session
|
|
@@ -6629,7 +6744,7 @@ export interface SendRequest {
|
|
|
6629
6744
|
/**
|
|
6630
6745
|
* Optional attachments (files, directories, selections, blobs, GitHub references) to include with the message
|
|
6631
6746
|
*/
|
|
6632
|
-
attachments?:
|
|
6747
|
+
attachments?: Attachment[];
|
|
6633
6748
|
mode?: SendMode;
|
|
6634
6749
|
/**
|
|
6635
6750
|
* If true, adds the message to the front of the queue instead of the end
|
|
@@ -7312,13 +7427,13 @@ export interface SessionInstalledPlugin {
|
|
|
7312
7427
|
source?: SessionInstalledPluginSource;
|
|
7313
7428
|
}
|
|
7314
7429
|
/**
|
|
7315
|
-
* Schema for the `
|
|
7430
|
+
* Schema for the `SessionInstalledPluginSourceGitHub` type.
|
|
7316
7431
|
*
|
|
7317
7432
|
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
7318
|
-
* via the `definition` "
|
|
7433
|
+
* via the `definition` "SessionInstalledPluginSourceGitHub".
|
|
7319
7434
|
*/
|
|
7320
7435
|
/** @experimental */
|
|
7321
|
-
export interface
|
|
7436
|
+
export interface SessionInstalledPluginSourceGitHub {
|
|
7322
7437
|
/**
|
|
7323
7438
|
* Constant value. Always "github".
|
|
7324
7439
|
*/
|
|
@@ -7471,6 +7586,25 @@ export interface SessionMetadataSnapshot {
|
|
|
7471
7586
|
*/
|
|
7472
7587
|
workspace?: WorkspaceSummary | null;
|
|
7473
7588
|
}
|
|
7589
|
+
/**
|
|
7590
|
+
* The list of models available to this session.
|
|
7591
|
+
*
|
|
7592
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
7593
|
+
* via the `definition` "SessionModelList".
|
|
7594
|
+
*/
|
|
7595
|
+
/** @experimental */
|
|
7596
|
+
export interface SessionModelList {
|
|
7597
|
+
/**
|
|
7598
|
+
* Available models, ordered with the most preferred default first.
|
|
7599
|
+
*/
|
|
7600
|
+
list: unknown[];
|
|
7601
|
+
/**
|
|
7602
|
+
* Per-quota snapshots returned alongside the model list, keyed by quota type.
|
|
7603
|
+
*/
|
|
7604
|
+
quotaSnapshots?: {
|
|
7605
|
+
[k: string]: unknown | undefined;
|
|
7606
|
+
};
|
|
7607
|
+
}
|
|
7474
7608
|
/**
|
|
7475
7609
|
* Outcome of the prune operation: deleted IDs, dry-run candidates, skipped IDs, total bytes freed, and the dry-run flag.
|
|
7476
7610
|
*
|
|
@@ -8029,6 +8163,10 @@ export interface SessionUpdateOptionsParams {
|
|
|
8029
8163
|
* Whether to default custom agents to local-only execution.
|
|
8030
8164
|
*/
|
|
8031
8165
|
customAgentsLocalOnly?: boolean;
|
|
8166
|
+
/**
|
|
8167
|
+
* 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.
|
|
8168
|
+
*/
|
|
8169
|
+
suppressCustomAgentPrompt?: boolean;
|
|
8032
8170
|
/**
|
|
8033
8171
|
* Whether to skip loading custom instruction sources.
|
|
8034
8172
|
*/
|
|
@@ -8087,6 +8225,30 @@ export interface SessionUpdateOptionsParams {
|
|
|
8087
8225
|
* 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).
|
|
8088
8226
|
*/
|
|
8089
8227
|
manageScheduleEnabled?: boolean;
|
|
8228
|
+
/**
|
|
8229
|
+
* Whether to skip embedding retrieval pipeline initialization and execution.
|
|
8230
|
+
*/
|
|
8231
|
+
skipEmbeddingRetrieval?: boolean;
|
|
8232
|
+
/**
|
|
8233
|
+
* Organization-level custom instructions to inject into the system prompt.
|
|
8234
|
+
*/
|
|
8235
|
+
organizationCustomInstructions?: string;
|
|
8236
|
+
/**
|
|
8237
|
+
* Whether to enable loading of `.github/hooks/` filesystem hooks. Separate from the SDK callback hook mechanism.
|
|
8238
|
+
*/
|
|
8239
|
+
enableFileHooks?: boolean;
|
|
8240
|
+
/**
|
|
8241
|
+
* Whether to enable host git operations (context resolution, child repo scanning, git info in system prompt).
|
|
8242
|
+
*/
|
|
8243
|
+
enableHostGitOperations?: boolean;
|
|
8244
|
+
/**
|
|
8245
|
+
* Whether to enable cross-session store writes and reads.
|
|
8246
|
+
*/
|
|
8247
|
+
enableSessionStore?: boolean;
|
|
8248
|
+
/**
|
|
8249
|
+
* Whether to enable skill directory scanning and loading. Falls back to enableConfigDiscovery when unset.
|
|
8250
|
+
*/
|
|
8251
|
+
enableSkills?: boolean;
|
|
8090
8252
|
}
|
|
8091
8253
|
/**
|
|
8092
8254
|
* Indicates whether the session options patch was applied successfully.
|
|
@@ -8936,6 +9098,19 @@ export interface ToolList {
|
|
|
8936
9098
|
*/
|
|
8937
9099
|
tools: Tool[];
|
|
8938
9100
|
}
|
|
9101
|
+
/**
|
|
9102
|
+
* Current lightweight tool metadata snapshot for the session.
|
|
9103
|
+
*
|
|
9104
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9105
|
+
* via the `definition` "ToolsGetCurrentMetadataResult".
|
|
9106
|
+
*/
|
|
9107
|
+
/** @experimental */
|
|
9108
|
+
export interface ToolsGetCurrentMetadataResult {
|
|
9109
|
+
/**
|
|
9110
|
+
* Current tool metadata, or null when tools have not been initialized yet
|
|
9111
|
+
*/
|
|
9112
|
+
tools: CurrentToolMetadata[] | null;
|
|
9113
|
+
}
|
|
8939
9114
|
/**
|
|
8940
9115
|
* Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation.
|
|
8941
9116
|
*
|
|
@@ -10014,6 +10189,10 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
10014
10189
|
* @param params MCP server names to disable for new sessions.
|
|
10015
10190
|
*/
|
|
10016
10191
|
disable: (params: McpConfigDisableRequest) => Promise<void>;
|
|
10192
|
+
/**
|
|
10193
|
+
* Drops this runtime process's in-memory MCP server-definition cache so the next MCP config read observes disk.
|
|
10194
|
+
*/
|
|
10195
|
+
reload: () => Promise<void>;
|
|
10017
10196
|
};
|
|
10018
10197
|
/**
|
|
10019
10198
|
* Discovers MCP servers from user, workspace, plugin, and builtin sources.
|
|
@@ -10042,6 +10221,20 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
10042
10221
|
*/
|
|
10043
10222
|
discover: (params: SkillsDiscoverRequest) => Promise<ServerSkillList>;
|
|
10044
10223
|
};
|
|
10224
|
+
user: {
|
|
10225
|
+
settings: {
|
|
10226
|
+
/**
|
|
10227
|
+
* Drops this runtime process's in-memory user settings cache so the next settings read observes disk.
|
|
10228
|
+
*/
|
|
10229
|
+
reload: () => Promise<void>;
|
|
10230
|
+
};
|
|
10231
|
+
};
|
|
10232
|
+
runtime: {
|
|
10233
|
+
/**
|
|
10234
|
+
* Gracefully shuts down an SDK-owned runtime. The response is sent only after cleanup completes; callers may then terminate the owned runtime process.
|
|
10235
|
+
*/
|
|
10236
|
+
shutdown: () => Promise<void>;
|
|
10237
|
+
};
|
|
10045
10238
|
sessionFs: {
|
|
10046
10239
|
/**
|
|
10047
10240
|
* Registers an SDK client as the session filesystem provider.
|
|
@@ -10298,27 +10491,30 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
10298
10491
|
* @param params Canvas close parameters.
|
|
10299
10492
|
*/
|
|
10300
10493
|
close: (params: CanvasCloseRequest) => Promise<void>;
|
|
10301
|
-
/**
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10494
|
+
/** @experimental */
|
|
10495
|
+
action: {
|
|
10496
|
+
/**
|
|
10497
|
+
* Invokes an action on an open canvas instance.
|
|
10498
|
+
*
|
|
10499
|
+
* @param params Canvas action invocation parameters.
|
|
10500
|
+
*
|
|
10501
|
+
* @returns Canvas action invocation result.
|
|
10502
|
+
*/
|
|
10503
|
+
invoke: (params: CanvasActionInvokeRequest) => Promise<CanvasActionInvokeResult>;
|
|
10504
|
+
};
|
|
10309
10505
|
};
|
|
10310
10506
|
/** @experimental */
|
|
10311
10507
|
model: {
|
|
10312
10508
|
/**
|
|
10313
10509
|
* Gets the currently selected model for the session.
|
|
10314
10510
|
*
|
|
10315
|
-
* @returns The currently selected model
|
|
10511
|
+
* @returns The currently selected model, reasoning effort, and context tier for the session. The context tier reflects `Session.getContextTier()`, restored from the session journal on resume.
|
|
10316
10512
|
*/
|
|
10317
10513
|
getCurrent: () => Promise<CurrentModel>;
|
|
10318
10514
|
/**
|
|
10319
10515
|
* Switches the session to a model and optional reasoning configuration.
|
|
10320
10516
|
*
|
|
10321
|
-
* @param params Target model identifier and optional reasoning effort, summary, and
|
|
10517
|
+
* @param params Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
|
|
10322
10518
|
*
|
|
10323
10519
|
* @returns The model identifier active on the session after the switch.
|
|
10324
10520
|
*/
|
|
@@ -10331,6 +10527,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
10331
10527
|
* @returns Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns.
|
|
10332
10528
|
*/
|
|
10333
10529
|
setReasoningEffort: (params: ModelSetReasoningEffortRequest) => Promise<ModelSetReasoningEffortResult>;
|
|
10530
|
+
/**
|
|
10531
|
+
* Lists models available to this session using its own auth and integration context. Connected hosts (CLI TUI, GitHub App) should call this through the session client so remote sessions return the remote CLI's available models rather than the caller's.
|
|
10532
|
+
*
|
|
10533
|
+
* @param params Optional listing options.
|
|
10534
|
+
*
|
|
10535
|
+
* @returns The list of models available to this session.
|
|
10536
|
+
*/
|
|
10537
|
+
list: (params?: ModelListRequest) => Promise<SessionModelList>;
|
|
10334
10538
|
};
|
|
10335
10539
|
/** @experimental */
|
|
10336
10540
|
mode: {
|
|
@@ -10785,6 +10989,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
10785
10989
|
* Reloads extension definitions and processes for the session.
|
|
10786
10990
|
*/
|
|
10787
10991
|
reload: () => Promise<void>;
|
|
10992
|
+
/**
|
|
10993
|
+
* Push attachments into the next user-message turn from an extension. The host should surface them as composer pills and forward them via the next session.send call. Callable only by extension-owned connections.
|
|
10994
|
+
*
|
|
10995
|
+
* @param params Parameters for session.extensions.sendAttachmentsToMessage.
|
|
10996
|
+
*/
|
|
10997
|
+
sendAttachmentsToMessage: (params: SendAttachmentsToMessageParams) => Promise<void>;
|
|
10788
10998
|
};
|
|
10789
10999
|
/** @experimental */
|
|
10790
11000
|
tools: {
|
|
@@ -10802,6 +11012,12 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
10802
11012
|
* @returns Resolve, build, and validate the runtime tool list for this session. Subagent sessions and consumer flows that need an initialized tool set before `send` invoke this. Default base-class implementation is a no-op for sessions that don't support tool validation.
|
|
10803
11013
|
*/
|
|
10804
11014
|
initializeAndValidate: () => Promise<ToolsInitializeAndValidateResult>;
|
|
11015
|
+
/**
|
|
11016
|
+
* Returns lightweight metadata for the session's currently initialized tools.
|
|
11017
|
+
*
|
|
11018
|
+
* @returns Current lightweight tool metadata snapshot for the session.
|
|
11019
|
+
*/
|
|
11020
|
+
getCurrentMetadata: () => Promise<ToolsGetCurrentMetadataResult>;
|
|
10805
11021
|
};
|
|
10806
11022
|
/** @experimental */
|
|
10807
11023
|
commands: {
|
|
@@ -11442,7 +11658,7 @@ export interface CanvasHandler {
|
|
|
11442
11658
|
*
|
|
11443
11659
|
* @returns Provider-supplied action result.
|
|
11444
11660
|
*/
|
|
11445
|
-
|
|
11661
|
+
invoke(params: CanvasProviderInvokeActionRequest): Promise<CanvasActionInvokeResult>;
|
|
11446
11662
|
}
|
|
11447
11663
|
/** All client session API handler groups. */
|
|
11448
11664
|
export interface ClientSessionApiHandlers {
|