@github/copilot-sdk 0.2.2 → 0.3.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cjs/client.js +60 -16
- package/dist/cjs/extension.js +2 -4
- package/dist/cjs/generated/rpc.js +40 -10
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/session.js +5 -4
- package/dist/cjs/sessionFsProvider.js +121 -0
- package/dist/cjs/types.js +52 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +60 -16
- package/dist/extension.d.ts +1 -1
- package/dist/extension.js +3 -3
- package/dist/generated/rpc.d.ts +1366 -1022
- package/dist/generated/rpc.js +40 -10
- package/dist/generated/session-events.d.ts +3863 -2894
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -1
- package/dist/session.js +5 -4
- package/dist/sessionFsProvider.d.ts +44 -0
- package/dist/sessionFsProvider.js +97 -0
- package/dist/types.d.ts +119 -16
- package/dist/types.js +49 -1
- package/docs/agent-author.md +22 -14
- package/docs/examples.md +35 -31
- package/package.json +2 -2
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -3,407 +3,736 @@
|
|
|
3
3
|
* Generated from: api.schema.json
|
|
4
4
|
*/
|
|
5
5
|
import type { MessageConnection } from "vscode-jsonrpc/node.js";
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Authentication type
|
|
8
|
+
*
|
|
9
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
10
|
+
* via the `definition` "AuthInfoType".
|
|
11
|
+
*/
|
|
12
|
+
export type AuthInfoType = "hmac" | "env" | "user" | "gh-cli" | "api-key" | "token" | "copilot-api-token";
|
|
13
|
+
/**
|
|
14
|
+
* Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)
|
|
15
|
+
*
|
|
16
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
17
|
+
* via the `definition` "DiscoveredMcpServerType".
|
|
18
|
+
*/
|
|
19
|
+
export type DiscoveredMcpServerType = "stdio" | "http" | "sse" | "memory";
|
|
20
|
+
/**
|
|
21
|
+
* Configuration source
|
|
22
|
+
*
|
|
23
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
24
|
+
* via the `definition` "DiscoveredMcpServerSource".
|
|
25
|
+
*/
|
|
26
|
+
export type DiscoveredMcpServerSource = "user" | "workspace" | "plugin" | "builtin";
|
|
27
|
+
/**
|
|
28
|
+
* Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
|
|
29
|
+
*
|
|
30
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
31
|
+
* via the `definition` "ExtensionSource".
|
|
32
|
+
*/
|
|
33
|
+
export type ExtensionSource = "project" | "user";
|
|
34
|
+
/**
|
|
35
|
+
* Current status: running, disabled, failed, or starting
|
|
36
|
+
*
|
|
37
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
38
|
+
* via the `definition` "ExtensionStatus".
|
|
39
|
+
*/
|
|
40
|
+
export type ExtensionStatus = "running" | "disabled" | "failed" | "starting";
|
|
41
|
+
export type FilterMapping = {
|
|
42
|
+
[k: string]: FilterMappingValue;
|
|
43
|
+
} | FilterMappingString;
|
|
44
|
+
export type FilterMappingValue = "none" | "markdown" | "hidden_characters";
|
|
45
|
+
export type FilterMappingString = "none" | "markdown" | "hidden_characters";
|
|
46
|
+
/**
|
|
47
|
+
* Category of instruction source — used for merge logic
|
|
48
|
+
*
|
|
49
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
50
|
+
* via the `definition` "InstructionsSourcesType".
|
|
51
|
+
*/
|
|
52
|
+
export type InstructionsSourcesType = "home" | "repo" | "model" | "vscode" | "nested-agents" | "child-instructions";
|
|
53
|
+
/**
|
|
54
|
+
* Where this source lives — used for UI grouping
|
|
55
|
+
*
|
|
56
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
57
|
+
* via the `definition` "InstructionsSourcesLocation".
|
|
58
|
+
*/
|
|
59
|
+
export type InstructionsSourcesLocation = "user" | "repository" | "working-directory";
|
|
60
|
+
/**
|
|
61
|
+
* Log severity level. Determines how the message is displayed in the timeline. Defaults to "info".
|
|
62
|
+
*
|
|
63
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
64
|
+
* via the `definition` "SessionLogLevel".
|
|
65
|
+
*/
|
|
66
|
+
export type SessionLogLevel = "info" | "warning" | "error";
|
|
67
|
+
/**
|
|
68
|
+
* MCP server configuration (local/stdio or remote/http)
|
|
69
|
+
*
|
|
70
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
71
|
+
* via the `definition` "McpServerConfig".
|
|
72
|
+
*/
|
|
73
|
+
export type McpServerConfig = McpServerConfigLocal | McpServerConfigHttp;
|
|
74
|
+
export type McpServerConfigLocalType = "local" | "stdio";
|
|
75
|
+
/**
|
|
76
|
+
* Remote transport type. Defaults to "http" when omitted.
|
|
77
|
+
*
|
|
78
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
79
|
+
* via the `definition` "McpServerConfigHttpType".
|
|
80
|
+
*/
|
|
81
|
+
export type McpServerConfigHttpType = "http" | "sse";
|
|
82
|
+
/**
|
|
83
|
+
* Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
|
|
84
|
+
*
|
|
85
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
86
|
+
* via the `definition` "McpServerStatus".
|
|
87
|
+
*/
|
|
88
|
+
export type McpServerStatus = "connected" | "failed" | "needs-auth" | "pending" | "disabled" | "not_configured";
|
|
89
|
+
/**
|
|
90
|
+
* Configuration source: user, workspace, plugin, or builtin
|
|
91
|
+
*
|
|
92
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
93
|
+
* via the `definition` "McpServerSource".
|
|
94
|
+
*/
|
|
95
|
+
export type McpServerSource = "user" | "workspace" | "plugin" | "builtin";
|
|
96
|
+
/**
|
|
97
|
+
* The agent mode. Valid values: "interactive", "plan", "autopilot".
|
|
98
|
+
*
|
|
99
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
100
|
+
* via the `definition` "SessionMode".
|
|
101
|
+
*/
|
|
102
|
+
export type SessionMode = "interactive" | "plan" | "autopilot";
|
|
103
|
+
export type PermissionDecision = PermissionDecisionApproveOnce | PermissionDecisionApproveForSession | PermissionDecisionApproveForLocation | PermissionDecisionReject | PermissionDecisionUserNotAvailable;
|
|
104
|
+
/**
|
|
105
|
+
* The approval to add as a session-scoped rule
|
|
106
|
+
*
|
|
107
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
108
|
+
* via the `definition` "PermissionDecisionApproveForSessionApproval".
|
|
109
|
+
*/
|
|
110
|
+
export type PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMcp | PermissionDecisionApproveForSessionApprovalMcpSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool;
|
|
111
|
+
/**
|
|
112
|
+
* The approval to persist for this location
|
|
113
|
+
*
|
|
114
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
115
|
+
* via the `definition` "PermissionDecisionApproveForLocationApproval".
|
|
116
|
+
*/
|
|
117
|
+
export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMcp | PermissionDecisionApproveForLocationApprovalMcpSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool;
|
|
118
|
+
/**
|
|
119
|
+
* Error classification
|
|
120
|
+
*
|
|
121
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
122
|
+
* via the `definition` "SessionFsErrorCode".
|
|
123
|
+
*/
|
|
124
|
+
export type SessionFsErrorCode = "ENOENT" | "UNKNOWN";
|
|
125
|
+
/**
|
|
126
|
+
* Entry type
|
|
127
|
+
*
|
|
128
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
129
|
+
* via the `definition` "SessionFsReaddirWithTypesEntryType".
|
|
130
|
+
*/
|
|
131
|
+
export type SessionFsReaddirWithTypesEntryType = "file" | "directory";
|
|
132
|
+
/**
|
|
133
|
+
* Path conventions used by this filesystem
|
|
134
|
+
*
|
|
135
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
136
|
+
* via the `definition` "SessionFsSetProviderConventions".
|
|
137
|
+
*/
|
|
138
|
+
export type SessionFsSetProviderConventions = "windows" | "posix";
|
|
139
|
+
/**
|
|
140
|
+
* Signal to send (default: SIGTERM)
|
|
141
|
+
*
|
|
142
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
143
|
+
* via the `definition` "ShellKillSignal".
|
|
144
|
+
*/
|
|
145
|
+
export type ShellKillSignal = "SIGTERM" | "SIGKILL" | "SIGINT";
|
|
146
|
+
/**
|
|
147
|
+
* Tool call result (string or expanded result object)
|
|
148
|
+
*
|
|
149
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
150
|
+
* via the `definition` "ToolsHandlePendingToolCall".
|
|
151
|
+
*/
|
|
152
|
+
export type ToolsHandlePendingToolCall = string | ToolCallResult;
|
|
153
|
+
export type UIElicitationFieldValue = string | number | boolean | string[];
|
|
154
|
+
export type UIElicitationSchemaProperty = UIElicitationStringEnumField | UIElicitationStringOneOfField | UIElicitationArrayEnumField | UIElicitationArrayAnyOfField | UIElicitationSchemaPropertyBoolean | UIElicitationSchemaPropertyString | UIElicitationSchemaPropertyNumber;
|
|
155
|
+
export type UIElicitationSchemaPropertyStringFormat = "email" | "uri" | "date" | "date-time";
|
|
156
|
+
export type UIElicitationSchemaPropertyNumberType = "number" | "integer";
|
|
157
|
+
/**
|
|
158
|
+
* The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
|
|
159
|
+
*
|
|
160
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
161
|
+
* via the `definition` "UIElicitationResponseAction".
|
|
162
|
+
*/
|
|
163
|
+
export type UIElicitationResponseAction = "accept" | "decline" | "cancel";
|
|
164
|
+
export interface AccountGetQuotaRequest {
|
|
7
165
|
/**
|
|
8
|
-
*
|
|
166
|
+
* GitHub token for per-user quota lookup. When provided, resolves this token to determine the user's quota instead of using the global auth.
|
|
9
167
|
*/
|
|
10
|
-
|
|
168
|
+
gitHubToken?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface AccountGetQuotaResult {
|
|
11
171
|
/**
|
|
12
|
-
*
|
|
172
|
+
* Quota snapshots keyed by type (e.g., chat, completions, premium_interactions)
|
|
13
173
|
*/
|
|
14
|
-
|
|
174
|
+
quotaSnapshots: {
|
|
175
|
+
[k: string]: AccountQuotaSnapshot;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export interface AccountQuotaSnapshot {
|
|
15
179
|
/**
|
|
16
|
-
*
|
|
180
|
+
* Whether the user has an unlimited usage entitlement
|
|
17
181
|
*/
|
|
18
|
-
|
|
182
|
+
isUnlimitedEntitlement: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Number of requests included in the entitlement
|
|
185
|
+
*/
|
|
186
|
+
entitlementRequests: number;
|
|
187
|
+
/**
|
|
188
|
+
* Number of requests used so far this period
|
|
189
|
+
*/
|
|
190
|
+
usedRequests: number;
|
|
191
|
+
/**
|
|
192
|
+
* Whether usage is still permitted after quota exhaustion
|
|
193
|
+
*/
|
|
194
|
+
usageAllowedWithExhaustedQuota: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Percentage of entitlement remaining
|
|
197
|
+
*/
|
|
198
|
+
remainingPercentage: number;
|
|
199
|
+
/**
|
|
200
|
+
* Number of overage requests made this period
|
|
201
|
+
*/
|
|
202
|
+
overage: number;
|
|
203
|
+
/**
|
|
204
|
+
* Whether overage is allowed when quota is exhausted
|
|
205
|
+
*/
|
|
206
|
+
overageAllowedWithExhaustedQuota: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Date when the quota resets (ISO 8601 string)
|
|
209
|
+
*/
|
|
210
|
+
resetDate?: string;
|
|
19
211
|
}
|
|
20
|
-
|
|
212
|
+
/** @experimental */
|
|
213
|
+
export interface AgentGetCurrentResult {
|
|
21
214
|
/**
|
|
22
|
-
*
|
|
215
|
+
* Currently selected custom agent, or null if using the default agent
|
|
23
216
|
*/
|
|
24
|
-
|
|
217
|
+
agent?: AgentInfo | null;
|
|
25
218
|
}
|
|
26
|
-
export interface
|
|
219
|
+
export interface AgentInfo {
|
|
27
220
|
/**
|
|
28
|
-
*
|
|
221
|
+
* Unique identifier of the custom agent
|
|
29
222
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
capabilities: ModelCapabilities;
|
|
40
|
-
/**
|
|
41
|
-
* Policy state (if applicable)
|
|
42
|
-
*/
|
|
43
|
-
policy?: {
|
|
44
|
-
/**
|
|
45
|
-
* Current policy state for this model
|
|
46
|
-
*/
|
|
47
|
-
state: string;
|
|
48
|
-
/**
|
|
49
|
-
* Usage terms or conditions for this model
|
|
50
|
-
*/
|
|
51
|
-
terms: string;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Billing information
|
|
55
|
-
*/
|
|
56
|
-
billing?: {
|
|
57
|
-
/**
|
|
58
|
-
* Billing cost multiplier relative to the base rate
|
|
59
|
-
*/
|
|
60
|
-
multiplier: number;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Supported reasoning effort levels (only present if model supports reasoning effort)
|
|
64
|
-
*/
|
|
65
|
-
supportedReasoningEfforts?: string[];
|
|
66
|
-
/**
|
|
67
|
-
* Default reasoning effort level (only present if model supports reasoning effort)
|
|
68
|
-
*/
|
|
69
|
-
defaultReasoningEffort?: string;
|
|
70
|
-
}[];
|
|
223
|
+
name: string;
|
|
224
|
+
/**
|
|
225
|
+
* Human-readable display name
|
|
226
|
+
*/
|
|
227
|
+
displayName: string;
|
|
228
|
+
/**
|
|
229
|
+
* Description of the agent's purpose
|
|
230
|
+
*/
|
|
231
|
+
description: string;
|
|
71
232
|
}
|
|
72
|
-
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
233
|
+
/** @experimental */
|
|
234
|
+
export interface AgentList {
|
|
235
|
+
/**
|
|
236
|
+
* Available custom agents
|
|
237
|
+
*/
|
|
238
|
+
agents: AgentInfo[];
|
|
78
239
|
}
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
*/
|
|
82
|
-
export interface ModelCapabilitiesSupports {
|
|
240
|
+
/** @experimental */
|
|
241
|
+
export interface AgentReloadResult {
|
|
83
242
|
/**
|
|
84
|
-
*
|
|
243
|
+
* Reloaded custom agents
|
|
85
244
|
*/
|
|
86
|
-
|
|
245
|
+
agents: AgentInfo[];
|
|
246
|
+
}
|
|
247
|
+
/** @experimental */
|
|
248
|
+
export interface AgentSelectRequest {
|
|
87
249
|
/**
|
|
88
|
-
*
|
|
250
|
+
* Name of the custom agent to select
|
|
89
251
|
*/
|
|
90
|
-
|
|
252
|
+
name: string;
|
|
91
253
|
}
|
|
92
|
-
/**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
254
|
+
/** @experimental */
|
|
255
|
+
export interface AgentSelectResult {
|
|
256
|
+
agent: AgentInfo;
|
|
257
|
+
}
|
|
258
|
+
export interface CommandsHandlePendingCommandRequest {
|
|
96
259
|
/**
|
|
97
|
-
*
|
|
260
|
+
* Request ID from the command invocation event
|
|
98
261
|
*/
|
|
99
|
-
|
|
262
|
+
requestId: string;
|
|
100
263
|
/**
|
|
101
|
-
*
|
|
264
|
+
* Error message if the command handler failed
|
|
102
265
|
*/
|
|
103
|
-
|
|
266
|
+
error?: string;
|
|
267
|
+
}
|
|
268
|
+
export interface CommandsHandlePendingCommandResult {
|
|
104
269
|
/**
|
|
105
|
-
*
|
|
270
|
+
* Whether the command was handled successfully
|
|
106
271
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
272
|
+
success: boolean;
|
|
273
|
+
}
|
|
274
|
+
export interface CurrentModel {
|
|
275
|
+
/**
|
|
276
|
+
* Currently active model identifier
|
|
277
|
+
*/
|
|
278
|
+
modelId?: string;
|
|
279
|
+
}
|
|
280
|
+
export interface DiscoveredMcpServer {
|
|
281
|
+
/**
|
|
282
|
+
* Server name (config key)
|
|
283
|
+
*/
|
|
284
|
+
name: string;
|
|
285
|
+
type?: DiscoveredMcpServerType;
|
|
286
|
+
source: DiscoveredMcpServerSource;
|
|
287
|
+
/**
|
|
288
|
+
* Whether the server is enabled (not in the disabled list)
|
|
289
|
+
*/
|
|
290
|
+
enabled: boolean;
|
|
291
|
+
}
|
|
292
|
+
export interface Extension {
|
|
293
|
+
/**
|
|
294
|
+
* Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
|
|
295
|
+
*/
|
|
296
|
+
id: string;
|
|
297
|
+
/**
|
|
298
|
+
* Extension name (directory name)
|
|
299
|
+
*/
|
|
300
|
+
name: string;
|
|
301
|
+
source: ExtensionSource;
|
|
302
|
+
status: ExtensionStatus;
|
|
303
|
+
/**
|
|
304
|
+
* Process ID if the extension is running
|
|
305
|
+
*/
|
|
306
|
+
pid?: number;
|
|
307
|
+
}
|
|
308
|
+
/** @experimental */
|
|
309
|
+
export interface ExtensionList {
|
|
310
|
+
/**
|
|
311
|
+
* Discovered extensions and their current status
|
|
312
|
+
*/
|
|
313
|
+
extensions: Extension[];
|
|
314
|
+
}
|
|
315
|
+
/** @experimental */
|
|
316
|
+
export interface ExtensionsDisableRequest {
|
|
317
|
+
/**
|
|
318
|
+
* Source-qualified extension ID to disable
|
|
319
|
+
*/
|
|
320
|
+
id: string;
|
|
321
|
+
}
|
|
322
|
+
/** @experimental */
|
|
323
|
+
export interface ExtensionsEnableRequest {
|
|
324
|
+
/**
|
|
325
|
+
* Source-qualified extension ID to enable
|
|
326
|
+
*/
|
|
327
|
+
id: string;
|
|
328
|
+
}
|
|
329
|
+
/** @experimental */
|
|
330
|
+
export interface FleetStartRequest {
|
|
331
|
+
/**
|
|
332
|
+
* Optional user prompt to combine with fleet instructions
|
|
333
|
+
*/
|
|
334
|
+
prompt?: string;
|
|
335
|
+
}
|
|
336
|
+
/** @experimental */
|
|
337
|
+
export interface FleetStartResult {
|
|
338
|
+
/**
|
|
339
|
+
* Whether fleet mode was successfully activated
|
|
340
|
+
*/
|
|
341
|
+
started: boolean;
|
|
342
|
+
}
|
|
343
|
+
export interface HandleToolCallResult {
|
|
344
|
+
/**
|
|
345
|
+
* Whether the tool call result was handled successfully
|
|
346
|
+
*/
|
|
347
|
+
success: boolean;
|
|
109
348
|
}
|
|
110
349
|
/**
|
|
111
|
-
*
|
|
350
|
+
* Post-compaction context window usage breakdown
|
|
351
|
+
*
|
|
352
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
353
|
+
* via the `definition` "HistoryCompactContextWindow".
|
|
112
354
|
*/
|
|
113
|
-
export interface
|
|
355
|
+
export interface HistoryCompactContextWindow {
|
|
114
356
|
/**
|
|
115
|
-
*
|
|
357
|
+
* Maximum token count for the model's context window
|
|
116
358
|
*/
|
|
117
|
-
|
|
359
|
+
tokenLimit: number;
|
|
118
360
|
/**
|
|
119
|
-
*
|
|
361
|
+
* Current total tokens in the context window (system + conversation + tool definitions)
|
|
120
362
|
*/
|
|
121
|
-
|
|
363
|
+
currentTokens: number;
|
|
122
364
|
/**
|
|
123
|
-
*
|
|
365
|
+
* Current number of messages in the conversation
|
|
124
366
|
*/
|
|
125
|
-
|
|
367
|
+
messagesLength: number;
|
|
368
|
+
/**
|
|
369
|
+
* Token count from system message(s)
|
|
370
|
+
*/
|
|
371
|
+
systemTokens?: number;
|
|
372
|
+
/**
|
|
373
|
+
* Token count from non-system messages (user, assistant, tool)
|
|
374
|
+
*/
|
|
375
|
+
conversationTokens?: number;
|
|
376
|
+
/**
|
|
377
|
+
* Token count from tool definitions
|
|
378
|
+
*/
|
|
379
|
+
toolDefinitionsTokens?: number;
|
|
126
380
|
}
|
|
127
|
-
|
|
381
|
+
/** @experimental */
|
|
382
|
+
export interface HistoryCompactResult {
|
|
128
383
|
/**
|
|
129
|
-
*
|
|
384
|
+
* Whether compaction completed successfully
|
|
130
385
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* Description of what the tool does
|
|
142
|
-
*/
|
|
143
|
-
description: string;
|
|
144
|
-
/**
|
|
145
|
-
* JSON Schema for the tool's input parameters
|
|
146
|
-
*/
|
|
147
|
-
parameters?: {
|
|
148
|
-
[k: string]: unknown;
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* Optional instructions for how to use this tool effectively
|
|
152
|
-
*/
|
|
153
|
-
instructions?: string;
|
|
154
|
-
}[];
|
|
386
|
+
success: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Number of tokens freed by compaction
|
|
389
|
+
*/
|
|
390
|
+
tokensRemoved: number;
|
|
391
|
+
/**
|
|
392
|
+
* Number of messages removed during compaction
|
|
393
|
+
*/
|
|
394
|
+
messagesRemoved: number;
|
|
395
|
+
contextWindow?: HistoryCompactContextWindow;
|
|
155
396
|
}
|
|
156
|
-
|
|
397
|
+
/** @experimental */
|
|
398
|
+
export interface HistoryTruncateRequest {
|
|
157
399
|
/**
|
|
158
|
-
*
|
|
400
|
+
* Event ID to truncate to. This event and all events after it are removed from the session.
|
|
159
401
|
*/
|
|
160
|
-
|
|
402
|
+
eventId: string;
|
|
161
403
|
}
|
|
162
|
-
|
|
404
|
+
/** @experimental */
|
|
405
|
+
export interface HistoryTruncateResult {
|
|
163
406
|
/**
|
|
164
|
-
*
|
|
407
|
+
* Number of events that were removed
|
|
165
408
|
*/
|
|
166
|
-
|
|
167
|
-
[k: string]: {
|
|
168
|
-
/**
|
|
169
|
-
* Number of requests included in the entitlement
|
|
170
|
-
*/
|
|
171
|
-
entitlementRequests: number;
|
|
172
|
-
/**
|
|
173
|
-
* Number of requests used so far this period
|
|
174
|
-
*/
|
|
175
|
-
usedRequests: number;
|
|
176
|
-
/**
|
|
177
|
-
* Percentage of entitlement remaining
|
|
178
|
-
*/
|
|
179
|
-
remainingPercentage: number;
|
|
180
|
-
/**
|
|
181
|
-
* Number of overage requests made this period
|
|
182
|
-
*/
|
|
183
|
-
overage: number;
|
|
184
|
-
/**
|
|
185
|
-
* Whether pay-per-request usage is allowed when quota is exhausted
|
|
186
|
-
*/
|
|
187
|
-
overageAllowedWithExhaustedQuota: boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Date when the quota resets (ISO 8601)
|
|
190
|
-
*/
|
|
191
|
-
resetDate?: string;
|
|
192
|
-
};
|
|
193
|
-
};
|
|
409
|
+
eventsRemoved: number;
|
|
194
410
|
}
|
|
195
|
-
export interface
|
|
411
|
+
export interface InstructionsGetSourcesResult {
|
|
196
412
|
/**
|
|
197
|
-
*
|
|
413
|
+
* Instruction sources for the session
|
|
198
414
|
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
415
|
+
sources: InstructionsSources[];
|
|
416
|
+
}
|
|
417
|
+
export interface InstructionsSources {
|
|
418
|
+
/**
|
|
419
|
+
* Unique identifier for this source (used for toggling)
|
|
420
|
+
*/
|
|
421
|
+
id: string;
|
|
422
|
+
/**
|
|
423
|
+
* Human-readable label
|
|
424
|
+
*/
|
|
425
|
+
label: string;
|
|
426
|
+
/**
|
|
427
|
+
* File path relative to repo or absolute for home
|
|
428
|
+
*/
|
|
429
|
+
sourcePath: string;
|
|
430
|
+
/**
|
|
431
|
+
* Raw content of the instruction file
|
|
432
|
+
*/
|
|
433
|
+
content: string;
|
|
434
|
+
type: InstructionsSourcesType;
|
|
435
|
+
location: InstructionsSourcesLocation;
|
|
436
|
+
/**
|
|
437
|
+
* Glob pattern from frontmatter — when set, this instruction applies only to matching files
|
|
438
|
+
*/
|
|
439
|
+
applyTo?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Short description (body after frontmatter) for use in instruction tables
|
|
442
|
+
*/
|
|
443
|
+
description?: string;
|
|
444
|
+
}
|
|
445
|
+
export interface LogRequest {
|
|
446
|
+
/**
|
|
447
|
+
* Human-readable message
|
|
448
|
+
*/
|
|
449
|
+
message: string;
|
|
450
|
+
level?: SessionLogLevel;
|
|
451
|
+
/**
|
|
452
|
+
* When true, the message is transient and not persisted to the session event log on disk
|
|
453
|
+
*/
|
|
454
|
+
ephemeral?: boolean;
|
|
455
|
+
/**
|
|
456
|
+
* Optional URL the user can open in their browser for more details
|
|
457
|
+
*/
|
|
458
|
+
url?: string;
|
|
459
|
+
}
|
|
460
|
+
export interface LogResult {
|
|
461
|
+
/**
|
|
462
|
+
* The unique identifier of the emitted session event
|
|
463
|
+
*/
|
|
464
|
+
eventId: string;
|
|
239
465
|
}
|
|
240
|
-
export interface
|
|
466
|
+
export interface McpConfigAddRequest {
|
|
241
467
|
/**
|
|
242
468
|
* Unique name for the MCP server
|
|
243
469
|
*/
|
|
244
470
|
name: string;
|
|
471
|
+
config: McpServerConfig;
|
|
472
|
+
}
|
|
473
|
+
export interface McpServerConfigLocal {
|
|
245
474
|
/**
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
cwd?: string;
|
|
262
|
-
env?: {
|
|
263
|
-
[k: string]: string;
|
|
264
|
-
};
|
|
265
|
-
} | {
|
|
266
|
-
/**
|
|
267
|
-
* Tools to include. Defaults to all tools if not specified.
|
|
268
|
-
*/
|
|
269
|
-
tools?: string[];
|
|
270
|
-
type: "http" | "sse";
|
|
271
|
-
isDefaultServer?: boolean;
|
|
272
|
-
filterMapping?: {
|
|
273
|
-
[k: string]: "none" | "markdown" | "hidden_characters";
|
|
274
|
-
} | ("none" | "markdown" | "hidden_characters");
|
|
275
|
-
timeout?: number;
|
|
276
|
-
url: string;
|
|
277
|
-
headers?: {
|
|
278
|
-
[k: string]: string;
|
|
279
|
-
};
|
|
280
|
-
oauthClientId?: string;
|
|
281
|
-
oauthPublicClient?: boolean;
|
|
475
|
+
* Tools to include. Defaults to all tools if not specified.
|
|
476
|
+
*/
|
|
477
|
+
tools?: string[];
|
|
478
|
+
type?: McpServerConfigLocalType;
|
|
479
|
+
isDefaultServer?: boolean;
|
|
480
|
+
filterMapping?: FilterMapping;
|
|
481
|
+
/**
|
|
482
|
+
* Timeout in milliseconds for tool calls to this server.
|
|
483
|
+
*/
|
|
484
|
+
timeout?: number;
|
|
485
|
+
command: string;
|
|
486
|
+
args: string[];
|
|
487
|
+
cwd?: string;
|
|
488
|
+
env?: {
|
|
489
|
+
[k: string]: string;
|
|
282
490
|
};
|
|
283
491
|
}
|
|
284
|
-
export interface
|
|
492
|
+
export interface McpServerConfigHttp {
|
|
285
493
|
/**
|
|
286
|
-
*
|
|
494
|
+
* Tools to include. Defaults to all tools if not specified.
|
|
287
495
|
*/
|
|
288
|
-
|
|
496
|
+
tools?: string[];
|
|
497
|
+
type?: McpServerConfigHttpType;
|
|
498
|
+
isDefaultServer?: boolean;
|
|
499
|
+
filterMapping?: FilterMapping;
|
|
289
500
|
/**
|
|
290
|
-
*
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
tools?: string[];
|
|
297
|
-
type?: "local" | "stdio";
|
|
298
|
-
isDefaultServer?: boolean;
|
|
299
|
-
filterMapping?: {
|
|
300
|
-
[k: string]: "none" | "markdown" | "hidden_characters";
|
|
301
|
-
} | ("none" | "markdown" | "hidden_characters");
|
|
302
|
-
timeout?: number;
|
|
303
|
-
command: string;
|
|
304
|
-
args: string[];
|
|
305
|
-
cwd?: string;
|
|
306
|
-
env?: {
|
|
307
|
-
[k: string]: string;
|
|
308
|
-
};
|
|
309
|
-
} | {
|
|
310
|
-
/**
|
|
311
|
-
* Tools to include. Defaults to all tools if not specified.
|
|
312
|
-
*/
|
|
313
|
-
tools?: string[];
|
|
314
|
-
type: "http" | "sse";
|
|
315
|
-
isDefaultServer?: boolean;
|
|
316
|
-
filterMapping?: {
|
|
317
|
-
[k: string]: "none" | "markdown" | "hidden_characters";
|
|
318
|
-
} | ("none" | "markdown" | "hidden_characters");
|
|
319
|
-
timeout?: number;
|
|
320
|
-
url: string;
|
|
321
|
-
headers?: {
|
|
322
|
-
[k: string]: string;
|
|
323
|
-
};
|
|
324
|
-
oauthClientId?: string;
|
|
325
|
-
oauthPublicClient?: boolean;
|
|
501
|
+
* Timeout in milliseconds for tool calls to this server.
|
|
502
|
+
*/
|
|
503
|
+
timeout?: number;
|
|
504
|
+
url: string;
|
|
505
|
+
headers?: {
|
|
506
|
+
[k: string]: string;
|
|
326
507
|
};
|
|
508
|
+
oauthClientId?: string;
|
|
509
|
+
oauthPublicClient?: boolean;
|
|
510
|
+
}
|
|
511
|
+
export interface McpConfigDisableRequest {
|
|
512
|
+
/**
|
|
513
|
+
* Names of MCP servers to disable. Each server is added to the persisted disabled list so new sessions skip it. Already-disabled names are ignored. Active sessions keep their current connections until they end.
|
|
514
|
+
*/
|
|
515
|
+
names: string[];
|
|
516
|
+
}
|
|
517
|
+
export interface McpConfigEnableRequest {
|
|
518
|
+
/**
|
|
519
|
+
* Names of MCP servers to enable. Each server is removed from the persisted disabled list so new sessions spawn it. Unknown or already-enabled names are ignored.
|
|
520
|
+
*/
|
|
521
|
+
names: string[];
|
|
327
522
|
}
|
|
328
|
-
export interface
|
|
523
|
+
export interface McpConfigList {
|
|
524
|
+
/**
|
|
525
|
+
* All MCP servers from user config, keyed by name
|
|
526
|
+
*/
|
|
527
|
+
servers: {
|
|
528
|
+
[k: string]: McpServerConfig;
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
export interface McpConfigRemoveRequest {
|
|
329
532
|
/**
|
|
330
533
|
* Name of the MCP server to remove
|
|
331
534
|
*/
|
|
332
535
|
name: string;
|
|
333
536
|
}
|
|
334
|
-
export interface
|
|
537
|
+
export interface McpConfigUpdateRequest {
|
|
335
538
|
/**
|
|
336
|
-
*
|
|
539
|
+
* Name of the MCP server to update
|
|
337
540
|
*/
|
|
338
|
-
|
|
541
|
+
name: string;
|
|
542
|
+
config: McpServerConfig;
|
|
339
543
|
}
|
|
340
|
-
|
|
544
|
+
/** @experimental */
|
|
545
|
+
export interface McpDisableRequest {
|
|
341
546
|
/**
|
|
342
|
-
*
|
|
547
|
+
* Name of the MCP server to disable
|
|
343
548
|
*/
|
|
344
|
-
|
|
549
|
+
serverName: string;
|
|
550
|
+
}
|
|
551
|
+
export interface McpDiscoverRequest {
|
|
345
552
|
/**
|
|
346
|
-
*
|
|
553
|
+
* Working directory used as context for discovery (e.g., plugin resolution)
|
|
347
554
|
*/
|
|
348
|
-
|
|
555
|
+
workingDirectory?: string;
|
|
556
|
+
}
|
|
557
|
+
export interface McpDiscoverResult {
|
|
349
558
|
/**
|
|
350
|
-
*
|
|
559
|
+
* MCP servers discovered from all sources
|
|
351
560
|
*/
|
|
352
|
-
|
|
561
|
+
servers: DiscoveredMcpServer[];
|
|
353
562
|
}
|
|
354
563
|
/** @experimental */
|
|
355
|
-
export interface
|
|
564
|
+
export interface McpEnableRequest {
|
|
356
565
|
/**
|
|
357
|
-
*
|
|
566
|
+
* Name of the MCP server to enable
|
|
358
567
|
*/
|
|
359
|
-
|
|
568
|
+
serverName: string;
|
|
360
569
|
}
|
|
361
570
|
/** @experimental */
|
|
362
|
-
export interface
|
|
571
|
+
export interface McpOauthLoginRequest {
|
|
363
572
|
/**
|
|
364
|
-
*
|
|
573
|
+
* Name of the remote MCP server to authenticate
|
|
365
574
|
*/
|
|
366
|
-
|
|
575
|
+
serverName: string;
|
|
367
576
|
/**
|
|
368
|
-
*
|
|
577
|
+
* When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck.
|
|
369
578
|
*/
|
|
370
|
-
|
|
579
|
+
forceReauth?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees.
|
|
582
|
+
*/
|
|
583
|
+
clientName?: string;
|
|
584
|
+
/**
|
|
585
|
+
* Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.
|
|
586
|
+
*/
|
|
587
|
+
callbackSuccessMessage?: string;
|
|
371
588
|
}
|
|
372
|
-
|
|
589
|
+
/** @experimental */
|
|
590
|
+
export interface McpOauthLoginResult {
|
|
373
591
|
/**
|
|
374
|
-
*
|
|
592
|
+
* URL the caller should open in a browser to complete OAuth. Omitted when cached tokens were still valid and no browser interaction was needed — the server is already reconnected in that case. When present, the runtime starts the callback listener before returning and continues the flow in the background; completion is signaled via session.mcp_server_status_changed.
|
|
375
593
|
*/
|
|
376
|
-
|
|
594
|
+
authorizationUrl?: string;
|
|
377
595
|
}
|
|
378
|
-
export interface
|
|
596
|
+
export interface McpServer {
|
|
379
597
|
/**
|
|
380
|
-
*
|
|
598
|
+
* Server name (config key)
|
|
381
599
|
*/
|
|
382
|
-
|
|
600
|
+
name: string;
|
|
601
|
+
status: McpServerStatus;
|
|
602
|
+
source?: McpServerSource;
|
|
603
|
+
/**
|
|
604
|
+
* Error message if the server failed to connect
|
|
605
|
+
*/
|
|
606
|
+
error?: string;
|
|
383
607
|
}
|
|
384
|
-
|
|
608
|
+
/** @experimental */
|
|
609
|
+
export interface McpServerList {
|
|
385
610
|
/**
|
|
386
|
-
*
|
|
611
|
+
* Configured MCP servers
|
|
387
612
|
*/
|
|
388
|
-
|
|
613
|
+
servers: McpServer[];
|
|
389
614
|
}
|
|
390
|
-
export interface
|
|
615
|
+
export interface Model {
|
|
391
616
|
/**
|
|
392
|
-
*
|
|
617
|
+
* Model identifier (e.g., "claude-sonnet-4.5")
|
|
393
618
|
*/
|
|
394
|
-
|
|
619
|
+
id: string;
|
|
395
620
|
/**
|
|
396
|
-
*
|
|
621
|
+
* Display name
|
|
397
622
|
*/
|
|
398
|
-
|
|
623
|
+
name: string;
|
|
624
|
+
capabilities: ModelCapabilities;
|
|
625
|
+
policy?: ModelPolicy;
|
|
626
|
+
billing?: ModelBilling;
|
|
399
627
|
/**
|
|
400
|
-
*
|
|
628
|
+
* Supported reasoning effort levels (only present if model supports reasoning effort)
|
|
401
629
|
*/
|
|
402
|
-
|
|
403
|
-
|
|
630
|
+
supportedReasoningEfforts?: string[];
|
|
631
|
+
/**
|
|
632
|
+
* Default reasoning effort level (only present if model supports reasoning effort)
|
|
633
|
+
*/
|
|
634
|
+
defaultReasoningEffort?: string;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Model capabilities and limits
|
|
638
|
+
*
|
|
639
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
640
|
+
* via the `definition` "ModelCapabilities".
|
|
641
|
+
*/
|
|
642
|
+
export interface ModelCapabilities {
|
|
643
|
+
supports?: ModelCapabilitiesSupports;
|
|
644
|
+
limits?: ModelCapabilitiesLimits;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Feature flags indicating what the model supports
|
|
648
|
+
*
|
|
649
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
650
|
+
* via the `definition` "ModelCapabilitiesSupports".
|
|
651
|
+
*/
|
|
652
|
+
export interface ModelCapabilitiesSupports {
|
|
653
|
+
/**
|
|
654
|
+
* Whether this model supports vision/image input
|
|
655
|
+
*/
|
|
656
|
+
vision?: boolean;
|
|
657
|
+
/**
|
|
658
|
+
* Whether this model supports reasoning effort configuration
|
|
659
|
+
*/
|
|
660
|
+
reasoningEffort?: boolean;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Token limits for prompts, outputs, and context window
|
|
664
|
+
*
|
|
665
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
666
|
+
* via the `definition` "ModelCapabilitiesLimits".
|
|
667
|
+
*/
|
|
668
|
+
export interface ModelCapabilitiesLimits {
|
|
669
|
+
/**
|
|
670
|
+
* Maximum number of prompt/input tokens
|
|
671
|
+
*/
|
|
672
|
+
max_prompt_tokens?: number;
|
|
673
|
+
/**
|
|
674
|
+
* Maximum number of output/completion tokens
|
|
675
|
+
*/
|
|
676
|
+
max_output_tokens?: number;
|
|
677
|
+
/**
|
|
678
|
+
* Maximum total context window size in tokens
|
|
679
|
+
*/
|
|
680
|
+
max_context_window_tokens?: number;
|
|
681
|
+
vision?: ModelCapabilitiesLimitsVision;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Vision-specific limits
|
|
685
|
+
*
|
|
686
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
687
|
+
* via the `definition` "ModelCapabilitiesLimitsVision".
|
|
688
|
+
*/
|
|
689
|
+
export interface ModelCapabilitiesLimitsVision {
|
|
690
|
+
/**
|
|
691
|
+
* MIME types the model accepts
|
|
692
|
+
*/
|
|
693
|
+
supported_media_types: string[];
|
|
694
|
+
/**
|
|
695
|
+
* Maximum number of images per prompt
|
|
696
|
+
*/
|
|
697
|
+
max_prompt_images: number;
|
|
698
|
+
/**
|
|
699
|
+
* Maximum image size in bytes
|
|
700
|
+
*/
|
|
701
|
+
max_prompt_image_size: number;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Policy state (if applicable)
|
|
705
|
+
*
|
|
706
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
707
|
+
* via the `definition` "ModelPolicy".
|
|
708
|
+
*/
|
|
709
|
+
export interface ModelPolicy {
|
|
710
|
+
/**
|
|
711
|
+
* Current policy state for this model
|
|
712
|
+
*/
|
|
713
|
+
state: string;
|
|
714
|
+
/**
|
|
715
|
+
* Usage terms or conditions for this model
|
|
716
|
+
*/
|
|
717
|
+
terms?: string;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Billing information
|
|
721
|
+
*
|
|
722
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
723
|
+
* via the `definition` "ModelBilling".
|
|
724
|
+
*/
|
|
725
|
+
export interface ModelBilling {
|
|
726
|
+
/**
|
|
727
|
+
* Billing cost multiplier relative to the base rate
|
|
728
|
+
*/
|
|
729
|
+
multiplier: number;
|
|
404
730
|
}
|
|
405
731
|
/**
|
|
406
732
|
* Override individual model capabilities resolved by the runtime
|
|
733
|
+
*
|
|
734
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
735
|
+
* via the `definition` "ModelCapabilitiesOverride".
|
|
407
736
|
*/
|
|
408
737
|
export interface ModelCapabilitiesOverride {
|
|
409
738
|
supports?: ModelCapabilitiesOverrideSupports;
|
|
@@ -411,6 +740,9 @@ export interface ModelCapabilitiesOverride {
|
|
|
411
740
|
}
|
|
412
741
|
/**
|
|
413
742
|
* Feature flags indicating what the model supports
|
|
743
|
+
*
|
|
744
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
745
|
+
* via the `definition` "ModelCapabilitiesOverrideSupports".
|
|
414
746
|
*/
|
|
415
747
|
export interface ModelCapabilitiesOverrideSupports {
|
|
416
748
|
vision?: boolean;
|
|
@@ -418,6 +750,9 @@ export interface ModelCapabilitiesOverrideSupports {
|
|
|
418
750
|
}
|
|
419
751
|
/**
|
|
420
752
|
* Token limits for prompts, outputs, and context window
|
|
753
|
+
*
|
|
754
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
755
|
+
* via the `definition` "ModelCapabilitiesOverrideLimits".
|
|
421
756
|
*/
|
|
422
757
|
export interface ModelCapabilitiesOverrideLimits {
|
|
423
758
|
max_prompt_tokens?: number;
|
|
@@ -442,750 +777,541 @@ export interface ModelCapabilitiesOverrideLimitsVision {
|
|
|
442
777
|
*/
|
|
443
778
|
max_prompt_image_size?: number;
|
|
444
779
|
}
|
|
445
|
-
export interface
|
|
780
|
+
export interface ModelList {
|
|
446
781
|
/**
|
|
447
|
-
*
|
|
782
|
+
* List of available models with full metadata
|
|
448
783
|
*/
|
|
449
|
-
|
|
784
|
+
models: Model[];
|
|
450
785
|
}
|
|
451
|
-
export interface
|
|
786
|
+
export interface ModelsListRequest {
|
|
452
787
|
/**
|
|
453
|
-
*
|
|
788
|
+
* GitHub token for per-user model listing. When provided, resolves this token to determine the user's Copilot plan and available models instead of using the global auth.
|
|
454
789
|
*/
|
|
455
|
-
|
|
790
|
+
gitHubToken?: string;
|
|
791
|
+
}
|
|
792
|
+
export interface ModelSwitchToRequest {
|
|
793
|
+
/**
|
|
794
|
+
* Model identifier to switch to
|
|
795
|
+
*/
|
|
796
|
+
modelId: string;
|
|
797
|
+
/**
|
|
798
|
+
* Reasoning effort level to use for the model
|
|
799
|
+
*/
|
|
800
|
+
reasoningEffort?: string;
|
|
801
|
+
modelCapabilities?: ModelCapabilitiesOverride;
|
|
456
802
|
}
|
|
457
|
-
export interface
|
|
803
|
+
export interface ModelSwitchToResult {
|
|
458
804
|
/**
|
|
459
|
-
*
|
|
805
|
+
* Currently active model identifier after the switch
|
|
460
806
|
*/
|
|
461
|
-
|
|
807
|
+
modelId?: string;
|
|
462
808
|
}
|
|
463
|
-
export interface
|
|
809
|
+
export interface ModeSetRequest {
|
|
810
|
+
mode: SessionMode;
|
|
811
|
+
}
|
|
812
|
+
export interface NameGetResult {
|
|
464
813
|
/**
|
|
465
|
-
*
|
|
814
|
+
* The session name, falling back to the auto-generated summary, or null if neither exists
|
|
466
815
|
*/
|
|
467
|
-
|
|
816
|
+
name: string | null;
|
|
817
|
+
}
|
|
818
|
+
export interface NameSetRequest {
|
|
468
819
|
/**
|
|
469
|
-
*
|
|
820
|
+
* New session name (1–100 characters, trimmed of leading/trailing whitespace)
|
|
470
821
|
*/
|
|
471
|
-
|
|
822
|
+
name: string;
|
|
472
823
|
}
|
|
473
|
-
export interface
|
|
824
|
+
export interface PermissionDecisionApproveOnce {
|
|
474
825
|
/**
|
|
475
|
-
*
|
|
826
|
+
* The permission request was approved for this one instance
|
|
476
827
|
*/
|
|
477
|
-
|
|
828
|
+
kind: "approve-once";
|
|
829
|
+
}
|
|
830
|
+
export interface PermissionDecisionApproveForSession {
|
|
478
831
|
/**
|
|
479
|
-
*
|
|
832
|
+
* Approved and remembered for the rest of the session
|
|
480
833
|
*/
|
|
481
|
-
|
|
834
|
+
kind: "approve-for-session";
|
|
835
|
+
approval: PermissionDecisionApproveForSessionApproval;
|
|
836
|
+
}
|
|
837
|
+
export interface PermissionDecisionApproveForSessionApprovalCommands {
|
|
838
|
+
kind: "commands";
|
|
839
|
+
commandIdentifiers: string[];
|
|
840
|
+
}
|
|
841
|
+
export interface PermissionDecisionApproveForSessionApprovalRead {
|
|
842
|
+
kind: "read";
|
|
843
|
+
}
|
|
844
|
+
export interface PermissionDecisionApproveForSessionApprovalWrite {
|
|
845
|
+
kind: "write";
|
|
846
|
+
}
|
|
847
|
+
export interface PermissionDecisionApproveForSessionApprovalMcp {
|
|
848
|
+
kind: "mcp";
|
|
849
|
+
serverName: string;
|
|
850
|
+
toolName: string | null;
|
|
851
|
+
}
|
|
852
|
+
export interface PermissionDecisionApproveForSessionApprovalMcpSampling {
|
|
853
|
+
kind: "mcp-sampling";
|
|
854
|
+
serverName: string;
|
|
855
|
+
}
|
|
856
|
+
export interface PermissionDecisionApproveForSessionApprovalMemory {
|
|
857
|
+
kind: "memory";
|
|
858
|
+
}
|
|
859
|
+
export interface PermissionDecisionApproveForSessionApprovalCustomTool {
|
|
860
|
+
kind: "custom-tool";
|
|
861
|
+
toolName: string;
|
|
862
|
+
}
|
|
863
|
+
export interface PermissionDecisionApproveForLocation {
|
|
482
864
|
/**
|
|
483
|
-
*
|
|
865
|
+
* Approved and persisted for this project location
|
|
484
866
|
*/
|
|
485
|
-
|
|
867
|
+
kind: "approve-for-location";
|
|
868
|
+
approval: PermissionDecisionApproveForLocationApproval;
|
|
869
|
+
/**
|
|
870
|
+
* The location key (git root or cwd) to persist the approval to
|
|
871
|
+
*/
|
|
872
|
+
locationKey: string;
|
|
873
|
+
}
|
|
874
|
+
export interface PermissionDecisionApproveForLocationApprovalCommands {
|
|
875
|
+
kind: "commands";
|
|
876
|
+
commandIdentifiers: string[];
|
|
877
|
+
}
|
|
878
|
+
export interface PermissionDecisionApproveForLocationApprovalRead {
|
|
879
|
+
kind: "read";
|
|
880
|
+
}
|
|
881
|
+
export interface PermissionDecisionApproveForLocationApprovalWrite {
|
|
882
|
+
kind: "write";
|
|
883
|
+
}
|
|
884
|
+
export interface PermissionDecisionApproveForLocationApprovalMcp {
|
|
885
|
+
kind: "mcp";
|
|
886
|
+
serverName: string;
|
|
887
|
+
toolName: string | null;
|
|
486
888
|
}
|
|
487
|
-
export interface
|
|
889
|
+
export interface PermissionDecisionApproveForLocationApprovalMcpSampling {
|
|
890
|
+
kind: "mcp-sampling";
|
|
891
|
+
serverName: string;
|
|
892
|
+
}
|
|
893
|
+
export interface PermissionDecisionApproveForLocationApprovalMemory {
|
|
894
|
+
kind: "memory";
|
|
895
|
+
}
|
|
896
|
+
export interface PermissionDecisionApproveForLocationApprovalCustomTool {
|
|
897
|
+
kind: "custom-tool";
|
|
898
|
+
toolName: string;
|
|
899
|
+
}
|
|
900
|
+
export interface PermissionDecisionReject {
|
|
488
901
|
/**
|
|
489
|
-
*
|
|
902
|
+
* Denied by the user during an interactive prompt
|
|
490
903
|
*/
|
|
491
|
-
|
|
904
|
+
kind: "reject";
|
|
905
|
+
/**
|
|
906
|
+
* Optional feedback from the user explaining the denial
|
|
907
|
+
*/
|
|
908
|
+
feedback?: string;
|
|
492
909
|
}
|
|
493
|
-
export interface
|
|
910
|
+
export interface PermissionDecisionUserNotAvailable {
|
|
911
|
+
/**
|
|
912
|
+
* Denied because user confirmation was unavailable
|
|
913
|
+
*/
|
|
914
|
+
kind: "user-not-available";
|
|
494
915
|
}
|
|
495
|
-
export interface
|
|
916
|
+
export interface PermissionDecisionRequest {
|
|
496
917
|
/**
|
|
497
|
-
*
|
|
918
|
+
* Request ID of the pending permission request
|
|
498
919
|
*/
|
|
499
|
-
|
|
920
|
+
requestId: string;
|
|
921
|
+
result: PermissionDecision;
|
|
922
|
+
}
|
|
923
|
+
export interface PermissionRequestResult {
|
|
500
924
|
/**
|
|
501
|
-
*
|
|
925
|
+
* Whether the permission request was handled successfully
|
|
502
926
|
*/
|
|
503
|
-
|
|
927
|
+
success: boolean;
|
|
504
928
|
}
|
|
505
|
-
export interface
|
|
929
|
+
export interface PermissionsResetSessionApprovalsRequest {
|
|
506
930
|
}
|
|
507
|
-
export interface
|
|
931
|
+
export interface PermissionsResetSessionApprovalsResult {
|
|
508
932
|
/**
|
|
509
|
-
*
|
|
933
|
+
* Whether the operation succeeded
|
|
510
934
|
*/
|
|
511
|
-
|
|
935
|
+
success: boolean;
|
|
512
936
|
}
|
|
513
|
-
export interface
|
|
937
|
+
export interface PermissionsSetApproveAllRequest {
|
|
514
938
|
/**
|
|
515
|
-
*
|
|
939
|
+
* Whether to auto-approve all tool permission requests
|
|
516
940
|
*/
|
|
517
|
-
|
|
941
|
+
enabled: boolean;
|
|
518
942
|
}
|
|
519
|
-
export interface
|
|
943
|
+
export interface PermissionsSetApproveAllResult {
|
|
520
944
|
/**
|
|
521
|
-
*
|
|
945
|
+
* Whether the operation succeeded
|
|
522
946
|
*/
|
|
523
|
-
|
|
947
|
+
success: boolean;
|
|
524
948
|
}
|
|
525
|
-
export interface
|
|
949
|
+
export interface PingRequest {
|
|
526
950
|
/**
|
|
527
|
-
*
|
|
951
|
+
* Optional message to echo back
|
|
528
952
|
*/
|
|
529
|
-
|
|
953
|
+
message?: string;
|
|
530
954
|
}
|
|
531
|
-
export interface
|
|
955
|
+
export interface PingResult {
|
|
532
956
|
/**
|
|
533
|
-
*
|
|
957
|
+
* Echoed message (or default greeting)
|
|
534
958
|
*/
|
|
535
|
-
|
|
959
|
+
message: string;
|
|
536
960
|
/**
|
|
537
|
-
*
|
|
961
|
+
* Server timestamp in milliseconds
|
|
538
962
|
*/
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
963
|
+
timestamp: number;
|
|
964
|
+
/**
|
|
965
|
+
* Server protocol version number
|
|
966
|
+
*/
|
|
967
|
+
protocolVersion: number;
|
|
542
968
|
}
|
|
543
|
-
export interface
|
|
969
|
+
export interface PlanReadResult {
|
|
544
970
|
/**
|
|
545
|
-
*
|
|
971
|
+
* Whether the plan file exists in the workspace
|
|
546
972
|
*/
|
|
547
|
-
|
|
973
|
+
exists: boolean;
|
|
548
974
|
/**
|
|
549
|
-
*
|
|
975
|
+
* The content of the plan file, or null if it does not exist
|
|
550
976
|
*/
|
|
551
|
-
|
|
977
|
+
content: string | null;
|
|
552
978
|
/**
|
|
553
|
-
*
|
|
979
|
+
* Absolute file path of the plan file, or null if workspace is not enabled
|
|
554
980
|
*/
|
|
555
|
-
|
|
981
|
+
path: string | null;
|
|
556
982
|
}
|
|
557
|
-
|
|
558
|
-
export interface SessionFleetStartResult {
|
|
983
|
+
export interface PlanUpdateRequest {
|
|
559
984
|
/**
|
|
560
|
-
*
|
|
985
|
+
* The new content for the plan file
|
|
561
986
|
*/
|
|
562
|
-
|
|
987
|
+
content: string;
|
|
563
988
|
}
|
|
564
|
-
|
|
565
|
-
export interface SessionFleetStartParams {
|
|
989
|
+
export interface Plugin {
|
|
566
990
|
/**
|
|
567
|
-
*
|
|
991
|
+
* Plugin name
|
|
568
992
|
*/
|
|
569
|
-
|
|
993
|
+
name: string;
|
|
570
994
|
/**
|
|
571
|
-
*
|
|
995
|
+
* Marketplace the plugin came from
|
|
572
996
|
*/
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
/** @experimental */
|
|
576
|
-
export interface SessionAgentListResult {
|
|
997
|
+
marketplace: string;
|
|
577
998
|
/**
|
|
578
|
-
*
|
|
999
|
+
* Installed version
|
|
579
1000
|
*/
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Unique identifier of the custom agent
|
|
583
|
-
*/
|
|
584
|
-
name: string;
|
|
585
|
-
/**
|
|
586
|
-
* Human-readable display name
|
|
587
|
-
*/
|
|
588
|
-
displayName: string;
|
|
589
|
-
/**
|
|
590
|
-
* Description of the agent's purpose
|
|
591
|
-
*/
|
|
592
|
-
description: string;
|
|
593
|
-
}[];
|
|
594
|
-
}
|
|
595
|
-
/** @experimental */
|
|
596
|
-
export interface SessionAgentListParams {
|
|
1001
|
+
version?: string;
|
|
597
1002
|
/**
|
|
598
|
-
*
|
|
1003
|
+
* Whether the plugin is currently enabled
|
|
599
1004
|
*/
|
|
600
|
-
|
|
1005
|
+
enabled: boolean;
|
|
601
1006
|
}
|
|
602
1007
|
/** @experimental */
|
|
603
|
-
export interface
|
|
1008
|
+
export interface PluginList {
|
|
604
1009
|
/**
|
|
605
|
-
*
|
|
1010
|
+
* Installed plugins
|
|
606
1011
|
*/
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Unique identifier of the custom agent
|
|
610
|
-
*/
|
|
611
|
-
name: string;
|
|
612
|
-
/**
|
|
613
|
-
* Human-readable display name
|
|
614
|
-
*/
|
|
615
|
-
displayName: string;
|
|
616
|
-
/**
|
|
617
|
-
* Description of the agent's purpose
|
|
618
|
-
*/
|
|
619
|
-
description: string;
|
|
620
|
-
} | null;
|
|
1012
|
+
plugins: Plugin[];
|
|
621
1013
|
}
|
|
622
|
-
|
|
623
|
-
export interface SessionAgentGetCurrentParams {
|
|
1014
|
+
export interface ServerSkill {
|
|
624
1015
|
/**
|
|
625
|
-
*
|
|
1016
|
+
* Unique identifier for the skill
|
|
626
1017
|
*/
|
|
627
|
-
|
|
628
|
-
}
|
|
629
|
-
/** @experimental */
|
|
630
|
-
export interface SessionAgentSelectResult {
|
|
1018
|
+
name: string;
|
|
631
1019
|
/**
|
|
632
|
-
*
|
|
1020
|
+
* Description of what the skill does
|
|
633
1021
|
*/
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Unique identifier of the custom agent
|
|
637
|
-
*/
|
|
638
|
-
name: string;
|
|
639
|
-
/**
|
|
640
|
-
* Human-readable display name
|
|
641
|
-
*/
|
|
642
|
-
displayName: string;
|
|
643
|
-
/**
|
|
644
|
-
* Description of the agent's purpose
|
|
645
|
-
*/
|
|
646
|
-
description: string;
|
|
647
|
-
};
|
|
648
|
-
}
|
|
649
|
-
/** @experimental */
|
|
650
|
-
export interface SessionAgentSelectParams {
|
|
1022
|
+
description: string;
|
|
651
1023
|
/**
|
|
652
|
-
*
|
|
1024
|
+
* Source location type (e.g., project, personal-copilot, plugin, builtin)
|
|
653
1025
|
*/
|
|
654
|
-
|
|
1026
|
+
source: string;
|
|
655
1027
|
/**
|
|
656
|
-
*
|
|
1028
|
+
* Whether the skill can be invoked by the user as a slash command
|
|
657
1029
|
*/
|
|
658
|
-
|
|
659
|
-
}
|
|
660
|
-
/** @experimental */
|
|
661
|
-
export interface SessionAgentDeselectResult {
|
|
662
|
-
}
|
|
663
|
-
/** @experimental */
|
|
664
|
-
export interface SessionAgentDeselectParams {
|
|
1030
|
+
userInvocable: boolean;
|
|
665
1031
|
/**
|
|
666
|
-
*
|
|
1032
|
+
* Whether the skill is currently enabled (based on global config)
|
|
667
1033
|
*/
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
/** @experimental */
|
|
671
|
-
export interface SessionAgentReloadResult {
|
|
1034
|
+
enabled: boolean;
|
|
672
1035
|
/**
|
|
673
|
-
*
|
|
1036
|
+
* Absolute path to the skill file
|
|
674
1037
|
*/
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Unique identifier of the custom agent
|
|
678
|
-
*/
|
|
679
|
-
name: string;
|
|
680
|
-
/**
|
|
681
|
-
* Human-readable display name
|
|
682
|
-
*/
|
|
683
|
-
displayName: string;
|
|
684
|
-
/**
|
|
685
|
-
* Description of the agent's purpose
|
|
686
|
-
*/
|
|
687
|
-
description: string;
|
|
688
|
-
}[];
|
|
689
|
-
}
|
|
690
|
-
/** @experimental */
|
|
691
|
-
export interface SessionAgentReloadParams {
|
|
1038
|
+
path?: string;
|
|
692
1039
|
/**
|
|
693
|
-
*
|
|
1040
|
+
* The project path this skill belongs to (only for project/inherited skills)
|
|
694
1041
|
*/
|
|
695
|
-
|
|
1042
|
+
projectPath?: string;
|
|
696
1043
|
}
|
|
697
|
-
|
|
698
|
-
export interface SessionSkillsListResult {
|
|
1044
|
+
export interface ServerSkillList {
|
|
699
1045
|
/**
|
|
700
|
-
*
|
|
1046
|
+
* All discovered skills across all sources
|
|
701
1047
|
*/
|
|
702
|
-
skills:
|
|
703
|
-
/**
|
|
704
|
-
* Unique identifier for the skill
|
|
705
|
-
*/
|
|
706
|
-
name: string;
|
|
707
|
-
/**
|
|
708
|
-
* Description of what the skill does
|
|
709
|
-
*/
|
|
710
|
-
description: string;
|
|
711
|
-
/**
|
|
712
|
-
* Source location type (e.g., project, personal, plugin)
|
|
713
|
-
*/
|
|
714
|
-
source: string;
|
|
715
|
-
/**
|
|
716
|
-
* Whether the skill can be invoked by the user as a slash command
|
|
717
|
-
*/
|
|
718
|
-
userInvocable: boolean;
|
|
719
|
-
/**
|
|
720
|
-
* Whether the skill is currently enabled
|
|
721
|
-
*/
|
|
722
|
-
enabled: boolean;
|
|
723
|
-
/**
|
|
724
|
-
* Absolute path to the skill file
|
|
725
|
-
*/
|
|
726
|
-
path?: string;
|
|
727
|
-
}[];
|
|
1048
|
+
skills: ServerSkill[];
|
|
728
1049
|
}
|
|
729
|
-
|
|
730
|
-
export interface SessionSkillsListParams {
|
|
1050
|
+
export interface SessionAuthStatus {
|
|
731
1051
|
/**
|
|
732
|
-
*
|
|
1052
|
+
* Whether the session has resolved authentication
|
|
733
1053
|
*/
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
/** @experimental */
|
|
737
|
-
export interface SessionSkillsEnableResult {
|
|
738
|
-
}
|
|
739
|
-
/** @experimental */
|
|
740
|
-
export interface SessionSkillsEnableParams {
|
|
1054
|
+
isAuthenticated: boolean;
|
|
1055
|
+
authType?: AuthInfoType;
|
|
741
1056
|
/**
|
|
742
|
-
*
|
|
1057
|
+
* Authentication host URL
|
|
743
1058
|
*/
|
|
744
|
-
|
|
1059
|
+
host?: string;
|
|
745
1060
|
/**
|
|
746
|
-
*
|
|
1061
|
+
* Authenticated login/username, if available
|
|
747
1062
|
*/
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
/** @experimental */
|
|
751
|
-
export interface SessionSkillsDisableResult {
|
|
752
|
-
}
|
|
753
|
-
/** @experimental */
|
|
754
|
-
export interface SessionSkillsDisableParams {
|
|
1063
|
+
login?: string;
|
|
755
1064
|
/**
|
|
756
|
-
*
|
|
1065
|
+
* Human-readable authentication status description
|
|
757
1066
|
*/
|
|
758
|
-
|
|
1067
|
+
statusMessage?: string;
|
|
759
1068
|
/**
|
|
760
|
-
*
|
|
1069
|
+
* Copilot plan tier (e.g., individual_pro, business)
|
|
761
1070
|
*/
|
|
762
|
-
|
|
763
|
-
}
|
|
764
|
-
/** @experimental */
|
|
765
|
-
export interface SessionSkillsReloadResult {
|
|
1071
|
+
copilotPlan?: string;
|
|
766
1072
|
}
|
|
767
|
-
|
|
768
|
-
export interface SessionSkillsReloadParams {
|
|
1073
|
+
export interface SessionFsAppendFileRequest {
|
|
769
1074
|
/**
|
|
770
1075
|
* Target session identifier
|
|
771
1076
|
*/
|
|
772
1077
|
sessionId: string;
|
|
773
|
-
}
|
|
774
|
-
/** @experimental */
|
|
775
|
-
export interface SessionMcpListResult {
|
|
776
1078
|
/**
|
|
777
|
-
*
|
|
1079
|
+
* Path using SessionFs conventions
|
|
778
1080
|
*/
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Server name (config key)
|
|
782
|
-
*/
|
|
783
|
-
name: string;
|
|
784
|
-
/**
|
|
785
|
-
* Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
|
|
786
|
-
*/
|
|
787
|
-
status: "connected" | "failed" | "needs-auth" | "pending" | "disabled" | "not_configured";
|
|
788
|
-
/**
|
|
789
|
-
* Configuration source: user, workspace, plugin, or builtin
|
|
790
|
-
*/
|
|
791
|
-
source?: string;
|
|
792
|
-
/**
|
|
793
|
-
* Error message if the server failed to connect
|
|
794
|
-
*/
|
|
795
|
-
error?: string;
|
|
796
|
-
}[];
|
|
797
|
-
}
|
|
798
|
-
/** @experimental */
|
|
799
|
-
export interface SessionMcpListParams {
|
|
1081
|
+
path: string;
|
|
800
1082
|
/**
|
|
801
|
-
*
|
|
1083
|
+
* Content to append
|
|
802
1084
|
*/
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
/** @experimental */
|
|
806
|
-
export interface SessionMcpEnableResult {
|
|
807
|
-
}
|
|
808
|
-
/** @experimental */
|
|
809
|
-
export interface SessionMcpEnableParams {
|
|
1085
|
+
content: string;
|
|
810
1086
|
/**
|
|
811
|
-
*
|
|
1087
|
+
* Optional POSIX-style mode for newly created files
|
|
812
1088
|
*/
|
|
813
|
-
|
|
1089
|
+
mode?: number;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Describes a filesystem error.
|
|
1093
|
+
*
|
|
1094
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1095
|
+
* via the `definition` "SessionFsError".
|
|
1096
|
+
*/
|
|
1097
|
+
export interface SessionFsError {
|
|
1098
|
+
code: SessionFsErrorCode;
|
|
814
1099
|
/**
|
|
815
|
-
*
|
|
1100
|
+
* Free-form detail about the error, for logging/diagnostics
|
|
816
1101
|
*/
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
/** @experimental */
|
|
820
|
-
export interface SessionMcpDisableResult {
|
|
1102
|
+
message?: string;
|
|
821
1103
|
}
|
|
822
|
-
|
|
823
|
-
export interface SessionMcpDisableParams {
|
|
1104
|
+
export interface SessionFsExistsRequest {
|
|
824
1105
|
/**
|
|
825
1106
|
* Target session identifier
|
|
826
1107
|
*/
|
|
827
1108
|
sessionId: string;
|
|
828
1109
|
/**
|
|
829
|
-
*
|
|
1110
|
+
* Path using SessionFs conventions
|
|
830
1111
|
*/
|
|
831
|
-
|
|
1112
|
+
path: string;
|
|
832
1113
|
}
|
|
833
|
-
|
|
834
|
-
|
|
1114
|
+
export interface SessionFsExistsResult {
|
|
1115
|
+
/**
|
|
1116
|
+
* Whether the path exists
|
|
1117
|
+
*/
|
|
1118
|
+
exists: boolean;
|
|
835
1119
|
}
|
|
836
|
-
|
|
837
|
-
export interface SessionMcpReloadParams {
|
|
1120
|
+
export interface SessionFsMkdirRequest {
|
|
838
1121
|
/**
|
|
839
1122
|
* Target session identifier
|
|
840
1123
|
*/
|
|
841
1124
|
sessionId: string;
|
|
842
|
-
}
|
|
843
|
-
/** @experimental */
|
|
844
|
-
export interface SessionPluginsListResult {
|
|
845
1125
|
/**
|
|
846
|
-
*
|
|
1126
|
+
* Path using SessionFs conventions
|
|
847
1127
|
*/
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* Plugin name
|
|
851
|
-
*/
|
|
852
|
-
name: string;
|
|
853
|
-
/**
|
|
854
|
-
* Marketplace the plugin came from
|
|
855
|
-
*/
|
|
856
|
-
marketplace: string;
|
|
857
|
-
/**
|
|
858
|
-
* Installed version
|
|
859
|
-
*/
|
|
860
|
-
version?: string;
|
|
861
|
-
/**
|
|
862
|
-
* Whether the plugin is currently enabled
|
|
863
|
-
*/
|
|
864
|
-
enabled: boolean;
|
|
865
|
-
}[];
|
|
866
|
-
}
|
|
867
|
-
/** @experimental */
|
|
868
|
-
export interface SessionPluginsListParams {
|
|
1128
|
+
path: string;
|
|
869
1129
|
/**
|
|
870
|
-
*
|
|
1130
|
+
* Create parent directories as needed
|
|
871
1131
|
*/
|
|
872
|
-
|
|
873
|
-
}
|
|
874
|
-
/** @experimental */
|
|
875
|
-
export interface SessionExtensionsListResult {
|
|
1132
|
+
recursive?: boolean;
|
|
876
1133
|
/**
|
|
877
|
-
*
|
|
1134
|
+
* Optional POSIX-style mode for newly created directories
|
|
878
1135
|
*/
|
|
879
|
-
|
|
880
|
-
/**
|
|
881
|
-
* Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
|
|
882
|
-
*/
|
|
883
|
-
id: string;
|
|
884
|
-
/**
|
|
885
|
-
* Extension name (directory name)
|
|
886
|
-
*/
|
|
887
|
-
name: string;
|
|
888
|
-
/**
|
|
889
|
-
* Discovery source: project (.github/extensions/) or user (~/.copilot/extensions/)
|
|
890
|
-
*/
|
|
891
|
-
source: "project" | "user";
|
|
892
|
-
/**
|
|
893
|
-
* Current status: running, disabled, failed, or starting
|
|
894
|
-
*/
|
|
895
|
-
status: "running" | "disabled" | "failed" | "starting";
|
|
896
|
-
/**
|
|
897
|
-
* Process ID if the extension is running
|
|
898
|
-
*/
|
|
899
|
-
pid?: number;
|
|
900
|
-
}[];
|
|
1136
|
+
mode?: number;
|
|
901
1137
|
}
|
|
902
|
-
|
|
903
|
-
export interface SessionExtensionsListParams {
|
|
1138
|
+
export interface SessionFsReaddirRequest {
|
|
904
1139
|
/**
|
|
905
1140
|
* Target session identifier
|
|
906
1141
|
*/
|
|
907
1142
|
sessionId: string;
|
|
908
|
-
}
|
|
909
|
-
/** @experimental */
|
|
910
|
-
export interface SessionExtensionsEnableResult {
|
|
911
|
-
}
|
|
912
|
-
/** @experimental */
|
|
913
|
-
export interface SessionExtensionsEnableParams {
|
|
914
1143
|
/**
|
|
915
|
-
*
|
|
1144
|
+
* Path using SessionFs conventions
|
|
916
1145
|
*/
|
|
917
|
-
|
|
1146
|
+
path: string;
|
|
1147
|
+
}
|
|
1148
|
+
export interface SessionFsReaddirResult {
|
|
918
1149
|
/**
|
|
919
|
-
*
|
|
1150
|
+
* Entry names in the directory
|
|
920
1151
|
*/
|
|
921
|
-
|
|
1152
|
+
entries: string[];
|
|
1153
|
+
error?: SessionFsError;
|
|
922
1154
|
}
|
|
923
|
-
|
|
924
|
-
|
|
1155
|
+
export interface SessionFsReaddirWithTypesEntry {
|
|
1156
|
+
/**
|
|
1157
|
+
* Entry name
|
|
1158
|
+
*/
|
|
1159
|
+
name: string;
|
|
1160
|
+
type: SessionFsReaddirWithTypesEntryType;
|
|
925
1161
|
}
|
|
926
|
-
|
|
927
|
-
export interface SessionExtensionsDisableParams {
|
|
1162
|
+
export interface SessionFsReaddirWithTypesRequest {
|
|
928
1163
|
/**
|
|
929
1164
|
* Target session identifier
|
|
930
1165
|
*/
|
|
931
1166
|
sessionId: string;
|
|
932
1167
|
/**
|
|
933
|
-
*
|
|
1168
|
+
* Path using SessionFs conventions
|
|
934
1169
|
*/
|
|
935
|
-
|
|
1170
|
+
path: string;
|
|
936
1171
|
}
|
|
937
|
-
|
|
938
|
-
|
|
1172
|
+
export interface SessionFsReaddirWithTypesResult {
|
|
1173
|
+
/**
|
|
1174
|
+
* Directory entries with type information
|
|
1175
|
+
*/
|
|
1176
|
+
entries: SessionFsReaddirWithTypesEntry[];
|
|
1177
|
+
error?: SessionFsError;
|
|
939
1178
|
}
|
|
940
|
-
|
|
941
|
-
export interface SessionExtensionsReloadParams {
|
|
1179
|
+
export interface SessionFsReadFileRequest {
|
|
942
1180
|
/**
|
|
943
1181
|
* Target session identifier
|
|
944
1182
|
*/
|
|
945
1183
|
sessionId: string;
|
|
946
|
-
}
|
|
947
|
-
export interface SessionToolsHandlePendingToolCallResult {
|
|
948
1184
|
/**
|
|
949
|
-
*
|
|
1185
|
+
* Path using SessionFs conventions
|
|
950
1186
|
*/
|
|
951
|
-
|
|
1187
|
+
path: string;
|
|
952
1188
|
}
|
|
953
|
-
export interface
|
|
1189
|
+
export interface SessionFsReadFileResult {
|
|
954
1190
|
/**
|
|
955
|
-
*
|
|
1191
|
+
* File content as UTF-8 string
|
|
956
1192
|
*/
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
result?: string | {
|
|
960
|
-
textResultForLlm: string;
|
|
961
|
-
resultType?: string;
|
|
962
|
-
error?: string;
|
|
963
|
-
toolTelemetry?: {
|
|
964
|
-
[k: string]: unknown;
|
|
965
|
-
};
|
|
966
|
-
};
|
|
967
|
-
error?: string;
|
|
968
|
-
}
|
|
969
|
-
export interface SessionCommandsHandlePendingCommandResult {
|
|
970
|
-
success: boolean;
|
|
1193
|
+
content: string;
|
|
1194
|
+
error?: SessionFsError;
|
|
971
1195
|
}
|
|
972
|
-
export interface
|
|
1196
|
+
export interface SessionFsRenameRequest {
|
|
973
1197
|
/**
|
|
974
1198
|
* Target session identifier
|
|
975
1199
|
*/
|
|
976
1200
|
sessionId: string;
|
|
977
1201
|
/**
|
|
978
|
-
*
|
|
979
|
-
*/
|
|
980
|
-
requestId: string;
|
|
981
|
-
/**
|
|
982
|
-
* Error message if the command handler failed
|
|
983
|
-
*/
|
|
984
|
-
error?: string;
|
|
985
|
-
}
|
|
986
|
-
export interface SessionUiElicitationResult {
|
|
987
|
-
/**
|
|
988
|
-
* The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
|
|
1202
|
+
* Source path using SessionFs conventions
|
|
989
1203
|
*/
|
|
990
|
-
|
|
1204
|
+
src: string;
|
|
991
1205
|
/**
|
|
992
|
-
*
|
|
1206
|
+
* Destination path using SessionFs conventions
|
|
993
1207
|
*/
|
|
994
|
-
|
|
995
|
-
[k: string]: string | number | boolean | string[];
|
|
996
|
-
};
|
|
1208
|
+
dest: string;
|
|
997
1209
|
}
|
|
998
|
-
export interface
|
|
1210
|
+
export interface SessionFsRmRequest {
|
|
999
1211
|
/**
|
|
1000
1212
|
* Target session identifier
|
|
1001
1213
|
*/
|
|
1002
1214
|
sessionId: string;
|
|
1003
1215
|
/**
|
|
1004
|
-
*
|
|
1216
|
+
* Path using SessionFs conventions
|
|
1005
1217
|
*/
|
|
1006
|
-
|
|
1218
|
+
path: string;
|
|
1007
1219
|
/**
|
|
1008
|
-
*
|
|
1009
|
-
*/
|
|
1010
|
-
|
|
1011
|
-
/**
|
|
1012
|
-
* Schema type indicator (always 'object')
|
|
1013
|
-
*/
|
|
1014
|
-
type: "object";
|
|
1015
|
-
/**
|
|
1016
|
-
* Form field definitions, keyed by field name
|
|
1017
|
-
*/
|
|
1018
|
-
properties: {
|
|
1019
|
-
[k: string]: {
|
|
1020
|
-
type: "string";
|
|
1021
|
-
title?: string;
|
|
1022
|
-
description?: string;
|
|
1023
|
-
enum: string[];
|
|
1024
|
-
enumNames?: string[];
|
|
1025
|
-
default?: string;
|
|
1026
|
-
} | {
|
|
1027
|
-
type: "string";
|
|
1028
|
-
title?: string;
|
|
1029
|
-
description?: string;
|
|
1030
|
-
oneOf: {
|
|
1031
|
-
const: string;
|
|
1032
|
-
title: string;
|
|
1033
|
-
}[];
|
|
1034
|
-
default?: string;
|
|
1035
|
-
} | {
|
|
1036
|
-
type: "array";
|
|
1037
|
-
title?: string;
|
|
1038
|
-
description?: string;
|
|
1039
|
-
minItems?: number;
|
|
1040
|
-
maxItems?: number;
|
|
1041
|
-
items: {
|
|
1042
|
-
type: "string";
|
|
1043
|
-
enum: string[];
|
|
1044
|
-
};
|
|
1045
|
-
default?: string[];
|
|
1046
|
-
} | {
|
|
1047
|
-
type: "array";
|
|
1048
|
-
title?: string;
|
|
1049
|
-
description?: string;
|
|
1050
|
-
minItems?: number;
|
|
1051
|
-
maxItems?: number;
|
|
1052
|
-
items: {
|
|
1053
|
-
anyOf: {
|
|
1054
|
-
const: string;
|
|
1055
|
-
title: string;
|
|
1056
|
-
}[];
|
|
1057
|
-
};
|
|
1058
|
-
default?: string[];
|
|
1059
|
-
} | {
|
|
1060
|
-
type: "boolean";
|
|
1061
|
-
title?: string;
|
|
1062
|
-
description?: string;
|
|
1063
|
-
default?: boolean;
|
|
1064
|
-
} | {
|
|
1065
|
-
type: "string";
|
|
1066
|
-
title?: string;
|
|
1067
|
-
description?: string;
|
|
1068
|
-
minLength?: number;
|
|
1069
|
-
maxLength?: number;
|
|
1070
|
-
format?: "email" | "uri" | "date" | "date-time";
|
|
1071
|
-
default?: string;
|
|
1072
|
-
} | {
|
|
1073
|
-
type: "number" | "integer";
|
|
1074
|
-
title?: string;
|
|
1075
|
-
description?: string;
|
|
1076
|
-
minimum?: number;
|
|
1077
|
-
maximum?: number;
|
|
1078
|
-
default?: number;
|
|
1079
|
-
};
|
|
1080
|
-
};
|
|
1081
|
-
/**
|
|
1082
|
-
* List of required field names
|
|
1083
|
-
*/
|
|
1084
|
-
required?: string[];
|
|
1085
|
-
};
|
|
1086
|
-
}
|
|
1087
|
-
export interface SessionUiHandlePendingElicitationResult {
|
|
1220
|
+
* Remove directories and their contents recursively
|
|
1221
|
+
*/
|
|
1222
|
+
recursive?: boolean;
|
|
1088
1223
|
/**
|
|
1089
|
-
*
|
|
1224
|
+
* Ignore errors if the path does not exist
|
|
1090
1225
|
*/
|
|
1091
|
-
|
|
1226
|
+
force?: boolean;
|
|
1092
1227
|
}
|
|
1093
|
-
export interface
|
|
1228
|
+
export interface SessionFsSetProviderRequest {
|
|
1094
1229
|
/**
|
|
1095
|
-
*
|
|
1230
|
+
* Initial working directory for sessions
|
|
1096
1231
|
*/
|
|
1097
|
-
|
|
1232
|
+
initialCwd: string;
|
|
1098
1233
|
/**
|
|
1099
|
-
*
|
|
1234
|
+
* Path within each session's SessionFs where the runtime stores files for that session
|
|
1100
1235
|
*/
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
* The elicitation response (accept with form values, decline, or cancel)
|
|
1104
|
-
*/
|
|
1105
|
-
result: {
|
|
1106
|
-
/**
|
|
1107
|
-
* The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
|
|
1108
|
-
*/
|
|
1109
|
-
action: "accept" | "decline" | "cancel";
|
|
1110
|
-
/**
|
|
1111
|
-
* The form values submitted by the user (present when action is 'accept')
|
|
1112
|
-
*/
|
|
1113
|
-
content?: {
|
|
1114
|
-
[k: string]: string | number | boolean | string[];
|
|
1115
|
-
};
|
|
1116
|
-
};
|
|
1236
|
+
sessionStatePath: string;
|
|
1237
|
+
conventions: SessionFsSetProviderConventions;
|
|
1117
1238
|
}
|
|
1118
|
-
export interface
|
|
1239
|
+
export interface SessionFsSetProviderResult {
|
|
1119
1240
|
/**
|
|
1120
|
-
* Whether the
|
|
1241
|
+
* Whether the provider was set successfully
|
|
1121
1242
|
*/
|
|
1122
1243
|
success: boolean;
|
|
1123
1244
|
}
|
|
1124
|
-
export interface
|
|
1245
|
+
export interface SessionFsStatRequest {
|
|
1125
1246
|
/**
|
|
1126
1247
|
* Target session identifier
|
|
1127
1248
|
*/
|
|
1128
1249
|
sessionId: string;
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
kind: "denied-by-rules";
|
|
1134
|
-
rules: unknown[];
|
|
1135
|
-
} | {
|
|
1136
|
-
kind: "denied-no-approval-rule-and-could-not-request-from-user";
|
|
1137
|
-
} | {
|
|
1138
|
-
kind: "denied-interactively-by-user";
|
|
1139
|
-
feedback?: string;
|
|
1140
|
-
} | {
|
|
1141
|
-
kind: "denied-by-content-exclusion-policy";
|
|
1142
|
-
path: string;
|
|
1143
|
-
message: string;
|
|
1144
|
-
} | {
|
|
1145
|
-
kind: "denied-by-permission-request-hook";
|
|
1146
|
-
message?: string;
|
|
1147
|
-
interrupt?: boolean;
|
|
1148
|
-
};
|
|
1250
|
+
/**
|
|
1251
|
+
* Path using SessionFs conventions
|
|
1252
|
+
*/
|
|
1253
|
+
path: string;
|
|
1149
1254
|
}
|
|
1150
|
-
export interface
|
|
1255
|
+
export interface SessionFsStatResult {
|
|
1151
1256
|
/**
|
|
1152
|
-
*
|
|
1257
|
+
* Whether the path is a file
|
|
1153
1258
|
*/
|
|
1154
|
-
|
|
1259
|
+
isFile: boolean;
|
|
1260
|
+
/**
|
|
1261
|
+
* Whether the path is a directory
|
|
1262
|
+
*/
|
|
1263
|
+
isDirectory: boolean;
|
|
1264
|
+
/**
|
|
1265
|
+
* File size in bytes
|
|
1266
|
+
*/
|
|
1267
|
+
size: number;
|
|
1268
|
+
/**
|
|
1269
|
+
* ISO 8601 timestamp of last modification
|
|
1270
|
+
*/
|
|
1271
|
+
mtime: string;
|
|
1272
|
+
/**
|
|
1273
|
+
* ISO 8601 timestamp of creation
|
|
1274
|
+
*/
|
|
1275
|
+
birthtime: string;
|
|
1276
|
+
error?: SessionFsError;
|
|
1155
1277
|
}
|
|
1156
|
-
export interface
|
|
1278
|
+
export interface SessionFsWriteFileRequest {
|
|
1157
1279
|
/**
|
|
1158
1280
|
* Target session identifier
|
|
1159
1281
|
*/
|
|
1160
1282
|
sessionId: string;
|
|
1161
1283
|
/**
|
|
1162
|
-
*
|
|
1284
|
+
* Path using SessionFs conventions
|
|
1163
1285
|
*/
|
|
1164
|
-
|
|
1286
|
+
path: string;
|
|
1165
1287
|
/**
|
|
1166
|
-
*
|
|
1288
|
+
* Content to write
|
|
1167
1289
|
*/
|
|
1168
|
-
|
|
1290
|
+
content: string;
|
|
1169
1291
|
/**
|
|
1170
|
-
*
|
|
1292
|
+
* Optional POSIX-style mode for newly created files
|
|
1171
1293
|
*/
|
|
1172
|
-
|
|
1294
|
+
mode?: number;
|
|
1295
|
+
}
|
|
1296
|
+
/** @experimental */
|
|
1297
|
+
export interface SessionsForkRequest {
|
|
1173
1298
|
/**
|
|
1174
|
-
*
|
|
1299
|
+
* Source session ID to fork from
|
|
1175
1300
|
*/
|
|
1176
|
-
|
|
1177
|
-
}
|
|
1178
|
-
export interface SessionShellExecResult {
|
|
1301
|
+
sessionId: string;
|
|
1179
1302
|
/**
|
|
1180
|
-
*
|
|
1303
|
+
* Optional event ID boundary. When provided, the fork includes only events before this ID (exclusive). When omitted, all events are included.
|
|
1181
1304
|
*/
|
|
1182
|
-
|
|
1305
|
+
toEventId?: string;
|
|
1183
1306
|
}
|
|
1184
|
-
|
|
1307
|
+
/** @experimental */
|
|
1308
|
+
export interface SessionsForkResult {
|
|
1185
1309
|
/**
|
|
1186
|
-
*
|
|
1310
|
+
* The new forked session's ID
|
|
1187
1311
|
*/
|
|
1188
1312
|
sessionId: string;
|
|
1313
|
+
}
|
|
1314
|
+
export interface ShellExecRequest {
|
|
1189
1315
|
/**
|
|
1190
1316
|
* Shell command to execute
|
|
1191
1317
|
*/
|
|
@@ -1199,378 +1325,596 @@ export interface SessionShellExecParams {
|
|
|
1199
1325
|
*/
|
|
1200
1326
|
timeout?: number;
|
|
1201
1327
|
}
|
|
1202
|
-
export interface
|
|
1328
|
+
export interface ShellExecResult {
|
|
1329
|
+
/**
|
|
1330
|
+
* Unique identifier for tracking streamed output
|
|
1331
|
+
*/
|
|
1332
|
+
processId: string;
|
|
1333
|
+
}
|
|
1334
|
+
export interface ShellKillRequest {
|
|
1335
|
+
/**
|
|
1336
|
+
* Process identifier returned by shell.exec
|
|
1337
|
+
*/
|
|
1338
|
+
processId: string;
|
|
1339
|
+
signal?: ShellKillSignal;
|
|
1340
|
+
}
|
|
1341
|
+
export interface ShellKillResult {
|
|
1203
1342
|
/**
|
|
1204
1343
|
* Whether the signal was sent successfully
|
|
1205
1344
|
*/
|
|
1206
1345
|
killed: boolean;
|
|
1207
1346
|
}
|
|
1208
|
-
export interface
|
|
1347
|
+
export interface Skill {
|
|
1209
1348
|
/**
|
|
1210
|
-
*
|
|
1349
|
+
* Unique identifier for the skill
|
|
1211
1350
|
*/
|
|
1212
|
-
|
|
1351
|
+
name: string;
|
|
1213
1352
|
/**
|
|
1214
|
-
*
|
|
1353
|
+
* Description of what the skill does
|
|
1215
1354
|
*/
|
|
1216
|
-
|
|
1355
|
+
description: string;
|
|
1217
1356
|
/**
|
|
1218
|
-
*
|
|
1357
|
+
* Source location type (e.g., project, personal, plugin)
|
|
1219
1358
|
*/
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
/** @experimental */
|
|
1223
|
-
export interface SessionHistoryCompactResult {
|
|
1359
|
+
source: string;
|
|
1224
1360
|
/**
|
|
1225
|
-
* Whether
|
|
1361
|
+
* Whether the skill can be invoked by the user as a slash command
|
|
1226
1362
|
*/
|
|
1227
|
-
|
|
1363
|
+
userInvocable: boolean;
|
|
1228
1364
|
/**
|
|
1229
|
-
*
|
|
1365
|
+
* Whether the skill is currently enabled
|
|
1230
1366
|
*/
|
|
1231
|
-
|
|
1367
|
+
enabled: boolean;
|
|
1232
1368
|
/**
|
|
1233
|
-
*
|
|
1369
|
+
* Absolute path to the skill file
|
|
1234
1370
|
*/
|
|
1235
|
-
|
|
1371
|
+
path?: string;
|
|
1236
1372
|
}
|
|
1237
1373
|
/** @experimental */
|
|
1238
|
-
export interface
|
|
1374
|
+
export interface SkillList {
|
|
1239
1375
|
/**
|
|
1240
|
-
*
|
|
1376
|
+
* Available skills
|
|
1241
1377
|
*/
|
|
1242
|
-
|
|
1378
|
+
skills: Skill[];
|
|
1243
1379
|
}
|
|
1244
|
-
|
|
1245
|
-
export interface SessionHistoryTruncateResult {
|
|
1380
|
+
export interface SkillsConfigSetDisabledSkillsRequest {
|
|
1246
1381
|
/**
|
|
1247
|
-
*
|
|
1382
|
+
* List of skill names to disable
|
|
1248
1383
|
*/
|
|
1249
|
-
|
|
1384
|
+
disabledSkills: string[];
|
|
1250
1385
|
}
|
|
1251
1386
|
/** @experimental */
|
|
1252
|
-
export interface
|
|
1387
|
+
export interface SkillsDisableRequest {
|
|
1253
1388
|
/**
|
|
1254
|
-
*
|
|
1389
|
+
* Name of the skill to disable
|
|
1255
1390
|
*/
|
|
1256
|
-
|
|
1391
|
+
name: string;
|
|
1392
|
+
}
|
|
1393
|
+
export interface SkillsDiscoverRequest {
|
|
1257
1394
|
/**
|
|
1258
|
-
*
|
|
1395
|
+
* Optional list of project directory paths to scan for project-scoped skills
|
|
1259
1396
|
*/
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
export interface SessionFsReadFileResult {
|
|
1397
|
+
projectPaths?: string[];
|
|
1263
1398
|
/**
|
|
1264
|
-
*
|
|
1399
|
+
* Optional list of additional skill directory paths to include
|
|
1265
1400
|
*/
|
|
1266
|
-
|
|
1401
|
+
skillDirectories?: string[];
|
|
1267
1402
|
}
|
|
1268
|
-
|
|
1403
|
+
/** @experimental */
|
|
1404
|
+
export interface SkillsEnableRequest {
|
|
1269
1405
|
/**
|
|
1270
|
-
*
|
|
1406
|
+
* Name of the skill to enable
|
|
1271
1407
|
*/
|
|
1272
|
-
|
|
1408
|
+
name: string;
|
|
1409
|
+
}
|
|
1410
|
+
export interface Tool {
|
|
1273
1411
|
/**
|
|
1274
|
-
*
|
|
1412
|
+
* Tool identifier (e.g., "bash", "grep", "str_replace_editor")
|
|
1275
1413
|
*/
|
|
1276
|
-
|
|
1277
|
-
}
|
|
1278
|
-
export interface SessionFsWriteFileParams {
|
|
1414
|
+
name: string;
|
|
1279
1415
|
/**
|
|
1280
|
-
*
|
|
1416
|
+
* Optional namespaced name for declarative filtering (e.g., "playwright/navigate" for MCP tools)
|
|
1281
1417
|
*/
|
|
1282
|
-
|
|
1418
|
+
namespacedName?: string;
|
|
1283
1419
|
/**
|
|
1284
|
-
*
|
|
1420
|
+
* Description of what the tool does
|
|
1285
1421
|
*/
|
|
1286
|
-
|
|
1422
|
+
description: string;
|
|
1287
1423
|
/**
|
|
1288
|
-
*
|
|
1424
|
+
* JSON Schema for the tool's input parameters
|
|
1289
1425
|
*/
|
|
1290
|
-
|
|
1426
|
+
parameters?: {
|
|
1427
|
+
[k: string]: unknown;
|
|
1428
|
+
};
|
|
1291
1429
|
/**
|
|
1292
|
-
* Optional
|
|
1430
|
+
* Optional instructions for how to use this tool effectively
|
|
1293
1431
|
*/
|
|
1294
|
-
|
|
1432
|
+
instructions?: string;
|
|
1295
1433
|
}
|
|
1296
|
-
export interface
|
|
1434
|
+
export interface ToolCallResult {
|
|
1297
1435
|
/**
|
|
1298
|
-
*
|
|
1436
|
+
* Text result to send back to the LLM
|
|
1299
1437
|
*/
|
|
1300
|
-
|
|
1438
|
+
textResultForLlm: string;
|
|
1301
1439
|
/**
|
|
1302
|
-
*
|
|
1440
|
+
* Type of the tool result
|
|
1303
1441
|
*/
|
|
1304
|
-
|
|
1442
|
+
resultType?: string;
|
|
1305
1443
|
/**
|
|
1306
|
-
*
|
|
1444
|
+
* Error message if the tool call failed
|
|
1307
1445
|
*/
|
|
1308
|
-
|
|
1446
|
+
error?: string;
|
|
1309
1447
|
/**
|
|
1310
|
-
*
|
|
1448
|
+
* Telemetry data from tool execution
|
|
1311
1449
|
*/
|
|
1312
|
-
|
|
1450
|
+
toolTelemetry?: {
|
|
1451
|
+
[k: string]: unknown;
|
|
1452
|
+
};
|
|
1313
1453
|
}
|
|
1314
|
-
export interface
|
|
1454
|
+
export interface ToolList {
|
|
1315
1455
|
/**
|
|
1316
|
-
*
|
|
1456
|
+
* List of available built-in tools with metadata
|
|
1317
1457
|
*/
|
|
1318
|
-
|
|
1458
|
+
tools: Tool[];
|
|
1319
1459
|
}
|
|
1320
|
-
export interface
|
|
1460
|
+
export interface ToolsHandlePendingToolCallRequest {
|
|
1321
1461
|
/**
|
|
1322
|
-
*
|
|
1462
|
+
* Request ID of the pending tool call
|
|
1323
1463
|
*/
|
|
1324
|
-
|
|
1464
|
+
requestId: string;
|
|
1465
|
+
result?: ToolsHandlePendingToolCall;
|
|
1325
1466
|
/**
|
|
1326
|
-
*
|
|
1467
|
+
* Error message if the tool call failed
|
|
1327
1468
|
*/
|
|
1328
|
-
|
|
1469
|
+
error?: string;
|
|
1329
1470
|
}
|
|
1330
|
-
export interface
|
|
1471
|
+
export interface ToolsListRequest {
|
|
1331
1472
|
/**
|
|
1332
|
-
*
|
|
1473
|
+
* Optional model ID — when provided, the returned tool list reflects model-specific overrides
|
|
1333
1474
|
*/
|
|
1334
|
-
|
|
1475
|
+
model?: string;
|
|
1476
|
+
}
|
|
1477
|
+
export interface UIElicitationArrayAnyOfField {
|
|
1478
|
+
type: "array";
|
|
1479
|
+
title?: string;
|
|
1480
|
+
description?: string;
|
|
1481
|
+
minItems?: number;
|
|
1482
|
+
maxItems?: number;
|
|
1483
|
+
items: UIElicitationArrayAnyOfFieldItems;
|
|
1484
|
+
default?: string[];
|
|
1485
|
+
}
|
|
1486
|
+
export interface UIElicitationArrayAnyOfFieldItems {
|
|
1487
|
+
anyOf: UIElicitationArrayAnyOfFieldItemsAnyOf[];
|
|
1488
|
+
}
|
|
1489
|
+
export interface UIElicitationArrayAnyOfFieldItemsAnyOf {
|
|
1490
|
+
const: string;
|
|
1491
|
+
title: string;
|
|
1492
|
+
}
|
|
1493
|
+
export interface UIElicitationArrayEnumField {
|
|
1494
|
+
type: "array";
|
|
1495
|
+
title?: string;
|
|
1496
|
+
description?: string;
|
|
1497
|
+
minItems?: number;
|
|
1498
|
+
maxItems?: number;
|
|
1499
|
+
items: UIElicitationArrayEnumFieldItems;
|
|
1500
|
+
default?: string[];
|
|
1501
|
+
}
|
|
1502
|
+
export interface UIElicitationArrayEnumFieldItems {
|
|
1503
|
+
type: "string";
|
|
1504
|
+
enum: string[];
|
|
1505
|
+
}
|
|
1506
|
+
export interface UIElicitationRequest {
|
|
1335
1507
|
/**
|
|
1336
|
-
*
|
|
1508
|
+
* Message describing what information is needed from the user
|
|
1337
1509
|
*/
|
|
1338
|
-
|
|
1510
|
+
message: string;
|
|
1511
|
+
requestedSchema: UIElicitationSchema;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* JSON Schema describing the form fields to present to the user
|
|
1515
|
+
*
|
|
1516
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1517
|
+
* via the `definition` "UIElicitationSchema".
|
|
1518
|
+
*/
|
|
1519
|
+
export interface UIElicitationSchema {
|
|
1339
1520
|
/**
|
|
1340
|
-
*
|
|
1521
|
+
* Schema type indicator (always 'object')
|
|
1341
1522
|
*/
|
|
1342
|
-
|
|
1523
|
+
type: "object";
|
|
1343
1524
|
/**
|
|
1344
|
-
*
|
|
1525
|
+
* Form field definitions, keyed by field name
|
|
1345
1526
|
*/
|
|
1346
|
-
|
|
1527
|
+
properties: {
|
|
1528
|
+
[k: string]: UIElicitationSchemaProperty;
|
|
1529
|
+
};
|
|
1347
1530
|
/**
|
|
1348
|
-
*
|
|
1349
|
-
*/
|
|
1350
|
-
|
|
1531
|
+
* List of required field names
|
|
1532
|
+
*/
|
|
1533
|
+
required?: string[];
|
|
1534
|
+
}
|
|
1535
|
+
export interface UIElicitationStringEnumField {
|
|
1536
|
+
type: "string";
|
|
1537
|
+
title?: string;
|
|
1538
|
+
description?: string;
|
|
1539
|
+
enum: string[];
|
|
1540
|
+
enumNames?: string[];
|
|
1541
|
+
default?: string;
|
|
1542
|
+
}
|
|
1543
|
+
export interface UIElicitationStringOneOfField {
|
|
1544
|
+
type: "string";
|
|
1545
|
+
title?: string;
|
|
1546
|
+
description?: string;
|
|
1547
|
+
oneOf: UIElicitationStringOneOfFieldOneOf[];
|
|
1548
|
+
default?: string;
|
|
1549
|
+
}
|
|
1550
|
+
export interface UIElicitationStringOneOfFieldOneOf {
|
|
1551
|
+
const: string;
|
|
1552
|
+
title: string;
|
|
1553
|
+
}
|
|
1554
|
+
export interface UIElicitationSchemaPropertyBoolean {
|
|
1555
|
+
type: "boolean";
|
|
1556
|
+
title?: string;
|
|
1557
|
+
description?: string;
|
|
1558
|
+
default?: boolean;
|
|
1559
|
+
}
|
|
1560
|
+
export interface UIElicitationSchemaPropertyString {
|
|
1561
|
+
type: "string";
|
|
1562
|
+
title?: string;
|
|
1563
|
+
description?: string;
|
|
1564
|
+
minLength?: number;
|
|
1565
|
+
maxLength?: number;
|
|
1566
|
+
format?: UIElicitationSchemaPropertyStringFormat;
|
|
1567
|
+
default?: string;
|
|
1568
|
+
}
|
|
1569
|
+
export interface UIElicitationSchemaPropertyNumber {
|
|
1570
|
+
type: UIElicitationSchemaPropertyNumberType;
|
|
1571
|
+
title?: string;
|
|
1572
|
+
description?: string;
|
|
1573
|
+
minimum?: number;
|
|
1574
|
+
maximum?: number;
|
|
1575
|
+
default?: number;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* The elicitation response (accept with form values, decline, or cancel)
|
|
1579
|
+
*
|
|
1580
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1581
|
+
* via the `definition` "UIElicitationResponse".
|
|
1582
|
+
*/
|
|
1583
|
+
export interface UIElicitationResponse {
|
|
1584
|
+
action: UIElicitationResponseAction;
|
|
1585
|
+
content?: UIElicitationResponseContent;
|
|
1351
1586
|
}
|
|
1352
|
-
|
|
1587
|
+
/**
|
|
1588
|
+
* The form values submitted by the user (present when action is 'accept')
|
|
1589
|
+
*
|
|
1590
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1591
|
+
* via the `definition` "UIElicitationResponseContent".
|
|
1592
|
+
*/
|
|
1593
|
+
export interface UIElicitationResponseContent {
|
|
1594
|
+
[k: string]: UIElicitationFieldValue;
|
|
1595
|
+
}
|
|
1596
|
+
export interface UIElicitationResult {
|
|
1353
1597
|
/**
|
|
1354
|
-
*
|
|
1598
|
+
* Whether the response was accepted. False if the request was already resolved by another client.
|
|
1355
1599
|
*/
|
|
1356
|
-
|
|
1600
|
+
success: boolean;
|
|
1601
|
+
}
|
|
1602
|
+
export interface UIHandlePendingElicitationRequest {
|
|
1357
1603
|
/**
|
|
1358
|
-
*
|
|
1604
|
+
* The unique request ID from the elicitation.requested event
|
|
1359
1605
|
*/
|
|
1360
|
-
|
|
1606
|
+
requestId: string;
|
|
1607
|
+
result: UIElicitationResponse;
|
|
1361
1608
|
}
|
|
1362
|
-
|
|
1609
|
+
/** @experimental */
|
|
1610
|
+
export interface UsageGetMetricsResult {
|
|
1363
1611
|
/**
|
|
1364
|
-
*
|
|
1612
|
+
* Total user-initiated premium request cost across all models (may be fractional due to multipliers)
|
|
1365
1613
|
*/
|
|
1366
|
-
|
|
1614
|
+
totalPremiumRequestCost: number;
|
|
1367
1615
|
/**
|
|
1368
|
-
*
|
|
1616
|
+
* Raw count of user-initiated API requests
|
|
1369
1617
|
*/
|
|
1370
|
-
|
|
1618
|
+
totalUserRequests: number;
|
|
1371
1619
|
/**
|
|
1372
|
-
*
|
|
1620
|
+
* Total time spent in model API calls (milliseconds)
|
|
1373
1621
|
*/
|
|
1374
|
-
|
|
1622
|
+
totalApiDurationMs: number;
|
|
1375
1623
|
/**
|
|
1376
|
-
*
|
|
1624
|
+
* Session start timestamp (epoch milliseconds)
|
|
1377
1625
|
*/
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
export interface SessionFsReaddirResult {
|
|
1626
|
+
sessionStartTime: number;
|
|
1627
|
+
codeChanges: UsageMetricsCodeChanges;
|
|
1381
1628
|
/**
|
|
1382
|
-
*
|
|
1629
|
+
* Per-model token and request metrics, keyed by model identifier
|
|
1383
1630
|
*/
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1631
|
+
modelMetrics: {
|
|
1632
|
+
[k: string]: UsageMetricsModelMetric;
|
|
1633
|
+
};
|
|
1387
1634
|
/**
|
|
1388
|
-
*
|
|
1635
|
+
* Currently active model identifier
|
|
1389
1636
|
*/
|
|
1390
|
-
|
|
1637
|
+
currentModel?: string;
|
|
1391
1638
|
/**
|
|
1392
|
-
*
|
|
1639
|
+
* Input tokens from the most recent main-agent API call
|
|
1393
1640
|
*/
|
|
1394
|
-
|
|
1641
|
+
lastCallInputTokens: number;
|
|
1642
|
+
/**
|
|
1643
|
+
* Output tokens from the most recent main-agent API call
|
|
1644
|
+
*/
|
|
1645
|
+
lastCallOutputTokens: number;
|
|
1395
1646
|
}
|
|
1396
|
-
|
|
1647
|
+
/**
|
|
1648
|
+
* Aggregated code change metrics
|
|
1649
|
+
*
|
|
1650
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1651
|
+
* via the `definition` "UsageMetricsCodeChanges".
|
|
1652
|
+
*/
|
|
1653
|
+
export interface UsageMetricsCodeChanges {
|
|
1397
1654
|
/**
|
|
1398
|
-
*
|
|
1655
|
+
* Total lines of code added
|
|
1656
|
+
*/
|
|
1657
|
+
linesAdded: number;
|
|
1658
|
+
/**
|
|
1659
|
+
* Total lines of code removed
|
|
1399
1660
|
*/
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* Entry type
|
|
1407
|
-
*/
|
|
1408
|
-
type: "file" | "directory";
|
|
1409
|
-
}[];
|
|
1661
|
+
linesRemoved: number;
|
|
1662
|
+
/**
|
|
1663
|
+
* Number of distinct files modified
|
|
1664
|
+
*/
|
|
1665
|
+
filesModifiedCount: number;
|
|
1410
1666
|
}
|
|
1411
|
-
export interface
|
|
1667
|
+
export interface UsageMetricsModelMetric {
|
|
1668
|
+
requests: UsageMetricsModelMetricRequests;
|
|
1669
|
+
usage: UsageMetricsModelMetricUsage;
|
|
1670
|
+
}
|
|
1671
|
+
/**
|
|
1672
|
+
* Request count and cost metrics for this model
|
|
1673
|
+
*
|
|
1674
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1675
|
+
* via the `definition` "UsageMetricsModelMetricRequests".
|
|
1676
|
+
*/
|
|
1677
|
+
export interface UsageMetricsModelMetricRequests {
|
|
1412
1678
|
/**
|
|
1413
|
-
*
|
|
1679
|
+
* Number of API requests made with this model
|
|
1414
1680
|
*/
|
|
1415
|
-
|
|
1681
|
+
count: number;
|
|
1416
1682
|
/**
|
|
1417
|
-
*
|
|
1683
|
+
* User-initiated premium request cost (with multiplier applied)
|
|
1418
1684
|
*/
|
|
1419
|
-
|
|
1685
|
+
cost: number;
|
|
1420
1686
|
}
|
|
1421
|
-
|
|
1687
|
+
/**
|
|
1688
|
+
* Token usage metrics for this model
|
|
1689
|
+
*
|
|
1690
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1691
|
+
* via the `definition` "UsageMetricsModelMetricUsage".
|
|
1692
|
+
*/
|
|
1693
|
+
export interface UsageMetricsModelMetricUsage {
|
|
1422
1694
|
/**
|
|
1423
|
-
*
|
|
1695
|
+
* Total input tokens consumed
|
|
1424
1696
|
*/
|
|
1425
|
-
|
|
1697
|
+
inputTokens: number;
|
|
1426
1698
|
/**
|
|
1427
|
-
*
|
|
1699
|
+
* Total output tokens produced
|
|
1700
|
+
*/
|
|
1701
|
+
outputTokens: number;
|
|
1702
|
+
/**
|
|
1703
|
+
* Total tokens read from prompt cache
|
|
1704
|
+
*/
|
|
1705
|
+
cacheReadTokens: number;
|
|
1706
|
+
/**
|
|
1707
|
+
* Total tokens written to prompt cache
|
|
1708
|
+
*/
|
|
1709
|
+
cacheWriteTokens: number;
|
|
1710
|
+
/**
|
|
1711
|
+
* Total output tokens used for reasoning
|
|
1712
|
+
*/
|
|
1713
|
+
reasoningTokens?: number;
|
|
1714
|
+
}
|
|
1715
|
+
export interface WorkspacesCreateFileRequest {
|
|
1716
|
+
/**
|
|
1717
|
+
* Relative path within the workspace files directory
|
|
1428
1718
|
*/
|
|
1429
1719
|
path: string;
|
|
1430
1720
|
/**
|
|
1431
|
-
*
|
|
1721
|
+
* File content to write as a UTF-8 string
|
|
1432
1722
|
*/
|
|
1433
|
-
|
|
1723
|
+
content: string;
|
|
1724
|
+
}
|
|
1725
|
+
export interface WorkspacesGetWorkspaceResult {
|
|
1434
1726
|
/**
|
|
1435
|
-
*
|
|
1727
|
+
* Current workspace metadata, or null if not available
|
|
1436
1728
|
*/
|
|
1437
|
-
|
|
1729
|
+
workspace: {
|
|
1730
|
+
id: string;
|
|
1731
|
+
cwd?: string;
|
|
1732
|
+
git_root?: string;
|
|
1733
|
+
repository?: string;
|
|
1734
|
+
host_type?: "github" | "ado";
|
|
1735
|
+
branch?: string;
|
|
1736
|
+
summary?: string;
|
|
1737
|
+
name?: string;
|
|
1738
|
+
summary_count?: number;
|
|
1739
|
+
created_at?: string;
|
|
1740
|
+
updated_at?: string;
|
|
1741
|
+
remote_steerable?: boolean;
|
|
1742
|
+
mc_task_id?: string;
|
|
1743
|
+
mc_session_id?: string;
|
|
1744
|
+
mc_last_event_id?: string;
|
|
1745
|
+
session_sync_level?: "local" | "user" | "repo_and_user";
|
|
1746
|
+
chronicle_sync_dismissed?: boolean;
|
|
1747
|
+
} | null;
|
|
1438
1748
|
}
|
|
1439
|
-
export interface
|
|
1749
|
+
export interface WorkspacesListFilesResult {
|
|
1440
1750
|
/**
|
|
1441
|
-
*
|
|
1751
|
+
* Relative file paths in the workspace files directory
|
|
1442
1752
|
*/
|
|
1443
|
-
|
|
1753
|
+
files: string[];
|
|
1754
|
+
}
|
|
1755
|
+
export interface WorkspacesReadFileRequest {
|
|
1444
1756
|
/**
|
|
1445
|
-
*
|
|
1757
|
+
* Relative path within the workspace files directory
|
|
1446
1758
|
*/
|
|
1447
|
-
|
|
1759
|
+
path: string;
|
|
1760
|
+
}
|
|
1761
|
+
export interface WorkspacesReadFileResult {
|
|
1448
1762
|
/**
|
|
1449
|
-
*
|
|
1763
|
+
* File content as a UTF-8 string
|
|
1450
1764
|
*/
|
|
1451
|
-
|
|
1765
|
+
content: string;
|
|
1452
1766
|
}
|
|
1453
1767
|
/** Create typed server-scoped RPC methods (no session required). */
|
|
1454
1768
|
export declare function createServerRpc(connection: MessageConnection): {
|
|
1455
|
-
ping: (params:
|
|
1769
|
+
ping: (params: PingRequest) => Promise<PingResult>;
|
|
1456
1770
|
models: {
|
|
1457
|
-
list: () => Promise<
|
|
1771
|
+
list: (params?: ModelsListRequest) => Promise<ModelList>;
|
|
1458
1772
|
};
|
|
1459
1773
|
tools: {
|
|
1460
|
-
list: (params:
|
|
1774
|
+
list: (params: ToolsListRequest) => Promise<ToolList>;
|
|
1461
1775
|
};
|
|
1462
1776
|
account: {
|
|
1463
|
-
getQuota: () => Promise<AccountGetQuotaResult>;
|
|
1777
|
+
getQuota: (params?: AccountGetQuotaRequest) => Promise<AccountGetQuotaResult>;
|
|
1464
1778
|
};
|
|
1465
1779
|
mcp: {
|
|
1466
1780
|
config: {
|
|
1467
|
-
list: () => Promise<
|
|
1468
|
-
add: (params:
|
|
1469
|
-
update: (params:
|
|
1470
|
-
remove: (params:
|
|
1781
|
+
list: () => Promise<McpConfigList>;
|
|
1782
|
+
add: (params: McpConfigAddRequest) => Promise<void>;
|
|
1783
|
+
update: (params: McpConfigUpdateRequest) => Promise<void>;
|
|
1784
|
+
remove: (params: McpConfigRemoveRequest) => Promise<void>;
|
|
1785
|
+
enable: (params: McpConfigEnableRequest) => Promise<void>;
|
|
1786
|
+
disable: (params: McpConfigDisableRequest) => Promise<void>;
|
|
1787
|
+
};
|
|
1788
|
+
discover: (params: McpDiscoverRequest) => Promise<McpDiscoverResult>;
|
|
1789
|
+
};
|
|
1790
|
+
skills: {
|
|
1791
|
+
config: {
|
|
1792
|
+
setDisabledSkills: (params: SkillsConfigSetDisabledSkillsRequest) => Promise<void>;
|
|
1471
1793
|
};
|
|
1794
|
+
discover: (params: SkillsDiscoverRequest) => Promise<ServerSkillList>;
|
|
1472
1795
|
};
|
|
1473
1796
|
sessionFs: {
|
|
1474
|
-
setProvider: (params:
|
|
1797
|
+
setProvider: (params: SessionFsSetProviderRequest) => Promise<SessionFsSetProviderResult>;
|
|
1475
1798
|
};
|
|
1476
1799
|
/** @experimental */
|
|
1477
1800
|
sessions: {
|
|
1478
|
-
fork: (params:
|
|
1801
|
+
fork: (params: SessionsForkRequest) => Promise<SessionsForkResult>;
|
|
1479
1802
|
};
|
|
1480
1803
|
};
|
|
1481
1804
|
/** Create typed session-scoped RPC methods. */
|
|
1482
1805
|
export declare function createSessionRpc(connection: MessageConnection, sessionId: string): {
|
|
1806
|
+
auth: {
|
|
1807
|
+
getStatus: () => Promise<SessionAuthStatus>;
|
|
1808
|
+
};
|
|
1483
1809
|
model: {
|
|
1484
|
-
getCurrent: () => Promise<
|
|
1485
|
-
switchTo: (params:
|
|
1810
|
+
getCurrent: () => Promise<CurrentModel>;
|
|
1811
|
+
switchTo: (params: ModelSwitchToRequest) => Promise<ModelSwitchToResult>;
|
|
1486
1812
|
};
|
|
1487
1813
|
mode: {
|
|
1488
|
-
get: () => Promise<
|
|
1489
|
-
set: (params:
|
|
1814
|
+
get: () => Promise<SessionMode>;
|
|
1815
|
+
set: (params: ModeSetRequest) => Promise<void>;
|
|
1816
|
+
};
|
|
1817
|
+
name: {
|
|
1818
|
+
get: () => Promise<NameGetResult>;
|
|
1819
|
+
set: (params: NameSetRequest) => Promise<void>;
|
|
1490
1820
|
};
|
|
1491
1821
|
plan: {
|
|
1492
|
-
read: () => Promise<
|
|
1493
|
-
update: (params:
|
|
1494
|
-
delete: () => Promise<
|
|
1822
|
+
read: () => Promise<PlanReadResult>;
|
|
1823
|
+
update: (params: PlanUpdateRequest) => Promise<void>;
|
|
1824
|
+
delete: () => Promise<void>;
|
|
1495
1825
|
};
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1826
|
+
workspaces: {
|
|
1827
|
+
getWorkspace: () => Promise<WorkspacesGetWorkspaceResult>;
|
|
1828
|
+
listFiles: () => Promise<WorkspacesListFilesResult>;
|
|
1829
|
+
readFile: (params: WorkspacesReadFileRequest) => Promise<WorkspacesReadFileResult>;
|
|
1830
|
+
createFile: (params: WorkspacesCreateFileRequest) => Promise<void>;
|
|
1831
|
+
};
|
|
1832
|
+
instructions: {
|
|
1833
|
+
getSources: () => Promise<InstructionsGetSourcesResult>;
|
|
1500
1834
|
};
|
|
1501
1835
|
/** @experimental */
|
|
1502
1836
|
fleet: {
|
|
1503
|
-
start: (params:
|
|
1837
|
+
start: (params: FleetStartRequest) => Promise<FleetStartResult>;
|
|
1504
1838
|
};
|
|
1505
1839
|
/** @experimental */
|
|
1506
1840
|
agent: {
|
|
1507
|
-
list: () => Promise<
|
|
1508
|
-
getCurrent: () => Promise<
|
|
1509
|
-
select: (params:
|
|
1510
|
-
deselect: () => Promise<
|
|
1511
|
-
reload: () => Promise<
|
|
1841
|
+
list: () => Promise<AgentList>;
|
|
1842
|
+
getCurrent: () => Promise<AgentGetCurrentResult>;
|
|
1843
|
+
select: (params: AgentSelectRequest) => Promise<AgentSelectResult>;
|
|
1844
|
+
deselect: () => Promise<void>;
|
|
1845
|
+
reload: () => Promise<AgentReloadResult>;
|
|
1512
1846
|
};
|
|
1513
1847
|
/** @experimental */
|
|
1514
1848
|
skills: {
|
|
1515
|
-
list: () => Promise<
|
|
1516
|
-
enable: (params:
|
|
1517
|
-
disable: (params:
|
|
1518
|
-
reload: () => Promise<
|
|
1849
|
+
list: () => Promise<SkillList>;
|
|
1850
|
+
enable: (params: SkillsEnableRequest) => Promise<void>;
|
|
1851
|
+
disable: (params: SkillsDisableRequest) => Promise<void>;
|
|
1852
|
+
reload: () => Promise<void>;
|
|
1519
1853
|
};
|
|
1520
1854
|
/** @experimental */
|
|
1521
1855
|
mcp: {
|
|
1522
|
-
list: () => Promise<
|
|
1523
|
-
enable: (params:
|
|
1524
|
-
disable: (params:
|
|
1525
|
-
reload: () => Promise<
|
|
1856
|
+
list: () => Promise<McpServerList>;
|
|
1857
|
+
enable: (params: McpEnableRequest) => Promise<void>;
|
|
1858
|
+
disable: (params: McpDisableRequest) => Promise<void>;
|
|
1859
|
+
reload: () => Promise<void>;
|
|
1860
|
+
/** @experimental */
|
|
1861
|
+
oauth: {
|
|
1862
|
+
login: (params: McpOauthLoginRequest) => Promise<McpOauthLoginResult>;
|
|
1863
|
+
};
|
|
1526
1864
|
};
|
|
1527
1865
|
/** @experimental */
|
|
1528
1866
|
plugins: {
|
|
1529
|
-
list: () => Promise<
|
|
1867
|
+
list: () => Promise<PluginList>;
|
|
1530
1868
|
};
|
|
1531
1869
|
/** @experimental */
|
|
1532
1870
|
extensions: {
|
|
1533
|
-
list: () => Promise<
|
|
1534
|
-
enable: (params:
|
|
1535
|
-
disable: (params:
|
|
1536
|
-
reload: () => Promise<
|
|
1871
|
+
list: () => Promise<ExtensionList>;
|
|
1872
|
+
enable: (params: ExtensionsEnableRequest) => Promise<void>;
|
|
1873
|
+
disable: (params: ExtensionsDisableRequest) => Promise<void>;
|
|
1874
|
+
reload: () => Promise<void>;
|
|
1537
1875
|
};
|
|
1538
1876
|
tools: {
|
|
1539
|
-
handlePendingToolCall: (params:
|
|
1877
|
+
handlePendingToolCall: (params: ToolsHandlePendingToolCallRequest) => Promise<HandleToolCallResult>;
|
|
1540
1878
|
};
|
|
1541
1879
|
commands: {
|
|
1542
|
-
handlePendingCommand: (params:
|
|
1880
|
+
handlePendingCommand: (params: CommandsHandlePendingCommandRequest) => Promise<CommandsHandlePendingCommandResult>;
|
|
1543
1881
|
};
|
|
1544
1882
|
ui: {
|
|
1545
|
-
elicitation: (params:
|
|
1546
|
-
handlePendingElicitation: (params:
|
|
1883
|
+
elicitation: (params: UIElicitationRequest) => Promise<UIElicitationResponse>;
|
|
1884
|
+
handlePendingElicitation: (params: UIHandlePendingElicitationRequest) => Promise<UIElicitationResult>;
|
|
1547
1885
|
};
|
|
1548
1886
|
permissions: {
|
|
1549
|
-
handlePendingPermissionRequest: (params:
|
|
1887
|
+
handlePendingPermissionRequest: (params: PermissionDecisionRequest) => Promise<PermissionRequestResult>;
|
|
1888
|
+
setApproveAll: (params: PermissionsSetApproveAllRequest) => Promise<PermissionsSetApproveAllResult>;
|
|
1889
|
+
resetSessionApprovals: () => Promise<PermissionsResetSessionApprovalsResult>;
|
|
1550
1890
|
};
|
|
1551
|
-
log: (params:
|
|
1891
|
+
log: (params: LogRequest) => Promise<LogResult>;
|
|
1552
1892
|
shell: {
|
|
1553
|
-
exec: (params:
|
|
1554
|
-
kill: (params:
|
|
1893
|
+
exec: (params: ShellExecRequest) => Promise<ShellExecResult>;
|
|
1894
|
+
kill: (params: ShellKillRequest) => Promise<ShellKillResult>;
|
|
1555
1895
|
};
|
|
1556
1896
|
/** @experimental */
|
|
1557
1897
|
history: {
|
|
1558
|
-
compact: () => Promise<
|
|
1559
|
-
truncate: (params:
|
|
1898
|
+
compact: () => Promise<HistoryCompactResult>;
|
|
1899
|
+
truncate: (params: HistoryTruncateRequest) => Promise<HistoryTruncateResult>;
|
|
1900
|
+
};
|
|
1901
|
+
/** @experimental */
|
|
1902
|
+
usage: {
|
|
1903
|
+
getMetrics: () => Promise<UsageGetMetricsResult>;
|
|
1560
1904
|
};
|
|
1561
1905
|
};
|
|
1562
1906
|
/** Handler for `sessionFs` client session API methods. */
|
|
1563
1907
|
export interface SessionFsHandler {
|
|
1564
|
-
readFile(params:
|
|
1565
|
-
writeFile(params:
|
|
1566
|
-
appendFile(params:
|
|
1567
|
-
exists(params:
|
|
1568
|
-
stat(params:
|
|
1569
|
-
mkdir(params:
|
|
1570
|
-
readdir(params:
|
|
1571
|
-
readdirWithTypes(params:
|
|
1572
|
-
rm(params:
|
|
1573
|
-
rename(params:
|
|
1908
|
+
readFile(params: SessionFsReadFileRequest): Promise<SessionFsReadFileResult>;
|
|
1909
|
+
writeFile(params: SessionFsWriteFileRequest): Promise<SessionFsError | undefined>;
|
|
1910
|
+
appendFile(params: SessionFsAppendFileRequest): Promise<SessionFsError | undefined>;
|
|
1911
|
+
exists(params: SessionFsExistsRequest): Promise<SessionFsExistsResult>;
|
|
1912
|
+
stat(params: SessionFsStatRequest): Promise<SessionFsStatResult>;
|
|
1913
|
+
mkdir(params: SessionFsMkdirRequest): Promise<SessionFsError | undefined>;
|
|
1914
|
+
readdir(params: SessionFsReaddirRequest): Promise<SessionFsReaddirResult>;
|
|
1915
|
+
readdirWithTypes(params: SessionFsReaddirWithTypesRequest): Promise<SessionFsReaddirWithTypesResult>;
|
|
1916
|
+
rm(params: SessionFsRmRequest): Promise<SessionFsError | undefined>;
|
|
1917
|
+
rename(params: SessionFsRenameRequest): Promise<SessionFsError | undefined>;
|
|
1574
1918
|
}
|
|
1575
1919
|
/** All client session API handler groups. */
|
|
1576
1920
|
export interface ClientSessionApiHandlers {
|