@codingame/monaco-vscode-xterm-common 31.0.1 → 32.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +154 -90
- package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.js +4 -1
- package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +9 -9
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +82 -19
- package/vscode/src/vs/platform/agentHost/common/state/sessionState.js +5 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.d.ts +12 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.js +52 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.js +55 -10
- package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +61 -61
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +42 -38
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalResizeDebouncer.js +15 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +3 -3
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +0 -1418
- package/vscode/src/vs/platform/agentHost/common/state/protocol/state.js +0 -118
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolCallConfirmationReason, ToolCallCancellationReason, PendingMessageKind, type URI, type StringOrMarkdown, type
|
|
1
|
+
import { ToolCallConfirmationReason, ToolCallCancellationReason, PendingMessageKind, type URI, type StringOrMarkdown, type AgentInfo, type ErrorInfo, type ModelSelection, type UserMessage, type ResponsePart, type ToolCallResult, type ToolResultContent, type ToolDefinition, type SessionActiveClient, type UsageInfo, type SessionCustomization, type FileEdit, type SessionInputAnswer, type SessionInputRequest, type TerminalInfo, type TerminalClaim, type SessionInputResponseKind, type ConfirmationOption } from "@codingame/monaco-vscode-api/vscode/vs/platform/agentHost/common/state/protocol/state";
|
|
2
2
|
/**
|
|
3
3
|
* Discriminant values for all state actions.
|
|
4
4
|
*
|
|
@@ -39,10 +39,13 @@ export declare enum ActionType {
|
|
|
39
39
|
SessionCustomizationToggled = "session/customizationToggled",
|
|
40
40
|
SessionTruncated = "session/truncated",
|
|
41
41
|
SessionIsReadChanged = "session/isReadChanged",
|
|
42
|
-
|
|
42
|
+
SessionIsArchivedChanged = "session/isArchivedChanged",
|
|
43
|
+
SessionActivityChanged = "session/activityChanged",
|
|
43
44
|
SessionDiffsChanged = "session/diffsChanged",
|
|
44
45
|
SessionConfigChanged = "session/configChanged",
|
|
46
|
+
SessionMetaChanged = "session/metaChanged",
|
|
45
47
|
RootTerminalsChanged = "root/terminalsChanged",
|
|
48
|
+
RootConfigChanged = "root/configChanged",
|
|
46
49
|
TerminalData = "terminal/data",
|
|
47
50
|
TerminalInput = "terminal/input",
|
|
48
51
|
TerminalResized = "terminal/resized",
|
|
@@ -58,17 +61,17 @@ export declare enum ActionType {
|
|
|
58
61
|
/**
|
|
59
62
|
* Identifies the client that originally dispatched an action.
|
|
60
63
|
*/
|
|
61
|
-
export interface
|
|
64
|
+
export interface ActionOrigin {
|
|
62
65
|
clientId: string;
|
|
63
66
|
clientSeq: number;
|
|
64
67
|
}
|
|
65
68
|
/**
|
|
66
69
|
* Every action is wrapped in an `ActionEnvelope`.
|
|
67
70
|
*/
|
|
68
|
-
export interface
|
|
69
|
-
readonly action:
|
|
71
|
+
export interface ActionEnvelope {
|
|
72
|
+
readonly action: StateAction;
|
|
70
73
|
readonly serverSeq: number;
|
|
71
|
-
readonly origin:
|
|
74
|
+
readonly origin: ActionOrigin | undefined;
|
|
72
75
|
readonly rejectionReason?: string;
|
|
73
76
|
}
|
|
74
77
|
/**
|
|
@@ -77,7 +80,7 @@ export interface IActionEnvelope {
|
|
|
77
80
|
*
|
|
78
81
|
* @category Session Actions
|
|
79
82
|
*/
|
|
80
|
-
interface
|
|
83
|
+
interface ToolCallActionBase {
|
|
81
84
|
/** Session URI */
|
|
82
85
|
session: URI;
|
|
83
86
|
/** Turn identifier */
|
|
@@ -100,10 +103,10 @@ interface IToolCallActionBase {
|
|
|
100
103
|
* @category Root Actions
|
|
101
104
|
* @version 1
|
|
102
105
|
*/
|
|
103
|
-
export interface
|
|
106
|
+
export interface RootAgentsChangedAction {
|
|
104
107
|
type: ActionType.RootAgentsChanged;
|
|
105
108
|
/** Updated agent list */
|
|
106
|
-
agents:
|
|
109
|
+
agents: AgentInfo[];
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
112
|
* Fired when the number of active sessions changes.
|
|
@@ -111,7 +114,7 @@ export interface IRootAgentsChangedAction {
|
|
|
111
114
|
* @category Root Actions
|
|
112
115
|
* @version 1
|
|
113
116
|
*/
|
|
114
|
-
export interface
|
|
117
|
+
export interface RootActiveSessionsChangedAction {
|
|
115
118
|
type: ActionType.RootActiveSessionsChanged;
|
|
116
119
|
/** Current count of active sessions */
|
|
117
120
|
activeSessions: number;
|
|
@@ -125,10 +128,27 @@ export interface IRootActiveSessionsChangedAction {
|
|
|
125
128
|
* @category Root Actions
|
|
126
129
|
* @version 1
|
|
127
130
|
*/
|
|
128
|
-
export interface
|
|
131
|
+
export interface RootTerminalsChangedAction {
|
|
129
132
|
type: ActionType.RootTerminalsChanged;
|
|
130
133
|
/** Updated terminal list (full replacement) */
|
|
131
|
-
terminals:
|
|
134
|
+
terminals: TerminalInfo[];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Fired when agent-host configuration values change.
|
|
138
|
+
*
|
|
139
|
+
* By default, the reducer merges the new values into `state.config.values`.
|
|
140
|
+
* Set `replace` to `true` to replace all values instead of merging.
|
|
141
|
+
*
|
|
142
|
+
* @category Root Actions
|
|
143
|
+
* @version 1
|
|
144
|
+
* @clientDispatchable
|
|
145
|
+
*/
|
|
146
|
+
export interface RootConfigChangedAction {
|
|
147
|
+
type: ActionType.RootConfigChanged;
|
|
148
|
+
/** Updated config values */
|
|
149
|
+
config: Record<string, unknown>;
|
|
150
|
+
/** When `true`, replaces all config values instead of merging */
|
|
151
|
+
replace?: boolean;
|
|
132
152
|
}
|
|
133
153
|
/**
|
|
134
154
|
* Session backend initialized successfully.
|
|
@@ -136,7 +156,7 @@ export interface IRootTerminalsChangedAction {
|
|
|
136
156
|
* @category Session Actions
|
|
137
157
|
* @version 1
|
|
138
158
|
*/
|
|
139
|
-
export interface
|
|
159
|
+
export interface SessionReadyAction {
|
|
140
160
|
type: ActionType.SessionReady;
|
|
141
161
|
/** Session URI */
|
|
142
162
|
session: URI;
|
|
@@ -147,12 +167,12 @@ export interface ISessionReadyAction {
|
|
|
147
167
|
* @category Session Actions
|
|
148
168
|
* @version 1
|
|
149
169
|
*/
|
|
150
|
-
export interface
|
|
170
|
+
export interface SessionCreationFailedAction {
|
|
151
171
|
type: ActionType.SessionCreationFailed;
|
|
152
172
|
/** Session URI */
|
|
153
173
|
session: URI;
|
|
154
174
|
/** Error details */
|
|
155
|
-
error:
|
|
175
|
+
error: ErrorInfo;
|
|
156
176
|
}
|
|
157
177
|
/**
|
|
158
178
|
* User sent a message; server starts agent processing.
|
|
@@ -161,14 +181,14 @@ export interface ISessionCreationFailedAction {
|
|
|
161
181
|
* @version 1
|
|
162
182
|
* @clientDispatchable
|
|
163
183
|
*/
|
|
164
|
-
export interface
|
|
184
|
+
export interface SessionTurnStartedAction {
|
|
165
185
|
type: ActionType.SessionTurnStarted;
|
|
166
186
|
/** Session URI */
|
|
167
187
|
session: URI;
|
|
168
188
|
/** Turn identifier */
|
|
169
189
|
turnId: string;
|
|
170
190
|
/** User's message */
|
|
171
|
-
userMessage:
|
|
191
|
+
userMessage: UserMessage;
|
|
172
192
|
/** If this turn was auto-started from a queued message, the ID of that message */
|
|
173
193
|
queuedMessageId?: string;
|
|
174
194
|
}
|
|
@@ -181,7 +201,7 @@ export interface ISessionTurnStartedAction {
|
|
|
181
201
|
* @category Session Actions
|
|
182
202
|
* @version 1
|
|
183
203
|
*/
|
|
184
|
-
export interface
|
|
204
|
+
export interface SessionDeltaAction {
|
|
185
205
|
type: ActionType.SessionDelta;
|
|
186
206
|
/** Session URI */
|
|
187
207
|
session: URI;
|
|
@@ -198,14 +218,14 @@ export interface ISessionDeltaAction {
|
|
|
198
218
|
* @category Session Actions
|
|
199
219
|
* @version 1
|
|
200
220
|
*/
|
|
201
|
-
export interface
|
|
221
|
+
export interface SessionResponsePartAction {
|
|
202
222
|
type: ActionType.SessionResponsePart;
|
|
203
223
|
/** Session URI */
|
|
204
224
|
session: URI;
|
|
205
225
|
/** Turn identifier */
|
|
206
226
|
turnId: string;
|
|
207
227
|
/** Response part (markdown or content ref) */
|
|
208
|
-
part:
|
|
228
|
+
part: ResponsePart;
|
|
209
229
|
}
|
|
210
230
|
/**
|
|
211
231
|
* A tool call begins — parameters are streaming from the LM.
|
|
@@ -217,7 +237,7 @@ export interface ISessionResponsePartAction {
|
|
|
217
237
|
* @category Session Actions
|
|
218
238
|
* @version 1
|
|
219
239
|
*/
|
|
220
|
-
export interface
|
|
240
|
+
export interface SessionToolCallStartAction extends ToolCallActionBase {
|
|
221
241
|
type: ActionType.SessionToolCallStart;
|
|
222
242
|
/** Internal tool name (for debugging/logging) */
|
|
223
243
|
toolName: string;
|
|
@@ -235,7 +255,7 @@ export interface ISessionToolCallStartAction extends IToolCallActionBase {
|
|
|
235
255
|
* @category Session Actions
|
|
236
256
|
* @version 1
|
|
237
257
|
*/
|
|
238
|
-
export interface
|
|
258
|
+
export interface SessionToolCallDeltaAction extends ToolCallActionBase {
|
|
239
259
|
type: ActionType.SessionToolCallDelta;
|
|
240
260
|
/** Partial parameter content to append */
|
|
241
261
|
content: string;
|
|
@@ -260,7 +280,7 @@ export interface ISessionToolCallDeltaAction extends IToolCallActionBase {
|
|
|
260
280
|
* @category Session Actions
|
|
261
281
|
* @version 1
|
|
262
282
|
*/
|
|
263
|
-
export interface
|
|
283
|
+
export interface SessionToolCallReadyAction extends ToolCallActionBase {
|
|
264
284
|
type: ActionType.SessionToolCallReady;
|
|
265
285
|
/** Message describing what the tool will do or what confirmation is needed */
|
|
266
286
|
invocationMessage: StringOrMarkdown;
|
|
@@ -270,12 +290,19 @@ export interface ISessionToolCallReadyAction extends IToolCallActionBase {
|
|
|
270
290
|
confirmationTitle?: StringOrMarkdown;
|
|
271
291
|
/** File edits that this tool call will perform, for preview before confirmation */
|
|
272
292
|
edits?: {
|
|
273
|
-
items:
|
|
293
|
+
items: FileEdit[];
|
|
274
294
|
};
|
|
275
295
|
/** Whether the agent host allows the client to edit the tool's input parameters before confirming */
|
|
276
296
|
editable?: boolean;
|
|
277
297
|
/** If set, the tool was auto-confirmed and transitions directly to `running` */
|
|
278
298
|
confirmed?: ToolCallConfirmationReason;
|
|
299
|
+
/**
|
|
300
|
+
* Options the server offers for this confirmation. When present, the client
|
|
301
|
+
* SHOULD render these instead of a plain approve/deny UI. Each option
|
|
302
|
+
* belongs to a {@link ConfirmationOptionGroup} so the client can still
|
|
303
|
+
* categorise the choices.
|
|
304
|
+
*/
|
|
305
|
+
options?: ConfirmationOption[];
|
|
279
306
|
}
|
|
280
307
|
/**
|
|
281
308
|
* Client approves a pending tool call. The tool transitions to `running`.
|
|
@@ -284,7 +311,7 @@ export interface ISessionToolCallReadyAction extends IToolCallActionBase {
|
|
|
284
311
|
* @version 1
|
|
285
312
|
* @clientDispatchable
|
|
286
313
|
*/
|
|
287
|
-
export interface
|
|
314
|
+
export interface SessionToolCallApprovedAction extends ToolCallActionBase {
|
|
288
315
|
type: ActionType.SessionToolCallConfirmed;
|
|
289
316
|
/** The tool call was approved */
|
|
290
317
|
approved: true;
|
|
@@ -292,6 +319,8 @@ export interface ISessionToolCallApprovedAction extends IToolCallActionBase {
|
|
|
292
319
|
confirmed: ToolCallConfirmationReason;
|
|
293
320
|
/** Edited tool input parameters, if the client modified them before confirming */
|
|
294
321
|
editedToolInput?: string;
|
|
322
|
+
/** ID of the selected confirmation option, if the server provided options */
|
|
323
|
+
selectedOptionId?: string;
|
|
295
324
|
}
|
|
296
325
|
/**
|
|
297
326
|
* Client denies a pending tool call. The tool transitions to `cancelled`.
|
|
@@ -303,16 +332,18 @@ export interface ISessionToolCallApprovedAction extends IToolCallActionBase {
|
|
|
303
332
|
* @version 1
|
|
304
333
|
* @clientDispatchable
|
|
305
334
|
*/
|
|
306
|
-
export interface
|
|
335
|
+
export interface SessionToolCallDeniedAction extends ToolCallActionBase {
|
|
307
336
|
type: ActionType.SessionToolCallConfirmed;
|
|
308
337
|
/** The tool call was denied */
|
|
309
338
|
approved: false;
|
|
310
339
|
/** Why the tool was cancelled */
|
|
311
340
|
reason: ToolCallCancellationReason.Denied | ToolCallCancellationReason.Skipped;
|
|
312
341
|
/** What the user suggested doing instead */
|
|
313
|
-
userSuggestion?:
|
|
342
|
+
userSuggestion?: UserMessage;
|
|
314
343
|
/** Optional explanation for the denial */
|
|
315
344
|
reasonMessage?: StringOrMarkdown;
|
|
345
|
+
/** ID of the selected confirmation option, if the server provided options */
|
|
346
|
+
selectedOptionId?: string;
|
|
316
347
|
}
|
|
317
348
|
/**
|
|
318
349
|
* Client confirms or denies a pending tool call.
|
|
@@ -321,7 +352,7 @@ export interface ISessionToolCallDeniedAction extends IToolCallActionBase {
|
|
|
321
352
|
* @version 1
|
|
322
353
|
* @clientDispatchable
|
|
323
354
|
*/
|
|
324
|
-
export type
|
|
355
|
+
export type SessionToolCallConfirmedAction = SessionToolCallApprovedAction | SessionToolCallDeniedAction;
|
|
325
356
|
/**
|
|
326
357
|
* Tool execution finished. Transitions to `completed` or `pending-result-confirmation`
|
|
327
358
|
* if `requiresResultConfirmation` is `true`.
|
|
@@ -338,10 +369,10 @@ export type ISessionToolCallConfirmedAction = ISessionToolCallApprovedAction | I
|
|
|
338
369
|
* @version 1
|
|
339
370
|
* @clientDispatchable
|
|
340
371
|
*/
|
|
341
|
-
export interface
|
|
372
|
+
export interface SessionToolCallCompleteAction extends ToolCallActionBase {
|
|
342
373
|
type: ActionType.SessionToolCallComplete;
|
|
343
374
|
/** Execution result */
|
|
344
|
-
result:
|
|
375
|
+
result: ToolCallResult;
|
|
345
376
|
/** If true, the result requires client approval before finalizing */
|
|
346
377
|
requiresResultConfirmation?: boolean;
|
|
347
378
|
}
|
|
@@ -354,7 +385,7 @@ export interface ISessionToolCallCompleteAction extends IToolCallActionBase {
|
|
|
354
385
|
* @version 1
|
|
355
386
|
* @clientDispatchable
|
|
356
387
|
*/
|
|
357
|
-
export interface
|
|
388
|
+
export interface SessionToolCallResultConfirmedAction extends ToolCallActionBase {
|
|
358
389
|
type: ActionType.SessionToolCallResultConfirmed;
|
|
359
390
|
/** Whether the result was approved */
|
|
360
391
|
approved: boolean;
|
|
@@ -375,10 +406,10 @@ export interface ISessionToolCallResultConfirmedAction extends IToolCallActionBa
|
|
|
375
406
|
* @version 1
|
|
376
407
|
* @clientDispatchable
|
|
377
408
|
*/
|
|
378
|
-
export interface
|
|
409
|
+
export interface SessionToolCallContentChangedAction extends ToolCallActionBase {
|
|
379
410
|
type: ActionType.SessionToolCallContentChanged;
|
|
380
411
|
/** The current partial content for the running tool call */
|
|
381
|
-
content:
|
|
412
|
+
content: ToolResultContent[];
|
|
382
413
|
}
|
|
383
414
|
/**
|
|
384
415
|
* Turn finished — the assistant is idle.
|
|
@@ -386,7 +417,7 @@ export interface ISessionToolCallContentChangedAction extends IToolCallActionBas
|
|
|
386
417
|
* @category Session Actions
|
|
387
418
|
* @version 1
|
|
388
419
|
*/
|
|
389
|
-
export interface
|
|
420
|
+
export interface SessionTurnCompleteAction {
|
|
390
421
|
type: ActionType.SessionTurnComplete;
|
|
391
422
|
/** Session URI */
|
|
392
423
|
session: URI;
|
|
@@ -400,7 +431,7 @@ export interface ISessionTurnCompleteAction {
|
|
|
400
431
|
* @version 1
|
|
401
432
|
* @clientDispatchable
|
|
402
433
|
*/
|
|
403
|
-
export interface
|
|
434
|
+
export interface SessionTurnCancelledAction {
|
|
404
435
|
type: ActionType.SessionTurnCancelled;
|
|
405
436
|
/** Session URI */
|
|
406
437
|
session: URI;
|
|
@@ -413,14 +444,14 @@ export interface ISessionTurnCancelledAction {
|
|
|
413
444
|
* @category Session Actions
|
|
414
445
|
* @version 1
|
|
415
446
|
*/
|
|
416
|
-
export interface
|
|
447
|
+
export interface SessionErrorAction {
|
|
417
448
|
type: ActionType.SessionError;
|
|
418
449
|
/** Session URI */
|
|
419
450
|
session: URI;
|
|
420
451
|
/** Turn identifier */
|
|
421
452
|
turnId: string;
|
|
422
453
|
/** Error details */
|
|
423
|
-
error:
|
|
454
|
+
error: ErrorInfo;
|
|
424
455
|
}
|
|
425
456
|
/**
|
|
426
457
|
* Session title updated. Fired by the server when the title is auto-generated
|
|
@@ -430,7 +461,7 @@ export interface ISessionErrorAction {
|
|
|
430
461
|
* @clientDispatchable
|
|
431
462
|
* @version 1
|
|
432
463
|
*/
|
|
433
|
-
export interface
|
|
464
|
+
export interface SessionTitleChangedAction {
|
|
434
465
|
type: ActionType.SessionTitleChanged;
|
|
435
466
|
/** Session URI */
|
|
436
467
|
session: URI;
|
|
@@ -443,14 +474,14 @@ export interface ISessionTitleChangedAction {
|
|
|
443
474
|
* @category Session Actions
|
|
444
475
|
* @version 1
|
|
445
476
|
*/
|
|
446
|
-
export interface
|
|
477
|
+
export interface SessionUsageAction {
|
|
447
478
|
type: ActionType.SessionUsage;
|
|
448
479
|
/** Session URI */
|
|
449
480
|
session: URI;
|
|
450
481
|
/** Turn identifier */
|
|
451
482
|
turnId: string;
|
|
452
483
|
/** Token usage data */
|
|
453
|
-
usage:
|
|
484
|
+
usage: UsageInfo;
|
|
454
485
|
}
|
|
455
486
|
/**
|
|
456
487
|
* Reasoning/thinking text from the model, appended to a specific reasoning response part.
|
|
@@ -461,7 +492,7 @@ export interface ISessionUsageAction {
|
|
|
461
492
|
* @category Session Actions
|
|
462
493
|
* @version 1
|
|
463
494
|
*/
|
|
464
|
-
export interface
|
|
495
|
+
export interface SessionReasoningAction {
|
|
465
496
|
type: ActionType.SessionReasoning;
|
|
466
497
|
/** Session URI */
|
|
467
498
|
session: URI;
|
|
@@ -479,12 +510,12 @@ export interface ISessionReasoningAction {
|
|
|
479
510
|
* @version 1
|
|
480
511
|
* @clientDispatchable
|
|
481
512
|
*/
|
|
482
|
-
export interface
|
|
513
|
+
export interface SessionModelChangedAction {
|
|
483
514
|
type: ActionType.SessionModelChanged;
|
|
484
515
|
/** Session URI */
|
|
485
516
|
session: URI;
|
|
486
517
|
/** New model selection */
|
|
487
|
-
model:
|
|
518
|
+
model: ModelSelection;
|
|
488
519
|
}
|
|
489
520
|
/**
|
|
490
521
|
* The read state of the session changed.
|
|
@@ -496,7 +527,7 @@ export interface ISessionModelChangedAction {
|
|
|
496
527
|
* @version 1
|
|
497
528
|
* @clientDispatchable
|
|
498
529
|
*/
|
|
499
|
-
export interface
|
|
530
|
+
export interface SessionIsReadChangedAction {
|
|
500
531
|
type: ActionType.SessionIsReadChanged;
|
|
501
532
|
/** Session URI */
|
|
502
533
|
session: URI;
|
|
@@ -504,21 +535,37 @@ export interface ISessionIsReadChangedAction {
|
|
|
504
535
|
isRead: boolean;
|
|
505
536
|
}
|
|
506
537
|
/**
|
|
507
|
-
* The
|
|
538
|
+
* The archived state of the session changed.
|
|
508
539
|
*
|
|
509
|
-
* Dispatched by a client to
|
|
510
|
-
* complete) or to
|
|
540
|
+
* Dispatched by a client to archive a session (e.g. the task is
|
|
541
|
+
* complete) or to unarchive it.
|
|
511
542
|
*
|
|
512
543
|
* @category Session Actions
|
|
513
544
|
* @version 1
|
|
514
545
|
* @clientDispatchable
|
|
515
546
|
*/
|
|
516
|
-
export interface
|
|
517
|
-
type: ActionType.
|
|
547
|
+
export interface SessionIsArchivedChangedAction {
|
|
548
|
+
type: ActionType.SessionIsArchivedChanged;
|
|
518
549
|
/** Session URI */
|
|
519
550
|
session: URI;
|
|
520
|
-
/** Whether the session is
|
|
521
|
-
|
|
551
|
+
/** Whether the session is archived */
|
|
552
|
+
isArchived: boolean;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* The activity description of the session changed.
|
|
556
|
+
*
|
|
557
|
+
* Dispatched by the server to indicate what the session is currently doing
|
|
558
|
+
* (e.g. running a tool, thinking). Clear activity by setting it to `undefined`.
|
|
559
|
+
*
|
|
560
|
+
* @category Session Actions
|
|
561
|
+
* @version 1
|
|
562
|
+
*/
|
|
563
|
+
export interface SessionActivityChangedAction {
|
|
564
|
+
type: ActionType.SessionActivityChanged;
|
|
565
|
+
/** Session URI */
|
|
566
|
+
session: URI;
|
|
567
|
+
/** Human-readable description of current activity, or `undefined` to clear */
|
|
568
|
+
activity: string | undefined;
|
|
522
569
|
}
|
|
523
570
|
/**
|
|
524
571
|
* The file diffs for the session changed.
|
|
@@ -529,12 +576,12 @@ export interface ISessionIsDoneChangedAction {
|
|
|
529
576
|
* @category Session Actions
|
|
530
577
|
* @version 1
|
|
531
578
|
*/
|
|
532
|
-
export interface
|
|
579
|
+
export interface SessionDiffsChangedAction {
|
|
533
580
|
type: ActionType.SessionDiffsChanged;
|
|
534
581
|
/** Session URI */
|
|
535
582
|
session: URI;
|
|
536
583
|
/** Updated file diffs for the session */
|
|
537
|
-
diffs:
|
|
584
|
+
diffs: FileEdit[];
|
|
538
585
|
}
|
|
539
586
|
/**
|
|
540
587
|
* Server tools for this session have changed.
|
|
@@ -544,17 +591,17 @@ export interface ISessionDiffsChangedAction {
|
|
|
544
591
|
* @category Session Actions
|
|
545
592
|
* @version 1
|
|
546
593
|
*/
|
|
547
|
-
export interface
|
|
594
|
+
export interface SessionServerToolsChangedAction {
|
|
548
595
|
type: ActionType.SessionServerToolsChanged;
|
|
549
596
|
/** Session URI */
|
|
550
597
|
session: URI;
|
|
551
598
|
/** Updated server tools list (full replacement) */
|
|
552
|
-
tools:
|
|
599
|
+
tools: ToolDefinition[];
|
|
553
600
|
}
|
|
554
601
|
/**
|
|
555
602
|
* The active client for this session has changed.
|
|
556
603
|
*
|
|
557
|
-
* A client dispatches this action with its own `
|
|
604
|
+
* A client dispatches this action with its own `SessionActiveClient` to claim
|
|
558
605
|
* the active role, or with `null` to release it. The server SHOULD reject if
|
|
559
606
|
* another client is already active. The server SHOULD automatically dispatch
|
|
560
607
|
* this action with `activeClient: null` when the active client disconnects.
|
|
@@ -563,12 +610,12 @@ export interface ISessionServerToolsChangedAction {
|
|
|
563
610
|
* @version 1
|
|
564
611
|
* @clientDispatchable
|
|
565
612
|
*/
|
|
566
|
-
export interface
|
|
613
|
+
export interface SessionActiveClientChangedAction {
|
|
567
614
|
type: ActionType.SessionActiveClientChanged;
|
|
568
615
|
/** Session URI */
|
|
569
616
|
session: URI;
|
|
570
617
|
/** The new active client, or `null` to unset */
|
|
571
|
-
activeClient:
|
|
618
|
+
activeClient: SessionActiveClient | null;
|
|
572
619
|
}
|
|
573
620
|
/**
|
|
574
621
|
* The active client's tool list has changed.
|
|
@@ -581,12 +628,12 @@ export interface ISessionActiveClientChangedAction {
|
|
|
581
628
|
* @version 1
|
|
582
629
|
* @clientDispatchable
|
|
583
630
|
*/
|
|
584
|
-
export interface
|
|
631
|
+
export interface SessionActiveClientToolsChangedAction {
|
|
585
632
|
type: ActionType.SessionActiveClientToolsChanged;
|
|
586
633
|
/** Session URI */
|
|
587
634
|
session: URI;
|
|
588
635
|
/** Updated client tools list (full replacement) */
|
|
589
|
-
tools:
|
|
636
|
+
tools: ToolDefinition[];
|
|
590
637
|
}
|
|
591
638
|
/**
|
|
592
639
|
* The session's customizations have changed.
|
|
@@ -597,12 +644,12 @@ export interface ISessionActiveClientToolsChangedAction {
|
|
|
597
644
|
* @category Session Actions
|
|
598
645
|
* @version 1
|
|
599
646
|
*/
|
|
600
|
-
export interface
|
|
647
|
+
export interface SessionCustomizationsChangedAction {
|
|
601
648
|
type: ActionType.SessionCustomizationsChanged;
|
|
602
649
|
/** Session URI */
|
|
603
650
|
session: URI;
|
|
604
651
|
/** Updated customization list (full replacement) */
|
|
605
|
-
customizations:
|
|
652
|
+
customizations: SessionCustomization[];
|
|
606
653
|
}
|
|
607
654
|
/**
|
|
608
655
|
* A client toggled a customization on or off.
|
|
@@ -614,7 +661,7 @@ export interface ISessionCustomizationsChangedAction {
|
|
|
614
661
|
* @version 1
|
|
615
662
|
* @clientDispatchable
|
|
616
663
|
*/
|
|
617
|
-
export interface
|
|
664
|
+
export interface SessionCustomizationToggledAction {
|
|
618
665
|
type: ActionType.SessionCustomizationToggled;
|
|
619
666
|
/** Session URI */
|
|
620
667
|
session: URI;
|
|
@@ -634,12 +681,29 @@ export interface ISessionCustomizationToggledAction {
|
|
|
634
681
|
* @version 1
|
|
635
682
|
* @clientDispatchable
|
|
636
683
|
*/
|
|
637
|
-
export interface
|
|
684
|
+
export interface SessionConfigChangedAction {
|
|
638
685
|
type: ActionType.SessionConfigChanged;
|
|
639
686
|
/** Session URI */
|
|
640
687
|
session: URI;
|
|
641
|
-
/** Updated config values
|
|
642
|
-
config: Record<string,
|
|
688
|
+
/** Updated config values */
|
|
689
|
+
config: Record<string, unknown>;
|
|
690
|
+
/** When `true`, replaces all config values instead of merging */
|
|
691
|
+
replace?: boolean;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* The session's `_meta` side-channel changed. Replaces `state._meta`
|
|
695
|
+
* entirely (full-replacement semantics). Producers SHOULD merge any
|
|
696
|
+
* keys they wish to preserve into the new value before dispatching.
|
|
697
|
+
*
|
|
698
|
+
* @category Session Actions
|
|
699
|
+
* @version 1
|
|
700
|
+
*/
|
|
701
|
+
export interface SessionMetaChangedAction {
|
|
702
|
+
type: ActionType.SessionMetaChanged;
|
|
703
|
+
/** Session URI */
|
|
704
|
+
session: URI;
|
|
705
|
+
/** New `_meta` payload, or `undefined` to clear it */
|
|
706
|
+
_meta: Record<string, unknown> | undefined;
|
|
643
707
|
}
|
|
644
708
|
/**
|
|
645
709
|
* Truncates a session's history. If `turnId` is provided, all turns after that
|
|
@@ -656,7 +720,7 @@ export interface ISessionConfigChangedAction {
|
|
|
656
720
|
* @version 1
|
|
657
721
|
* @clientDispatchable
|
|
658
722
|
*/
|
|
659
|
-
export interface
|
|
723
|
+
export interface SessionTruncatedAction {
|
|
660
724
|
type: ActionType.SessionTruncated;
|
|
661
725
|
/** Session URI */
|
|
662
726
|
session: URI;
|
|
@@ -676,7 +740,7 @@ export interface ISessionTruncatedAction {
|
|
|
676
740
|
* @version 1
|
|
677
741
|
* @clientDispatchable
|
|
678
742
|
*/
|
|
679
|
-
export interface
|
|
743
|
+
export interface SessionPendingMessageSetAction {
|
|
680
744
|
type: ActionType.SessionPendingMessageSet;
|
|
681
745
|
/** Session URI */
|
|
682
746
|
session: URI;
|
|
@@ -685,7 +749,7 @@ export interface ISessionPendingMessageSetAction {
|
|
|
685
749
|
/** Unique identifier for this pending message */
|
|
686
750
|
id: string;
|
|
687
751
|
/** The message content */
|
|
688
|
-
userMessage:
|
|
752
|
+
userMessage: UserMessage;
|
|
689
753
|
}
|
|
690
754
|
/**
|
|
691
755
|
* A pending message was removed (steering or queued).
|
|
@@ -698,7 +762,7 @@ export interface ISessionPendingMessageSetAction {
|
|
|
698
762
|
* @version 1
|
|
699
763
|
* @clientDispatchable
|
|
700
764
|
*/
|
|
701
|
-
export interface
|
|
765
|
+
export interface SessionPendingMessageRemovedAction {
|
|
702
766
|
type: ActionType.SessionPendingMessageRemoved;
|
|
703
767
|
/** Session URI */
|
|
704
768
|
session: URI;
|
|
@@ -720,7 +784,7 @@ export interface ISessionPendingMessageRemovedAction {
|
|
|
720
784
|
* @version 1
|
|
721
785
|
* @clientDispatchable
|
|
722
786
|
*/
|
|
723
|
-
export interface
|
|
787
|
+
export interface SessionQueuedMessagesReorderedAction {
|
|
724
788
|
type: ActionType.SessionQueuedMessagesReordered;
|
|
725
789
|
/** Session URI */
|
|
726
790
|
session: URI;
|
|
@@ -737,12 +801,12 @@ export interface ISessionQueuedMessagesReorderedAction {
|
|
|
737
801
|
* @category Session Actions
|
|
738
802
|
* @version 1
|
|
739
803
|
*/
|
|
740
|
-
export interface
|
|
804
|
+
export interface SessionInputRequestedAction {
|
|
741
805
|
type: ActionType.SessionInputRequested;
|
|
742
806
|
/** Session URI */
|
|
743
807
|
session: URI;
|
|
744
808
|
/** Input request to create or replace */
|
|
745
|
-
request:
|
|
809
|
+
request: SessionInputRequest;
|
|
746
810
|
}
|
|
747
811
|
/**
|
|
748
812
|
* A client updated, submitted, skipped, or removed a single in-progress answer.
|
|
@@ -753,7 +817,7 @@ export interface ISessionInputRequestedAction {
|
|
|
753
817
|
* @version 1
|
|
754
818
|
* @clientDispatchable
|
|
755
819
|
*/
|
|
756
|
-
export interface
|
|
820
|
+
export interface SessionInputAnswerChangedAction {
|
|
757
821
|
type: ActionType.SessionInputAnswerChanged;
|
|
758
822
|
/** Session URI */
|
|
759
823
|
session: URI;
|
|
@@ -762,7 +826,7 @@ export interface ISessionInputAnswerChangedAction {
|
|
|
762
826
|
/** Question identifier within the input request */
|
|
763
827
|
questionId: string;
|
|
764
828
|
/** Updated answer, or `undefined` to clear an answer draft */
|
|
765
|
-
answer?:
|
|
829
|
+
answer?: SessionInputAnswer;
|
|
766
830
|
}
|
|
767
831
|
/**
|
|
768
832
|
* A client accepted, declined, or cancelled a session input request.
|
|
@@ -774,7 +838,7 @@ export interface ISessionInputAnswerChangedAction {
|
|
|
774
838
|
* @version 1
|
|
775
839
|
* @clientDispatchable
|
|
776
840
|
*/
|
|
777
|
-
export interface
|
|
841
|
+
export interface SessionInputCompletedAction {
|
|
778
842
|
type: ActionType.SessionInputCompleted;
|
|
779
843
|
/** Session URI */
|
|
780
844
|
session: URI;
|
|
@@ -783,7 +847,7 @@ export interface ISessionInputCompletedAction {
|
|
|
783
847
|
/** Completion outcome */
|
|
784
848
|
response: SessionInputResponseKind;
|
|
785
849
|
/** Optional final answer replacement, keyed by question ID */
|
|
786
|
-
answers?: Record<string,
|
|
850
|
+
answers?: Record<string, SessionInputAnswer>;
|
|
787
851
|
}
|
|
788
852
|
/**
|
|
789
853
|
* Terminal output data (pty → client direction).
|
|
@@ -800,7 +864,7 @@ export interface ISessionInputCompletedAction {
|
|
|
800
864
|
* @category Terminal Actions
|
|
801
865
|
* @version 1
|
|
802
866
|
*/
|
|
803
|
-
export interface
|
|
867
|
+
export interface TerminalDataAction {
|
|
804
868
|
type: ActionType.TerminalData;
|
|
805
869
|
/** Terminal URI */
|
|
806
870
|
terminal: URI;
|
|
@@ -820,7 +884,7 @@ export interface ITerminalDataAction {
|
|
|
820
884
|
* @version 1
|
|
821
885
|
* @clientDispatchable
|
|
822
886
|
*/
|
|
823
|
-
export interface
|
|
887
|
+
export interface TerminalInputAction {
|
|
824
888
|
type: ActionType.TerminalInput;
|
|
825
889
|
/** Terminal URI */
|
|
826
890
|
terminal: URI;
|
|
@@ -837,7 +901,7 @@ export interface ITerminalInputAction {
|
|
|
837
901
|
* @version 1
|
|
838
902
|
* @clientDispatchable
|
|
839
903
|
*/
|
|
840
|
-
export interface
|
|
904
|
+
export interface TerminalResizedAction {
|
|
841
905
|
type: ActionType.TerminalResized;
|
|
842
906
|
/** Terminal URI */
|
|
843
907
|
terminal: URI;
|
|
@@ -856,12 +920,12 @@ export interface ITerminalResizedAction {
|
|
|
856
920
|
* @version 1
|
|
857
921
|
* @clientDispatchable
|
|
858
922
|
*/
|
|
859
|
-
export interface
|
|
923
|
+
export interface TerminalClaimedAction {
|
|
860
924
|
type: ActionType.TerminalClaimed;
|
|
861
925
|
/** Terminal URI */
|
|
862
926
|
terminal: URI;
|
|
863
927
|
/** The new claim */
|
|
864
|
-
claim:
|
|
928
|
+
claim: TerminalClaim;
|
|
865
929
|
}
|
|
866
930
|
/**
|
|
867
931
|
* Terminal title changed.
|
|
@@ -873,7 +937,7 @@ export interface ITerminalClaimedAction {
|
|
|
873
937
|
* @version 1
|
|
874
938
|
* @clientDispatchable
|
|
875
939
|
*/
|
|
876
|
-
export interface
|
|
940
|
+
export interface TerminalTitleChangedAction {
|
|
877
941
|
type: ActionType.TerminalTitleChanged;
|
|
878
942
|
/** Terminal URI */
|
|
879
943
|
terminal: URI;
|
|
@@ -886,7 +950,7 @@ export interface ITerminalTitleChangedAction {
|
|
|
886
950
|
* @category Terminal Actions
|
|
887
951
|
* @version 1
|
|
888
952
|
*/
|
|
889
|
-
export interface
|
|
953
|
+
export interface TerminalCwdChangedAction {
|
|
890
954
|
type: ActionType.TerminalCwdChanged;
|
|
891
955
|
/** Terminal URI */
|
|
892
956
|
terminal: URI;
|
|
@@ -899,7 +963,7 @@ export interface ITerminalCwdChangedAction {
|
|
|
899
963
|
* @category Terminal Actions
|
|
900
964
|
* @version 1
|
|
901
965
|
*/
|
|
902
|
-
export interface
|
|
966
|
+
export interface TerminalExitedAction {
|
|
903
967
|
type: ActionType.TerminalExited;
|
|
904
968
|
/** Terminal URI */
|
|
905
969
|
terminal: URI;
|
|
@@ -913,7 +977,7 @@ export interface ITerminalExitedAction {
|
|
|
913
977
|
* @version 1
|
|
914
978
|
* @clientDispatchable
|
|
915
979
|
*/
|
|
916
|
-
export interface
|
|
980
|
+
export interface TerminalClearedAction {
|
|
917
981
|
type: ActionType.TerminalCleared;
|
|
918
982
|
/** Terminal URI */
|
|
919
983
|
terminal: URI;
|
|
@@ -929,7 +993,7 @@ export interface ITerminalClearedAction {
|
|
|
929
993
|
* @category Terminal Actions
|
|
930
994
|
* @version 1
|
|
931
995
|
*/
|
|
932
|
-
export interface
|
|
996
|
+
export interface TerminalCommandDetectionAvailableAction {
|
|
933
997
|
type: ActionType.TerminalCommandDetectionAvailable;
|
|
934
998
|
/** Terminal URI */
|
|
935
999
|
terminal: URI;
|
|
@@ -942,7 +1006,7 @@ export interface ITerminalCommandDetectionAvailableAction {
|
|
|
942
1006
|
* @category Terminal Actions
|
|
943
1007
|
* @version 1
|
|
944
1008
|
*/
|
|
945
|
-
export interface
|
|
1009
|
+
export interface TerminalCommandExecutedAction {
|
|
946
1010
|
type: ActionType.TerminalCommandExecuted;
|
|
947
1011
|
/** Terminal URI */
|
|
948
1012
|
terminal: URI;
|
|
@@ -969,7 +1033,7 @@ export interface ITerminalCommandExecutedAction {
|
|
|
969
1033
|
* @category Terminal Actions
|
|
970
1034
|
* @version 1
|
|
971
1035
|
*/
|
|
972
|
-
export interface
|
|
1036
|
+
export interface TerminalCommandFinishedAction {
|
|
973
1037
|
type: ActionType.TerminalCommandFinished;
|
|
974
1038
|
/** Terminal URI */
|
|
975
1039
|
terminal: URI;
|
|
@@ -986,5 +1050,5 @@ export interface ITerminalCommandFinishedAction {
|
|
|
986
1050
|
/**
|
|
987
1051
|
* Discriminated union of all state actions.
|
|
988
1052
|
*/
|
|
989
|
-
export type
|
|
1053
|
+
export type StateAction = RootAgentsChangedAction | RootActiveSessionsChangedAction | RootTerminalsChangedAction | RootConfigChangedAction | SessionReadyAction | SessionCreationFailedAction | SessionTurnStartedAction | SessionDeltaAction | SessionResponsePartAction | SessionToolCallStartAction | SessionToolCallDeltaAction | SessionToolCallReadyAction | SessionToolCallConfirmedAction | SessionToolCallCompleteAction | SessionToolCallResultConfirmedAction | SessionToolCallContentChangedAction | SessionTurnCompleteAction | SessionTurnCancelledAction | SessionErrorAction | SessionTitleChangedAction | SessionUsageAction | SessionReasoningAction | SessionModelChangedAction | SessionServerToolsChangedAction | SessionActiveClientChangedAction | SessionActiveClientToolsChangedAction | SessionPendingMessageSetAction | SessionPendingMessageRemovedAction | SessionQueuedMessagesReorderedAction | SessionInputRequestedAction | SessionInputAnswerChangedAction | SessionInputCompletedAction | SessionCustomizationsChangedAction | SessionCustomizationToggledAction | SessionTruncatedAction | SessionIsReadChangedAction | SessionIsArchivedChangedAction | SessionActivityChangedAction | SessionDiffsChangedAction | SessionConfigChangedAction | SessionMetaChangedAction | TerminalDataAction | TerminalInputAction | TerminalResizedAction | TerminalClaimedAction | TerminalTitleChangedAction | TerminalCwdChangedAction | TerminalExitedAction | TerminalClearedAction | TerminalCommandDetectionAvailableAction | TerminalCommandExecutedAction | TerminalCommandFinishedAction;
|
|
990
1054
|
export {};
|