@github/copilot-sdk 1.0.0-beta.1 → 1.0.0-beta.11
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 +61 -48
- package/dist/canvas.d.ts +126 -0
- package/dist/canvas.js +49 -0
- package/dist/cjs/canvas.js +75 -0
- package/dist/cjs/client.js +540 -299
- package/dist/cjs/extension.js +12 -3
- package/dist/cjs/generated/rpc.js +1332 -15
- package/dist/cjs/index.js +22 -7
- package/dist/cjs/session.js +179 -93
- package/dist/cjs/sessionFsProvider.js +34 -0
- package/dist/cjs/toolSet.js +107 -0
- package/dist/cjs/types.js +38 -4
- package/dist/client.d.ts +63 -73
- package/dist/client.js +541 -300
- package/dist/extension.d.ts +4 -2
- package/dist/extension.js +13 -3
- package/dist/generated/rpc.d.ts +10205 -994
- package/dist/generated/rpc.js +1332 -15
- package/dist/generated/session-events.d.ts +2061 -194
- package/dist/index.d.ts +6 -2
- package/dist/index.js +15 -2
- package/dist/session.d.ts +19 -186
- package/dist/session.js +179 -92
- package/dist/sessionFsProvider.d.ts +29 -2
- package/dist/sessionFsProvider.js +34 -0
- package/dist/toolSet.d.ts +75 -0
- package/dist/toolSet.js +82 -0
- package/dist/types.d.ts +753 -123
- package/dist/types.js +36 -3
- package/docs/agent-author.md +31 -7
- package/docs/examples.md +29 -19
- package/package.json +4 -4
|
@@ -2,47 +2,168 @@
|
|
|
2
2
|
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
3
|
* Generated from: session-events.schema.json
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Union of all session event variants emitted by the Copilot CLI runtime.
|
|
7
|
+
*/
|
|
8
|
+
export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | PermissionsChangedEvent | PlanChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | ContextChangedEvent | UsageInfoEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | CustomNotificationEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
|
|
6
9
|
/**
|
|
7
10
|
* Hosting platform type of the repository (github or ado)
|
|
8
11
|
*/
|
|
9
|
-
export type WorkingDirectoryContextHostType =
|
|
12
|
+
export type WorkingDirectoryContextHostType =
|
|
13
|
+
/** Repository is hosted on GitHub. */
|
|
14
|
+
"github"
|
|
15
|
+
/** Repository is hosted on Azure DevOps. */
|
|
16
|
+
| "ado";
|
|
17
|
+
/**
|
|
18
|
+
* Allowed values for the `ContextTier` enumeration.
|
|
19
|
+
*/
|
|
20
|
+
export type ContextTier =
|
|
21
|
+
/** Default context tier with standard context window size. */
|
|
22
|
+
"default"
|
|
23
|
+
/** Extended context tier with a larger context window. */
|
|
24
|
+
| "long_context";
|
|
25
|
+
/**
|
|
26
|
+
* Reasoning summary mode used for model calls, if applicable (e.g. "none", "concise", "detailed")
|
|
27
|
+
*/
|
|
28
|
+
export type ReasoningSummary =
|
|
29
|
+
/** Do not request reasoning summaries from the model. */
|
|
30
|
+
"none"
|
|
31
|
+
/** Request a concise summary of the model's reasoning. */
|
|
32
|
+
| "concise"
|
|
33
|
+
/** Request a detailed summary of the model's reasoning. */
|
|
34
|
+
| "detailed";
|
|
35
|
+
/**
|
|
36
|
+
* The type of operation performed on the autopilot objective state file
|
|
37
|
+
*/
|
|
38
|
+
export type AutopilotObjectiveChangedOperation =
|
|
39
|
+
/** Autopilot objective state file was created for a new objective. */
|
|
40
|
+
"create"
|
|
41
|
+
/** Autopilot objective state file was updated for an existing objective. */
|
|
42
|
+
| "update"
|
|
43
|
+
/** Autopilot objective state file was deleted or cleared. */
|
|
44
|
+
| "delete";
|
|
45
|
+
/**
|
|
46
|
+
* Current autopilot objective status, if one exists
|
|
47
|
+
*/
|
|
48
|
+
export type AutopilotObjectiveChangedStatus =
|
|
49
|
+
/** Objective is active and can drive autopilot continuations. */
|
|
50
|
+
"active"
|
|
51
|
+
/** Objective is paused and will not drive autopilot continuations. */
|
|
52
|
+
| "paused"
|
|
53
|
+
/** Legacy objective state indicating the previous continuation cap was reached. */
|
|
54
|
+
| "cap_reached"
|
|
55
|
+
/** Objective was completed by the agent. */
|
|
56
|
+
| "completed";
|
|
57
|
+
/**
|
|
58
|
+
* The session mode the agent is operating in
|
|
59
|
+
*/
|
|
60
|
+
export type SessionMode =
|
|
61
|
+
/** The agent is responding interactively to the user. */
|
|
62
|
+
"interactive"
|
|
63
|
+
/** The agent is preparing a plan before making changes. */
|
|
64
|
+
| "plan"
|
|
65
|
+
/** The agent is working autonomously toward task completion. */
|
|
66
|
+
| "autopilot";
|
|
10
67
|
/**
|
|
11
68
|
* The type of operation performed on the plan file
|
|
12
69
|
*/
|
|
13
|
-
export type PlanChangedOperation =
|
|
70
|
+
export type PlanChangedOperation =
|
|
71
|
+
/** The plan file was created. */
|
|
72
|
+
"create"
|
|
73
|
+
/** The plan file was updated. */
|
|
74
|
+
| "update"
|
|
75
|
+
/** The plan file was deleted. */
|
|
76
|
+
| "delete";
|
|
14
77
|
/**
|
|
15
78
|
* Whether the file was newly created or updated
|
|
16
79
|
*/
|
|
17
|
-
export type WorkspaceFileChangedOperation =
|
|
80
|
+
export type WorkspaceFileChangedOperation =
|
|
81
|
+
/** The workspace file was created. */
|
|
82
|
+
"create"
|
|
83
|
+
/** The workspace file was updated. */
|
|
84
|
+
| "update";
|
|
18
85
|
/**
|
|
19
86
|
* Origin type of the session being handed off
|
|
20
87
|
*/
|
|
21
|
-
export type HandoffSourceType =
|
|
88
|
+
export type HandoffSourceType =
|
|
89
|
+
/** The handoff originated from a remote session. */
|
|
90
|
+
"remote"
|
|
91
|
+
/** The handoff originated from a local session. */
|
|
92
|
+
| "local";
|
|
22
93
|
/**
|
|
23
94
|
* Whether the session ended normally ("routine") or due to a crash/fatal error ("error")
|
|
24
95
|
*/
|
|
25
|
-
export type ShutdownType =
|
|
96
|
+
export type ShutdownType =
|
|
97
|
+
/** The session ended normally. */
|
|
98
|
+
"routine"
|
|
99
|
+
/** The session ended because of a crash or fatal error. */
|
|
100
|
+
| "error";
|
|
26
101
|
/**
|
|
27
102
|
* The agent mode that was active when this message was sent
|
|
28
103
|
*/
|
|
29
|
-
export type UserMessageAgentMode =
|
|
104
|
+
export type UserMessageAgentMode =
|
|
105
|
+
/** The agent is responding interactively to the user. */
|
|
106
|
+
"interactive"
|
|
107
|
+
/** The agent is preparing a plan before making changes. */
|
|
108
|
+
| "plan"
|
|
109
|
+
/** The agent is working autonomously toward task completion. */
|
|
110
|
+
| "autopilot"
|
|
111
|
+
/** The agent is in shell-focused UI mode. */
|
|
112
|
+
| "shell";
|
|
30
113
|
/**
|
|
31
|
-
* A user message attachment — a file, directory, code selection, blob, or
|
|
114
|
+
* A user message attachment — a file, directory, code selection, blob, GitHub reference, or extension-supplied context payload
|
|
32
115
|
*/
|
|
33
|
-
export type
|
|
116
|
+
export type Attachment = AttachmentFile | AttachmentDirectory | AttachmentSelection | AttachmentGitHubReference | AttachmentBlob | AttachmentExtensionContext;
|
|
34
117
|
/**
|
|
35
118
|
* Type of GitHub reference
|
|
36
119
|
*/
|
|
37
|
-
export type
|
|
120
|
+
export type AttachmentGitHubReferenceType =
|
|
121
|
+
/** GitHub issue reference. */
|
|
122
|
+
"issue"
|
|
123
|
+
/** GitHub pull request reference. */
|
|
124
|
+
| "pr"
|
|
125
|
+
/** GitHub discussion reference. */
|
|
126
|
+
| "discussion";
|
|
38
127
|
/**
|
|
39
128
|
* Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent.
|
|
40
129
|
*/
|
|
41
|
-
export type AssistantMessageToolRequestType =
|
|
130
|
+
export type AssistantMessageToolRequestType =
|
|
131
|
+
/** Standard function-style tool call. */
|
|
132
|
+
"function"
|
|
133
|
+
/** Custom grammar-based tool call. */
|
|
134
|
+
| "custom";
|
|
135
|
+
/**
|
|
136
|
+
* API endpoint used for this model call, matching CAPI supported_endpoints vocabulary
|
|
137
|
+
*/
|
|
138
|
+
export type AssistantUsageApiEndpoint =
|
|
139
|
+
/** Chat Completions API endpoint. */
|
|
140
|
+
"/chat/completions"
|
|
141
|
+
/** Anthropic Messages API endpoint. */
|
|
142
|
+
| "/v1/messages"
|
|
143
|
+
/** Responses API endpoint. */
|
|
144
|
+
| "/responses"
|
|
145
|
+
/** WebSocket Responses API endpoint. */
|
|
146
|
+
| "ws:/responses";
|
|
42
147
|
/**
|
|
43
148
|
* Where the failed model call originated
|
|
44
149
|
*/
|
|
45
|
-
export type ModelCallFailureSource =
|
|
150
|
+
export type ModelCallFailureSource =
|
|
151
|
+
/** Model call from the top-level agent. */
|
|
152
|
+
"top_level"
|
|
153
|
+
/** Model call from a sub-agent. */
|
|
154
|
+
| "subagent"
|
|
155
|
+
/** Model call from MCP sampling. */
|
|
156
|
+
| "mcp_sampling";
|
|
157
|
+
/**
|
|
158
|
+
* Finite reason code describing why the current turn was aborted
|
|
159
|
+
*/
|
|
160
|
+
export type AbortReason =
|
|
161
|
+
/** The local user requested the abort, for example by pressing Ctrl+C in the CLI. */
|
|
162
|
+
"user_initiated"
|
|
163
|
+
/** A remote command requested the abort. */
|
|
164
|
+
| "remote_command"
|
|
165
|
+
/** An MCP server delivered a user.abort notification. */
|
|
166
|
+
| "user_abort";
|
|
46
167
|
/**
|
|
47
168
|
* A content block within a tool result, which may be text, terminal output, image, audio, or a resource
|
|
48
169
|
*/
|
|
@@ -50,15 +171,41 @@ export type ToolExecutionCompleteContent = ToolExecutionCompleteContentText | To
|
|
|
50
171
|
/**
|
|
51
172
|
* Theme variant this icon is intended for
|
|
52
173
|
*/
|
|
53
|
-
export type ToolExecutionCompleteContentResourceLinkIconTheme =
|
|
174
|
+
export type ToolExecutionCompleteContentResourceLinkIconTheme =
|
|
175
|
+
/** Icon intended for light themes. */
|
|
176
|
+
"light"
|
|
177
|
+
/** Icon intended for dark themes. */
|
|
178
|
+
| "dark";
|
|
54
179
|
/**
|
|
55
180
|
* The embedded resource contents, either text or base64-encoded binary
|
|
56
181
|
*/
|
|
57
182
|
export type ToolExecutionCompleteContentResourceDetails = EmbeddedTextResourceContents | EmbeddedBlobResourceContents;
|
|
183
|
+
/**
|
|
184
|
+
* Allowed values for the `ToolExecutionCompleteToolDescriptionMetaUIVisibility` enumeration.
|
|
185
|
+
*/
|
|
186
|
+
export type ToolExecutionCompleteToolDescriptionMetaUIVisibility =
|
|
187
|
+
/** Tool is callable by the model (LLM tool surface) */
|
|
188
|
+
"model"
|
|
189
|
+
/** Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool */
|
|
190
|
+
| "app";
|
|
191
|
+
/**
|
|
192
|
+
* What triggered the skill invocation: `user-invoked` (explicit user action, such as via a slash command or UI affordance), `agent-invoked` (agent requested the skill), or `context-load` (loaded as part of another context, such as preloading skills configured on a custom agent or subagent)
|
|
193
|
+
*/
|
|
194
|
+
export type SkillInvokedTrigger =
|
|
195
|
+
/** Skill invocation requested explicitly by the user, such as via a slash command or UI affordance. */
|
|
196
|
+
"user-invoked"
|
|
197
|
+
/** Skill invocation requested by the agent. */
|
|
198
|
+
| "agent-invoked"
|
|
199
|
+
/** Skill content loaded as part of another context, such as a configured custom agent or subagent. */
|
|
200
|
+
| "context-load";
|
|
58
201
|
/**
|
|
59
202
|
* Message role: "system" for system prompts, "developer" for developer-injected instructions
|
|
60
203
|
*/
|
|
61
|
-
export type SystemMessageRole =
|
|
204
|
+
export type SystemMessageRole =
|
|
205
|
+
/** System prompt message. */
|
|
206
|
+
"system"
|
|
207
|
+
/** Developer instruction message. */
|
|
208
|
+
| "developer";
|
|
62
209
|
/**
|
|
63
210
|
* Structured metadata identifying what triggered this notification
|
|
64
211
|
*/
|
|
@@ -66,35 +213,45 @@ export type SystemNotification = SystemNotificationAgentCompleted | SystemNotifi
|
|
|
66
213
|
/**
|
|
67
214
|
* Whether the agent completed successfully or failed
|
|
68
215
|
*/
|
|
69
|
-
export type SystemNotificationAgentCompletedStatus =
|
|
216
|
+
export type SystemNotificationAgentCompletedStatus =
|
|
217
|
+
/** The agent completed successfully. */
|
|
218
|
+
"completed"
|
|
219
|
+
/** The agent failed. */
|
|
220
|
+
| "failed";
|
|
70
221
|
/**
|
|
71
222
|
* Details of the permission being requested
|
|
72
223
|
*/
|
|
73
|
-
export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook;
|
|
224
|
+
export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestExtensionPermissionAccess;
|
|
74
225
|
/**
|
|
75
226
|
* Whether this is a store or vote memory operation
|
|
76
227
|
*/
|
|
77
|
-
export type PermissionRequestMemoryAction =
|
|
228
|
+
export type PermissionRequestMemoryAction =
|
|
229
|
+
/** Store a new memory. */
|
|
230
|
+
"store"
|
|
231
|
+
/** Vote on an existing memory. */
|
|
232
|
+
| "vote";
|
|
78
233
|
/**
|
|
79
234
|
* Vote direction (vote only)
|
|
80
235
|
*/
|
|
81
|
-
export type PermissionRequestMemoryDirection =
|
|
236
|
+
export type PermissionRequestMemoryDirection =
|
|
237
|
+
/** Vote that the memory is useful or accurate. */
|
|
238
|
+
"upvote"
|
|
239
|
+
/** Vote that the memory is incorrect or outdated. */
|
|
240
|
+
| "downvote";
|
|
82
241
|
/**
|
|
83
242
|
* Derived user-facing permission prompt details for UI consumers
|
|
84
243
|
*/
|
|
85
|
-
export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook;
|
|
86
|
-
/**
|
|
87
|
-
* Whether this is a store or vote memory operation
|
|
88
|
-
*/
|
|
89
|
-
export type PermissionPromptRequestMemoryAction = "store" | "vote";
|
|
90
|
-
/**
|
|
91
|
-
* Vote direction (vote only)
|
|
92
|
-
*/
|
|
93
|
-
export type PermissionPromptRequestMemoryDirection = "upvote" | "downvote";
|
|
244
|
+
export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestExtensionPermissionAccess;
|
|
94
245
|
/**
|
|
95
246
|
* Underlying permission kind that needs path approval
|
|
96
247
|
*/
|
|
97
|
-
export type PermissionPromptRequestPathAccessKind =
|
|
248
|
+
export type PermissionPromptRequestPathAccessKind =
|
|
249
|
+
/** Read access to a filesystem path. */
|
|
250
|
+
"read"
|
|
251
|
+
/** Shell command access involving a filesystem path. */
|
|
252
|
+
| "shell"
|
|
253
|
+
/** Write access to a filesystem path. */
|
|
254
|
+
| "write";
|
|
98
255
|
/**
|
|
99
256
|
* The result of the permission request
|
|
100
257
|
*/
|
|
@@ -102,32 +259,146 @@ export type PermissionResult = PermissionApproved | PermissionApprovedForSession
|
|
|
102
259
|
/**
|
|
103
260
|
* The approval to add as a session-scoped rule
|
|
104
261
|
*/
|
|
105
|
-
export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool;
|
|
262
|
+
export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalExtensionPermissionAccess;
|
|
106
263
|
/**
|
|
107
264
|
* Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent.
|
|
108
265
|
*/
|
|
109
|
-
export type ElicitationRequestedMode =
|
|
266
|
+
export type ElicitationRequestedMode =
|
|
267
|
+
/** Structured form-based elicitation. */
|
|
268
|
+
"form"
|
|
269
|
+
/** Browser URL-based elicitation. */
|
|
270
|
+
| "url";
|
|
110
271
|
/**
|
|
111
272
|
* The user action: "accept" (submitted form), "decline" (explicitly refused), or "cancel" (dismissed)
|
|
112
273
|
*/
|
|
113
|
-
export type ElicitationCompletedAction =
|
|
114
|
-
|
|
274
|
+
export type ElicitationCompletedAction =
|
|
275
|
+
/** The user submitted the requested form. */
|
|
276
|
+
"accept"
|
|
277
|
+
/** The user explicitly declined the request. */
|
|
278
|
+
| "decline"
|
|
279
|
+
/** The user dismissed the request. */
|
|
280
|
+
| "cancel";
|
|
281
|
+
/**
|
|
282
|
+
* Schema for the `ElicitationCompletedContent` type.
|
|
283
|
+
*/
|
|
284
|
+
export type ElicitationCompletedContent = (string | number | boolean | string[]) | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* Source-defined JSON payload for the custom notification
|
|
287
|
+
*/
|
|
288
|
+
export type CustomNotificationPayload = string | number | boolean | null | unknown[] | {
|
|
289
|
+
[k: string]: unknown | undefined;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* The user's auto-mode-switch choice
|
|
293
|
+
*/
|
|
294
|
+
export type AutoModeSwitchResponse =
|
|
295
|
+
/** Switch models for this request. */
|
|
296
|
+
"yes"
|
|
297
|
+
/** Switch models now and keep using the replacement automatically. */
|
|
298
|
+
| "yes_always"
|
|
299
|
+
/** Do not switch models. */
|
|
300
|
+
| "no";
|
|
301
|
+
/**
|
|
302
|
+
* Exit plan mode action
|
|
303
|
+
*/
|
|
304
|
+
export type ExitPlanModeAction =
|
|
305
|
+
/** Exit plan mode without starting implementation. */
|
|
306
|
+
"exit_only"
|
|
307
|
+
/** Exit plan mode and continue in interactive mode. */
|
|
308
|
+
| "interactive"
|
|
309
|
+
/** Exit plan mode and continue autonomously. */
|
|
310
|
+
| "autopilot"
|
|
311
|
+
/** Exit plan mode and continue with parallel autonomous workers. */
|
|
312
|
+
| "autopilot_fleet";
|
|
313
|
+
/**
|
|
314
|
+
* Source location type (e.g., project, personal-copilot, plugin, builtin)
|
|
315
|
+
*/
|
|
316
|
+
export type SkillSource =
|
|
317
|
+
/** Skill defined in the current project's skill directories. */
|
|
318
|
+
"project"
|
|
319
|
+
/** Skill discovered from a parent directory in the current workspace tree. */
|
|
320
|
+
| "inherited"
|
|
321
|
+
/** Skill defined in the user's Copilot skill directory. */
|
|
322
|
+
| "personal-copilot"
|
|
323
|
+
/** Skill defined in the user's personal agents skill directory. */
|
|
324
|
+
| "personal-agents"
|
|
325
|
+
/** Skill provided by an installed plugin. */
|
|
326
|
+
| "plugin"
|
|
327
|
+
/** Skill loaded from a configured custom skill directory. */
|
|
328
|
+
| "custom"
|
|
329
|
+
/** Skill bundled with the runtime. */
|
|
330
|
+
| "builtin";
|
|
331
|
+
/**
|
|
332
|
+
* Configuration source: user, workspace, plugin, or builtin
|
|
333
|
+
*/
|
|
334
|
+
export type McpServerSource =
|
|
335
|
+
/** Server configured in the user's global MCP configuration. */
|
|
336
|
+
"user"
|
|
337
|
+
/** Server configured by the current workspace. */
|
|
338
|
+
| "workspace"
|
|
339
|
+
/** Server contributed by an installed plugin. */
|
|
340
|
+
| "plugin"
|
|
341
|
+
/** Server bundled with the runtime. */
|
|
342
|
+
| "builtin";
|
|
115
343
|
/**
|
|
116
344
|
* Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
|
|
117
345
|
*/
|
|
118
|
-
export type
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
*/
|
|
122
|
-
|
|
346
|
+
export type McpServerStatus =
|
|
347
|
+
/** The server is connected and available. */
|
|
348
|
+
"connected"
|
|
349
|
+
/** The server failed to connect or initialize. */
|
|
350
|
+
| "failed"
|
|
351
|
+
/** The server requires authentication before it can connect. */
|
|
352
|
+
| "needs-auth"
|
|
353
|
+
/** The server connection is still being established. */
|
|
354
|
+
| "pending"
|
|
355
|
+
/** The server is configured but disabled. */
|
|
356
|
+
| "disabled"
|
|
357
|
+
/** The server is not configured for this session. */
|
|
358
|
+
| "not_configured";
|
|
359
|
+
/**
|
|
360
|
+
* Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
|
|
361
|
+
*/
|
|
362
|
+
export type McpServerTransport =
|
|
363
|
+
/** Server communicates over stdio with a local child process. */
|
|
364
|
+
"stdio"
|
|
365
|
+
/** Server communicates over streamable HTTP. */
|
|
366
|
+
| "http"
|
|
367
|
+
/** Server communicates over Server-Sent Events (deprecated). */
|
|
368
|
+
| "sse"
|
|
369
|
+
/** Server is backed by an in-memory runtime implementation. */
|
|
370
|
+
| "memory";
|
|
123
371
|
/**
|
|
124
372
|
* Discovery source
|
|
125
373
|
*/
|
|
126
|
-
export type ExtensionsLoadedExtensionSource =
|
|
374
|
+
export type ExtensionsLoadedExtensionSource =
|
|
375
|
+
/** Extension discovered from the current project. */
|
|
376
|
+
"project"
|
|
377
|
+
/** Extension discovered from the user's extension directory. */
|
|
378
|
+
| "user";
|
|
127
379
|
/**
|
|
128
380
|
* Current status: running, disabled, failed, or starting
|
|
129
381
|
*/
|
|
130
|
-
export type ExtensionsLoadedExtensionStatus =
|
|
382
|
+
export type ExtensionsLoadedExtensionStatus =
|
|
383
|
+
/** The extension process is running. */
|
|
384
|
+
"running"
|
|
385
|
+
/** The extension is installed but disabled. */
|
|
386
|
+
| "disabled"
|
|
387
|
+
/** The extension failed to start or crashed. */
|
|
388
|
+
| "failed"
|
|
389
|
+
/** The extension process is starting. */
|
|
390
|
+
| "starting";
|
|
391
|
+
/**
|
|
392
|
+
* Runtime-controlled routing state for the instance. "ready" when the provider connection is live; "stale" when the provider has gone away and the instance is awaiting rebinding.
|
|
393
|
+
*/
|
|
394
|
+
export type CanvasOpenedAvailability =
|
|
395
|
+
/** Provider connection is live; actions can be invoked. */
|
|
396
|
+
"ready"
|
|
397
|
+
/** Provider has gone away; the instance is awaiting rebinding. */
|
|
398
|
+
| "stale";
|
|
399
|
+
/**
|
|
400
|
+
* Session event "session.start". Session initialization metadata including context and configuration
|
|
401
|
+
*/
|
|
131
402
|
export interface StartEvent {
|
|
132
403
|
/**
|
|
133
404
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -150,6 +421,9 @@ export interface StartEvent {
|
|
|
150
421
|
* ISO 8601 timestamp when the event was created
|
|
151
422
|
*/
|
|
152
423
|
timestamp: string;
|
|
424
|
+
/**
|
|
425
|
+
* Type discriminator. Always "session.start".
|
|
426
|
+
*/
|
|
153
427
|
type: "session.start";
|
|
154
428
|
}
|
|
155
429
|
/**
|
|
@@ -161,20 +435,29 @@ export interface StartData {
|
|
|
161
435
|
*/
|
|
162
436
|
alreadyInUse?: boolean;
|
|
163
437
|
context?: WorkingDirectoryContext;
|
|
438
|
+
/**
|
|
439
|
+
* Context tier selected at session creation time for models with tiered context pricing; null when no tier is selected (e.g., non-tiered model)
|
|
440
|
+
*/
|
|
441
|
+
contextTier?: ContextTier | null;
|
|
164
442
|
/**
|
|
165
443
|
* Version string of the Copilot application
|
|
166
444
|
*/
|
|
167
445
|
copilotVersion: string;
|
|
446
|
+
/**
|
|
447
|
+
* When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id.
|
|
448
|
+
*/
|
|
449
|
+
detachedFromSpawningParentSessionId?: string;
|
|
168
450
|
/**
|
|
169
451
|
* Identifier of the software producing the events (e.g., "copilot-agent")
|
|
170
452
|
*/
|
|
171
453
|
producer: string;
|
|
172
454
|
/**
|
|
173
|
-
* Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh")
|
|
455
|
+
* Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
|
|
174
456
|
*/
|
|
175
457
|
reasoningEffort?: string;
|
|
458
|
+
reasoningSummary?: ReasoningSummary;
|
|
176
459
|
/**
|
|
177
|
-
* Whether this session supports remote steering via
|
|
460
|
+
* Whether this session supports remote steering via GitHub
|
|
178
461
|
*/
|
|
179
462
|
remoteSteerable?: boolean;
|
|
180
463
|
/**
|
|
@@ -228,6 +511,9 @@ export interface WorkingDirectoryContext {
|
|
|
228
511
|
*/
|
|
229
512
|
repositoryHost?: string;
|
|
230
513
|
}
|
|
514
|
+
/**
|
|
515
|
+
* Session event "session.resume". Session resume metadata including current context and event count
|
|
516
|
+
*/
|
|
231
517
|
export interface ResumeEvent {
|
|
232
518
|
/**
|
|
233
519
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -250,6 +536,9 @@ export interface ResumeEvent {
|
|
|
250
536
|
* ISO 8601 timestamp when the event was created
|
|
251
537
|
*/
|
|
252
538
|
timestamp: string;
|
|
539
|
+
/**
|
|
540
|
+
* Type discriminator. Always "session.resume".
|
|
541
|
+
*/
|
|
253
542
|
type: "session.resume";
|
|
254
543
|
}
|
|
255
544
|
/**
|
|
@@ -261,6 +550,10 @@ export interface ResumeData {
|
|
|
261
550
|
*/
|
|
262
551
|
alreadyInUse?: boolean;
|
|
263
552
|
context?: WorkingDirectoryContext;
|
|
553
|
+
/**
|
|
554
|
+
* Context tier currently selected at resume time; null when no tier is active
|
|
555
|
+
*/
|
|
556
|
+
contextTier?: ContextTier | null;
|
|
264
557
|
/**
|
|
265
558
|
* When true, tool calls and permission requests left in flight by the previous session lifetime remain pending after resume and the agentic loop awaits their results. User sends are queued behind the pending work until all such requests reach a terminal state. When false (the default), any such tool calls and permission requests are immediately marked as interrupted on resume.
|
|
266
559
|
*/
|
|
@@ -270,11 +563,12 @@ export interface ResumeData {
|
|
|
270
563
|
*/
|
|
271
564
|
eventCount: number;
|
|
272
565
|
/**
|
|
273
|
-
* Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh")
|
|
566
|
+
* Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
|
|
274
567
|
*/
|
|
275
568
|
reasoningEffort?: string;
|
|
569
|
+
reasoningSummary?: ReasoningSummary;
|
|
276
570
|
/**
|
|
277
|
-
* Whether this session supports remote steering via
|
|
571
|
+
* Whether this session supports remote steering via GitHub
|
|
278
572
|
*/
|
|
279
573
|
remoteSteerable?: boolean;
|
|
280
574
|
/**
|
|
@@ -290,6 +584,9 @@ export interface ResumeData {
|
|
|
290
584
|
*/
|
|
291
585
|
sessionWasActive?: boolean;
|
|
292
586
|
}
|
|
587
|
+
/**
|
|
588
|
+
* Session event "session.remote_steerable_changed". Notifies that the session's remote steering capability has changed
|
|
589
|
+
*/
|
|
293
590
|
export interface RemoteSteerableChangedEvent {
|
|
294
591
|
/**
|
|
295
592
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -312,17 +609,23 @@ export interface RemoteSteerableChangedEvent {
|
|
|
312
609
|
* ISO 8601 timestamp when the event was created
|
|
313
610
|
*/
|
|
314
611
|
timestamp: string;
|
|
612
|
+
/**
|
|
613
|
+
* Type discriminator. Always "session.remote_steerable_changed".
|
|
614
|
+
*/
|
|
315
615
|
type: "session.remote_steerable_changed";
|
|
316
616
|
}
|
|
317
617
|
/**
|
|
318
|
-
* Notifies
|
|
618
|
+
* Notifies that the session's remote steering capability has changed
|
|
319
619
|
*/
|
|
320
620
|
export interface RemoteSteerableChangedData {
|
|
321
621
|
/**
|
|
322
|
-
* Whether this session now supports remote steering via
|
|
622
|
+
* Whether this session now supports remote steering via GitHub
|
|
323
623
|
*/
|
|
324
624
|
remoteSteerable: boolean;
|
|
325
625
|
}
|
|
626
|
+
/**
|
|
627
|
+
* Session event "session.error". Error details for timeline display including message and optional diagnostic information
|
|
628
|
+
*/
|
|
326
629
|
export interface ErrorEvent {
|
|
327
630
|
/**
|
|
328
631
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -345,6 +648,9 @@ export interface ErrorEvent {
|
|
|
345
648
|
* ISO 8601 timestamp when the event was created
|
|
346
649
|
*/
|
|
347
650
|
timestamp: string;
|
|
651
|
+
/**
|
|
652
|
+
* Type discriminator. Always "session.error".
|
|
653
|
+
*/
|
|
348
654
|
type: "session.error";
|
|
349
655
|
}
|
|
350
656
|
/**
|
|
@@ -356,7 +662,7 @@ export interface ErrorData {
|
|
|
356
662
|
*/
|
|
357
663
|
eligibleForAutoSwitch?: boolean;
|
|
358
664
|
/**
|
|
359
|
-
* Fine-grained error code from the upstream provider, when available. For `errorType: "rate_limit"`, this is one of the `RateLimitErrorCode` values (e.g., `"user_weekly_rate_limited"`, `"user_global_rate_limited"`, `"rate_limited"`, `"user_model_rate_limited"`, `"integration_rate_limited"`).
|
|
665
|
+
* Fine-grained error code from the upstream provider, when available. For `errorType: "rate_limit"`, this is one of the `RateLimitErrorCode` values (e.g., `"user_weekly_rate_limited"`, `"user_global_rate_limited"`, `"rate_limited"`, `"user_model_rate_limited"`, `"integration_rate_limited"`). For `errorType: "quota"`, this is the CAPI quota error code (e.g., `"quota_exceeded"`, `"session_quota_exceeded"`, `"billing_not_configured"`).
|
|
360
666
|
*/
|
|
361
667
|
errorCode?: string;
|
|
362
668
|
/**
|
|
@@ -371,6 +677,10 @@ export interface ErrorData {
|
|
|
371
677
|
* GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
|
|
372
678
|
*/
|
|
373
679
|
providerCallId?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
|
|
682
|
+
*/
|
|
683
|
+
serviceRequestId?: string;
|
|
374
684
|
/**
|
|
375
685
|
* Error stack trace, when available
|
|
376
686
|
*/
|
|
@@ -384,12 +694,18 @@ export interface ErrorData {
|
|
|
384
694
|
*/
|
|
385
695
|
url?: string;
|
|
386
696
|
}
|
|
697
|
+
/**
|
|
698
|
+
* Session event "session.idle". Payload indicating the session is idle with no background agents in flight
|
|
699
|
+
*/
|
|
387
700
|
export interface IdleEvent {
|
|
388
701
|
/**
|
|
389
702
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
390
703
|
*/
|
|
391
704
|
agentId?: string;
|
|
392
705
|
data: IdleData;
|
|
706
|
+
/**
|
|
707
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
708
|
+
*/
|
|
393
709
|
ephemeral: true;
|
|
394
710
|
/**
|
|
395
711
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -403,6 +719,9 @@ export interface IdleEvent {
|
|
|
403
719
|
* ISO 8601 timestamp when the event was created
|
|
404
720
|
*/
|
|
405
721
|
timestamp: string;
|
|
722
|
+
/**
|
|
723
|
+
* Type discriminator. Always "session.idle".
|
|
724
|
+
*/
|
|
406
725
|
type: "session.idle";
|
|
407
726
|
}
|
|
408
727
|
/**
|
|
@@ -414,12 +733,18 @@ export interface IdleData {
|
|
|
414
733
|
*/
|
|
415
734
|
aborted?: boolean;
|
|
416
735
|
}
|
|
736
|
+
/**
|
|
737
|
+
* Session event "session.title_changed". Session title change payload containing the new display title
|
|
738
|
+
*/
|
|
417
739
|
export interface TitleChangedEvent {
|
|
418
740
|
/**
|
|
419
741
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
420
742
|
*/
|
|
421
743
|
agentId?: string;
|
|
422
744
|
data: TitleChangedData;
|
|
745
|
+
/**
|
|
746
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
747
|
+
*/
|
|
423
748
|
ephemeral: true;
|
|
424
749
|
/**
|
|
425
750
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -433,6 +758,9 @@ export interface TitleChangedEvent {
|
|
|
433
758
|
* ISO 8601 timestamp when the event was created
|
|
434
759
|
*/
|
|
435
760
|
timestamp: string;
|
|
761
|
+
/**
|
|
762
|
+
* Type discriminator. Always "session.title_changed".
|
|
763
|
+
*/
|
|
436
764
|
type: "session.title_changed";
|
|
437
765
|
}
|
|
438
766
|
/**
|
|
@@ -444,6 +772,144 @@ export interface TitleChangedData {
|
|
|
444
772
|
*/
|
|
445
773
|
title: string;
|
|
446
774
|
}
|
|
775
|
+
/**
|
|
776
|
+
* Session event "session.schedule_created". Scheduled prompt registered via /every or /after
|
|
777
|
+
*/
|
|
778
|
+
export interface ScheduleCreatedEvent {
|
|
779
|
+
/**
|
|
780
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
781
|
+
*/
|
|
782
|
+
agentId?: string;
|
|
783
|
+
data: ScheduleCreatedData;
|
|
784
|
+
/**
|
|
785
|
+
* When true, the event is transient and not persisted to the session event log on disk
|
|
786
|
+
*/
|
|
787
|
+
ephemeral?: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
790
|
+
*/
|
|
791
|
+
id: string;
|
|
792
|
+
/**
|
|
793
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
794
|
+
*/
|
|
795
|
+
parentId: string | null;
|
|
796
|
+
/**
|
|
797
|
+
* ISO 8601 timestamp when the event was created
|
|
798
|
+
*/
|
|
799
|
+
timestamp: string;
|
|
800
|
+
/**
|
|
801
|
+
* Type discriminator. Always "session.schedule_created".
|
|
802
|
+
*/
|
|
803
|
+
type: "session.schedule_created";
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Scheduled prompt registered via /every or /after
|
|
807
|
+
*/
|
|
808
|
+
export interface ScheduleCreatedData {
|
|
809
|
+
/**
|
|
810
|
+
* Optional user-facing label shown in the timeline instead of the actual prompt (e.g. `/skill-name args` when the prompt is a skill invocation expansion)
|
|
811
|
+
*/
|
|
812
|
+
displayPrompt?: string;
|
|
813
|
+
/**
|
|
814
|
+
* Sequential id assigned to the scheduled prompt within the session
|
|
815
|
+
*/
|
|
816
|
+
id: number;
|
|
817
|
+
/**
|
|
818
|
+
* Interval between ticks in milliseconds
|
|
819
|
+
*/
|
|
820
|
+
intervalMs: number;
|
|
821
|
+
/**
|
|
822
|
+
* Prompt text that gets enqueued on every tick
|
|
823
|
+
*/
|
|
824
|
+
prompt: string;
|
|
825
|
+
/**
|
|
826
|
+
* Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`)
|
|
827
|
+
*/
|
|
828
|
+
recurring?: boolean;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Session event "session.schedule_cancelled". Scheduled prompt cancelled from the schedule manager dialog
|
|
832
|
+
*/
|
|
833
|
+
export interface ScheduleCancelledEvent {
|
|
834
|
+
/**
|
|
835
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
836
|
+
*/
|
|
837
|
+
agentId?: string;
|
|
838
|
+
data: ScheduleCancelledData;
|
|
839
|
+
/**
|
|
840
|
+
* When true, the event is transient and not persisted to the session event log on disk
|
|
841
|
+
*/
|
|
842
|
+
ephemeral?: boolean;
|
|
843
|
+
/**
|
|
844
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
845
|
+
*/
|
|
846
|
+
id: string;
|
|
847
|
+
/**
|
|
848
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
849
|
+
*/
|
|
850
|
+
parentId: string | null;
|
|
851
|
+
/**
|
|
852
|
+
* ISO 8601 timestamp when the event was created
|
|
853
|
+
*/
|
|
854
|
+
timestamp: string;
|
|
855
|
+
/**
|
|
856
|
+
* Type discriminator. Always "session.schedule_cancelled".
|
|
857
|
+
*/
|
|
858
|
+
type: "session.schedule_cancelled";
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Scheduled prompt cancelled from the schedule manager dialog
|
|
862
|
+
*/
|
|
863
|
+
export interface ScheduleCancelledData {
|
|
864
|
+
/**
|
|
865
|
+
* Id of the scheduled prompt that was cancelled
|
|
866
|
+
*/
|
|
867
|
+
id: number;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Session event "session.autopilot_objective_changed". Autopilot objective state file operation details indicating what changed
|
|
871
|
+
*/
|
|
872
|
+
export interface AutopilotObjectiveChangedEvent {
|
|
873
|
+
/**
|
|
874
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
875
|
+
*/
|
|
876
|
+
agentId?: string;
|
|
877
|
+
data: AutopilotObjectiveChangedData;
|
|
878
|
+
/**
|
|
879
|
+
* When true, the event is transient and not persisted to the session event log on disk
|
|
880
|
+
*/
|
|
881
|
+
ephemeral?: boolean;
|
|
882
|
+
/**
|
|
883
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
884
|
+
*/
|
|
885
|
+
id: string;
|
|
886
|
+
/**
|
|
887
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
888
|
+
*/
|
|
889
|
+
parentId: string | null;
|
|
890
|
+
/**
|
|
891
|
+
* ISO 8601 timestamp when the event was created
|
|
892
|
+
*/
|
|
893
|
+
timestamp: string;
|
|
894
|
+
/**
|
|
895
|
+
* Type discriminator. Always "session.autopilot_objective_changed".
|
|
896
|
+
*/
|
|
897
|
+
type: "session.autopilot_objective_changed";
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Autopilot objective state file operation details indicating what changed
|
|
901
|
+
*/
|
|
902
|
+
export interface AutopilotObjectiveChangedData {
|
|
903
|
+
/**
|
|
904
|
+
* Current autopilot objective id, if one exists
|
|
905
|
+
*/
|
|
906
|
+
id?: number;
|
|
907
|
+
operation: AutopilotObjectiveChangedOperation;
|
|
908
|
+
status?: AutopilotObjectiveChangedStatus;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Session event "session.info". Informational message for timeline display with categorization
|
|
912
|
+
*/
|
|
447
913
|
export interface InfoEvent {
|
|
448
914
|
/**
|
|
449
915
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -466,6 +932,9 @@ export interface InfoEvent {
|
|
|
466
932
|
* ISO 8601 timestamp when the event was created
|
|
467
933
|
*/
|
|
468
934
|
timestamp: string;
|
|
935
|
+
/**
|
|
936
|
+
* Type discriminator. Always "session.info".
|
|
937
|
+
*/
|
|
469
938
|
type: "session.info";
|
|
470
939
|
}
|
|
471
940
|
/**
|
|
@@ -489,6 +958,9 @@ export interface InfoData {
|
|
|
489
958
|
*/
|
|
490
959
|
url?: string;
|
|
491
960
|
}
|
|
961
|
+
/**
|
|
962
|
+
* Session event "session.warning". Warning message for timeline display with categorization
|
|
963
|
+
*/
|
|
492
964
|
export interface WarningEvent {
|
|
493
965
|
/**
|
|
494
966
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -511,6 +983,9 @@ export interface WarningEvent {
|
|
|
511
983
|
* ISO 8601 timestamp when the event was created
|
|
512
984
|
*/
|
|
513
985
|
timestamp: string;
|
|
986
|
+
/**
|
|
987
|
+
* Type discriminator. Always "session.warning".
|
|
988
|
+
*/
|
|
514
989
|
type: "session.warning";
|
|
515
990
|
}
|
|
516
991
|
/**
|
|
@@ -530,6 +1005,9 @@ export interface WarningData {
|
|
|
530
1005
|
*/
|
|
531
1006
|
warningType: string;
|
|
532
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* Session event "session.model_change". Model change details including previous and new model identifiers
|
|
1010
|
+
*/
|
|
533
1011
|
export interface ModelChangeEvent {
|
|
534
1012
|
/**
|
|
535
1013
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -552,6 +1030,9 @@ export interface ModelChangeEvent {
|
|
|
552
1030
|
* ISO 8601 timestamp when the event was created
|
|
553
1031
|
*/
|
|
554
1032
|
timestamp: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* Type discriminator. Always "session.model_change".
|
|
1035
|
+
*/
|
|
555
1036
|
type: "session.model_change";
|
|
556
1037
|
}
|
|
557
1038
|
/**
|
|
@@ -562,6 +1043,10 @@ export interface ModelChangeData {
|
|
|
562
1043
|
* Reason the change happened, when not user-initiated. Currently `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path. UI clients can use this to render contextual copy.
|
|
563
1044
|
*/
|
|
564
1045
|
cause?: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Context tier after the model change; null explicitly clears a previously selected tier
|
|
1048
|
+
*/
|
|
1049
|
+
contextTier?: ContextTier | null;
|
|
565
1050
|
/**
|
|
566
1051
|
* Newly selected model identifier
|
|
567
1052
|
*/
|
|
@@ -574,11 +1059,16 @@ export interface ModelChangeData {
|
|
|
574
1059
|
* Reasoning effort level before the model change, if applicable
|
|
575
1060
|
*/
|
|
576
1061
|
previousReasoningEffort?: string;
|
|
1062
|
+
previousReasoningSummary?: ReasoningSummary;
|
|
577
1063
|
/**
|
|
578
1064
|
* Reasoning effort level after the model change, if applicable
|
|
579
1065
|
*/
|
|
580
|
-
reasoningEffort?: string;
|
|
1066
|
+
reasoningEffort?: string | null;
|
|
1067
|
+
reasoningSummary?: ReasoningSummary;
|
|
581
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Session event "session.mode_changed". Agent mode change details including previous and new modes
|
|
1071
|
+
*/
|
|
582
1072
|
export interface ModeChangedEvent {
|
|
583
1073
|
/**
|
|
584
1074
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -601,21 +1091,64 @@ export interface ModeChangedEvent {
|
|
|
601
1091
|
* ISO 8601 timestamp when the event was created
|
|
602
1092
|
*/
|
|
603
1093
|
timestamp: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* Type discriminator. Always "session.mode_changed".
|
|
1096
|
+
*/
|
|
604
1097
|
type: "session.mode_changed";
|
|
605
1098
|
}
|
|
606
1099
|
/**
|
|
607
1100
|
* Agent mode change details including previous and new modes
|
|
608
1101
|
*/
|
|
609
1102
|
export interface ModeChangedData {
|
|
1103
|
+
newMode: SessionMode;
|
|
1104
|
+
previousMode: SessionMode;
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition.
|
|
1108
|
+
*/
|
|
1109
|
+
export interface PermissionsChangedEvent {
|
|
1110
|
+
/**
|
|
1111
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1112
|
+
*/
|
|
1113
|
+
agentId?: string;
|
|
1114
|
+
data: PermissionsChangedData;
|
|
1115
|
+
/**
|
|
1116
|
+
* When true, the event is transient and not persisted to the session event log on disk
|
|
1117
|
+
*/
|
|
1118
|
+
ephemeral?: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
1121
|
+
*/
|
|
1122
|
+
id: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
1125
|
+
*/
|
|
1126
|
+
parentId: string | null;
|
|
610
1127
|
/**
|
|
611
|
-
*
|
|
1128
|
+
* ISO 8601 timestamp when the event was created
|
|
1129
|
+
*/
|
|
1130
|
+
timestamp: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Type discriminator. Always "session.permissions_changed".
|
|
1133
|
+
*/
|
|
1134
|
+
type: "session.permissions_changed";
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Permissions change details carrying the aggregate allow-all boolean transition.
|
|
1138
|
+
*/
|
|
1139
|
+
export interface PermissionsChangedData {
|
|
1140
|
+
/**
|
|
1141
|
+
* Aggregate allow-all flag after the change
|
|
612
1142
|
*/
|
|
613
|
-
|
|
1143
|
+
allowAllPermissions: boolean;
|
|
614
1144
|
/**
|
|
615
|
-
*
|
|
1145
|
+
* Aggregate allow-all flag before the change
|
|
616
1146
|
*/
|
|
617
|
-
|
|
1147
|
+
previousAllowAllPermissions: boolean;
|
|
618
1148
|
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Session event "session.plan_changed". Plan file operation details indicating what changed
|
|
1151
|
+
*/
|
|
619
1152
|
export interface PlanChangedEvent {
|
|
620
1153
|
/**
|
|
621
1154
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -638,6 +1171,9 @@ export interface PlanChangedEvent {
|
|
|
638
1171
|
* ISO 8601 timestamp when the event was created
|
|
639
1172
|
*/
|
|
640
1173
|
timestamp: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Type discriminator. Always "session.plan_changed".
|
|
1176
|
+
*/
|
|
641
1177
|
type: "session.plan_changed";
|
|
642
1178
|
}
|
|
643
1179
|
/**
|
|
@@ -646,6 +1182,9 @@ export interface PlanChangedEvent {
|
|
|
646
1182
|
export interface PlanChangedData {
|
|
647
1183
|
operation: PlanChangedOperation;
|
|
648
1184
|
}
|
|
1185
|
+
/**
|
|
1186
|
+
* Session event "session.workspace_file_changed". Workspace file change details including path and operation type
|
|
1187
|
+
*/
|
|
649
1188
|
export interface WorkspaceFileChangedEvent {
|
|
650
1189
|
/**
|
|
651
1190
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -668,6 +1207,9 @@ export interface WorkspaceFileChangedEvent {
|
|
|
668
1207
|
* ISO 8601 timestamp when the event was created
|
|
669
1208
|
*/
|
|
670
1209
|
timestamp: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* Type discriminator. Always "session.workspace_file_changed".
|
|
1212
|
+
*/
|
|
671
1213
|
type: "session.workspace_file_changed";
|
|
672
1214
|
}
|
|
673
1215
|
/**
|
|
@@ -680,6 +1222,9 @@ export interface WorkspaceFileChangedData {
|
|
|
680
1222
|
*/
|
|
681
1223
|
path: string;
|
|
682
1224
|
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Session event "session.handoff". Session handoff metadata including source, context, and repository information
|
|
1227
|
+
*/
|
|
683
1228
|
export interface HandoffEvent {
|
|
684
1229
|
/**
|
|
685
1230
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -702,6 +1247,9 @@ export interface HandoffEvent {
|
|
|
702
1247
|
* ISO 8601 timestamp when the event was created
|
|
703
1248
|
*/
|
|
704
1249
|
timestamp: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Type discriminator. Always "session.handoff".
|
|
1252
|
+
*/
|
|
705
1253
|
type: "session.handoff";
|
|
706
1254
|
}
|
|
707
1255
|
/**
|
|
@@ -748,6 +1296,9 @@ export interface HandoffRepository {
|
|
|
748
1296
|
*/
|
|
749
1297
|
owner: string;
|
|
750
1298
|
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Session event "session.truncation". Conversation truncation statistics including token counts and removed content metrics
|
|
1301
|
+
*/
|
|
751
1302
|
export interface TruncationEvent {
|
|
752
1303
|
/**
|
|
753
1304
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -770,6 +1321,9 @@ export interface TruncationEvent {
|
|
|
770
1321
|
* ISO 8601 timestamp when the event was created
|
|
771
1322
|
*/
|
|
772
1323
|
timestamp: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Type discriminator. Always "session.truncation".
|
|
1326
|
+
*/
|
|
773
1327
|
type: "session.truncation";
|
|
774
1328
|
}
|
|
775
1329
|
/**
|
|
@@ -809,12 +1363,18 @@ export interface TruncationData {
|
|
|
809
1363
|
*/
|
|
810
1364
|
tokensRemovedDuringTruncation: number;
|
|
811
1365
|
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Session event "session.snapshot_rewind". Session rewind details including target event and count of removed events
|
|
1368
|
+
*/
|
|
812
1369
|
export interface SnapshotRewindEvent {
|
|
813
1370
|
/**
|
|
814
1371
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
815
1372
|
*/
|
|
816
1373
|
agentId?: string;
|
|
817
1374
|
data: SnapshotRewindData;
|
|
1375
|
+
/**
|
|
1376
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
1377
|
+
*/
|
|
818
1378
|
ephemeral: true;
|
|
819
1379
|
/**
|
|
820
1380
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -828,6 +1388,9 @@ export interface SnapshotRewindEvent {
|
|
|
828
1388
|
* ISO 8601 timestamp when the event was created
|
|
829
1389
|
*/
|
|
830
1390
|
timestamp: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Type discriminator. Always "session.snapshot_rewind".
|
|
1393
|
+
*/
|
|
831
1394
|
type: "session.snapshot_rewind";
|
|
832
1395
|
}
|
|
833
1396
|
/**
|
|
@@ -843,6 +1406,9 @@ export interface SnapshotRewindData {
|
|
|
843
1406
|
*/
|
|
844
1407
|
upToEventId: string;
|
|
845
1408
|
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Session event "session.shutdown". Session termination metrics including usage statistics, code changes, and shutdown reason
|
|
1411
|
+
*/
|
|
846
1412
|
export interface ShutdownEvent {
|
|
847
1413
|
/**
|
|
848
1414
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -865,6 +1431,9 @@ export interface ShutdownEvent {
|
|
|
865
1431
|
* ISO 8601 timestamp when the event was created
|
|
866
1432
|
*/
|
|
867
1433
|
timestamp: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* Type discriminator. Always "session.shutdown".
|
|
1436
|
+
*/
|
|
868
1437
|
type: "session.shutdown";
|
|
869
1438
|
}
|
|
870
1439
|
/**
|
|
@@ -892,7 +1461,7 @@ export interface ShutdownData {
|
|
|
892
1461
|
* Per-model usage breakdown, keyed by model identifier
|
|
893
1462
|
*/
|
|
894
1463
|
modelMetrics: {
|
|
895
|
-
[k: string]: ShutdownModelMetric;
|
|
1464
|
+
[k: string]: ShutdownModelMetric | undefined;
|
|
896
1465
|
};
|
|
897
1466
|
/**
|
|
898
1467
|
* Unix timestamp (milliseconds) when the session started
|
|
@@ -907,7 +1476,7 @@ export interface ShutdownData {
|
|
|
907
1476
|
* Session-wide per-token-type accumulated token counts
|
|
908
1477
|
*/
|
|
909
1478
|
tokenDetails?: {
|
|
910
|
-
[k: string]: ShutdownTokenDetail;
|
|
1479
|
+
[k: string]: ShutdownTokenDetail | undefined;
|
|
911
1480
|
};
|
|
912
1481
|
/**
|
|
913
1482
|
* Tool definitions token count at shutdown
|
|
@@ -919,12 +1488,10 @@ export interface ShutdownData {
|
|
|
919
1488
|
totalApiDurationMs: number;
|
|
920
1489
|
/**
|
|
921
1490
|
* Session-wide accumulated nano-AI units cost
|
|
1491
|
+
*
|
|
1492
|
+
* @experimental
|
|
922
1493
|
*/
|
|
923
1494
|
totalNanoAiu?: number;
|
|
924
|
-
/**
|
|
925
|
-
* Total number of premium API requests used during the session
|
|
926
|
-
*/
|
|
927
|
-
totalPremiumRequests: number;
|
|
928
1495
|
}
|
|
929
1496
|
/**
|
|
930
1497
|
* Aggregate code change metrics for the session
|
|
@@ -943,16 +1510,21 @@ export interface ShutdownCodeChanges {
|
|
|
943
1510
|
*/
|
|
944
1511
|
linesRemoved: number;
|
|
945
1512
|
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Schema for the `ShutdownModelMetric` type.
|
|
1515
|
+
*/
|
|
946
1516
|
export interface ShutdownModelMetric {
|
|
947
1517
|
requests: ShutdownModelMetricRequests;
|
|
948
1518
|
/**
|
|
949
1519
|
* Token count details per type
|
|
950
1520
|
*/
|
|
951
1521
|
tokenDetails?: {
|
|
952
|
-
[k: string]: ShutdownModelMetricTokenDetail;
|
|
1522
|
+
[k: string]: ShutdownModelMetricTokenDetail | undefined;
|
|
953
1523
|
};
|
|
954
1524
|
/**
|
|
955
1525
|
* Accumulated nano-AI units cost for this model
|
|
1526
|
+
*
|
|
1527
|
+
* @experimental
|
|
956
1528
|
*/
|
|
957
1529
|
totalNanoAiu?: number;
|
|
958
1530
|
usage: ShutdownModelMetricUsage;
|
|
@@ -963,13 +1535,20 @@ export interface ShutdownModelMetric {
|
|
|
963
1535
|
export interface ShutdownModelMetricRequests {
|
|
964
1536
|
/**
|
|
965
1537
|
* Cumulative cost multiplier for requests to this model
|
|
1538
|
+
*
|
|
1539
|
+
* @experimental
|
|
966
1540
|
*/
|
|
967
|
-
cost
|
|
1541
|
+
cost?: number;
|
|
968
1542
|
/**
|
|
969
1543
|
* Total number of API requests made to this model
|
|
1544
|
+
*
|
|
1545
|
+
* @experimental
|
|
970
1546
|
*/
|
|
971
|
-
count
|
|
1547
|
+
count?: number;
|
|
972
1548
|
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Schema for the `ShutdownModelMetricTokenDetail` type.
|
|
1551
|
+
*/
|
|
973
1552
|
export interface ShutdownModelMetricTokenDetail {
|
|
974
1553
|
/**
|
|
975
1554
|
* Accumulated token count for this token type
|
|
@@ -1001,12 +1580,18 @@ export interface ShutdownModelMetricUsage {
|
|
|
1001
1580
|
*/
|
|
1002
1581
|
reasoningTokens?: number;
|
|
1003
1582
|
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Schema for the `ShutdownTokenDetail` type.
|
|
1585
|
+
*/
|
|
1004
1586
|
export interface ShutdownTokenDetail {
|
|
1005
1587
|
/**
|
|
1006
1588
|
* Accumulated token count for this token type
|
|
1007
1589
|
*/
|
|
1008
1590
|
tokenCount: number;
|
|
1009
1591
|
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Session event "session.context_changed". Updated working directory and git context after the change
|
|
1594
|
+
*/
|
|
1010
1595
|
export interface ContextChangedEvent {
|
|
1011
1596
|
/**
|
|
1012
1597
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1029,14 +1614,23 @@ export interface ContextChangedEvent {
|
|
|
1029
1614
|
* ISO 8601 timestamp when the event was created
|
|
1030
1615
|
*/
|
|
1031
1616
|
timestamp: string;
|
|
1617
|
+
/**
|
|
1618
|
+
* Type discriminator. Always "session.context_changed".
|
|
1619
|
+
*/
|
|
1032
1620
|
type: "session.context_changed";
|
|
1033
1621
|
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Session event "session.usage_info". Current context window usage statistics including token and message counts
|
|
1624
|
+
*/
|
|
1034
1625
|
export interface UsageInfoEvent {
|
|
1035
1626
|
/**
|
|
1036
1627
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1037
1628
|
*/
|
|
1038
1629
|
agentId?: string;
|
|
1039
1630
|
data: UsageInfoData;
|
|
1631
|
+
/**
|
|
1632
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
1633
|
+
*/
|
|
1040
1634
|
ephemeral: true;
|
|
1041
1635
|
/**
|
|
1042
1636
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1050,6 +1644,9 @@ export interface UsageInfoEvent {
|
|
|
1050
1644
|
* ISO 8601 timestamp when the event was created
|
|
1051
1645
|
*/
|
|
1052
1646
|
timestamp: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* Type discriminator. Always "session.usage_info".
|
|
1649
|
+
*/
|
|
1053
1650
|
type: "session.usage_info";
|
|
1054
1651
|
}
|
|
1055
1652
|
/**
|
|
@@ -1085,6 +1682,9 @@ export interface UsageInfoData {
|
|
|
1085
1682
|
*/
|
|
1086
1683
|
toolDefinitionsTokens?: number;
|
|
1087
1684
|
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Session event "session.compaction_start". Context window breakdown at the start of LLM-powered conversation compaction
|
|
1687
|
+
*/
|
|
1088
1688
|
export interface CompactionStartEvent {
|
|
1089
1689
|
/**
|
|
1090
1690
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1107,6 +1707,9 @@ export interface CompactionStartEvent {
|
|
|
1107
1707
|
* ISO 8601 timestamp when the event was created
|
|
1108
1708
|
*/
|
|
1109
1709
|
timestamp: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Type discriminator. Always "session.compaction_start".
|
|
1712
|
+
*/
|
|
1110
1713
|
type: "session.compaction_start";
|
|
1111
1714
|
}
|
|
1112
1715
|
/**
|
|
@@ -1126,6 +1729,9 @@ export interface CompactionStartData {
|
|
|
1126
1729
|
*/
|
|
1127
1730
|
toolDefinitionsTokens?: number;
|
|
1128
1731
|
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Session event "session.compaction_complete". Conversation compaction results including success status, metrics, and optional error details
|
|
1734
|
+
*/
|
|
1129
1735
|
export interface CompactionCompleteEvent {
|
|
1130
1736
|
/**
|
|
1131
1737
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1148,6 +1754,9 @@ export interface CompactionCompleteEvent {
|
|
|
1148
1754
|
* ISO 8601 timestamp when the event was created
|
|
1149
1755
|
*/
|
|
1150
1756
|
timestamp: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Type discriminator. Always "session.compaction_complete".
|
|
1759
|
+
*/
|
|
1151
1760
|
type: "session.compaction_complete";
|
|
1152
1761
|
}
|
|
1153
1762
|
/**
|
|
@@ -1167,6 +1776,10 @@ export interface CompactionCompleteData {
|
|
|
1167
1776
|
* Token count from non-system messages (user, assistant, tool) after compaction
|
|
1168
1777
|
*/
|
|
1169
1778
|
conversationTokens?: number;
|
|
1779
|
+
/**
|
|
1780
|
+
* User-supplied focus instructions provided to a manual `/compact` invocation. Omitted for automatic compaction and for manual compaction with no focus text.
|
|
1781
|
+
*/
|
|
1782
|
+
customInstructions?: string;
|
|
1170
1783
|
/**
|
|
1171
1784
|
* Error message if compaction failed
|
|
1172
1785
|
*/
|
|
@@ -1191,6 +1804,10 @@ export interface CompactionCompleteData {
|
|
|
1191
1804
|
* GitHub request tracing ID (x-github-request-id header) for the compaction LLM call
|
|
1192
1805
|
*/
|
|
1193
1806
|
requestId?: string;
|
|
1807
|
+
/**
|
|
1808
|
+
* Copilot service request ID (x-copilot-service-request-id header) for the compaction LLM call
|
|
1809
|
+
*/
|
|
1810
|
+
serviceRequestId?: string;
|
|
1194
1811
|
/**
|
|
1195
1812
|
* Whether compaction completed successfully
|
|
1196
1813
|
*/
|
|
@@ -1224,7 +1841,6 @@ export interface CompactionCompleteCompactionTokensUsed {
|
|
|
1224
1841
|
* Tokens written to prompt cache in the compaction LLM call
|
|
1225
1842
|
*/
|
|
1226
1843
|
cacheWriteTokens?: number;
|
|
1227
|
-
copilotUsage?: CompactionCompleteCompactionTokensUsedCopilotUsage;
|
|
1228
1844
|
/**
|
|
1229
1845
|
* Duration of the compaction LLM call in milliseconds
|
|
1230
1846
|
*/
|
|
@@ -1242,19 +1858,6 @@ export interface CompactionCompleteCompactionTokensUsed {
|
|
|
1242
1858
|
*/
|
|
1243
1859
|
outputTokens?: number;
|
|
1244
1860
|
}
|
|
1245
|
-
/**
|
|
1246
|
-
* Per-request cost and usage data from the CAPI copilot_usage response field
|
|
1247
|
-
*/
|
|
1248
|
-
export interface CompactionCompleteCompactionTokensUsedCopilotUsage {
|
|
1249
|
-
/**
|
|
1250
|
-
* Itemized token usage breakdown
|
|
1251
|
-
*/
|
|
1252
|
-
tokenDetails: CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail[];
|
|
1253
|
-
/**
|
|
1254
|
-
* Total cost in nano-AI units for this request
|
|
1255
|
-
*/
|
|
1256
|
-
totalNanoAiu: number;
|
|
1257
|
-
}
|
|
1258
1861
|
/**
|
|
1259
1862
|
* Token usage detail for a single billing category
|
|
1260
1863
|
*/
|
|
@@ -1276,6 +1879,9 @@ export interface CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail {
|
|
|
1276
1879
|
*/
|
|
1277
1880
|
tokenType: string;
|
|
1278
1881
|
}
|
|
1882
|
+
/**
|
|
1883
|
+
* Session event "session.task_complete". Task completion notification with summary from the agent
|
|
1884
|
+
*/
|
|
1279
1885
|
export interface TaskCompleteEvent {
|
|
1280
1886
|
/**
|
|
1281
1887
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1298,6 +1904,9 @@ export interface TaskCompleteEvent {
|
|
|
1298
1904
|
* ISO 8601 timestamp when the event was created
|
|
1299
1905
|
*/
|
|
1300
1906
|
timestamp: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* Type discriminator. Always "session.task_complete".
|
|
1909
|
+
*/
|
|
1301
1910
|
type: "session.task_complete";
|
|
1302
1911
|
}
|
|
1303
1912
|
/**
|
|
@@ -1313,6 +1922,9 @@ export interface TaskCompleteData {
|
|
|
1313
1922
|
*/
|
|
1314
1923
|
summary?: string;
|
|
1315
1924
|
}
|
|
1925
|
+
/**
|
|
1926
|
+
* Session event "user.message".
|
|
1927
|
+
*/
|
|
1316
1928
|
export interface UserMessageEvent {
|
|
1317
1929
|
/**
|
|
1318
1930
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1335,14 +1947,20 @@ export interface UserMessageEvent {
|
|
|
1335
1947
|
* ISO 8601 timestamp when the event was created
|
|
1336
1948
|
*/
|
|
1337
1949
|
timestamp: string;
|
|
1950
|
+
/**
|
|
1951
|
+
* Type discriminator. Always "user.message".
|
|
1952
|
+
*/
|
|
1338
1953
|
type: "user.message";
|
|
1339
1954
|
}
|
|
1955
|
+
/**
|
|
1956
|
+
* Schema for the `UserMessageData` type.
|
|
1957
|
+
*/
|
|
1340
1958
|
export interface UserMessageData {
|
|
1341
1959
|
agentMode?: UserMessageAgentMode;
|
|
1342
1960
|
/**
|
|
1343
1961
|
* Files, selections, or GitHub references attached to the message
|
|
1344
1962
|
*/
|
|
1345
|
-
attachments?:
|
|
1963
|
+
attachments?: Attachment[];
|
|
1346
1964
|
/**
|
|
1347
1965
|
* The user's message text as displayed in the timeline
|
|
1348
1966
|
*/
|
|
@@ -1352,7 +1970,11 @@ export interface UserMessageData {
|
|
|
1352
1970
|
*/
|
|
1353
1971
|
interactionId?: string;
|
|
1354
1972
|
/**
|
|
1355
|
-
*
|
|
1973
|
+
* True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry.
|
|
1974
|
+
*/
|
|
1975
|
+
isAutopilotContinuation?: boolean;
|
|
1976
|
+
/**
|
|
1977
|
+
* Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit
|
|
1356
1978
|
*/
|
|
1357
1979
|
nativeDocumentPathFallbackPaths?: string[];
|
|
1358
1980
|
/**
|
|
@@ -1375,12 +1997,12 @@ export interface UserMessageData {
|
|
|
1375
1997
|
/**
|
|
1376
1998
|
* File attachment
|
|
1377
1999
|
*/
|
|
1378
|
-
export interface
|
|
2000
|
+
export interface AttachmentFile {
|
|
1379
2001
|
/**
|
|
1380
2002
|
* User-facing display name for the attachment
|
|
1381
2003
|
*/
|
|
1382
2004
|
displayName: string;
|
|
1383
|
-
lineRange?:
|
|
2005
|
+
lineRange?: AttachmentFileLineRange;
|
|
1384
2006
|
/**
|
|
1385
2007
|
* Absolute file path
|
|
1386
2008
|
*/
|
|
@@ -1393,7 +2015,7 @@ export interface UserMessageAttachmentFile {
|
|
|
1393
2015
|
/**
|
|
1394
2016
|
* Optional line range to scope the attachment to a specific section of the file
|
|
1395
2017
|
*/
|
|
1396
|
-
export interface
|
|
2018
|
+
export interface AttachmentFileLineRange {
|
|
1397
2019
|
/**
|
|
1398
2020
|
* End line number (1-based, inclusive)
|
|
1399
2021
|
*/
|
|
@@ -1406,7 +2028,7 @@ export interface UserMessageAttachmentFileLineRange {
|
|
|
1406
2028
|
/**
|
|
1407
2029
|
* Directory attachment
|
|
1408
2030
|
*/
|
|
1409
|
-
export interface
|
|
2031
|
+
export interface AttachmentDirectory {
|
|
1410
2032
|
/**
|
|
1411
2033
|
* User-facing display name for the attachment
|
|
1412
2034
|
*/
|
|
@@ -1423,7 +2045,7 @@ export interface UserMessageAttachmentDirectory {
|
|
|
1423
2045
|
/**
|
|
1424
2046
|
* Code selection attachment from an editor
|
|
1425
2047
|
*/
|
|
1426
|
-
export interface
|
|
2048
|
+
export interface AttachmentSelection {
|
|
1427
2049
|
/**
|
|
1428
2050
|
* User-facing display name for the selection
|
|
1429
2051
|
*/
|
|
@@ -1432,7 +2054,7 @@ export interface UserMessageAttachmentSelection {
|
|
|
1432
2054
|
* Absolute path to the file containing the selection
|
|
1433
2055
|
*/
|
|
1434
2056
|
filePath: string;
|
|
1435
|
-
selection:
|
|
2057
|
+
selection: AttachmentSelectionDetails;
|
|
1436
2058
|
/**
|
|
1437
2059
|
* The selected text content
|
|
1438
2060
|
*/
|
|
@@ -1445,14 +2067,14 @@ export interface UserMessageAttachmentSelection {
|
|
|
1445
2067
|
/**
|
|
1446
2068
|
* Position range of the selection within the file
|
|
1447
2069
|
*/
|
|
1448
|
-
export interface
|
|
1449
|
-
end:
|
|
1450
|
-
start:
|
|
2070
|
+
export interface AttachmentSelectionDetails {
|
|
2071
|
+
end: AttachmentSelectionDetailsEnd;
|
|
2072
|
+
start: AttachmentSelectionDetailsStart;
|
|
1451
2073
|
}
|
|
1452
2074
|
/**
|
|
1453
2075
|
* End position of the selection
|
|
1454
2076
|
*/
|
|
1455
|
-
export interface
|
|
2077
|
+
export interface AttachmentSelectionDetailsEnd {
|
|
1456
2078
|
/**
|
|
1457
2079
|
* End character offset within the line (0-based)
|
|
1458
2080
|
*/
|
|
@@ -1465,7 +2087,7 @@ export interface UserMessageAttachmentSelectionDetailsEnd {
|
|
|
1465
2087
|
/**
|
|
1466
2088
|
* Start position of the selection
|
|
1467
2089
|
*/
|
|
1468
|
-
export interface
|
|
2090
|
+
export interface AttachmentSelectionDetailsStart {
|
|
1469
2091
|
/**
|
|
1470
2092
|
* Start character offset within the line (0-based)
|
|
1471
2093
|
*/
|
|
@@ -1478,12 +2100,12 @@ export interface UserMessageAttachmentSelectionDetailsStart {
|
|
|
1478
2100
|
/**
|
|
1479
2101
|
* GitHub issue, pull request, or discussion reference
|
|
1480
2102
|
*/
|
|
1481
|
-
export interface
|
|
2103
|
+
export interface AttachmentGitHubReference {
|
|
1482
2104
|
/**
|
|
1483
2105
|
* Issue, pull request, or discussion number
|
|
1484
2106
|
*/
|
|
1485
2107
|
number: number;
|
|
1486
|
-
referenceType:
|
|
2108
|
+
referenceType: AttachmentGitHubReferenceType;
|
|
1487
2109
|
/**
|
|
1488
2110
|
* Current state of the referenced item (e.g., open, closed, merged)
|
|
1489
2111
|
*/
|
|
@@ -1504,7 +2126,7 @@ export interface UserMessageAttachmentGithubReference {
|
|
|
1504
2126
|
/**
|
|
1505
2127
|
* Blob attachment with inline base64-encoded data
|
|
1506
2128
|
*/
|
|
1507
|
-
export interface
|
|
2129
|
+
export interface AttachmentBlob {
|
|
1508
2130
|
/**
|
|
1509
2131
|
* Base64-encoded content
|
|
1510
2132
|
*/
|
|
@@ -1522,12 +2144,53 @@ export interface UserMessageAttachmentBlob {
|
|
|
1522
2144
|
*/
|
|
1523
2145
|
type: "blob";
|
|
1524
2146
|
}
|
|
2147
|
+
/**
|
|
2148
|
+
* Structured context contributed by an extension. Composer pills displayed in the host are forwarded back through session.send.attachments, then rendered into the model prompt as an <extension_context> XML block.
|
|
2149
|
+
*/
|
|
2150
|
+
export interface AttachmentExtensionContext {
|
|
2151
|
+
/**
|
|
2152
|
+
* Provider-local canvas identifier when the push was bound to a canvas instance
|
|
2153
|
+
*/
|
|
2154
|
+
canvasId?: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* ISO 8601 timestamp captured by the runtime when the push was accepted
|
|
2157
|
+
*/
|
|
2158
|
+
capturedAt: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* Owning extension identifier. Runtime-derived from the caller's connection when produced via session.extensions.sendAttachmentsToMessage; preserved verbatim on subsequent transports.
|
|
2161
|
+
*/
|
|
2162
|
+
extensionId: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* Open canvas instance identifier when the push was bound to a canvas instance
|
|
2165
|
+
*/
|
|
2166
|
+
instanceId?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Caller-supplied JSON payload
|
|
2169
|
+
*/
|
|
2170
|
+
payload?: {
|
|
2171
|
+
[k: string]: unknown | undefined;
|
|
2172
|
+
};
|
|
2173
|
+
/**
|
|
2174
|
+
* Human-readable composer pill label
|
|
2175
|
+
*/
|
|
2176
|
+
title: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* Attachment type discriminator
|
|
2179
|
+
*/
|
|
2180
|
+
type: "extension_context";
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Session event "pending_messages.modified". Empty payload; the event signals that the pending message queue has changed
|
|
2184
|
+
*/
|
|
1525
2185
|
export interface PendingMessagesModifiedEvent {
|
|
1526
2186
|
/**
|
|
1527
2187
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1528
2188
|
*/
|
|
1529
2189
|
agentId?: string;
|
|
1530
2190
|
data: PendingMessagesModifiedData;
|
|
2191
|
+
/**
|
|
2192
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2193
|
+
*/
|
|
1531
2194
|
ephemeral: true;
|
|
1532
2195
|
/**
|
|
1533
2196
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1541,6 +2204,9 @@ export interface PendingMessagesModifiedEvent {
|
|
|
1541
2204
|
* ISO 8601 timestamp when the event was created
|
|
1542
2205
|
*/
|
|
1543
2206
|
timestamp: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Type discriminator. Always "pending_messages.modified".
|
|
2209
|
+
*/
|
|
1544
2210
|
type: "pending_messages.modified";
|
|
1545
2211
|
}
|
|
1546
2212
|
/**
|
|
@@ -1548,6 +2214,9 @@ export interface PendingMessagesModifiedEvent {
|
|
|
1548
2214
|
*/
|
|
1549
2215
|
export interface PendingMessagesModifiedData {
|
|
1550
2216
|
}
|
|
2217
|
+
/**
|
|
2218
|
+
* Session event "assistant.turn_start". Turn initialization metadata including identifier and interaction tracking
|
|
2219
|
+
*/
|
|
1551
2220
|
export interface AssistantTurnStartEvent {
|
|
1552
2221
|
/**
|
|
1553
2222
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1570,6 +2239,9 @@ export interface AssistantTurnStartEvent {
|
|
|
1570
2239
|
* ISO 8601 timestamp when the event was created
|
|
1571
2240
|
*/
|
|
1572
2241
|
timestamp: string;
|
|
2242
|
+
/**
|
|
2243
|
+
* Type discriminator. Always "assistant.turn_start".
|
|
2244
|
+
*/
|
|
1573
2245
|
type: "assistant.turn_start";
|
|
1574
2246
|
}
|
|
1575
2247
|
/**
|
|
@@ -1585,12 +2257,18 @@ export interface AssistantTurnStartData {
|
|
|
1585
2257
|
*/
|
|
1586
2258
|
turnId: string;
|
|
1587
2259
|
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Session event "assistant.intent". Agent intent description for current activity or plan
|
|
2262
|
+
*/
|
|
1588
2263
|
export interface AssistantIntentEvent {
|
|
1589
2264
|
/**
|
|
1590
2265
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1591
2266
|
*/
|
|
1592
2267
|
agentId?: string;
|
|
1593
2268
|
data: AssistantIntentData;
|
|
2269
|
+
/**
|
|
2270
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2271
|
+
*/
|
|
1594
2272
|
ephemeral: true;
|
|
1595
2273
|
/**
|
|
1596
2274
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1604,6 +2282,9 @@ export interface AssistantIntentEvent {
|
|
|
1604
2282
|
* ISO 8601 timestamp when the event was created
|
|
1605
2283
|
*/
|
|
1606
2284
|
timestamp: string;
|
|
2285
|
+
/**
|
|
2286
|
+
* Type discriminator. Always "assistant.intent".
|
|
2287
|
+
*/
|
|
1607
2288
|
type: "assistant.intent";
|
|
1608
2289
|
}
|
|
1609
2290
|
/**
|
|
@@ -1615,6 +2296,9 @@ export interface AssistantIntentData {
|
|
|
1615
2296
|
*/
|
|
1616
2297
|
intent: string;
|
|
1617
2298
|
}
|
|
2299
|
+
/**
|
|
2300
|
+
* Session event "assistant.reasoning". Assistant reasoning content for timeline display with complete thinking text
|
|
2301
|
+
*/
|
|
1618
2302
|
export interface AssistantReasoningEvent {
|
|
1619
2303
|
/**
|
|
1620
2304
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1637,6 +2321,9 @@ export interface AssistantReasoningEvent {
|
|
|
1637
2321
|
* ISO 8601 timestamp when the event was created
|
|
1638
2322
|
*/
|
|
1639
2323
|
timestamp: string;
|
|
2324
|
+
/**
|
|
2325
|
+
* Type discriminator. Always "assistant.reasoning".
|
|
2326
|
+
*/
|
|
1640
2327
|
type: "assistant.reasoning";
|
|
1641
2328
|
}
|
|
1642
2329
|
/**
|
|
@@ -1652,12 +2339,18 @@ export interface AssistantReasoningData {
|
|
|
1652
2339
|
*/
|
|
1653
2340
|
reasoningId: string;
|
|
1654
2341
|
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Session event "assistant.reasoning_delta". Streaming reasoning delta for incremental extended thinking updates
|
|
2344
|
+
*/
|
|
1655
2345
|
export interface AssistantReasoningDeltaEvent {
|
|
1656
2346
|
/**
|
|
1657
2347
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1658
2348
|
*/
|
|
1659
2349
|
agentId?: string;
|
|
1660
2350
|
data: AssistantReasoningDeltaData;
|
|
2351
|
+
/**
|
|
2352
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2353
|
+
*/
|
|
1661
2354
|
ephemeral: true;
|
|
1662
2355
|
/**
|
|
1663
2356
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1671,6 +2364,9 @@ export interface AssistantReasoningDeltaEvent {
|
|
|
1671
2364
|
* ISO 8601 timestamp when the event was created
|
|
1672
2365
|
*/
|
|
1673
2366
|
timestamp: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* Type discriminator. Always "assistant.reasoning_delta".
|
|
2369
|
+
*/
|
|
1674
2370
|
type: "assistant.reasoning_delta";
|
|
1675
2371
|
}
|
|
1676
2372
|
/**
|
|
@@ -1686,12 +2382,18 @@ export interface AssistantReasoningDeltaData {
|
|
|
1686
2382
|
*/
|
|
1687
2383
|
reasoningId: string;
|
|
1688
2384
|
}
|
|
2385
|
+
/**
|
|
2386
|
+
* Session event "assistant.streaming_delta". Streaming response progress with cumulative byte count
|
|
2387
|
+
*/
|
|
1689
2388
|
export interface AssistantStreamingDeltaEvent {
|
|
1690
2389
|
/**
|
|
1691
2390
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1692
2391
|
*/
|
|
1693
2392
|
agentId?: string;
|
|
1694
2393
|
data: AssistantStreamingDeltaData;
|
|
2394
|
+
/**
|
|
2395
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2396
|
+
*/
|
|
1695
2397
|
ephemeral: true;
|
|
1696
2398
|
/**
|
|
1697
2399
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1705,6 +2407,9 @@ export interface AssistantStreamingDeltaEvent {
|
|
|
1705
2407
|
* ISO 8601 timestamp when the event was created
|
|
1706
2408
|
*/
|
|
1707
2409
|
timestamp: string;
|
|
2410
|
+
/**
|
|
2411
|
+
* Type discriminator. Always "assistant.streaming_delta".
|
|
2412
|
+
*/
|
|
1708
2413
|
type: "assistant.streaming_delta";
|
|
1709
2414
|
}
|
|
1710
2415
|
/**
|
|
@@ -1716,6 +2421,9 @@ export interface AssistantStreamingDeltaData {
|
|
|
1716
2421
|
*/
|
|
1717
2422
|
totalResponseSizeBytes: number;
|
|
1718
2423
|
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Session event "assistant.message". Assistant response containing text content, optional tool requests, and interaction metadata
|
|
2426
|
+
*/
|
|
1719
2427
|
export interface AssistantMessageEvent {
|
|
1720
2428
|
/**
|
|
1721
2429
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1738,12 +2446,27 @@ export interface AssistantMessageEvent {
|
|
|
1738
2446
|
* ISO 8601 timestamp when the event was created
|
|
1739
2447
|
*/
|
|
1740
2448
|
timestamp: string;
|
|
2449
|
+
/**
|
|
2450
|
+
* Type discriminator. Always "assistant.message".
|
|
2451
|
+
*/
|
|
1741
2452
|
type: "assistant.message";
|
|
1742
2453
|
}
|
|
1743
2454
|
/**
|
|
1744
2455
|
* Assistant response containing text content, optional tool requests, and interaction metadata
|
|
1745
2456
|
*/
|
|
1746
2457
|
export interface AssistantMessageData {
|
|
2458
|
+
/**
|
|
2459
|
+
* Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping
|
|
2460
|
+
*
|
|
2461
|
+
* @experimental
|
|
2462
|
+
*/
|
|
2463
|
+
anthropicAdvisorBlocks?: unknown[];
|
|
2464
|
+
/**
|
|
2465
|
+
* Anthropic advisor model ID used for this response, for timeline display on replay
|
|
2466
|
+
*
|
|
2467
|
+
* @experimental
|
|
2468
|
+
*/
|
|
2469
|
+
anthropicAdvisorModel?: string;
|
|
1747
2470
|
/**
|
|
1748
2471
|
* The assistant's text response content
|
|
1749
2472
|
*/
|
|
@@ -1760,6 +2483,10 @@ export interface AssistantMessageData {
|
|
|
1760
2483
|
* Unique identifier for this assistant message
|
|
1761
2484
|
*/
|
|
1762
2485
|
messageId: string;
|
|
2486
|
+
/**
|
|
2487
|
+
* Model that produced this assistant message, if known
|
|
2488
|
+
*/
|
|
2489
|
+
model?: string;
|
|
1763
2490
|
/**
|
|
1764
2491
|
* Actual output token count from the API response (completion_tokens), used for accurate token accounting
|
|
1765
2492
|
*/
|
|
@@ -1785,6 +2512,10 @@ export interface AssistantMessageData {
|
|
|
1785
2512
|
* GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
|
|
1786
2513
|
*/
|
|
1787
2514
|
requestId?: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
|
|
2517
|
+
*/
|
|
2518
|
+
serviceRequestId?: string;
|
|
1788
2519
|
/**
|
|
1789
2520
|
* Tool invocations requested by the assistant in this message
|
|
1790
2521
|
*/
|
|
@@ -1802,7 +2533,7 @@ export interface AssistantMessageToolRequest {
|
|
|
1802
2533
|
* Arguments to pass to the tool, format depends on the tool
|
|
1803
2534
|
*/
|
|
1804
2535
|
arguments?: {
|
|
1805
|
-
[k: string]: unknown;
|
|
2536
|
+
[k: string]: unknown | undefined;
|
|
1806
2537
|
};
|
|
1807
2538
|
/**
|
|
1808
2539
|
* Resolved intention summary describing what this specific call does
|
|
@@ -1812,6 +2543,10 @@ export interface AssistantMessageToolRequest {
|
|
|
1812
2543
|
* Name of the MCP server hosting this tool, when the tool is an MCP tool
|
|
1813
2544
|
*/
|
|
1814
2545
|
mcpServerName?: string;
|
|
2546
|
+
/**
|
|
2547
|
+
* Original tool name on the MCP server, when the tool is an MCP tool
|
|
2548
|
+
*/
|
|
2549
|
+
mcpToolName?: string;
|
|
1815
2550
|
/**
|
|
1816
2551
|
* Name of the tool being invoked
|
|
1817
2552
|
*/
|
|
@@ -1826,12 +2561,18 @@ export interface AssistantMessageToolRequest {
|
|
|
1826
2561
|
toolTitle?: string;
|
|
1827
2562
|
type?: AssistantMessageToolRequestType;
|
|
1828
2563
|
}
|
|
2564
|
+
/**
|
|
2565
|
+
* Session event "assistant.message_start". Streaming assistant message start metadata
|
|
2566
|
+
*/
|
|
1829
2567
|
export interface AssistantMessageStartEvent {
|
|
1830
2568
|
/**
|
|
1831
2569
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1832
2570
|
*/
|
|
1833
2571
|
agentId?: string;
|
|
1834
2572
|
data: AssistantMessageStartData;
|
|
2573
|
+
/**
|
|
2574
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2575
|
+
*/
|
|
1835
2576
|
ephemeral: true;
|
|
1836
2577
|
/**
|
|
1837
2578
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1845,6 +2586,9 @@ export interface AssistantMessageStartEvent {
|
|
|
1845
2586
|
* ISO 8601 timestamp when the event was created
|
|
1846
2587
|
*/
|
|
1847
2588
|
timestamp: string;
|
|
2589
|
+
/**
|
|
2590
|
+
* Type discriminator. Always "assistant.message_start".
|
|
2591
|
+
*/
|
|
1848
2592
|
type: "assistant.message_start";
|
|
1849
2593
|
}
|
|
1850
2594
|
/**
|
|
@@ -1860,12 +2604,18 @@ export interface AssistantMessageStartData {
|
|
|
1860
2604
|
*/
|
|
1861
2605
|
phase?: string;
|
|
1862
2606
|
}
|
|
2607
|
+
/**
|
|
2608
|
+
* Session event "assistant.message_delta". Streaming assistant message delta for incremental response updates
|
|
2609
|
+
*/
|
|
1863
2610
|
export interface AssistantMessageDeltaEvent {
|
|
1864
2611
|
/**
|
|
1865
2612
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1866
2613
|
*/
|
|
1867
2614
|
agentId?: string;
|
|
1868
2615
|
data: AssistantMessageDeltaData;
|
|
2616
|
+
/**
|
|
2617
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2618
|
+
*/
|
|
1869
2619
|
ephemeral: true;
|
|
1870
2620
|
/**
|
|
1871
2621
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1879,6 +2629,9 @@ export interface AssistantMessageDeltaEvent {
|
|
|
1879
2629
|
* ISO 8601 timestamp when the event was created
|
|
1880
2630
|
*/
|
|
1881
2631
|
timestamp: string;
|
|
2632
|
+
/**
|
|
2633
|
+
* Type discriminator. Always "assistant.message_delta".
|
|
2634
|
+
*/
|
|
1882
2635
|
type: "assistant.message_delta";
|
|
1883
2636
|
}
|
|
1884
2637
|
/**
|
|
@@ -1899,6 +2652,9 @@ export interface AssistantMessageDeltaData {
|
|
|
1899
2652
|
*/
|
|
1900
2653
|
parentToolCallId?: string;
|
|
1901
2654
|
}
|
|
2655
|
+
/**
|
|
2656
|
+
* Session event "assistant.turn_end". Turn completion metadata including the turn identifier
|
|
2657
|
+
*/
|
|
1902
2658
|
export interface AssistantTurnEndEvent {
|
|
1903
2659
|
/**
|
|
1904
2660
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -1921,6 +2677,9 @@ export interface AssistantTurnEndEvent {
|
|
|
1921
2677
|
* ISO 8601 timestamp when the event was created
|
|
1922
2678
|
*/
|
|
1923
2679
|
timestamp: string;
|
|
2680
|
+
/**
|
|
2681
|
+
* Type discriminator. Always "assistant.turn_end".
|
|
2682
|
+
*/
|
|
1924
2683
|
type: "assistant.turn_end";
|
|
1925
2684
|
}
|
|
1926
2685
|
/**
|
|
@@ -1932,12 +2691,18 @@ export interface AssistantTurnEndData {
|
|
|
1932
2691
|
*/
|
|
1933
2692
|
turnId: string;
|
|
1934
2693
|
}
|
|
2694
|
+
/**
|
|
2695
|
+
* Session event "assistant.usage". LLM API call usage metrics including tokens, costs, quotas, and billing information
|
|
2696
|
+
*/
|
|
1935
2697
|
export interface AssistantUsageEvent {
|
|
1936
2698
|
/**
|
|
1937
2699
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
1938
2700
|
*/
|
|
1939
2701
|
agentId?: string;
|
|
1940
2702
|
data: AssistantUsageData;
|
|
2703
|
+
/**
|
|
2704
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2705
|
+
*/
|
|
1941
2706
|
ephemeral: true;
|
|
1942
2707
|
/**
|
|
1943
2708
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -1951,6 +2716,9 @@ export interface AssistantUsageEvent {
|
|
|
1951
2716
|
* ISO 8601 timestamp when the event was created
|
|
1952
2717
|
*/
|
|
1953
2718
|
timestamp: string;
|
|
2719
|
+
/**
|
|
2720
|
+
* Type discriminator. Always "assistant.usage".
|
|
2721
|
+
*/
|
|
1954
2722
|
type: "assistant.usage";
|
|
1955
2723
|
}
|
|
1956
2724
|
/**
|
|
@@ -1961,6 +2729,7 @@ export interface AssistantUsageData {
|
|
|
1961
2729
|
* Completion ID from the model provider (e.g., chatcmpl-abc123)
|
|
1962
2730
|
*/
|
|
1963
2731
|
apiCallId?: string;
|
|
2732
|
+
apiEndpoint?: AssistantUsageApiEndpoint;
|
|
1964
2733
|
/**
|
|
1965
2734
|
* Number of tokens read from prompt cache
|
|
1966
2735
|
*/
|
|
@@ -1969,9 +2738,10 @@ export interface AssistantUsageData {
|
|
|
1969
2738
|
* Number of tokens written to prompt cache
|
|
1970
2739
|
*/
|
|
1971
2740
|
cacheWriteTokens?: number;
|
|
1972
|
-
copilotUsage?: AssistantUsageCopilotUsage;
|
|
1973
2741
|
/**
|
|
1974
2742
|
* Model multiplier cost for billing purposes
|
|
2743
|
+
*
|
|
2744
|
+
* @experimental
|
|
1975
2745
|
*/
|
|
1976
2746
|
cost?: number;
|
|
1977
2747
|
/**
|
|
@@ -2008,13 +2778,7 @@ export interface AssistantUsageData {
|
|
|
2008
2778
|
*/
|
|
2009
2779
|
providerCallId?: string;
|
|
2010
2780
|
/**
|
|
2011
|
-
*
|
|
2012
|
-
*/
|
|
2013
|
-
quotaSnapshots?: {
|
|
2014
|
-
[k: string]: AssistantUsageQuotaSnapshot;
|
|
2015
|
-
};
|
|
2016
|
-
/**
|
|
2017
|
-
* Reasoning effort level used for model calls, if applicable (e.g. "low", "medium", "high", "xhigh")
|
|
2781
|
+
* Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
|
|
2018
2782
|
*/
|
|
2019
2783
|
reasoningEffort?: string;
|
|
2020
2784
|
/**
|
|
@@ -2022,22 +2786,13 @@ export interface AssistantUsageData {
|
|
|
2022
2786
|
*/
|
|
2023
2787
|
reasoningTokens?: number;
|
|
2024
2788
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
*/
|
|
2027
|
-
ttftMs?: number;
|
|
2028
|
-
}
|
|
2029
|
-
/**
|
|
2030
|
-
* Per-request cost and usage data from the CAPI copilot_usage response field
|
|
2031
|
-
*/
|
|
2032
|
-
export interface AssistantUsageCopilotUsage {
|
|
2033
|
-
/**
|
|
2034
|
-
* Itemized token usage breakdown
|
|
2789
|
+
* Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
|
|
2035
2790
|
*/
|
|
2036
|
-
|
|
2791
|
+
serviceRequestId?: string;
|
|
2037
2792
|
/**
|
|
2038
|
-
*
|
|
2793
|
+
* Time to first token in milliseconds. Only available for streaming requests
|
|
2039
2794
|
*/
|
|
2040
|
-
|
|
2795
|
+
timeToFirstTokenMs?: number;
|
|
2041
2796
|
}
|
|
2042
2797
|
/**
|
|
2043
2798
|
* Token usage detail for a single billing category
|
|
@@ -2060,46 +2815,18 @@ export interface AssistantUsageCopilotUsageTokenDetail {
|
|
|
2060
2815
|
*/
|
|
2061
2816
|
tokenType: string;
|
|
2062
2817
|
}
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
*/
|
|
2067
|
-
entitlementRequests: number;
|
|
2068
|
-
/**
|
|
2069
|
-
* Whether the user has an unlimited usage entitlement
|
|
2070
|
-
*/
|
|
2071
|
-
isUnlimitedEntitlement: boolean;
|
|
2072
|
-
/**
|
|
2073
|
-
* Number of requests over the entitlement limit
|
|
2074
|
-
*/
|
|
2075
|
-
overage: number;
|
|
2076
|
-
/**
|
|
2077
|
-
* Whether overage is allowed when quota is exhausted
|
|
2078
|
-
*/
|
|
2079
|
-
overageAllowedWithExhaustedQuota: boolean;
|
|
2080
|
-
/**
|
|
2081
|
-
* Percentage of quota remaining (0.0 to 1.0)
|
|
2082
|
-
*/
|
|
2083
|
-
remainingPercentage: number;
|
|
2084
|
-
/**
|
|
2085
|
-
* Date when the quota resets
|
|
2086
|
-
*/
|
|
2087
|
-
resetDate?: string;
|
|
2088
|
-
/**
|
|
2089
|
-
* Whether usage is still permitted after quota exhaustion
|
|
2090
|
-
*/
|
|
2091
|
-
usageAllowedWithExhaustedQuota: boolean;
|
|
2092
|
-
/**
|
|
2093
|
-
* Number of requests already consumed
|
|
2094
|
-
*/
|
|
2095
|
-
usedRequests: number;
|
|
2096
|
-
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Session event "model.call_failure". Failed LLM API call metadata for telemetry
|
|
2820
|
+
*/
|
|
2097
2821
|
export interface ModelCallFailureEvent {
|
|
2098
2822
|
/**
|
|
2099
2823
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
2100
2824
|
*/
|
|
2101
2825
|
agentId?: string;
|
|
2102
2826
|
data: ModelCallFailureData;
|
|
2827
|
+
/**
|
|
2828
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
2829
|
+
*/
|
|
2103
2830
|
ephemeral: true;
|
|
2104
2831
|
/**
|
|
2105
2832
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -2113,6 +2840,9 @@ export interface ModelCallFailureEvent {
|
|
|
2113
2840
|
* ISO 8601 timestamp when the event was created
|
|
2114
2841
|
*/
|
|
2115
2842
|
timestamp: string;
|
|
2843
|
+
/**
|
|
2844
|
+
* Type discriminator. Always "model.call_failure".
|
|
2845
|
+
*/
|
|
2116
2846
|
type: "model.call_failure";
|
|
2117
2847
|
}
|
|
2118
2848
|
/**
|
|
@@ -2143,12 +2873,19 @@ export interface ModelCallFailureData {
|
|
|
2143
2873
|
* GitHub request tracing ID (x-github-request-id header) for server-side log correlation
|
|
2144
2874
|
*/
|
|
2145
2875
|
providerCallId?: string;
|
|
2876
|
+
/**
|
|
2877
|
+
* Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
|
|
2878
|
+
*/
|
|
2879
|
+
serviceRequestId?: string;
|
|
2146
2880
|
source: ModelCallFailureSource;
|
|
2147
2881
|
/**
|
|
2148
2882
|
* HTTP status code from the failed request
|
|
2149
2883
|
*/
|
|
2150
2884
|
statusCode?: number;
|
|
2151
2885
|
}
|
|
2886
|
+
/**
|
|
2887
|
+
* Session event "abort". Turn abort information including the reason for termination
|
|
2888
|
+
*/
|
|
2152
2889
|
export interface AbortEvent {
|
|
2153
2890
|
/**
|
|
2154
2891
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2171,17 +2908,20 @@ export interface AbortEvent {
|
|
|
2171
2908
|
* ISO 8601 timestamp when the event was created
|
|
2172
2909
|
*/
|
|
2173
2910
|
timestamp: string;
|
|
2911
|
+
/**
|
|
2912
|
+
* Type discriminator. Always "abort".
|
|
2913
|
+
*/
|
|
2174
2914
|
type: "abort";
|
|
2175
2915
|
}
|
|
2176
2916
|
/**
|
|
2177
2917
|
* Turn abort information including the reason for termination
|
|
2178
2918
|
*/
|
|
2179
2919
|
export interface AbortData {
|
|
2180
|
-
|
|
2181
|
-
* Reason the current turn was aborted (e.g., "user initiated")
|
|
2182
|
-
*/
|
|
2183
|
-
reason: string;
|
|
2920
|
+
reason: AbortReason;
|
|
2184
2921
|
}
|
|
2922
|
+
/**
|
|
2923
|
+
* Session event "tool.user_requested". User-initiated tool invocation request with tool name and arguments
|
|
2924
|
+
*/
|
|
2185
2925
|
export interface ToolUserRequestedEvent {
|
|
2186
2926
|
/**
|
|
2187
2927
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2204,6 +2944,9 @@ export interface ToolUserRequestedEvent {
|
|
|
2204
2944
|
* ISO 8601 timestamp when the event was created
|
|
2205
2945
|
*/
|
|
2206
2946
|
timestamp: string;
|
|
2947
|
+
/**
|
|
2948
|
+
* Type discriminator. Always "tool.user_requested".
|
|
2949
|
+
*/
|
|
2207
2950
|
type: "tool.user_requested";
|
|
2208
2951
|
}
|
|
2209
2952
|
/**
|
|
@@ -2214,7 +2957,7 @@ export interface ToolUserRequestedData {
|
|
|
2214
2957
|
* Arguments for the tool invocation
|
|
2215
2958
|
*/
|
|
2216
2959
|
arguments?: {
|
|
2217
|
-
[k: string]: unknown;
|
|
2960
|
+
[k: string]: unknown | undefined;
|
|
2218
2961
|
};
|
|
2219
2962
|
/**
|
|
2220
2963
|
* Unique identifier for this tool call
|
|
@@ -2225,6 +2968,9 @@ export interface ToolUserRequestedData {
|
|
|
2225
2968
|
*/
|
|
2226
2969
|
toolName: string;
|
|
2227
2970
|
}
|
|
2971
|
+
/**
|
|
2972
|
+
* Session event "tool.execution_start". Tool execution startup details including MCP server information when applicable
|
|
2973
|
+
*/
|
|
2228
2974
|
export interface ToolExecutionStartEvent {
|
|
2229
2975
|
/**
|
|
2230
2976
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2247,6 +2993,9 @@ export interface ToolExecutionStartEvent {
|
|
|
2247
2993
|
* ISO 8601 timestamp when the event was created
|
|
2248
2994
|
*/
|
|
2249
2995
|
timestamp: string;
|
|
2996
|
+
/**
|
|
2997
|
+
* Type discriminator. Always "tool.execution_start".
|
|
2998
|
+
*/
|
|
2250
2999
|
type: "tool.execution_start";
|
|
2251
3000
|
}
|
|
2252
3001
|
/**
|
|
@@ -2257,8 +3006,12 @@ export interface ToolExecutionStartData {
|
|
|
2257
3006
|
* Arguments passed to the tool
|
|
2258
3007
|
*/
|
|
2259
3008
|
arguments?: {
|
|
2260
|
-
[k: string]: unknown;
|
|
3009
|
+
[k: string]: unknown | undefined;
|
|
2261
3010
|
};
|
|
3011
|
+
/**
|
|
3012
|
+
* When true, the tool output should be displayed expanded (verbatim) in the CLI timeline
|
|
3013
|
+
*/
|
|
3014
|
+
displayVerbatim?: boolean;
|
|
2262
3015
|
/**
|
|
2263
3016
|
* Name of the MCP server hosting this tool, when the tool is an MCP tool
|
|
2264
3017
|
*/
|
|
@@ -2267,6 +3020,10 @@ export interface ToolExecutionStartData {
|
|
|
2267
3020
|
* Original tool name on the MCP server, when the tool is an MCP tool
|
|
2268
3021
|
*/
|
|
2269
3022
|
mcpToolName?: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* Model identifier that generated this tool call
|
|
3025
|
+
*/
|
|
3026
|
+
model?: string;
|
|
2270
3027
|
/**
|
|
2271
3028
|
* @deprecated
|
|
2272
3029
|
* Tool call ID of the parent tool invocation when this event originates from a sub-agent
|
|
@@ -2285,12 +3042,18 @@ export interface ToolExecutionStartData {
|
|
|
2285
3042
|
*/
|
|
2286
3043
|
turnId?: string;
|
|
2287
3044
|
}
|
|
3045
|
+
/**
|
|
3046
|
+
* Session event "tool.execution_partial_result". Streaming tool execution output for incremental result display
|
|
3047
|
+
*/
|
|
2288
3048
|
export interface ToolExecutionPartialResultEvent {
|
|
2289
3049
|
/**
|
|
2290
3050
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
2291
3051
|
*/
|
|
2292
3052
|
agentId?: string;
|
|
2293
3053
|
data: ToolExecutionPartialData;
|
|
3054
|
+
/**
|
|
3055
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
3056
|
+
*/
|
|
2294
3057
|
ephemeral: true;
|
|
2295
3058
|
/**
|
|
2296
3059
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -2304,6 +3067,9 @@ export interface ToolExecutionPartialResultEvent {
|
|
|
2304
3067
|
* ISO 8601 timestamp when the event was created
|
|
2305
3068
|
*/
|
|
2306
3069
|
timestamp: string;
|
|
3070
|
+
/**
|
|
3071
|
+
* Type discriminator. Always "tool.execution_partial_result".
|
|
3072
|
+
*/
|
|
2307
3073
|
type: "tool.execution_partial_result";
|
|
2308
3074
|
}
|
|
2309
3075
|
/**
|
|
@@ -2319,12 +3085,18 @@ export interface ToolExecutionPartialData {
|
|
|
2319
3085
|
*/
|
|
2320
3086
|
toolCallId: string;
|
|
2321
3087
|
}
|
|
3088
|
+
/**
|
|
3089
|
+
* Session event "tool.execution_progress". Tool execution progress notification with status message
|
|
3090
|
+
*/
|
|
2322
3091
|
export interface ToolExecutionProgressEvent {
|
|
2323
3092
|
/**
|
|
2324
3093
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
2325
3094
|
*/
|
|
2326
3095
|
agentId?: string;
|
|
2327
3096
|
data: ToolExecutionProgressData;
|
|
3097
|
+
/**
|
|
3098
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
3099
|
+
*/
|
|
2328
3100
|
ephemeral: true;
|
|
2329
3101
|
/**
|
|
2330
3102
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -2338,6 +3110,9 @@ export interface ToolExecutionProgressEvent {
|
|
|
2338
3110
|
* ISO 8601 timestamp when the event was created
|
|
2339
3111
|
*/
|
|
2340
3112
|
timestamp: string;
|
|
3113
|
+
/**
|
|
3114
|
+
* Type discriminator. Always "tool.execution_progress".
|
|
3115
|
+
*/
|
|
2341
3116
|
type: "tool.execution_progress";
|
|
2342
3117
|
}
|
|
2343
3118
|
/**
|
|
@@ -2353,6 +3128,9 @@ export interface ToolExecutionProgressData {
|
|
|
2353
3128
|
*/
|
|
2354
3129
|
toolCallId: string;
|
|
2355
3130
|
}
|
|
3131
|
+
/**
|
|
3132
|
+
* Session event "tool.execution_complete". Tool execution completion results including success status, detailed output, and error information
|
|
3133
|
+
*/
|
|
2356
3134
|
export interface ToolExecutionCompleteEvent {
|
|
2357
3135
|
/**
|
|
2358
3136
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2375,6 +3153,9 @@ export interface ToolExecutionCompleteEvent {
|
|
|
2375
3153
|
* ISO 8601 timestamp when the event was created
|
|
2376
3154
|
*/
|
|
2377
3155
|
timestamp: string;
|
|
3156
|
+
/**
|
|
3157
|
+
* Type discriminator. Always "tool.execution_complete".
|
|
3158
|
+
*/
|
|
2378
3159
|
type: "tool.execution_complete";
|
|
2379
3160
|
}
|
|
2380
3161
|
/**
|
|
@@ -2400,6 +3181,10 @@ export interface ToolExecutionCompleteData {
|
|
|
2400
3181
|
*/
|
|
2401
3182
|
parentToolCallId?: string;
|
|
2402
3183
|
result?: ToolExecutionCompleteResult;
|
|
3184
|
+
/**
|
|
3185
|
+
* Whether this tool execution ran inside a sandbox container
|
|
3186
|
+
*/
|
|
3187
|
+
sandboxed?: boolean;
|
|
2403
3188
|
/**
|
|
2404
3189
|
* Whether the tool execution completed successfully
|
|
2405
3190
|
*/
|
|
@@ -2408,11 +3193,12 @@ export interface ToolExecutionCompleteData {
|
|
|
2408
3193
|
* Unique identifier for the completed tool call
|
|
2409
3194
|
*/
|
|
2410
3195
|
toolCallId: string;
|
|
3196
|
+
toolDescription?: ToolExecutionCompleteToolDescription;
|
|
2411
3197
|
/**
|
|
2412
3198
|
* Tool-specific telemetry data (e.g., CodeQL check counts, grep match counts)
|
|
2413
3199
|
*/
|
|
2414
3200
|
toolTelemetry?: {
|
|
2415
|
-
[k: string]: unknown;
|
|
3201
|
+
[k: string]: unknown | undefined;
|
|
2416
3202
|
};
|
|
2417
3203
|
/**
|
|
2418
3204
|
* Identifier for the agent loop turn this tool was invoked in, matching the corresponding assistant.turn_start event
|
|
@@ -2448,6 +3234,7 @@ export interface ToolExecutionCompleteResult {
|
|
|
2448
3234
|
* Full detailed tool result for UI/timeline display, preserving complete content such as diffs. Falls back to content when absent.
|
|
2449
3235
|
*/
|
|
2450
3236
|
detailedContent?: string;
|
|
3237
|
+
uiResource?: ToolExecutionCompleteUIResource;
|
|
2451
3238
|
}
|
|
2452
3239
|
/**
|
|
2453
3240
|
* Plain text content block
|
|
@@ -2582,6 +3369,9 @@ export interface ToolExecutionCompleteContentResource {
|
|
|
2582
3369
|
*/
|
|
2583
3370
|
type: "resource";
|
|
2584
3371
|
}
|
|
3372
|
+
/**
|
|
3373
|
+
* Schema for the `EmbeddedTextResourceContents` type.
|
|
3374
|
+
*/
|
|
2585
3375
|
export interface EmbeddedTextResourceContents {
|
|
2586
3376
|
/**
|
|
2587
3377
|
* MIME type of the text content
|
|
@@ -2596,6 +3386,9 @@ export interface EmbeddedTextResourceContents {
|
|
|
2596
3386
|
*/
|
|
2597
3387
|
uri: string;
|
|
2598
3388
|
}
|
|
3389
|
+
/**
|
|
3390
|
+
* Schema for the `EmbeddedBlobResourceContents` type.
|
|
3391
|
+
*/
|
|
2599
3392
|
export interface EmbeddedBlobResourceContents {
|
|
2600
3393
|
/**
|
|
2601
3394
|
* Base64-encoded binary content of the resource
|
|
@@ -2610,6 +3403,121 @@ export interface EmbeddedBlobResourceContents {
|
|
|
2610
3403
|
*/
|
|
2611
3404
|
uri: string;
|
|
2612
3405
|
}
|
|
3406
|
+
/**
|
|
3407
|
+
* MCP Apps UI resource content for rendering in a sandboxed iframe
|
|
3408
|
+
*/
|
|
3409
|
+
export interface ToolExecutionCompleteUIResource {
|
|
3410
|
+
_meta?: ToolExecutionCompleteUIResourceMeta;
|
|
3411
|
+
/**
|
|
3412
|
+
* Base64-encoded HTML content
|
|
3413
|
+
*/
|
|
3414
|
+
blob?: string;
|
|
3415
|
+
/**
|
|
3416
|
+
* MIME type of the content
|
|
3417
|
+
*/
|
|
3418
|
+
mimeType: string;
|
|
3419
|
+
/**
|
|
3420
|
+
* HTML content as a string
|
|
3421
|
+
*/
|
|
3422
|
+
text?: string;
|
|
3423
|
+
/**
|
|
3424
|
+
* The ui:// URI of the resource
|
|
3425
|
+
*/
|
|
3426
|
+
uri: string;
|
|
3427
|
+
}
|
|
3428
|
+
/**
|
|
3429
|
+
* Resource-level UI metadata (CSP, permissions, visual preferences)
|
|
3430
|
+
*/
|
|
3431
|
+
export interface ToolExecutionCompleteUIResourceMeta {
|
|
3432
|
+
ui?: ToolExecutionCompleteUIResourceMetaUI;
|
|
3433
|
+
}
|
|
3434
|
+
/**
|
|
3435
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUI` type.
|
|
3436
|
+
*/
|
|
3437
|
+
export interface ToolExecutionCompleteUIResourceMetaUI {
|
|
3438
|
+
csp?: ToolExecutionCompleteUIResourceMetaUICsp;
|
|
3439
|
+
domain?: string;
|
|
3440
|
+
permissions?: ToolExecutionCompleteUIResourceMetaUIPermissions;
|
|
3441
|
+
prefersBorder?: boolean;
|
|
3442
|
+
}
|
|
3443
|
+
/**
|
|
3444
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type.
|
|
3445
|
+
*/
|
|
3446
|
+
export interface ToolExecutionCompleteUIResourceMetaUICsp {
|
|
3447
|
+
baseUriDomains?: string[];
|
|
3448
|
+
connectDomains?: string[];
|
|
3449
|
+
frameDomains?: string[];
|
|
3450
|
+
resourceDomains?: string[];
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type.
|
|
3454
|
+
*/
|
|
3455
|
+
export interface ToolExecutionCompleteUIResourceMetaUIPermissions {
|
|
3456
|
+
camera?: ToolExecutionCompleteUIResourceMetaUIPermissionsCamera;
|
|
3457
|
+
clipboardWrite?: ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite;
|
|
3458
|
+
geolocation?: ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation;
|
|
3459
|
+
microphone?: ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone;
|
|
3460
|
+
}
|
|
3461
|
+
/**
|
|
3462
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type.
|
|
3463
|
+
*/
|
|
3464
|
+
export interface ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {
|
|
3465
|
+
[k: string]: unknown | undefined;
|
|
3466
|
+
}
|
|
3467
|
+
/**
|
|
3468
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type.
|
|
3469
|
+
*/
|
|
3470
|
+
export interface ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {
|
|
3471
|
+
[k: string]: unknown | undefined;
|
|
3472
|
+
}
|
|
3473
|
+
/**
|
|
3474
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type.
|
|
3475
|
+
*/
|
|
3476
|
+
export interface ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {
|
|
3477
|
+
[k: string]: unknown | undefined;
|
|
3478
|
+
}
|
|
3479
|
+
/**
|
|
3480
|
+
* Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type.
|
|
3481
|
+
*/
|
|
3482
|
+
export interface ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {
|
|
3483
|
+
[k: string]: unknown | undefined;
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* Tool definition metadata, present for MCP tools with MCP Apps support
|
|
3487
|
+
*/
|
|
3488
|
+
export interface ToolExecutionCompleteToolDescription {
|
|
3489
|
+
_meta?: ToolExecutionCompleteToolDescriptionMeta;
|
|
3490
|
+
/**
|
|
3491
|
+
* Tool description
|
|
3492
|
+
*/
|
|
3493
|
+
description?: string;
|
|
3494
|
+
/**
|
|
3495
|
+
* Tool name
|
|
3496
|
+
*/
|
|
3497
|
+
name: string;
|
|
3498
|
+
}
|
|
3499
|
+
/**
|
|
3500
|
+
* MCP Apps metadata for UI resource association
|
|
3501
|
+
*/
|
|
3502
|
+
export interface ToolExecutionCompleteToolDescriptionMeta {
|
|
3503
|
+
ui?: ToolExecutionCompleteToolDescriptionMetaUI;
|
|
3504
|
+
}
|
|
3505
|
+
/**
|
|
3506
|
+
* Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type.
|
|
3507
|
+
*/
|
|
3508
|
+
export interface ToolExecutionCompleteToolDescriptionMetaUI {
|
|
3509
|
+
/**
|
|
3510
|
+
* URI of the UI resource
|
|
3511
|
+
*/
|
|
3512
|
+
resourceUri?: string;
|
|
3513
|
+
/**
|
|
3514
|
+
* Who can access this tool
|
|
3515
|
+
*/
|
|
3516
|
+
visibility?: ToolExecutionCompleteToolDescriptionMetaUIVisibility[];
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* Session event "skill.invoked". Skill invocation details including content, allowed tools, and plugin metadata
|
|
3520
|
+
*/
|
|
2613
3521
|
export interface SkillInvokedEvent {
|
|
2614
3522
|
/**
|
|
2615
3523
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2632,6 +3540,9 @@ export interface SkillInvokedEvent {
|
|
|
2632
3540
|
* ISO 8601 timestamp when the event was created
|
|
2633
3541
|
*/
|
|
2634
3542
|
timestamp: string;
|
|
3543
|
+
/**
|
|
3544
|
+
* Type discriminator. Always "skill.invoked".
|
|
3545
|
+
*/
|
|
2635
3546
|
type: "skill.invoked";
|
|
2636
3547
|
}
|
|
2637
3548
|
/**
|
|
@@ -2666,7 +3577,15 @@ export interface SkillInvokedData {
|
|
|
2666
3577
|
* Version of the plugin this skill originated from, when applicable
|
|
2667
3578
|
*/
|
|
2668
3579
|
pluginVersion?: string;
|
|
3580
|
+
/**
|
|
3581
|
+
* Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill)
|
|
3582
|
+
*/
|
|
3583
|
+
source?: string;
|
|
3584
|
+
trigger?: SkillInvokedTrigger;
|
|
2669
3585
|
}
|
|
3586
|
+
/**
|
|
3587
|
+
* Session event "subagent.started". Sub-agent startup details including parent tool call and agent information
|
|
3588
|
+
*/
|
|
2670
3589
|
export interface SubagentStartedEvent {
|
|
2671
3590
|
/**
|
|
2672
3591
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2689,6 +3608,9 @@ export interface SubagentStartedEvent {
|
|
|
2689
3608
|
* ISO 8601 timestamp when the event was created
|
|
2690
3609
|
*/
|
|
2691
3610
|
timestamp: string;
|
|
3611
|
+
/**
|
|
3612
|
+
* Type discriminator. Always "subagent.started".
|
|
3613
|
+
*/
|
|
2692
3614
|
type: "subagent.started";
|
|
2693
3615
|
}
|
|
2694
3616
|
/**
|
|
@@ -2707,11 +3629,18 @@ export interface SubagentStartedData {
|
|
|
2707
3629
|
* Internal name of the sub-agent
|
|
2708
3630
|
*/
|
|
2709
3631
|
agentName: string;
|
|
3632
|
+
/**
|
|
3633
|
+
* Model the sub-agent will run with, when known at start. Surfaced in the timeline for auto-selected sub-agents (e.g. rubber-duck).
|
|
3634
|
+
*/
|
|
3635
|
+
model?: string;
|
|
2710
3636
|
/**
|
|
2711
3637
|
* Tool call ID of the parent tool invocation that spawned this sub-agent
|
|
2712
3638
|
*/
|
|
2713
3639
|
toolCallId: string;
|
|
2714
3640
|
}
|
|
3641
|
+
/**
|
|
3642
|
+
* Session event "subagent.completed". Sub-agent completion details for successful execution
|
|
3643
|
+
*/
|
|
2715
3644
|
export interface SubagentCompletedEvent {
|
|
2716
3645
|
/**
|
|
2717
3646
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2734,6 +3663,9 @@ export interface SubagentCompletedEvent {
|
|
|
2734
3663
|
* ISO 8601 timestamp when the event was created
|
|
2735
3664
|
*/
|
|
2736
3665
|
timestamp: string;
|
|
3666
|
+
/**
|
|
3667
|
+
* Type discriminator. Always "subagent.completed".
|
|
3668
|
+
*/
|
|
2737
3669
|
type: "subagent.completed";
|
|
2738
3670
|
}
|
|
2739
3671
|
/**
|
|
@@ -2769,6 +3701,9 @@ export interface SubagentCompletedData {
|
|
|
2769
3701
|
*/
|
|
2770
3702
|
totalToolCalls?: number;
|
|
2771
3703
|
}
|
|
3704
|
+
/**
|
|
3705
|
+
* Session event "subagent.failed". Sub-agent failure details including error message and agent information
|
|
3706
|
+
*/
|
|
2772
3707
|
export interface SubagentFailedEvent {
|
|
2773
3708
|
/**
|
|
2774
3709
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2791,6 +3726,9 @@ export interface SubagentFailedEvent {
|
|
|
2791
3726
|
* ISO 8601 timestamp when the event was created
|
|
2792
3727
|
*/
|
|
2793
3728
|
timestamp: string;
|
|
3729
|
+
/**
|
|
3730
|
+
* Type discriminator. Always "subagent.failed".
|
|
3731
|
+
*/
|
|
2794
3732
|
type: "subagent.failed";
|
|
2795
3733
|
}
|
|
2796
3734
|
/**
|
|
@@ -2830,6 +3768,9 @@ export interface SubagentFailedData {
|
|
|
2830
3768
|
*/
|
|
2831
3769
|
totalToolCalls?: number;
|
|
2832
3770
|
}
|
|
3771
|
+
/**
|
|
3772
|
+
* Session event "subagent.selected". Custom agent selection details including name and available tools
|
|
3773
|
+
*/
|
|
2833
3774
|
export interface SubagentSelectedEvent {
|
|
2834
3775
|
/**
|
|
2835
3776
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2852,6 +3793,9 @@ export interface SubagentSelectedEvent {
|
|
|
2852
3793
|
* ISO 8601 timestamp when the event was created
|
|
2853
3794
|
*/
|
|
2854
3795
|
timestamp: string;
|
|
3796
|
+
/**
|
|
3797
|
+
* Type discriminator. Always "subagent.selected".
|
|
3798
|
+
*/
|
|
2855
3799
|
type: "subagent.selected";
|
|
2856
3800
|
}
|
|
2857
3801
|
/**
|
|
@@ -2871,6 +3815,9 @@ export interface SubagentSelectedData {
|
|
|
2871
3815
|
*/
|
|
2872
3816
|
tools: string[] | null;
|
|
2873
3817
|
}
|
|
3818
|
+
/**
|
|
3819
|
+
* Session event "subagent.deselected". Empty payload; the event signals that the custom agent was deselected, returning to the default agent
|
|
3820
|
+
*/
|
|
2874
3821
|
export interface SubagentDeselectedEvent {
|
|
2875
3822
|
/**
|
|
2876
3823
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2893,6 +3840,9 @@ export interface SubagentDeselectedEvent {
|
|
|
2893
3840
|
* ISO 8601 timestamp when the event was created
|
|
2894
3841
|
*/
|
|
2895
3842
|
timestamp: string;
|
|
3843
|
+
/**
|
|
3844
|
+
* Type discriminator. Always "subagent.deselected".
|
|
3845
|
+
*/
|
|
2896
3846
|
type: "subagent.deselected";
|
|
2897
3847
|
}
|
|
2898
3848
|
/**
|
|
@@ -2900,6 +3850,9 @@ export interface SubagentDeselectedEvent {
|
|
|
2900
3850
|
*/
|
|
2901
3851
|
export interface SubagentDeselectedData {
|
|
2902
3852
|
}
|
|
3853
|
+
/**
|
|
3854
|
+
* Session event "hook.start". Hook invocation start details including type and input data
|
|
3855
|
+
*/
|
|
2903
3856
|
export interface HookStartEvent {
|
|
2904
3857
|
/**
|
|
2905
3858
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2922,6 +3875,9 @@ export interface HookStartEvent {
|
|
|
2922
3875
|
* ISO 8601 timestamp when the event was created
|
|
2923
3876
|
*/
|
|
2924
3877
|
timestamp: string;
|
|
3878
|
+
/**
|
|
3879
|
+
* Type discriminator. Always "hook.start".
|
|
3880
|
+
*/
|
|
2925
3881
|
type: "hook.start";
|
|
2926
3882
|
}
|
|
2927
3883
|
/**
|
|
@@ -2940,9 +3896,12 @@ export interface HookStartData {
|
|
|
2940
3896
|
* Input data passed to the hook
|
|
2941
3897
|
*/
|
|
2942
3898
|
input?: {
|
|
2943
|
-
[k: string]: unknown;
|
|
3899
|
+
[k: string]: unknown | undefined;
|
|
2944
3900
|
};
|
|
2945
3901
|
}
|
|
3902
|
+
/**
|
|
3903
|
+
* Session event "hook.end". Hook invocation completion details including output, success status, and error information
|
|
3904
|
+
*/
|
|
2946
3905
|
export interface HookEndEvent {
|
|
2947
3906
|
/**
|
|
2948
3907
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -2965,6 +3924,9 @@ export interface HookEndEvent {
|
|
|
2965
3924
|
* ISO 8601 timestamp when the event was created
|
|
2966
3925
|
*/
|
|
2967
3926
|
timestamp: string;
|
|
3927
|
+
/**
|
|
3928
|
+
* Type discriminator. Always "hook.end".
|
|
3929
|
+
*/
|
|
2968
3930
|
type: "hook.end";
|
|
2969
3931
|
}
|
|
2970
3932
|
/**
|
|
@@ -2984,7 +3946,7 @@ export interface HookEndData {
|
|
|
2984
3946
|
* Output data produced by the hook
|
|
2985
3947
|
*/
|
|
2986
3948
|
output?: {
|
|
2987
|
-
[k: string]: unknown;
|
|
3949
|
+
[k: string]: unknown | undefined;
|
|
2988
3950
|
};
|
|
2989
3951
|
/**
|
|
2990
3952
|
* Whether the hook completed successfully
|
|
@@ -3004,6 +3966,48 @@ export interface HookEndError {
|
|
|
3004
3966
|
*/
|
|
3005
3967
|
stack?: string;
|
|
3006
3968
|
}
|
|
3969
|
+
/**
|
|
3970
|
+
* Session event "hook.progress". Ephemeral progress update from a running hook process
|
|
3971
|
+
*/
|
|
3972
|
+
export interface HookProgressEvent {
|
|
3973
|
+
/**
|
|
3974
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
3975
|
+
*/
|
|
3976
|
+
agentId?: string;
|
|
3977
|
+
data: HookProgressData;
|
|
3978
|
+
/**
|
|
3979
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
3980
|
+
*/
|
|
3981
|
+
ephemeral: true;
|
|
3982
|
+
/**
|
|
3983
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
3984
|
+
*/
|
|
3985
|
+
id: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
3988
|
+
*/
|
|
3989
|
+
parentId: string | null;
|
|
3990
|
+
/**
|
|
3991
|
+
* ISO 8601 timestamp when the event was created
|
|
3992
|
+
*/
|
|
3993
|
+
timestamp: string;
|
|
3994
|
+
/**
|
|
3995
|
+
* Type discriminator. Always "hook.progress".
|
|
3996
|
+
*/
|
|
3997
|
+
type: "hook.progress";
|
|
3998
|
+
}
|
|
3999
|
+
/**
|
|
4000
|
+
* Ephemeral progress update from a running hook process
|
|
4001
|
+
*/
|
|
4002
|
+
export interface HookProgressData {
|
|
4003
|
+
/**
|
|
4004
|
+
* Human-readable progress message from the hook process
|
|
4005
|
+
*/
|
|
4006
|
+
message: string;
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Session event "system.message". System/developer instruction content with role and optional template metadata
|
|
4010
|
+
*/
|
|
3007
4011
|
export interface SystemMessageEvent {
|
|
3008
4012
|
/**
|
|
3009
4013
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -3026,6 +4030,9 @@ export interface SystemMessageEvent {
|
|
|
3026
4030
|
* ISO 8601 timestamp when the event was created
|
|
3027
4031
|
*/
|
|
3028
4032
|
timestamp: string;
|
|
4033
|
+
/**
|
|
4034
|
+
* Type discriminator. Always "system.message".
|
|
4035
|
+
*/
|
|
3029
4036
|
type: "system.message";
|
|
3030
4037
|
}
|
|
3031
4038
|
/**
|
|
@@ -3055,9 +4062,12 @@ export interface SystemMessageMetadata {
|
|
|
3055
4062
|
* Template variables used when constructing the prompt
|
|
3056
4063
|
*/
|
|
3057
4064
|
variables?: {
|
|
3058
|
-
[k: string]: unknown;
|
|
4065
|
+
[k: string]: unknown | undefined;
|
|
3059
4066
|
};
|
|
3060
4067
|
}
|
|
4068
|
+
/**
|
|
4069
|
+
* Session event "system.notification". System-generated notification for runtime events like background task completion
|
|
4070
|
+
*/
|
|
3061
4071
|
export interface SystemNotificationEvent {
|
|
3062
4072
|
/**
|
|
3063
4073
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -3080,6 +4090,9 @@ export interface SystemNotificationEvent {
|
|
|
3080
4090
|
* ISO 8601 timestamp when the event was created
|
|
3081
4091
|
*/
|
|
3082
4092
|
timestamp: string;
|
|
4093
|
+
/**
|
|
4094
|
+
* Type discriminator. Always "system.notification".
|
|
4095
|
+
*/
|
|
3083
4096
|
type: "system.notification";
|
|
3084
4097
|
}
|
|
3085
4098
|
/**
|
|
@@ -3092,6 +4105,9 @@ export interface SystemNotificationData {
|
|
|
3092
4105
|
content: string;
|
|
3093
4106
|
kind: SystemNotification;
|
|
3094
4107
|
}
|
|
4108
|
+
/**
|
|
4109
|
+
* Schema for the `SystemNotificationAgentCompleted` type.
|
|
4110
|
+
*/
|
|
3095
4111
|
export interface SystemNotificationAgentCompleted {
|
|
3096
4112
|
/**
|
|
3097
4113
|
* Unique identifier of the background agent
|
|
@@ -3110,8 +4126,14 @@ export interface SystemNotificationAgentCompleted {
|
|
|
3110
4126
|
*/
|
|
3111
4127
|
prompt?: string;
|
|
3112
4128
|
status: SystemNotificationAgentCompletedStatus;
|
|
4129
|
+
/**
|
|
4130
|
+
* Type discriminator. Always "agent_completed".
|
|
4131
|
+
*/
|
|
3113
4132
|
type: "agent_completed";
|
|
3114
4133
|
}
|
|
4134
|
+
/**
|
|
4135
|
+
* Schema for the `SystemNotificationAgentIdle` type.
|
|
4136
|
+
*/
|
|
3115
4137
|
export interface SystemNotificationAgentIdle {
|
|
3116
4138
|
/**
|
|
3117
4139
|
* Unique identifier of the background agent
|
|
@@ -3125,8 +4147,14 @@ export interface SystemNotificationAgentIdle {
|
|
|
3125
4147
|
* Human-readable description of the agent task
|
|
3126
4148
|
*/
|
|
3127
4149
|
description?: string;
|
|
4150
|
+
/**
|
|
4151
|
+
* Type discriminator. Always "agent_idle".
|
|
4152
|
+
*/
|
|
3128
4153
|
type: "agent_idle";
|
|
3129
4154
|
}
|
|
4155
|
+
/**
|
|
4156
|
+
* Schema for the `SystemNotificationNewInboxMessage` type.
|
|
4157
|
+
*/
|
|
3130
4158
|
export interface SystemNotificationNewInboxMessage {
|
|
3131
4159
|
/**
|
|
3132
4160
|
* Unique identifier of the inbox entry
|
|
@@ -3144,8 +4172,14 @@ export interface SystemNotificationNewInboxMessage {
|
|
|
3144
4172
|
* Short summary shown before the agent decides whether to read the inbox
|
|
3145
4173
|
*/
|
|
3146
4174
|
summary: string;
|
|
4175
|
+
/**
|
|
4176
|
+
* Type discriminator. Always "new_inbox_message".
|
|
4177
|
+
*/
|
|
3147
4178
|
type: "new_inbox_message";
|
|
3148
4179
|
}
|
|
4180
|
+
/**
|
|
4181
|
+
* Schema for the `SystemNotificationShellCompleted` type.
|
|
4182
|
+
*/
|
|
3149
4183
|
export interface SystemNotificationShellCompleted {
|
|
3150
4184
|
/**
|
|
3151
4185
|
* Human-readable description of the command
|
|
@@ -3159,8 +4193,14 @@ export interface SystemNotificationShellCompleted {
|
|
|
3159
4193
|
* Unique identifier of the shell session
|
|
3160
4194
|
*/
|
|
3161
4195
|
shellId: string;
|
|
4196
|
+
/**
|
|
4197
|
+
* Type discriminator. Always "shell_completed".
|
|
4198
|
+
*/
|
|
3162
4199
|
type: "shell_completed";
|
|
3163
4200
|
}
|
|
4201
|
+
/**
|
|
4202
|
+
* Schema for the `SystemNotificationShellDetachedCompleted` type.
|
|
4203
|
+
*/
|
|
3164
4204
|
export interface SystemNotificationShellDetachedCompleted {
|
|
3165
4205
|
/**
|
|
3166
4206
|
* Human-readable description of the command
|
|
@@ -3170,8 +4210,14 @@ export interface SystemNotificationShellDetachedCompleted {
|
|
|
3170
4210
|
* Unique identifier of the detached shell session
|
|
3171
4211
|
*/
|
|
3172
4212
|
shellId: string;
|
|
4213
|
+
/**
|
|
4214
|
+
* Type discriminator. Always "shell_detached_completed".
|
|
4215
|
+
*/
|
|
3173
4216
|
type: "shell_detached_completed";
|
|
3174
4217
|
}
|
|
4218
|
+
/**
|
|
4219
|
+
* Schema for the `SystemNotificationInstructionDiscovered` type.
|
|
4220
|
+
*/
|
|
3175
4221
|
export interface SystemNotificationInstructionDiscovered {
|
|
3176
4222
|
/**
|
|
3177
4223
|
* Human-readable label for the timeline (e.g., 'AGENTS.md from packages/billing/')
|
|
@@ -3189,8 +4235,14 @@ export interface SystemNotificationInstructionDiscovered {
|
|
|
3189
4235
|
* Tool command that triggered discovery (currently always 'view')
|
|
3190
4236
|
*/
|
|
3191
4237
|
triggerTool: string;
|
|
4238
|
+
/**
|
|
4239
|
+
* Type discriminator. Always "instruction_discovered".
|
|
4240
|
+
*/
|
|
3192
4241
|
type: "instruction_discovered";
|
|
3193
4242
|
}
|
|
4243
|
+
/**
|
|
4244
|
+
* Session event "permission.requested". Permission request notification requiring client approval with request details
|
|
4245
|
+
*/
|
|
3194
4246
|
export interface PermissionRequestedEvent {
|
|
3195
4247
|
/**
|
|
3196
4248
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -3213,6 +4265,9 @@ export interface PermissionRequestedEvent {
|
|
|
3213
4265
|
* ISO 8601 timestamp when the event was created
|
|
3214
4266
|
*/
|
|
3215
4267
|
timestamp: string;
|
|
4268
|
+
/**
|
|
4269
|
+
* Type discriminator. Always "permission.requested".
|
|
4270
|
+
*/
|
|
3216
4271
|
type: "permission.requested";
|
|
3217
4272
|
}
|
|
3218
4273
|
/**
|
|
@@ -3275,6 +4330,9 @@ export interface PermissionRequestShell {
|
|
|
3275
4330
|
*/
|
|
3276
4331
|
warning?: string;
|
|
3277
4332
|
}
|
|
4333
|
+
/**
|
|
4334
|
+
* Schema for the `PermissionRequestShellCommand` type.
|
|
4335
|
+
*/
|
|
3278
4336
|
export interface PermissionRequestShellCommand {
|
|
3279
4337
|
/**
|
|
3280
4338
|
* Command identifier (e.g., executable name)
|
|
@@ -3285,6 +4343,9 @@ export interface PermissionRequestShellCommand {
|
|
|
3285
4343
|
*/
|
|
3286
4344
|
readOnly: boolean;
|
|
3287
4345
|
}
|
|
4346
|
+
/**
|
|
4347
|
+
* Schema for the `PermissionRequestShellPossibleUrl` type.
|
|
4348
|
+
*/
|
|
3288
4349
|
export interface PermissionRequestShellPossibleUrl {
|
|
3289
4350
|
/**
|
|
3290
4351
|
* URL that may be accessed by the command
|
|
@@ -3353,7 +4414,7 @@ export interface PermissionRequestMcp {
|
|
|
3353
4414
|
* Arguments to pass to the MCP tool
|
|
3354
4415
|
*/
|
|
3355
4416
|
args?: {
|
|
3356
|
-
[k: string]: unknown;
|
|
4417
|
+
[k: string]: unknown | undefined;
|
|
3357
4418
|
};
|
|
3358
4419
|
/**
|
|
3359
4420
|
* Permission kind discriminator
|
|
@@ -3440,7 +4501,7 @@ export interface PermissionRequestCustomTool {
|
|
|
3440
4501
|
* Arguments to pass to the custom tool
|
|
3441
4502
|
*/
|
|
3442
4503
|
args?: {
|
|
3443
|
-
[k: string]: unknown;
|
|
4504
|
+
[k: string]: unknown | undefined;
|
|
3444
4505
|
};
|
|
3445
4506
|
/**
|
|
3446
4507
|
* Permission kind discriminator
|
|
@@ -3475,7 +4536,7 @@ export interface PermissionRequestHook {
|
|
|
3475
4536
|
* Arguments of the tool call being gated
|
|
3476
4537
|
*/
|
|
3477
4538
|
toolArgs?: {
|
|
3478
|
-
[k: string]: unknown;
|
|
4539
|
+
[k: string]: unknown | undefined;
|
|
3479
4540
|
};
|
|
3480
4541
|
/**
|
|
3481
4542
|
* Tool call ID that triggered this permission request
|
|
@@ -3486,6 +4547,48 @@ export interface PermissionRequestHook {
|
|
|
3486
4547
|
*/
|
|
3487
4548
|
toolName: string;
|
|
3488
4549
|
}
|
|
4550
|
+
/**
|
|
4551
|
+
* Extension management permission request
|
|
4552
|
+
*/
|
|
4553
|
+
export interface PermissionRequestExtensionManagement {
|
|
4554
|
+
/**
|
|
4555
|
+
* Name of the extension being managed
|
|
4556
|
+
*/
|
|
4557
|
+
extensionName?: string;
|
|
4558
|
+
/**
|
|
4559
|
+
* Permission kind discriminator
|
|
4560
|
+
*/
|
|
4561
|
+
kind: "extension-management";
|
|
4562
|
+
/**
|
|
4563
|
+
* The extension management operation (scaffold, reload)
|
|
4564
|
+
*/
|
|
4565
|
+
operation: string;
|
|
4566
|
+
/**
|
|
4567
|
+
* Tool call ID that triggered this permission request
|
|
4568
|
+
*/
|
|
4569
|
+
toolCallId?: string;
|
|
4570
|
+
}
|
|
4571
|
+
/**
|
|
4572
|
+
* Extension permission access request
|
|
4573
|
+
*/
|
|
4574
|
+
export interface PermissionRequestExtensionPermissionAccess {
|
|
4575
|
+
/**
|
|
4576
|
+
* Capabilities the extension is requesting
|
|
4577
|
+
*/
|
|
4578
|
+
capabilities: string[];
|
|
4579
|
+
/**
|
|
4580
|
+
* Name of the extension requesting permission access
|
|
4581
|
+
*/
|
|
4582
|
+
extensionName: string;
|
|
4583
|
+
/**
|
|
4584
|
+
* Permission kind discriminator
|
|
4585
|
+
*/
|
|
4586
|
+
kind: "extension-permission-access";
|
|
4587
|
+
/**
|
|
4588
|
+
* Tool call ID that triggered this permission request
|
|
4589
|
+
*/
|
|
4590
|
+
toolCallId?: string;
|
|
4591
|
+
}
|
|
3489
4592
|
/**
|
|
3490
4593
|
* Shell command permission prompt
|
|
3491
4594
|
*/
|
|
@@ -3624,12 +4727,12 @@ export interface PermissionPromptRequestUrl {
|
|
|
3624
4727
|
* Memory operation permission prompt
|
|
3625
4728
|
*/
|
|
3626
4729
|
export interface PermissionPromptRequestMemory {
|
|
3627
|
-
action?:
|
|
4730
|
+
action?: PermissionRequestMemoryAction;
|
|
3628
4731
|
/**
|
|
3629
4732
|
* Source references for the stored fact (store only)
|
|
3630
4733
|
*/
|
|
3631
4734
|
citations?: string;
|
|
3632
|
-
direction?:
|
|
4735
|
+
direction?: PermissionRequestMemoryDirection;
|
|
3633
4736
|
/**
|
|
3634
4737
|
* The fact being stored or voted on
|
|
3635
4738
|
*/
|
|
@@ -3659,7 +4762,7 @@ export interface PermissionPromptRequestCustomTool {
|
|
|
3659
4762
|
* Arguments to pass to the custom tool
|
|
3660
4763
|
*/
|
|
3661
4764
|
args?: {
|
|
3662
|
-
[k: string]: unknown;
|
|
4765
|
+
[k: string]: unknown | undefined;
|
|
3663
4766
|
};
|
|
3664
4767
|
/**
|
|
3665
4768
|
* Prompt kind discriminator
|
|
@@ -3712,7 +4815,7 @@ export interface PermissionPromptRequestHook {
|
|
|
3712
4815
|
* Arguments of the tool call being gated
|
|
3713
4816
|
*/
|
|
3714
4817
|
toolArgs?: {
|
|
3715
|
-
[k: string]: unknown;
|
|
4818
|
+
[k: string]: unknown | undefined;
|
|
3716
4819
|
};
|
|
3717
4820
|
/**
|
|
3718
4821
|
* Tool call ID that triggered this permission request
|
|
@@ -3723,6 +4826,51 @@ export interface PermissionPromptRequestHook {
|
|
|
3723
4826
|
*/
|
|
3724
4827
|
toolName: string;
|
|
3725
4828
|
}
|
|
4829
|
+
/**
|
|
4830
|
+
* Extension management permission prompt
|
|
4831
|
+
*/
|
|
4832
|
+
export interface PermissionPromptRequestExtensionManagement {
|
|
4833
|
+
/**
|
|
4834
|
+
* Name of the extension being managed
|
|
4835
|
+
*/
|
|
4836
|
+
extensionName?: string;
|
|
4837
|
+
/**
|
|
4838
|
+
* Prompt kind discriminator
|
|
4839
|
+
*/
|
|
4840
|
+
kind: "extension-management";
|
|
4841
|
+
/**
|
|
4842
|
+
* The extension management operation (scaffold, reload)
|
|
4843
|
+
*/
|
|
4844
|
+
operation: string;
|
|
4845
|
+
/**
|
|
4846
|
+
* Tool call ID that triggered this permission request
|
|
4847
|
+
*/
|
|
4848
|
+
toolCallId?: string;
|
|
4849
|
+
}
|
|
4850
|
+
/**
|
|
4851
|
+
* Extension permission access prompt
|
|
4852
|
+
*/
|
|
4853
|
+
export interface PermissionPromptRequestExtensionPermissionAccess {
|
|
4854
|
+
/**
|
|
4855
|
+
* Capabilities the extension is requesting
|
|
4856
|
+
*/
|
|
4857
|
+
capabilities: string[];
|
|
4858
|
+
/**
|
|
4859
|
+
* Name of the extension requesting permission access
|
|
4860
|
+
*/
|
|
4861
|
+
extensionName: string;
|
|
4862
|
+
/**
|
|
4863
|
+
* Prompt kind discriminator
|
|
4864
|
+
*/
|
|
4865
|
+
kind: "extension-permission-access";
|
|
4866
|
+
/**
|
|
4867
|
+
* Tool call ID that triggered this permission request
|
|
4868
|
+
*/
|
|
4869
|
+
toolCallId?: string;
|
|
4870
|
+
}
|
|
4871
|
+
/**
|
|
4872
|
+
* Session event "permission.completed". Permission request completion notification signaling UI dismissal
|
|
4873
|
+
*/
|
|
3726
4874
|
export interface PermissionCompletedEvent {
|
|
3727
4875
|
/**
|
|
3728
4876
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
@@ -3745,6 +4893,9 @@ export interface PermissionCompletedEvent {
|
|
|
3745
4893
|
* ISO 8601 timestamp when the event was created
|
|
3746
4894
|
*/
|
|
3747
4895
|
timestamp: string;
|
|
4896
|
+
/**
|
|
4897
|
+
* Type discriminator. Always "permission.completed".
|
|
4898
|
+
*/
|
|
3748
4899
|
type: "permission.completed";
|
|
3749
4900
|
}
|
|
3750
4901
|
/**
|
|
@@ -3761,12 +4912,18 @@ export interface PermissionCompletedData {
|
|
|
3761
4912
|
*/
|
|
3762
4913
|
toolCallId?: string;
|
|
3763
4914
|
}
|
|
4915
|
+
/**
|
|
4916
|
+
* Schema for the `PermissionApproved` type.
|
|
4917
|
+
*/
|
|
3764
4918
|
export interface PermissionApproved {
|
|
3765
4919
|
/**
|
|
3766
4920
|
* The permission request was approved
|
|
3767
4921
|
*/
|
|
3768
4922
|
kind: "approved";
|
|
3769
4923
|
}
|
|
4924
|
+
/**
|
|
4925
|
+
* Schema for the `PermissionApprovedForSession` type.
|
|
4926
|
+
*/
|
|
3770
4927
|
export interface PermissionApprovedForSession {
|
|
3771
4928
|
approval: UserToolSessionApproval;
|
|
3772
4929
|
/**
|
|
@@ -3774,6 +4931,9 @@ export interface PermissionApprovedForSession {
|
|
|
3774
4931
|
*/
|
|
3775
4932
|
kind: "approved-for-session";
|
|
3776
4933
|
}
|
|
4934
|
+
/**
|
|
4935
|
+
* Schema for the `UserToolSessionApprovalCommands` type.
|
|
4936
|
+
*/
|
|
3777
4937
|
export interface UserToolSessionApprovalCommands {
|
|
3778
4938
|
/**
|
|
3779
4939
|
* Command identifiers approved by the user
|
|
@@ -3784,18 +4944,27 @@ export interface UserToolSessionApprovalCommands {
|
|
|
3784
4944
|
*/
|
|
3785
4945
|
kind: "commands";
|
|
3786
4946
|
}
|
|
4947
|
+
/**
|
|
4948
|
+
* Schema for the `UserToolSessionApprovalRead` type.
|
|
4949
|
+
*/
|
|
3787
4950
|
export interface UserToolSessionApprovalRead {
|
|
3788
4951
|
/**
|
|
3789
4952
|
* Read approval kind
|
|
3790
4953
|
*/
|
|
3791
4954
|
kind: "read";
|
|
3792
4955
|
}
|
|
4956
|
+
/**
|
|
4957
|
+
* Schema for the `UserToolSessionApprovalWrite` type.
|
|
4958
|
+
*/
|
|
3793
4959
|
export interface UserToolSessionApprovalWrite {
|
|
3794
4960
|
/**
|
|
3795
4961
|
* Write approval kind
|
|
3796
4962
|
*/
|
|
3797
4963
|
kind: "write";
|
|
3798
4964
|
}
|
|
4965
|
+
/**
|
|
4966
|
+
* Schema for the `UserToolSessionApprovalMcp` type.
|
|
4967
|
+
*/
|
|
3799
4968
|
export interface UserToolSessionApprovalMcp {
|
|
3800
4969
|
/**
|
|
3801
4970
|
* MCP tool approval kind
|
|
@@ -3810,12 +4979,18 @@ export interface UserToolSessionApprovalMcp {
|
|
|
3810
4979
|
*/
|
|
3811
4980
|
toolName: string | null;
|
|
3812
4981
|
}
|
|
4982
|
+
/**
|
|
4983
|
+
* Schema for the `UserToolSessionApprovalMemory` type.
|
|
4984
|
+
*/
|
|
3813
4985
|
export interface UserToolSessionApprovalMemory {
|
|
3814
4986
|
/**
|
|
3815
4987
|
* Memory approval kind
|
|
3816
4988
|
*/
|
|
3817
4989
|
kind: "memory";
|
|
3818
4990
|
}
|
|
4991
|
+
/**
|
|
4992
|
+
* Schema for the `UserToolSessionApprovalCustomTool` type.
|
|
4993
|
+
*/
|
|
3819
4994
|
export interface UserToolSessionApprovalCustomTool {
|
|
3820
4995
|
/**
|
|
3821
4996
|
* Custom tool approval kind
|
|
@@ -3826,6 +5001,35 @@ export interface UserToolSessionApprovalCustomTool {
|
|
|
3826
5001
|
*/
|
|
3827
5002
|
toolName: string;
|
|
3828
5003
|
}
|
|
5004
|
+
/**
|
|
5005
|
+
* Schema for the `UserToolSessionApprovalExtensionManagement` type.
|
|
5006
|
+
*/
|
|
5007
|
+
export interface UserToolSessionApprovalExtensionManagement {
|
|
5008
|
+
/**
|
|
5009
|
+
* Extension management approval kind
|
|
5010
|
+
*/
|
|
5011
|
+
kind: "extension-management";
|
|
5012
|
+
/**
|
|
5013
|
+
* Optional operation identifier
|
|
5014
|
+
*/
|
|
5015
|
+
operation?: string;
|
|
5016
|
+
}
|
|
5017
|
+
/**
|
|
5018
|
+
* Schema for the `UserToolSessionApprovalExtensionPermissionAccess` type.
|
|
5019
|
+
*/
|
|
5020
|
+
export interface UserToolSessionApprovalExtensionPermissionAccess {
|
|
5021
|
+
/**
|
|
5022
|
+
* Extension name
|
|
5023
|
+
*/
|
|
5024
|
+
extensionName: string;
|
|
5025
|
+
/**
|
|
5026
|
+
* Extension permission access approval kind
|
|
5027
|
+
*/
|
|
5028
|
+
kind: "extension-permission-access";
|
|
5029
|
+
}
|
|
5030
|
+
/**
|
|
5031
|
+
* Schema for the `PermissionApprovedForLocation` type.
|
|
5032
|
+
*/
|
|
3829
5033
|
export interface PermissionApprovedForLocation {
|
|
3830
5034
|
approval: UserToolSessionApproval;
|
|
3831
5035
|
/**
|
|
@@ -3837,6 +5041,9 @@ export interface PermissionApprovedForLocation {
|
|
|
3837
5041
|
*/
|
|
3838
5042
|
locationKey: string;
|
|
3839
5043
|
}
|
|
5044
|
+
/**
|
|
5045
|
+
* Schema for the `PermissionCancelled` type.
|
|
5046
|
+
*/
|
|
3840
5047
|
export interface PermissionCancelled {
|
|
3841
5048
|
/**
|
|
3842
5049
|
* The permission request was cancelled before a response was used
|
|
@@ -3847,6 +5054,9 @@ export interface PermissionCancelled {
|
|
|
3847
5054
|
*/
|
|
3848
5055
|
reason?: string;
|
|
3849
5056
|
}
|
|
5057
|
+
/**
|
|
5058
|
+
* Schema for the `PermissionDeniedByRules` type.
|
|
5059
|
+
*/
|
|
3850
5060
|
export interface PermissionDeniedByRules {
|
|
3851
5061
|
/**
|
|
3852
5062
|
* Denied because approval rules explicitly blocked it
|
|
@@ -3857,9 +5067,12 @@ export interface PermissionDeniedByRules {
|
|
|
3857
5067
|
*/
|
|
3858
5068
|
rules: PermissionRule[];
|
|
3859
5069
|
}
|
|
5070
|
+
/**
|
|
5071
|
+
* Schema for the `PermissionRule` type.
|
|
5072
|
+
*/
|
|
3860
5073
|
export interface PermissionRule {
|
|
3861
5074
|
/**
|
|
3862
|
-
*
|
|
5075
|
+
* Argument value matched against the request, or null when the rule kind has no argument (e.g. 'read', 'write', 'memory').
|
|
3863
5076
|
*/
|
|
3864
5077
|
argument: string | null;
|
|
3865
5078
|
/**
|
|
@@ -3867,12 +5080,18 @@ export interface PermissionRule {
|
|
|
3867
5080
|
*/
|
|
3868
5081
|
kind: string;
|
|
3869
5082
|
}
|
|
5083
|
+
/**
|
|
5084
|
+
* Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type.
|
|
5085
|
+
*/
|
|
3870
5086
|
export interface PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser {
|
|
3871
5087
|
/**
|
|
3872
5088
|
* Denied because no approval rule matched and user confirmation was unavailable
|
|
3873
5089
|
*/
|
|
3874
5090
|
kind: "denied-no-approval-rule-and-could-not-request-from-user";
|
|
3875
5091
|
}
|
|
5092
|
+
/**
|
|
5093
|
+
* Schema for the `PermissionDeniedInteractivelyByUser` type.
|
|
5094
|
+
*/
|
|
3876
5095
|
export interface PermissionDeniedInteractivelyByUser {
|
|
3877
5096
|
/**
|
|
3878
5097
|
* Optional feedback from the user explaining the denial
|
|
@@ -3887,6 +5106,9 @@ export interface PermissionDeniedInteractivelyByUser {
|
|
|
3887
5106
|
*/
|
|
3888
5107
|
kind: "denied-interactively-by-user";
|
|
3889
5108
|
}
|
|
5109
|
+
/**
|
|
5110
|
+
* Schema for the `PermissionDeniedByContentExclusionPolicy` type.
|
|
5111
|
+
*/
|
|
3890
5112
|
export interface PermissionDeniedByContentExclusionPolicy {
|
|
3891
5113
|
/**
|
|
3892
5114
|
* Denied by the organization's content exclusion policy
|
|
@@ -3901,6 +5123,9 @@ export interface PermissionDeniedByContentExclusionPolicy {
|
|
|
3901
5123
|
*/
|
|
3902
5124
|
path: string;
|
|
3903
5125
|
}
|
|
5126
|
+
/**
|
|
5127
|
+
* Schema for the `PermissionDeniedByPermissionRequestHook` type.
|
|
5128
|
+
*/
|
|
3904
5129
|
export interface PermissionDeniedByPermissionRequestHook {
|
|
3905
5130
|
/**
|
|
3906
5131
|
* Whether to interrupt the current agent turn
|
|
@@ -3915,12 +5140,18 @@ export interface PermissionDeniedByPermissionRequestHook {
|
|
|
3915
5140
|
*/
|
|
3916
5141
|
message?: string;
|
|
3917
5142
|
}
|
|
5143
|
+
/**
|
|
5144
|
+
* Session event "user_input.requested". User input request notification with question and optional predefined choices
|
|
5145
|
+
*/
|
|
3918
5146
|
export interface UserInputRequestedEvent {
|
|
3919
5147
|
/**
|
|
3920
5148
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
3921
5149
|
*/
|
|
3922
5150
|
agentId?: string;
|
|
3923
5151
|
data: UserInputRequestedData;
|
|
5152
|
+
/**
|
|
5153
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5154
|
+
*/
|
|
3924
5155
|
ephemeral: true;
|
|
3925
5156
|
/**
|
|
3926
5157
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -3934,6 +5165,9 @@ export interface UserInputRequestedEvent {
|
|
|
3934
5165
|
* ISO 8601 timestamp when the event was created
|
|
3935
5166
|
*/
|
|
3936
5167
|
timestamp: string;
|
|
5168
|
+
/**
|
|
5169
|
+
* Type discriminator. Always "user_input.requested".
|
|
5170
|
+
*/
|
|
3937
5171
|
type: "user_input.requested";
|
|
3938
5172
|
}
|
|
3939
5173
|
/**
|
|
@@ -3961,12 +5195,18 @@ export interface UserInputRequestedData {
|
|
|
3961
5195
|
*/
|
|
3962
5196
|
toolCallId?: string;
|
|
3963
5197
|
}
|
|
5198
|
+
/**
|
|
5199
|
+
* Session event "user_input.completed". User input request completion with the user's response
|
|
5200
|
+
*/
|
|
3964
5201
|
export interface UserInputCompletedEvent {
|
|
3965
5202
|
/**
|
|
3966
5203
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
3967
5204
|
*/
|
|
3968
5205
|
agentId?: string;
|
|
3969
5206
|
data: UserInputCompletedData;
|
|
5207
|
+
/**
|
|
5208
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5209
|
+
*/
|
|
3970
5210
|
ephemeral: true;
|
|
3971
5211
|
/**
|
|
3972
5212
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -3980,6 +5220,9 @@ export interface UserInputCompletedEvent {
|
|
|
3980
5220
|
* ISO 8601 timestamp when the event was created
|
|
3981
5221
|
*/
|
|
3982
5222
|
timestamp: string;
|
|
5223
|
+
/**
|
|
5224
|
+
* Type discriminator. Always "user_input.completed".
|
|
5225
|
+
*/
|
|
3983
5226
|
type: "user_input.completed";
|
|
3984
5227
|
}
|
|
3985
5228
|
/**
|
|
@@ -3999,12 +5242,18 @@ export interface UserInputCompletedData {
|
|
|
3999
5242
|
*/
|
|
4000
5243
|
wasFreeform?: boolean;
|
|
4001
5244
|
}
|
|
5245
|
+
/**
|
|
5246
|
+
* Session event "elicitation.requested". Elicitation request; may be form-based (structured input) or URL-based (browser redirect)
|
|
5247
|
+
*/
|
|
4002
5248
|
export interface ElicitationRequestedEvent {
|
|
4003
5249
|
/**
|
|
4004
5250
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4005
5251
|
*/
|
|
4006
5252
|
agentId?: string;
|
|
4007
5253
|
data: ElicitationRequestedData;
|
|
5254
|
+
/**
|
|
5255
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5256
|
+
*/
|
|
4008
5257
|
ephemeral: true;
|
|
4009
5258
|
/**
|
|
4010
5259
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4018,6 +5267,9 @@ export interface ElicitationRequestedEvent {
|
|
|
4018
5267
|
* ISO 8601 timestamp when the event was created
|
|
4019
5268
|
*/
|
|
4020
5269
|
timestamp: string;
|
|
5270
|
+
/**
|
|
5271
|
+
* Type discriminator. Always "elicitation.requested".
|
|
5272
|
+
*/
|
|
4021
5273
|
type: "elicitation.requested";
|
|
4022
5274
|
}
|
|
4023
5275
|
/**
|
|
@@ -4046,7 +5298,7 @@ export interface ElicitationRequestedData {
|
|
|
4046
5298
|
* URL to open in the user's browser (url mode only)
|
|
4047
5299
|
*/
|
|
4048
5300
|
url?: string;
|
|
4049
|
-
[k: string]: unknown;
|
|
5301
|
+
[k: string]: unknown | undefined;
|
|
4050
5302
|
}
|
|
4051
5303
|
/**
|
|
4052
5304
|
* JSON Schema describing the form fields to present to the user (form mode only)
|
|
@@ -4056,7 +5308,7 @@ export interface ElicitationRequestedSchema {
|
|
|
4056
5308
|
* Form field definitions, keyed by field name
|
|
4057
5309
|
*/
|
|
4058
5310
|
properties: {
|
|
4059
|
-
[k: string]: unknown;
|
|
5311
|
+
[k: string]: unknown | undefined;
|
|
4060
5312
|
};
|
|
4061
5313
|
/**
|
|
4062
5314
|
* List of required field names
|
|
@@ -4067,12 +5319,18 @@ export interface ElicitationRequestedSchema {
|
|
|
4067
5319
|
*/
|
|
4068
5320
|
type: "object";
|
|
4069
5321
|
}
|
|
5322
|
+
/**
|
|
5323
|
+
* Session event "elicitation.completed". Elicitation request completion with the user's response
|
|
5324
|
+
*/
|
|
4070
5325
|
export interface ElicitationCompletedEvent {
|
|
4071
5326
|
/**
|
|
4072
5327
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4073
5328
|
*/
|
|
4074
5329
|
agentId?: string;
|
|
4075
5330
|
data: ElicitationCompletedData;
|
|
5331
|
+
/**
|
|
5332
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5333
|
+
*/
|
|
4076
5334
|
ephemeral: true;
|
|
4077
5335
|
/**
|
|
4078
5336
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4086,6 +5344,9 @@ export interface ElicitationCompletedEvent {
|
|
|
4086
5344
|
* ISO 8601 timestamp when the event was created
|
|
4087
5345
|
*/
|
|
4088
5346
|
timestamp: string;
|
|
5347
|
+
/**
|
|
5348
|
+
* Type discriminator. Always "elicitation.completed".
|
|
5349
|
+
*/
|
|
4089
5350
|
type: "elicitation.completed";
|
|
4090
5351
|
}
|
|
4091
5352
|
/**
|
|
@@ -4097,19 +5358,25 @@ export interface ElicitationCompletedData {
|
|
|
4097
5358
|
* The submitted form data when action is 'accept'; keys match the requested schema fields
|
|
4098
5359
|
*/
|
|
4099
5360
|
content?: {
|
|
4100
|
-
[k: string]: ElicitationCompletedContent;
|
|
5361
|
+
[k: string]: ElicitationCompletedContent | undefined;
|
|
4101
5362
|
};
|
|
4102
5363
|
/**
|
|
4103
5364
|
* Request ID of the resolved elicitation request; clients should dismiss any UI for this request
|
|
4104
5365
|
*/
|
|
4105
5366
|
requestId: string;
|
|
4106
5367
|
}
|
|
5368
|
+
/**
|
|
5369
|
+
* Session event "sampling.requested". Sampling request from an MCP server; contains the server name and a requestId for correlation
|
|
5370
|
+
*/
|
|
4107
5371
|
export interface SamplingRequestedEvent {
|
|
4108
5372
|
/**
|
|
4109
5373
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4110
5374
|
*/
|
|
4111
5375
|
agentId?: string;
|
|
4112
5376
|
data: SamplingRequestedData;
|
|
5377
|
+
/**
|
|
5378
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5379
|
+
*/
|
|
4113
5380
|
ephemeral: true;
|
|
4114
5381
|
/**
|
|
4115
5382
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4123,6 +5390,9 @@ export interface SamplingRequestedEvent {
|
|
|
4123
5390
|
* ISO 8601 timestamp when the event was created
|
|
4124
5391
|
*/
|
|
4125
5392
|
timestamp: string;
|
|
5393
|
+
/**
|
|
5394
|
+
* Type discriminator. Always "sampling.requested".
|
|
5395
|
+
*/
|
|
4126
5396
|
type: "sampling.requested";
|
|
4127
5397
|
}
|
|
4128
5398
|
/**
|
|
@@ -4141,14 +5411,20 @@ export interface SamplingRequestedData {
|
|
|
4141
5411
|
* Name of the MCP server that initiated the sampling request
|
|
4142
5412
|
*/
|
|
4143
5413
|
serverName: string;
|
|
4144
|
-
[k: string]: unknown;
|
|
5414
|
+
[k: string]: unknown | undefined;
|
|
4145
5415
|
}
|
|
5416
|
+
/**
|
|
5417
|
+
* Session event "sampling.completed". Sampling request completion notification signaling UI dismissal
|
|
5418
|
+
*/
|
|
4146
5419
|
export interface SamplingCompletedEvent {
|
|
4147
5420
|
/**
|
|
4148
5421
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4149
5422
|
*/
|
|
4150
5423
|
agentId?: string;
|
|
4151
5424
|
data: SamplingCompletedData;
|
|
5425
|
+
/**
|
|
5426
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5427
|
+
*/
|
|
4152
5428
|
ephemeral: true;
|
|
4153
5429
|
/**
|
|
4154
5430
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4162,6 +5438,9 @@ export interface SamplingCompletedEvent {
|
|
|
4162
5438
|
* ISO 8601 timestamp when the event was created
|
|
4163
5439
|
*/
|
|
4164
5440
|
timestamp: string;
|
|
5441
|
+
/**
|
|
5442
|
+
* Type discriminator. Always "sampling.completed".
|
|
5443
|
+
*/
|
|
4165
5444
|
type: "sampling.completed";
|
|
4166
5445
|
}
|
|
4167
5446
|
/**
|
|
@@ -4173,12 +5452,18 @@ export interface SamplingCompletedData {
|
|
|
4173
5452
|
*/
|
|
4174
5453
|
requestId: string;
|
|
4175
5454
|
}
|
|
5455
|
+
/**
|
|
5456
|
+
* Session event "mcp.oauth_required". OAuth authentication request for an MCP server
|
|
5457
|
+
*/
|
|
4176
5458
|
export interface McpOauthRequiredEvent {
|
|
4177
5459
|
/**
|
|
4178
5460
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4179
5461
|
*/
|
|
4180
5462
|
agentId?: string;
|
|
4181
5463
|
data: McpOauthRequiredData;
|
|
5464
|
+
/**
|
|
5465
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5466
|
+
*/
|
|
4182
5467
|
ephemeral: true;
|
|
4183
5468
|
/**
|
|
4184
5469
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4192,6 +5477,9 @@ export interface McpOauthRequiredEvent {
|
|
|
4192
5477
|
* ISO 8601 timestamp when the event was created
|
|
4193
5478
|
*/
|
|
4194
5479
|
timestamp: string;
|
|
5480
|
+
/**
|
|
5481
|
+
* Type discriminator. Always "mcp.oauth_required".
|
|
5482
|
+
*/
|
|
4195
5483
|
type: "mcp.oauth_required";
|
|
4196
5484
|
}
|
|
4197
5485
|
/**
|
|
@@ -4229,12 +5517,18 @@ export interface McpOauthRequiredStaticClientConfig {
|
|
|
4229
5517
|
*/
|
|
4230
5518
|
publicClient?: boolean;
|
|
4231
5519
|
}
|
|
5520
|
+
/**
|
|
5521
|
+
* Session event "mcp.oauth_completed". MCP OAuth request completion notification
|
|
5522
|
+
*/
|
|
4232
5523
|
export interface McpOauthCompletedEvent {
|
|
4233
5524
|
/**
|
|
4234
5525
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4235
5526
|
*/
|
|
4236
5527
|
agentId?: string;
|
|
4237
5528
|
data: McpOauthCompletedData;
|
|
5529
|
+
/**
|
|
5530
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5531
|
+
*/
|
|
4238
5532
|
ephemeral: true;
|
|
4239
5533
|
/**
|
|
4240
5534
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4248,6 +5542,9 @@ export interface McpOauthCompletedEvent {
|
|
|
4248
5542
|
* ISO 8601 timestamp when the event was created
|
|
4249
5543
|
*/
|
|
4250
5544
|
timestamp: string;
|
|
5545
|
+
/**
|
|
5546
|
+
* Type discriminator. Always "mcp.oauth_completed".
|
|
5547
|
+
*/
|
|
4251
5548
|
type: "mcp.oauth_completed";
|
|
4252
5549
|
}
|
|
4253
5550
|
/**
|
|
@@ -4259,7 +5556,65 @@ export interface McpOauthCompletedData {
|
|
|
4259
5556
|
*/
|
|
4260
5557
|
requestId: string;
|
|
4261
5558
|
}
|
|
4262
|
-
|
|
5559
|
+
/**
|
|
5560
|
+
* Session event "session.custom_notification". Opaque custom notification data. Consumers may branch on source and name, but payload semantics are source-defined.
|
|
5561
|
+
*/
|
|
5562
|
+
export interface CustomNotificationEvent {
|
|
5563
|
+
/**
|
|
5564
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
5565
|
+
*/
|
|
5566
|
+
agentId?: string;
|
|
5567
|
+
data: CustomNotificationData;
|
|
5568
|
+
/**
|
|
5569
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5570
|
+
*/
|
|
5571
|
+
ephemeral: true;
|
|
5572
|
+
/**
|
|
5573
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
5574
|
+
*/
|
|
5575
|
+
id: string;
|
|
5576
|
+
/**
|
|
5577
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
5578
|
+
*/
|
|
5579
|
+
parentId: string | null;
|
|
5580
|
+
/**
|
|
5581
|
+
* ISO 8601 timestamp when the event was created
|
|
5582
|
+
*/
|
|
5583
|
+
timestamp: string;
|
|
5584
|
+
/**
|
|
5585
|
+
* Type discriminator. Always "session.custom_notification".
|
|
5586
|
+
*/
|
|
5587
|
+
type: "session.custom_notification";
|
|
5588
|
+
}
|
|
5589
|
+
/**
|
|
5590
|
+
* Opaque custom notification data. Consumers may branch on source and name, but payload semantics are source-defined.
|
|
5591
|
+
*/
|
|
5592
|
+
export interface CustomNotificationData {
|
|
5593
|
+
/**
|
|
5594
|
+
* Source-defined custom notification name
|
|
5595
|
+
*/
|
|
5596
|
+
name: string;
|
|
5597
|
+
payload: CustomNotificationPayload;
|
|
5598
|
+
/**
|
|
5599
|
+
* Namespace for the custom notification producer
|
|
5600
|
+
*/
|
|
5601
|
+
source: string;
|
|
5602
|
+
subject?: CustomNotificationSubject;
|
|
5603
|
+
/**
|
|
5604
|
+
* Optional source-defined payload schema version
|
|
5605
|
+
*/
|
|
5606
|
+
version?: number;
|
|
5607
|
+
}
|
|
5608
|
+
/**
|
|
5609
|
+
* Optional source-defined string identifiers describing the payload subject
|
|
5610
|
+
*/
|
|
5611
|
+
export interface CustomNotificationSubject {
|
|
5612
|
+
[k: string]: string | undefined;
|
|
5613
|
+
}
|
|
5614
|
+
/**
|
|
5615
|
+
* Session event "external_tool.requested". External tool invocation request for client-side tool execution
|
|
5616
|
+
*/
|
|
5617
|
+
export interface ExternalToolRequestedEvent {
|
|
4263
5618
|
/**
|
|
4264
5619
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4265
5620
|
*/
|
|
@@ -4281,6 +5636,9 @@ export interface ExternalToolRequestedEvent {
|
|
|
4281
5636
|
* ISO 8601 timestamp when the event was created
|
|
4282
5637
|
*/
|
|
4283
5638
|
timestamp: string;
|
|
5639
|
+
/**
|
|
5640
|
+
* Type discriminator. Always "external_tool.requested".
|
|
5641
|
+
*/
|
|
4284
5642
|
type: "external_tool.requested";
|
|
4285
5643
|
}
|
|
4286
5644
|
/**
|
|
@@ -4291,7 +5649,7 @@ export interface ExternalToolRequestedData {
|
|
|
4291
5649
|
* Arguments to pass to the external tool
|
|
4292
5650
|
*/
|
|
4293
5651
|
arguments?: {
|
|
4294
|
-
[k: string]: unknown;
|
|
5652
|
+
[k: string]: unknown | undefined;
|
|
4295
5653
|
};
|
|
4296
5654
|
/**
|
|
4297
5655
|
* Unique identifier for this request; used to respond via session.respondToExternalTool()
|
|
@@ -4317,13 +5675,23 @@ export interface ExternalToolRequestedData {
|
|
|
4317
5675
|
* W3C Trace Context tracestate header for the execute_tool span
|
|
4318
5676
|
*/
|
|
4319
5677
|
tracestate?: string;
|
|
5678
|
+
/**
|
|
5679
|
+
* Active session working directory, when known.
|
|
5680
|
+
*/
|
|
5681
|
+
workingDirectory?: string;
|
|
4320
5682
|
}
|
|
5683
|
+
/**
|
|
5684
|
+
* Session event "external_tool.completed". External tool completion notification signaling UI dismissal
|
|
5685
|
+
*/
|
|
4321
5686
|
export interface ExternalToolCompletedEvent {
|
|
4322
5687
|
/**
|
|
4323
5688
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4324
5689
|
*/
|
|
4325
5690
|
agentId?: string;
|
|
4326
5691
|
data: ExternalToolCompletedData;
|
|
5692
|
+
/**
|
|
5693
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5694
|
+
*/
|
|
4327
5695
|
ephemeral?: true;
|
|
4328
5696
|
/**
|
|
4329
5697
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4337,6 +5705,9 @@ export interface ExternalToolCompletedEvent {
|
|
|
4337
5705
|
* ISO 8601 timestamp when the event was created
|
|
4338
5706
|
*/
|
|
4339
5707
|
timestamp: string;
|
|
5708
|
+
/**
|
|
5709
|
+
* Type discriminator. Always "external_tool.completed".
|
|
5710
|
+
*/
|
|
4340
5711
|
type: "external_tool.completed";
|
|
4341
5712
|
}
|
|
4342
5713
|
/**
|
|
@@ -4348,12 +5719,18 @@ export interface ExternalToolCompletedData {
|
|
|
4348
5719
|
*/
|
|
4349
5720
|
requestId: string;
|
|
4350
5721
|
}
|
|
5722
|
+
/**
|
|
5723
|
+
* Session event "command.queued". Queued slash command dispatch request for client execution
|
|
5724
|
+
*/
|
|
4351
5725
|
export interface CommandQueuedEvent {
|
|
4352
5726
|
/**
|
|
4353
5727
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4354
5728
|
*/
|
|
4355
5729
|
agentId?: string;
|
|
4356
5730
|
data: CommandQueuedData;
|
|
5731
|
+
/**
|
|
5732
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5733
|
+
*/
|
|
4357
5734
|
ephemeral: true;
|
|
4358
5735
|
/**
|
|
4359
5736
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4367,6 +5744,9 @@ export interface CommandQueuedEvent {
|
|
|
4367
5744
|
* ISO 8601 timestamp when the event was created
|
|
4368
5745
|
*/
|
|
4369
5746
|
timestamp: string;
|
|
5747
|
+
/**
|
|
5748
|
+
* Type discriminator. Always "command.queued".
|
|
5749
|
+
*/
|
|
4370
5750
|
type: "command.queued";
|
|
4371
5751
|
}
|
|
4372
5752
|
/**
|
|
@@ -4382,12 +5762,18 @@ export interface CommandQueuedData {
|
|
|
4382
5762
|
*/
|
|
4383
5763
|
requestId: string;
|
|
4384
5764
|
}
|
|
5765
|
+
/**
|
|
5766
|
+
* Session event "command.execute". Registered command dispatch request routed to the owning client
|
|
5767
|
+
*/
|
|
4385
5768
|
export interface CommandExecuteEvent {
|
|
4386
5769
|
/**
|
|
4387
5770
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4388
5771
|
*/
|
|
4389
5772
|
agentId?: string;
|
|
4390
5773
|
data: CommandExecuteData;
|
|
5774
|
+
/**
|
|
5775
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5776
|
+
*/
|
|
4391
5777
|
ephemeral: true;
|
|
4392
5778
|
/**
|
|
4393
5779
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4401,6 +5787,9 @@ export interface CommandExecuteEvent {
|
|
|
4401
5787
|
* ISO 8601 timestamp when the event was created
|
|
4402
5788
|
*/
|
|
4403
5789
|
timestamp: string;
|
|
5790
|
+
/**
|
|
5791
|
+
* Type discriminator. Always "command.execute".
|
|
5792
|
+
*/
|
|
4404
5793
|
type: "command.execute";
|
|
4405
5794
|
}
|
|
4406
5795
|
/**
|
|
@@ -4424,12 +5813,18 @@ export interface CommandExecuteData {
|
|
|
4424
5813
|
*/
|
|
4425
5814
|
requestId: string;
|
|
4426
5815
|
}
|
|
5816
|
+
/**
|
|
5817
|
+
* Session event "command.completed". Queued command completion notification signaling UI dismissal
|
|
5818
|
+
*/
|
|
4427
5819
|
export interface CommandCompletedEvent {
|
|
4428
5820
|
/**
|
|
4429
5821
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4430
5822
|
*/
|
|
4431
5823
|
agentId?: string;
|
|
4432
5824
|
data: CommandCompletedData;
|
|
5825
|
+
/**
|
|
5826
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5827
|
+
*/
|
|
4433
5828
|
ephemeral: true;
|
|
4434
5829
|
/**
|
|
4435
5830
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4443,6 +5838,9 @@ export interface CommandCompletedEvent {
|
|
|
4443
5838
|
* ISO 8601 timestamp when the event was created
|
|
4444
5839
|
*/
|
|
4445
5840
|
timestamp: string;
|
|
5841
|
+
/**
|
|
5842
|
+
* Type discriminator. Always "command.completed".
|
|
5843
|
+
*/
|
|
4446
5844
|
type: "command.completed";
|
|
4447
5845
|
}
|
|
4448
5846
|
/**
|
|
@@ -4454,12 +5852,18 @@ export interface CommandCompletedData {
|
|
|
4454
5852
|
*/
|
|
4455
5853
|
requestId: string;
|
|
4456
5854
|
}
|
|
5855
|
+
/**
|
|
5856
|
+
* Session event "auto_mode_switch.requested". Auto mode switch request notification requiring user approval
|
|
5857
|
+
*/
|
|
4457
5858
|
export interface AutoModeSwitchRequestedEvent {
|
|
4458
5859
|
/**
|
|
4459
5860
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4460
5861
|
*/
|
|
4461
5862
|
agentId?: string;
|
|
4462
5863
|
data: AutoModeSwitchRequestedData;
|
|
5864
|
+
/**
|
|
5865
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5866
|
+
*/
|
|
4463
5867
|
ephemeral: true;
|
|
4464
5868
|
/**
|
|
4465
5869
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4473,6 +5877,9 @@ export interface AutoModeSwitchRequestedEvent {
|
|
|
4473
5877
|
* ISO 8601 timestamp when the event was created
|
|
4474
5878
|
*/
|
|
4475
5879
|
timestamp: string;
|
|
5880
|
+
/**
|
|
5881
|
+
* Type discriminator. Always "auto_mode_switch.requested".
|
|
5882
|
+
*/
|
|
4476
5883
|
type: "auto_mode_switch.requested";
|
|
4477
5884
|
}
|
|
4478
5885
|
/**
|
|
@@ -4492,12 +5899,18 @@ export interface AutoModeSwitchRequestedData {
|
|
|
4492
5899
|
*/
|
|
4493
5900
|
retryAfterSeconds?: number;
|
|
4494
5901
|
}
|
|
5902
|
+
/**
|
|
5903
|
+
* Session event "auto_mode_switch.completed". Auto mode switch completion notification
|
|
5904
|
+
*/
|
|
4495
5905
|
export interface AutoModeSwitchCompletedEvent {
|
|
4496
5906
|
/**
|
|
4497
5907
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4498
5908
|
*/
|
|
4499
5909
|
agentId?: string;
|
|
4500
5910
|
data: AutoModeSwitchCompletedData;
|
|
5911
|
+
/**
|
|
5912
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5913
|
+
*/
|
|
4501
5914
|
ephemeral: true;
|
|
4502
5915
|
/**
|
|
4503
5916
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4511,6 +5924,9 @@ export interface AutoModeSwitchCompletedEvent {
|
|
|
4511
5924
|
* ISO 8601 timestamp when the event was created
|
|
4512
5925
|
*/
|
|
4513
5926
|
timestamp: string;
|
|
5927
|
+
/**
|
|
5928
|
+
* Type discriminator. Always "auto_mode_switch.completed".
|
|
5929
|
+
*/
|
|
4514
5930
|
type: "auto_mode_switch.completed";
|
|
4515
5931
|
}
|
|
4516
5932
|
/**
|
|
@@ -4521,17 +5937,20 @@ export interface AutoModeSwitchCompletedData {
|
|
|
4521
5937
|
* Request ID of the resolved request; clients should dismiss any UI for this request
|
|
4522
5938
|
*/
|
|
4523
5939
|
requestId: string;
|
|
4524
|
-
|
|
4525
|
-
* The user's choice: 'yes', 'yes_always', or 'no'
|
|
4526
|
-
*/
|
|
4527
|
-
response: string;
|
|
5940
|
+
response: AutoModeSwitchResponse;
|
|
4528
5941
|
}
|
|
5942
|
+
/**
|
|
5943
|
+
* Session event "commands.changed". SDK command registration change notification
|
|
5944
|
+
*/
|
|
4529
5945
|
export interface CommandsChangedEvent {
|
|
4530
5946
|
/**
|
|
4531
5947
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4532
5948
|
*/
|
|
4533
5949
|
agentId?: string;
|
|
4534
5950
|
data: CommandsChangedData;
|
|
5951
|
+
/**
|
|
5952
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
5953
|
+
*/
|
|
4535
5954
|
ephemeral: true;
|
|
4536
5955
|
/**
|
|
4537
5956
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4545,6 +5964,9 @@ export interface CommandsChangedEvent {
|
|
|
4545
5964
|
* ISO 8601 timestamp when the event was created
|
|
4546
5965
|
*/
|
|
4547
5966
|
timestamp: string;
|
|
5967
|
+
/**
|
|
5968
|
+
* Type discriminator. Always "commands.changed".
|
|
5969
|
+
*/
|
|
4548
5970
|
type: "commands.changed";
|
|
4549
5971
|
}
|
|
4550
5972
|
/**
|
|
@@ -4556,16 +5978,31 @@ export interface CommandsChangedData {
|
|
|
4556
5978
|
*/
|
|
4557
5979
|
commands: CommandsChangedCommand[];
|
|
4558
5980
|
}
|
|
5981
|
+
/**
|
|
5982
|
+
* Schema for the `CommandsChangedCommand` type.
|
|
5983
|
+
*/
|
|
4559
5984
|
export interface CommandsChangedCommand {
|
|
5985
|
+
/**
|
|
5986
|
+
* Optional human-readable command description.
|
|
5987
|
+
*/
|
|
4560
5988
|
description?: string;
|
|
5989
|
+
/**
|
|
5990
|
+
* Slash command name without the leading slash.
|
|
5991
|
+
*/
|
|
4561
5992
|
name: string;
|
|
4562
5993
|
}
|
|
5994
|
+
/**
|
|
5995
|
+
* Session event "capabilities.changed". Session capability change notification
|
|
5996
|
+
*/
|
|
4563
5997
|
export interface CapabilitiesChangedEvent {
|
|
4564
5998
|
/**
|
|
4565
5999
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4566
6000
|
*/
|
|
4567
6001
|
agentId?: string;
|
|
4568
6002
|
data: CapabilitiesChangedData;
|
|
6003
|
+
/**
|
|
6004
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6005
|
+
*/
|
|
4569
6006
|
ephemeral: true;
|
|
4570
6007
|
/**
|
|
4571
6008
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4579,6 +6016,9 @@ export interface CapabilitiesChangedEvent {
|
|
|
4579
6016
|
* ISO 8601 timestamp when the event was created
|
|
4580
6017
|
*/
|
|
4581
6018
|
timestamp: string;
|
|
6019
|
+
/**
|
|
6020
|
+
* Type discriminator. Always "capabilities.changed".
|
|
6021
|
+
*/
|
|
4582
6022
|
type: "capabilities.changed";
|
|
4583
6023
|
}
|
|
4584
6024
|
/**
|
|
@@ -4591,17 +6031,31 @@ export interface CapabilitiesChangedData {
|
|
|
4591
6031
|
* UI capability changes
|
|
4592
6032
|
*/
|
|
4593
6033
|
export interface CapabilitiesChangedUI {
|
|
6034
|
+
/**
|
|
6035
|
+
* Whether canvas rendering is now supported
|
|
6036
|
+
*/
|
|
6037
|
+
canvases?: boolean;
|
|
4594
6038
|
/**
|
|
4595
6039
|
* Whether elicitation is now supported
|
|
4596
6040
|
*/
|
|
4597
6041
|
elicitation?: boolean;
|
|
6042
|
+
/**
|
|
6043
|
+
* Whether MCP Apps (SEP-1865) UI passthrough is now supported
|
|
6044
|
+
*/
|
|
6045
|
+
mcpApps?: boolean;
|
|
4598
6046
|
}
|
|
6047
|
+
/**
|
|
6048
|
+
* Session event "exit_plan_mode.requested". Plan approval request with plan content and available user actions
|
|
6049
|
+
*/
|
|
4599
6050
|
export interface ExitPlanModeRequestedEvent {
|
|
4600
6051
|
/**
|
|
4601
6052
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4602
6053
|
*/
|
|
4603
6054
|
agentId?: string;
|
|
4604
6055
|
data: ExitPlanModeRequestedData;
|
|
6056
|
+
/**
|
|
6057
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6058
|
+
*/
|
|
4605
6059
|
ephemeral: true;
|
|
4606
6060
|
/**
|
|
4607
6061
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4615,6 +6069,9 @@ export interface ExitPlanModeRequestedEvent {
|
|
|
4615
6069
|
* ISO 8601 timestamp when the event was created
|
|
4616
6070
|
*/
|
|
4617
6071
|
timestamp: string;
|
|
6072
|
+
/**
|
|
6073
|
+
* Type discriminator. Always "exit_plan_mode.requested".
|
|
6074
|
+
*/
|
|
4618
6075
|
type: "exit_plan_mode.requested";
|
|
4619
6076
|
}
|
|
4620
6077
|
/**
|
|
@@ -4622,17 +6079,14 @@ export interface ExitPlanModeRequestedEvent {
|
|
|
4622
6079
|
*/
|
|
4623
6080
|
export interface ExitPlanModeRequestedData {
|
|
4624
6081
|
/**
|
|
4625
|
-
* Available actions the user can take
|
|
6082
|
+
* Available actions the user can take
|
|
4626
6083
|
*/
|
|
4627
|
-
actions:
|
|
6084
|
+
actions: ExitPlanModeAction[];
|
|
4628
6085
|
/**
|
|
4629
6086
|
* Full content of the plan file
|
|
4630
6087
|
*/
|
|
4631
6088
|
planContent: string;
|
|
4632
|
-
|
|
4633
|
-
* The recommended action for the user to take
|
|
4634
|
-
*/
|
|
4635
|
-
recommendedAction: string;
|
|
6089
|
+
recommendedAction: ExitPlanModeAction;
|
|
4636
6090
|
/**
|
|
4637
6091
|
* Unique identifier for this request; used to respond via session.respondToExitPlanMode()
|
|
4638
6092
|
*/
|
|
@@ -4642,12 +6096,18 @@ export interface ExitPlanModeRequestedData {
|
|
|
4642
6096
|
*/
|
|
4643
6097
|
summary: string;
|
|
4644
6098
|
}
|
|
6099
|
+
/**
|
|
6100
|
+
* Session event "exit_plan_mode.completed". Plan mode exit completion with the user's approval decision and optional feedback
|
|
6101
|
+
*/
|
|
4645
6102
|
export interface ExitPlanModeCompletedEvent {
|
|
4646
6103
|
/**
|
|
4647
6104
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4648
6105
|
*/
|
|
4649
6106
|
agentId?: string;
|
|
4650
6107
|
data: ExitPlanModeCompletedData;
|
|
6108
|
+
/**
|
|
6109
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6110
|
+
*/
|
|
4651
6111
|
ephemeral: true;
|
|
4652
6112
|
/**
|
|
4653
6113
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4661,6 +6121,9 @@ export interface ExitPlanModeCompletedEvent {
|
|
|
4661
6121
|
* ISO 8601 timestamp when the event was created
|
|
4662
6122
|
*/
|
|
4663
6123
|
timestamp: string;
|
|
6124
|
+
/**
|
|
6125
|
+
* Type discriminator. Always "exit_plan_mode.completed".
|
|
6126
|
+
*/
|
|
4664
6127
|
type: "exit_plan_mode.completed";
|
|
4665
6128
|
}
|
|
4666
6129
|
/**
|
|
@@ -4683,17 +6146,20 @@ export interface ExitPlanModeCompletedData {
|
|
|
4683
6146
|
* Request ID of the resolved exit plan mode request; clients should dismiss any UI for this request
|
|
4684
6147
|
*/
|
|
4685
6148
|
requestId: string;
|
|
4686
|
-
|
|
4687
|
-
* Which action the user selected (e.g. 'autopilot', 'interactive', 'exit_only')
|
|
4688
|
-
*/
|
|
4689
|
-
selectedAction?: string;
|
|
6149
|
+
selectedAction?: ExitPlanModeAction;
|
|
4690
6150
|
}
|
|
6151
|
+
/**
|
|
6152
|
+
* Session event "session.tools_updated".
|
|
6153
|
+
*/
|
|
4691
6154
|
export interface ToolsUpdatedEvent {
|
|
4692
6155
|
/**
|
|
4693
6156
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4694
6157
|
*/
|
|
4695
6158
|
agentId?: string;
|
|
4696
6159
|
data: ToolsUpdatedData;
|
|
6160
|
+
/**
|
|
6161
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6162
|
+
*/
|
|
4697
6163
|
ephemeral: true;
|
|
4698
6164
|
/**
|
|
4699
6165
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4707,17 +6173,32 @@ export interface ToolsUpdatedEvent {
|
|
|
4707
6173
|
* ISO 8601 timestamp when the event was created
|
|
4708
6174
|
*/
|
|
4709
6175
|
timestamp: string;
|
|
6176
|
+
/**
|
|
6177
|
+
* Type discriminator. Always "session.tools_updated".
|
|
6178
|
+
*/
|
|
4710
6179
|
type: "session.tools_updated";
|
|
4711
6180
|
}
|
|
6181
|
+
/**
|
|
6182
|
+
* Schema for the `ToolsUpdatedData` type.
|
|
6183
|
+
*/
|
|
4712
6184
|
export interface ToolsUpdatedData {
|
|
6185
|
+
/**
|
|
6186
|
+
* Identifier of the model the resolved tools apply to.
|
|
6187
|
+
*/
|
|
4713
6188
|
model: string;
|
|
4714
6189
|
}
|
|
6190
|
+
/**
|
|
6191
|
+
* Session event "session.background_tasks_changed".
|
|
6192
|
+
*/
|
|
4715
6193
|
export interface BackgroundTasksChangedEvent {
|
|
4716
6194
|
/**
|
|
4717
6195
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4718
6196
|
*/
|
|
4719
6197
|
agentId?: string;
|
|
4720
6198
|
data: BackgroundTasksChangedData;
|
|
6199
|
+
/**
|
|
6200
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6201
|
+
*/
|
|
4721
6202
|
ephemeral: true;
|
|
4722
6203
|
/**
|
|
4723
6204
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4731,16 +6212,28 @@ export interface BackgroundTasksChangedEvent {
|
|
|
4731
6212
|
* ISO 8601 timestamp when the event was created
|
|
4732
6213
|
*/
|
|
4733
6214
|
timestamp: string;
|
|
6215
|
+
/**
|
|
6216
|
+
* Type discriminator. Always "session.background_tasks_changed".
|
|
6217
|
+
*/
|
|
4734
6218
|
type: "session.background_tasks_changed";
|
|
4735
6219
|
}
|
|
6220
|
+
/**
|
|
6221
|
+
* Schema for the `BackgroundTasksChangedData` type.
|
|
6222
|
+
*/
|
|
4736
6223
|
export interface BackgroundTasksChangedData {
|
|
4737
6224
|
}
|
|
6225
|
+
/**
|
|
6226
|
+
* Session event "session.skills_loaded".
|
|
6227
|
+
*/
|
|
4738
6228
|
export interface SkillsLoadedEvent {
|
|
4739
6229
|
/**
|
|
4740
6230
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4741
6231
|
*/
|
|
4742
6232
|
agentId?: string;
|
|
4743
6233
|
data: SkillsLoadedData;
|
|
6234
|
+
/**
|
|
6235
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6236
|
+
*/
|
|
4744
6237
|
ephemeral: true;
|
|
4745
6238
|
/**
|
|
4746
6239
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4754,14 +6247,23 @@ export interface SkillsLoadedEvent {
|
|
|
4754
6247
|
* ISO 8601 timestamp when the event was created
|
|
4755
6248
|
*/
|
|
4756
6249
|
timestamp: string;
|
|
6250
|
+
/**
|
|
6251
|
+
* Type discriminator. Always "session.skills_loaded".
|
|
6252
|
+
*/
|
|
4757
6253
|
type: "session.skills_loaded";
|
|
4758
6254
|
}
|
|
6255
|
+
/**
|
|
6256
|
+
* Schema for the `SkillsLoadedData` type.
|
|
6257
|
+
*/
|
|
4759
6258
|
export interface SkillsLoadedData {
|
|
4760
6259
|
/**
|
|
4761
6260
|
* Array of resolved skill metadata
|
|
4762
6261
|
*/
|
|
4763
6262
|
skills: SkillsLoadedSkill[];
|
|
4764
6263
|
}
|
|
6264
|
+
/**
|
|
6265
|
+
* Schema for the `SkillsLoadedSkill` type.
|
|
6266
|
+
*/
|
|
4765
6267
|
export interface SkillsLoadedSkill {
|
|
4766
6268
|
/**
|
|
4767
6269
|
* Description of what the skill does
|
|
@@ -4779,21 +6281,24 @@ export interface SkillsLoadedSkill {
|
|
|
4779
6281
|
* Absolute path to the skill file, if available
|
|
4780
6282
|
*/
|
|
4781
6283
|
path?: string;
|
|
4782
|
-
|
|
4783
|
-
* Source location type of the skill (e.g., project, personal, plugin)
|
|
4784
|
-
*/
|
|
4785
|
-
source: string;
|
|
6284
|
+
source: SkillSource;
|
|
4786
6285
|
/**
|
|
4787
6286
|
* Whether the skill can be invoked by the user as a slash command
|
|
4788
6287
|
*/
|
|
4789
6288
|
userInvocable: boolean;
|
|
4790
6289
|
}
|
|
6290
|
+
/**
|
|
6291
|
+
* Session event "session.custom_agents_updated".
|
|
6292
|
+
*/
|
|
4791
6293
|
export interface CustomAgentsUpdatedEvent {
|
|
4792
6294
|
/**
|
|
4793
6295
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4794
6296
|
*/
|
|
4795
6297
|
agentId?: string;
|
|
4796
6298
|
data: CustomAgentsUpdatedData;
|
|
6299
|
+
/**
|
|
6300
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6301
|
+
*/
|
|
4797
6302
|
ephemeral: true;
|
|
4798
6303
|
/**
|
|
4799
6304
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4807,8 +6312,14 @@ export interface CustomAgentsUpdatedEvent {
|
|
|
4807
6312
|
* ISO 8601 timestamp when the event was created
|
|
4808
6313
|
*/
|
|
4809
6314
|
timestamp: string;
|
|
6315
|
+
/**
|
|
6316
|
+
* Type discriminator. Always "session.custom_agents_updated".
|
|
6317
|
+
*/
|
|
4810
6318
|
type: "session.custom_agents_updated";
|
|
4811
6319
|
}
|
|
6320
|
+
/**
|
|
6321
|
+
* Schema for the `CustomAgentsUpdatedData` type.
|
|
6322
|
+
*/
|
|
4812
6323
|
export interface CustomAgentsUpdatedData {
|
|
4813
6324
|
/**
|
|
4814
6325
|
* Array of loaded custom agent metadata
|
|
@@ -4823,6 +6334,9 @@ export interface CustomAgentsUpdatedData {
|
|
|
4823
6334
|
*/
|
|
4824
6335
|
warnings: string[];
|
|
4825
6336
|
}
|
|
6337
|
+
/**
|
|
6338
|
+
* Schema for the `CustomAgentsUpdatedAgent` type.
|
|
6339
|
+
*/
|
|
4826
6340
|
export interface CustomAgentsUpdatedAgent {
|
|
4827
6341
|
/**
|
|
4828
6342
|
* Description of what the agent does
|
|
@@ -4849,20 +6363,26 @@ export interface CustomAgentsUpdatedAgent {
|
|
|
4849
6363
|
*/
|
|
4850
6364
|
source: string;
|
|
4851
6365
|
/**
|
|
4852
|
-
* List of tool names available to this agent
|
|
6366
|
+
* List of tool names available to this agent, or null when all tools are available
|
|
4853
6367
|
*/
|
|
4854
|
-
tools: string[];
|
|
6368
|
+
tools: string[] | null;
|
|
4855
6369
|
/**
|
|
4856
6370
|
* Whether the agent can be selected by the user
|
|
4857
6371
|
*/
|
|
4858
6372
|
userInvocable: boolean;
|
|
4859
6373
|
}
|
|
6374
|
+
/**
|
|
6375
|
+
* Session event "session.mcp_servers_loaded".
|
|
6376
|
+
*/
|
|
4860
6377
|
export interface McpServersLoadedEvent {
|
|
4861
6378
|
/**
|
|
4862
6379
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4863
6380
|
*/
|
|
4864
6381
|
agentId?: string;
|
|
4865
6382
|
data: McpServersLoadedData;
|
|
6383
|
+
/**
|
|
6384
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6385
|
+
*/
|
|
4866
6386
|
ephemeral: true;
|
|
4867
6387
|
/**
|
|
4868
6388
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4876,14 +6396,23 @@ export interface McpServersLoadedEvent {
|
|
|
4876
6396
|
* ISO 8601 timestamp when the event was created
|
|
4877
6397
|
*/
|
|
4878
6398
|
timestamp: string;
|
|
6399
|
+
/**
|
|
6400
|
+
* Type discriminator. Always "session.mcp_servers_loaded".
|
|
6401
|
+
*/
|
|
4879
6402
|
type: "session.mcp_servers_loaded";
|
|
4880
6403
|
}
|
|
6404
|
+
/**
|
|
6405
|
+
* Schema for the `McpServersLoadedData` type.
|
|
6406
|
+
*/
|
|
4881
6407
|
export interface McpServersLoadedData {
|
|
4882
6408
|
/**
|
|
4883
6409
|
* Array of MCP server status summaries
|
|
4884
6410
|
*/
|
|
4885
6411
|
servers: McpServersLoadedServer[];
|
|
4886
6412
|
}
|
|
6413
|
+
/**
|
|
6414
|
+
* Schema for the `McpServersLoadedServer` type.
|
|
6415
|
+
*/
|
|
4887
6416
|
export interface McpServersLoadedServer {
|
|
4888
6417
|
/**
|
|
4889
6418
|
* Error message if the server failed to connect
|
|
@@ -4894,17 +6423,29 @@ export interface McpServersLoadedServer {
|
|
|
4894
6423
|
*/
|
|
4895
6424
|
name: string;
|
|
4896
6425
|
/**
|
|
4897
|
-
*
|
|
6426
|
+
* Name of the plugin that supplied the effective MCP server config, only when source is plugin
|
|
4898
6427
|
*/
|
|
4899
|
-
|
|
4900
|
-
|
|
6428
|
+
pluginName?: string;
|
|
6429
|
+
/**
|
|
6430
|
+
* Version of the plugin that supplied the effective MCP server config, only when source is plugin
|
|
6431
|
+
*/
|
|
6432
|
+
pluginVersion?: string;
|
|
6433
|
+
source?: McpServerSource;
|
|
6434
|
+
status: McpServerStatus;
|
|
6435
|
+
transport?: McpServerTransport;
|
|
4901
6436
|
}
|
|
6437
|
+
/**
|
|
6438
|
+
* Session event "session.mcp_server_status_changed".
|
|
6439
|
+
*/
|
|
4902
6440
|
export interface McpServerStatusChangedEvent {
|
|
4903
6441
|
/**
|
|
4904
6442
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4905
6443
|
*/
|
|
4906
6444
|
agentId?: string;
|
|
4907
6445
|
data: McpServerStatusChangedData;
|
|
6446
|
+
/**
|
|
6447
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6448
|
+
*/
|
|
4908
6449
|
ephemeral: true;
|
|
4909
6450
|
/**
|
|
4910
6451
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4918,21 +6459,37 @@ export interface McpServerStatusChangedEvent {
|
|
|
4918
6459
|
* ISO 8601 timestamp when the event was created
|
|
4919
6460
|
*/
|
|
4920
6461
|
timestamp: string;
|
|
6462
|
+
/**
|
|
6463
|
+
* Type discriminator. Always "session.mcp_server_status_changed".
|
|
6464
|
+
*/
|
|
4921
6465
|
type: "session.mcp_server_status_changed";
|
|
4922
6466
|
}
|
|
6467
|
+
/**
|
|
6468
|
+
* Schema for the `McpServerStatusChangedData` type.
|
|
6469
|
+
*/
|
|
4923
6470
|
export interface McpServerStatusChangedData {
|
|
6471
|
+
/**
|
|
6472
|
+
* Error message if the server entered a failed state
|
|
6473
|
+
*/
|
|
6474
|
+
error?: string;
|
|
4924
6475
|
/**
|
|
4925
6476
|
* Name of the MCP server whose status changed
|
|
4926
6477
|
*/
|
|
4927
6478
|
serverName: string;
|
|
4928
|
-
status:
|
|
6479
|
+
status: McpServerStatus;
|
|
4929
6480
|
}
|
|
6481
|
+
/**
|
|
6482
|
+
* Session event "session.extensions_loaded".
|
|
6483
|
+
*/
|
|
4930
6484
|
export interface ExtensionsLoadedEvent {
|
|
4931
6485
|
/**
|
|
4932
6486
|
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
4933
6487
|
*/
|
|
4934
6488
|
agentId?: string;
|
|
4935
6489
|
data: ExtensionsLoadedData;
|
|
6490
|
+
/**
|
|
6491
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6492
|
+
*/
|
|
4936
6493
|
ephemeral: true;
|
|
4937
6494
|
/**
|
|
4938
6495
|
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
@@ -4946,14 +6503,23 @@ export interface ExtensionsLoadedEvent {
|
|
|
4946
6503
|
* ISO 8601 timestamp when the event was created
|
|
4947
6504
|
*/
|
|
4948
6505
|
timestamp: string;
|
|
6506
|
+
/**
|
|
6507
|
+
* Type discriminator. Always "session.extensions_loaded".
|
|
6508
|
+
*/
|
|
4949
6509
|
type: "session.extensions_loaded";
|
|
4950
6510
|
}
|
|
6511
|
+
/**
|
|
6512
|
+
* Schema for the `ExtensionsLoadedData` type.
|
|
6513
|
+
*/
|
|
4951
6514
|
export interface ExtensionsLoadedData {
|
|
4952
6515
|
/**
|
|
4953
6516
|
* Array of discovered extensions and their status
|
|
4954
6517
|
*/
|
|
4955
6518
|
extensions: ExtensionsLoadedExtension[];
|
|
4956
6519
|
}
|
|
6520
|
+
/**
|
|
6521
|
+
* Schema for the `ExtensionsLoadedExtension` type.
|
|
6522
|
+
*/
|
|
4957
6523
|
export interface ExtensionsLoadedExtension {
|
|
4958
6524
|
/**
|
|
4959
6525
|
* Source-qualified extension ID (e.g., 'project:my-ext', 'user:auth-helper')
|
|
@@ -4966,3 +6532,304 @@ export interface ExtensionsLoadedExtension {
|
|
|
4966
6532
|
source: ExtensionsLoadedExtensionSource;
|
|
4967
6533
|
status: ExtensionsLoadedExtensionStatus;
|
|
4968
6534
|
}
|
|
6535
|
+
/**
|
|
6536
|
+
* Session event "session.canvas.opened".
|
|
6537
|
+
*/
|
|
6538
|
+
export interface CanvasOpenedEvent {
|
|
6539
|
+
/**
|
|
6540
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
6541
|
+
*/
|
|
6542
|
+
agentId?: string;
|
|
6543
|
+
data: CanvasOpenedData;
|
|
6544
|
+
/**
|
|
6545
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6546
|
+
*/
|
|
6547
|
+
ephemeral: true;
|
|
6548
|
+
/**
|
|
6549
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
6550
|
+
*/
|
|
6551
|
+
id: string;
|
|
6552
|
+
/**
|
|
6553
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
6554
|
+
*/
|
|
6555
|
+
parentId: string | null;
|
|
6556
|
+
/**
|
|
6557
|
+
* ISO 8601 timestamp when the event was created
|
|
6558
|
+
*/
|
|
6559
|
+
timestamp: string;
|
|
6560
|
+
/**
|
|
6561
|
+
* Type discriminator. Always "session.canvas.opened".
|
|
6562
|
+
*/
|
|
6563
|
+
type: "session.canvas.opened";
|
|
6564
|
+
}
|
|
6565
|
+
/**
|
|
6566
|
+
* Schema for the `CanvasOpenedData` type.
|
|
6567
|
+
*/
|
|
6568
|
+
export interface CanvasOpenedData {
|
|
6569
|
+
availability: CanvasOpenedAvailability;
|
|
6570
|
+
/**
|
|
6571
|
+
* Provider-local canvas identifier
|
|
6572
|
+
*/
|
|
6573
|
+
canvasId: string;
|
|
6574
|
+
/**
|
|
6575
|
+
* Owning provider identifier
|
|
6576
|
+
*/
|
|
6577
|
+
extensionId: string;
|
|
6578
|
+
/**
|
|
6579
|
+
* Owning extension display name, when available
|
|
6580
|
+
*/
|
|
6581
|
+
extensionName?: string;
|
|
6582
|
+
/**
|
|
6583
|
+
* Input supplied when the instance was opened
|
|
6584
|
+
*/
|
|
6585
|
+
input?: {
|
|
6586
|
+
[k: string]: unknown | undefined;
|
|
6587
|
+
};
|
|
6588
|
+
/**
|
|
6589
|
+
* Stable caller-supplied canvas instance identifier
|
|
6590
|
+
*/
|
|
6591
|
+
instanceId: string;
|
|
6592
|
+
/**
|
|
6593
|
+
* Whether this notification represents an idempotent reopen
|
|
6594
|
+
*/
|
|
6595
|
+
reopen: boolean;
|
|
6596
|
+
/**
|
|
6597
|
+
* Provider-supplied status text
|
|
6598
|
+
*/
|
|
6599
|
+
status?: string;
|
|
6600
|
+
/**
|
|
6601
|
+
* Rendered title
|
|
6602
|
+
*/
|
|
6603
|
+
title?: string;
|
|
6604
|
+
/**
|
|
6605
|
+
* URL for web-rendered canvases
|
|
6606
|
+
*/
|
|
6607
|
+
url?: string;
|
|
6608
|
+
}
|
|
6609
|
+
/**
|
|
6610
|
+
* Session event "session.canvas.registry_changed".
|
|
6611
|
+
*/
|
|
6612
|
+
export interface CanvasRegistryChangedEvent {
|
|
6613
|
+
/**
|
|
6614
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
6615
|
+
*/
|
|
6616
|
+
agentId?: string;
|
|
6617
|
+
data: CanvasRegistryChangedData;
|
|
6618
|
+
/**
|
|
6619
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6620
|
+
*/
|
|
6621
|
+
ephemeral: true;
|
|
6622
|
+
/**
|
|
6623
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
6624
|
+
*/
|
|
6625
|
+
id: string;
|
|
6626
|
+
/**
|
|
6627
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
6628
|
+
*/
|
|
6629
|
+
parentId: string | null;
|
|
6630
|
+
/**
|
|
6631
|
+
* ISO 8601 timestamp when the event was created
|
|
6632
|
+
*/
|
|
6633
|
+
timestamp: string;
|
|
6634
|
+
/**
|
|
6635
|
+
* Type discriminator. Always "session.canvas.registry_changed".
|
|
6636
|
+
*/
|
|
6637
|
+
type: "session.canvas.registry_changed";
|
|
6638
|
+
}
|
|
6639
|
+
/**
|
|
6640
|
+
* Schema for the `CanvasRegistryChangedData` type.
|
|
6641
|
+
*/
|
|
6642
|
+
export interface CanvasRegistryChangedData {
|
|
6643
|
+
/**
|
|
6644
|
+
* Canvas declarations currently available
|
|
6645
|
+
*/
|
|
6646
|
+
canvases: CanvasRegistryChangedCanvas[];
|
|
6647
|
+
}
|
|
6648
|
+
/**
|
|
6649
|
+
* Schema for the `CanvasRegistryChangedCanvas` type.
|
|
6650
|
+
*/
|
|
6651
|
+
export interface CanvasRegistryChangedCanvas {
|
|
6652
|
+
/**
|
|
6653
|
+
* Actions the agent or host may invoke
|
|
6654
|
+
*/
|
|
6655
|
+
actions?: CanvasRegistryChangedCanvasAction[];
|
|
6656
|
+
/**
|
|
6657
|
+
* Provider-local canvas identifier
|
|
6658
|
+
*/
|
|
6659
|
+
canvasId: string;
|
|
6660
|
+
/**
|
|
6661
|
+
* Short, single-sentence description shown to the agent in canvas catalogs.
|
|
6662
|
+
*/
|
|
6663
|
+
description: string;
|
|
6664
|
+
/**
|
|
6665
|
+
* Human-readable canvas name
|
|
6666
|
+
*/
|
|
6667
|
+
displayName: string;
|
|
6668
|
+
/**
|
|
6669
|
+
* Owning provider identifier
|
|
6670
|
+
*/
|
|
6671
|
+
extensionId: string;
|
|
6672
|
+
/**
|
|
6673
|
+
* Owning extension display name, when available
|
|
6674
|
+
*/
|
|
6675
|
+
extensionName?: string;
|
|
6676
|
+
/**
|
|
6677
|
+
* JSON Schema for canvas open input
|
|
6678
|
+
*/
|
|
6679
|
+
inputSchema?: {
|
|
6680
|
+
[k: string]: unknown | undefined;
|
|
6681
|
+
};
|
|
6682
|
+
}
|
|
6683
|
+
/**
|
|
6684
|
+
* Schema for the `CanvasRegistryChangedCanvasAction` type.
|
|
6685
|
+
*/
|
|
6686
|
+
export interface CanvasRegistryChangedCanvasAction {
|
|
6687
|
+
/**
|
|
6688
|
+
* Action description
|
|
6689
|
+
*/
|
|
6690
|
+
description?: string;
|
|
6691
|
+
/**
|
|
6692
|
+
* JSON Schema for action input
|
|
6693
|
+
*/
|
|
6694
|
+
inputSchema?: {
|
|
6695
|
+
[k: string]: unknown | undefined;
|
|
6696
|
+
};
|
|
6697
|
+
/**
|
|
6698
|
+
* Action name
|
|
6699
|
+
*/
|
|
6700
|
+
name: string;
|
|
6701
|
+
}
|
|
6702
|
+
/**
|
|
6703
|
+
* Session event "session.extensions.attachments_pushed".
|
|
6704
|
+
*/
|
|
6705
|
+
export interface ExtensionsAttachmentsPushedEvent {
|
|
6706
|
+
/**
|
|
6707
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
6708
|
+
*/
|
|
6709
|
+
agentId?: string;
|
|
6710
|
+
data: ExtensionsAttachmentsPushedData;
|
|
6711
|
+
/**
|
|
6712
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6713
|
+
*/
|
|
6714
|
+
ephemeral: true;
|
|
6715
|
+
/**
|
|
6716
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
6717
|
+
*/
|
|
6718
|
+
id: string;
|
|
6719
|
+
/**
|
|
6720
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
6721
|
+
*/
|
|
6722
|
+
parentId: string | null;
|
|
6723
|
+
/**
|
|
6724
|
+
* ISO 8601 timestamp when the event was created
|
|
6725
|
+
*/
|
|
6726
|
+
timestamp: string;
|
|
6727
|
+
/**
|
|
6728
|
+
* Type discriminator. Always "session.extensions.attachments_pushed".
|
|
6729
|
+
*/
|
|
6730
|
+
type: "session.extensions.attachments_pushed";
|
|
6731
|
+
}
|
|
6732
|
+
/**
|
|
6733
|
+
* Schema for the `ExtensionsAttachmentsPushedData` type.
|
|
6734
|
+
*/
|
|
6735
|
+
export interface ExtensionsAttachmentsPushedData {
|
|
6736
|
+
/**
|
|
6737
|
+
* Attachments contributed by an extension; the host should surface these as composer pills and forward them via the next session.send call.
|
|
6738
|
+
*/
|
|
6739
|
+
attachments: Attachment[];
|
|
6740
|
+
}
|
|
6741
|
+
/**
|
|
6742
|
+
* Session event "mcp_app.tool_call_complete". MCP App view called a tool on a connected MCP server (SEP-1865)
|
|
6743
|
+
*/
|
|
6744
|
+
export interface McpAppToolCallCompleteEvent {
|
|
6745
|
+
/**
|
|
6746
|
+
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
|
|
6747
|
+
*/
|
|
6748
|
+
agentId?: string;
|
|
6749
|
+
data: McpAppToolCallCompleteData;
|
|
6750
|
+
/**
|
|
6751
|
+
* Always true for events that are transient and not persisted to the session event log on disk.
|
|
6752
|
+
*/
|
|
6753
|
+
ephemeral: true;
|
|
6754
|
+
/**
|
|
6755
|
+
* Unique event identifier (UUID v4), generated when the event is emitted
|
|
6756
|
+
*/
|
|
6757
|
+
id: string;
|
|
6758
|
+
/**
|
|
6759
|
+
* ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
|
|
6760
|
+
*/
|
|
6761
|
+
parentId: string | null;
|
|
6762
|
+
/**
|
|
6763
|
+
* ISO 8601 timestamp when the event was created
|
|
6764
|
+
*/
|
|
6765
|
+
timestamp: string;
|
|
6766
|
+
/**
|
|
6767
|
+
* Type discriminator. Always "mcp_app.tool_call_complete".
|
|
6768
|
+
*/
|
|
6769
|
+
type: "mcp_app.tool_call_complete";
|
|
6770
|
+
}
|
|
6771
|
+
/**
|
|
6772
|
+
* MCP App view called a tool on a connected MCP server (SEP-1865)
|
|
6773
|
+
*/
|
|
6774
|
+
export interface McpAppToolCallCompleteData {
|
|
6775
|
+
/**
|
|
6776
|
+
* Arguments passed to the tool by the app view, if any
|
|
6777
|
+
*/
|
|
6778
|
+
arguments?: {
|
|
6779
|
+
[k: string]: unknown | undefined;
|
|
6780
|
+
};
|
|
6781
|
+
/**
|
|
6782
|
+
* Wall-clock duration of the underlying tools/call in milliseconds
|
|
6783
|
+
*/
|
|
6784
|
+
durationMs: number;
|
|
6785
|
+
error?: McpAppToolCallCompleteError;
|
|
6786
|
+
/**
|
|
6787
|
+
* Standard MCP CallToolResult returned by the server. Present whether or not the call set isError.
|
|
6788
|
+
*/
|
|
6789
|
+
result?: {
|
|
6790
|
+
[k: string]: unknown | undefined;
|
|
6791
|
+
};
|
|
6792
|
+
/**
|
|
6793
|
+
* Name of the MCP server hosting the tool
|
|
6794
|
+
*/
|
|
6795
|
+
serverName: string;
|
|
6796
|
+
/**
|
|
6797
|
+
* True when the call completed without throwing AND the MCP CallToolResult did not set isError
|
|
6798
|
+
*/
|
|
6799
|
+
success: boolean;
|
|
6800
|
+
toolMeta?: McpAppToolCallCompleteToolMeta;
|
|
6801
|
+
/**
|
|
6802
|
+
* MCP tool name that was invoked
|
|
6803
|
+
*/
|
|
6804
|
+
toolName: string;
|
|
6805
|
+
}
|
|
6806
|
+
/**
|
|
6807
|
+
* Set when the underlying tools/call threw an error before returning a CallToolResult
|
|
6808
|
+
*/
|
|
6809
|
+
export interface McpAppToolCallCompleteError {
|
|
6810
|
+
/**
|
|
6811
|
+
* Human-readable error message
|
|
6812
|
+
*/
|
|
6813
|
+
message: string;
|
|
6814
|
+
}
|
|
6815
|
+
/**
|
|
6816
|
+
* The tool's `_meta.ui` block at the time of the call, so consumers can decide whether to forward the result to the model without re-listing tools.
|
|
6817
|
+
*/
|
|
6818
|
+
export interface McpAppToolCallCompleteToolMeta {
|
|
6819
|
+
ui?: McpAppToolCallCompleteToolMetaUI;
|
|
6820
|
+
[k: string]: unknown | undefined;
|
|
6821
|
+
}
|
|
6822
|
+
/**
|
|
6823
|
+
* Schema for the `McpAppToolCallCompleteToolMetaUI` type.
|
|
6824
|
+
*/
|
|
6825
|
+
export interface McpAppToolCallCompleteToolMetaUI {
|
|
6826
|
+
/**
|
|
6827
|
+
* `ui://` URI declared by the tool's `_meta.ui.resourceUri`
|
|
6828
|
+
*/
|
|
6829
|
+
resourceUri?: string;
|
|
6830
|
+
/**
|
|
6831
|
+
* Tool visibility per SEP-1865 (typically a subset of `["model","app"]`)
|
|
6832
|
+
*/
|
|
6833
|
+
visibility?: string[];
|
|
6834
|
+
[k: string]: unknown | undefined;
|
|
6835
|
+
}
|