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