@deepseek-ai/dsh-api-terminal-controller 0.1.6-alpha.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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +93 -0
- package/README.zh.md +93 -0
- package/lib/client.js +677 -0
- package/lib/index.js +844 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +1131 -0
- package/lib/typert.remote-client.d.ts +49 -0
- package/lib/typert.remote-client.js +529 -0
- package/lib/types/client/close-requests.d.ts +31 -0
- package/lib/types/client/close-requests.js +75 -0
- package/lib/types/client/index.d.ts +88 -0
- package/lib/types/client/index.js +157 -0
- package/lib/types/client/model.d.ts +119 -0
- package/lib/types/client/model.js +323 -0
- package/lib/types/client/shell-preference.d.ts +11 -0
- package/lib/types/client/shell-preference.js +26 -0
- package/lib/types/index.d.ts +135 -0
- package/lib/types/index.js +371 -0
- package/lib/types/shells.d.ts +21 -0
- package/lib/types/shells.js +54 -0
- package/lib/types/stream.d.ts +29 -0
- package/lib/types/stream.js +78 -0
- package/lib/types/terminal.d.ts +61 -0
- package/lib/types/terminal.js +168 -0
- package/lib/types/types.d.ts +69 -0
- package/lib/types/types.js +2 -0
- package/package.json +93 -0
|
@@ -0,0 +1,1131 @@
|
|
|
1
|
+
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
5
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
6
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema = z.void()
|
|
7
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
8
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema = z.object({
|
|
9
|
+
'shellPath': z.string().readonly().optional(),
|
|
10
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
11
|
+
'cols': z.number().readonly(),
|
|
12
|
+
'rows': z.number().readonly(),
|
|
13
|
+
})
|
|
14
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema = z.object({
|
|
15
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
16
|
+
'title': z.string().readonly(),
|
|
17
|
+
'shell': z.object({
|
|
18
|
+
'path': z.string().readonly(),
|
|
19
|
+
'args': z.array(z.string()).readonly(),
|
|
20
|
+
'name': z.string().readonly(),
|
|
21
|
+
}).readonly(),
|
|
22
|
+
'cwd': z.string().readonly(),
|
|
23
|
+
'cols': z.number().readonly(),
|
|
24
|
+
'rows': z.number().readonly(),
|
|
25
|
+
'state': z.union([z.literal("running"), z.literal("failed"), z.literal("exited")]).readonly(),
|
|
26
|
+
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
27
|
+
'error': z.string().readonly().optional(),
|
|
28
|
+
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
29
|
+
})
|
|
30
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
31
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema = z.object({
|
|
32
|
+
'cwd': z.string().readonly(),
|
|
33
|
+
'maxInputBytes': z.number().readonly(),
|
|
34
|
+
'maxCols': z.number().readonly(),
|
|
35
|
+
'maxRows': z.number().readonly(),
|
|
36
|
+
'scrollback': z.number().readonly(),
|
|
37
|
+
})
|
|
38
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
39
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
40
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema = z.intersection(z.string(), z.unknown())
|
|
41
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema = z.union([z.object({
|
|
42
|
+
'type': z.literal("snapshot").readonly(),
|
|
43
|
+
'sequence': z.number().readonly(),
|
|
44
|
+
'screen': z.string().readonly(),
|
|
45
|
+
'info': z.object({
|
|
46
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
47
|
+
'title': z.string().readonly(),
|
|
48
|
+
'shell': z.object({
|
|
49
|
+
'path': z.string().readonly(),
|
|
50
|
+
'args': z.array(z.string()).readonly(),
|
|
51
|
+
'name': z.string().readonly(),
|
|
52
|
+
}).readonly(),
|
|
53
|
+
'cwd': z.string().readonly(),
|
|
54
|
+
'cols': z.number().readonly(),
|
|
55
|
+
'rows': z.number().readonly(),
|
|
56
|
+
'state': z.union([z.literal("running"), z.literal("failed"), z.literal("exited")]).readonly(),
|
|
57
|
+
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
58
|
+
'error': z.string().readonly().optional(),
|
|
59
|
+
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
60
|
+
}).readonly(),
|
|
61
|
+
}), z.object({
|
|
62
|
+
'type': z.literal("output").readonly(),
|
|
63
|
+
'sequence': z.number().readonly(),
|
|
64
|
+
'data': z.string().readonly(),
|
|
65
|
+
}), z.object({
|
|
66
|
+
'type': z.literal("state").readonly(),
|
|
67
|
+
'info': z.object({
|
|
68
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
69
|
+
'title': z.string().readonly(),
|
|
70
|
+
'shell': z.object({
|
|
71
|
+
'path': z.string().readonly(),
|
|
72
|
+
'args': z.array(z.string()).readonly(),
|
|
73
|
+
'name': z.string().readonly(),
|
|
74
|
+
}).readonly(),
|
|
75
|
+
'cwd': z.string().readonly(),
|
|
76
|
+
'cols': z.number().readonly(),
|
|
77
|
+
'rows': z.number().readonly(),
|
|
78
|
+
'state': z.union([z.literal("running"), z.literal("failed"), z.literal("exited")]).readonly(),
|
|
79
|
+
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
80
|
+
'error': z.string().readonly().optional(),
|
|
81
|
+
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
82
|
+
}).readonly(),
|
|
83
|
+
})])
|
|
84
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
85
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema = z.array(z.object({
|
|
86
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
87
|
+
'title': z.string().readonly(),
|
|
88
|
+
'shell': z.object({
|
|
89
|
+
'path': z.string().readonly(),
|
|
90
|
+
'args': z.array(z.string()).readonly(),
|
|
91
|
+
'name': z.string().readonly(),
|
|
92
|
+
}).readonly(),
|
|
93
|
+
'cwd': z.string().readonly(),
|
|
94
|
+
'cols': z.number().readonly(),
|
|
95
|
+
'rows': z.number().readonly(),
|
|
96
|
+
'state': z.union([z.literal("running"), z.literal("failed"), z.literal("exited")]).readonly(),
|
|
97
|
+
'exitCode': z.union([z.literal(null), z.number()]).readonly(),
|
|
98
|
+
'error': z.string().readonly().optional(),
|
|
99
|
+
'controllerId': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
100
|
+
}))
|
|
101
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
102
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
103
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema = z.string()
|
|
104
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema = z.void()
|
|
105
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
106
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
107
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema = z.intersection(z.string(), z.unknown())
|
|
108
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema = z.number()
|
|
109
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema = z.number()
|
|
110
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema = z.void()
|
|
111
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
112
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema = z.array(z.object({
|
|
113
|
+
'path': z.string().readonly(),
|
|
114
|
+
'args': z.array(z.string()).readonly(),
|
|
115
|
+
'name': z.string().readonly(),
|
|
116
|
+
}))
|
|
117
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
118
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
119
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema = z.intersection(z.string(), z.unknown())
|
|
120
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema = z.string()
|
|
121
|
+
const _deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema = z.void()
|
|
122
|
+
|
|
123
|
+
export const TYPERT = {
|
|
124
|
+
package: '@deepseek-ai/dsh-api-terminal-controller',
|
|
125
|
+
face: 'host',
|
|
126
|
+
schemas: [
|
|
127
|
+
],
|
|
128
|
+
invocations: [
|
|
129
|
+
{
|
|
130
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/close',
|
|
131
|
+
service: 'terminalController',
|
|
132
|
+
namespace: 'terminal',
|
|
133
|
+
method: 'close',
|
|
134
|
+
invocation: { kind: 'direct' },
|
|
135
|
+
scope: {
|
|
136
|
+
context: 'agent',
|
|
137
|
+
wire: 'agentId',
|
|
138
|
+
},
|
|
139
|
+
parameters: [
|
|
140
|
+
{
|
|
141
|
+
name: 'agent',
|
|
142
|
+
wire: 'agentId',
|
|
143
|
+
source: 'lookup',
|
|
144
|
+
lookup: 'agent',
|
|
145
|
+
codec: {
|
|
146
|
+
mode: 'strict',
|
|
147
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
148
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_0$schema,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'id',
|
|
153
|
+
wire: 'id',
|
|
154
|
+
source: 'json',
|
|
155
|
+
codec: {
|
|
156
|
+
mode: 'strict',
|
|
157
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
158
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_close_parameter_1$schema,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
result: {
|
|
163
|
+
mode: 'strict',
|
|
164
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/close:result',
|
|
165
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_close_result$schema,
|
|
166
|
+
},
|
|
167
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":247,"column":9},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/create',
|
|
171
|
+
service: 'terminalController',
|
|
172
|
+
namespace: 'terminal',
|
|
173
|
+
method: 'create',
|
|
174
|
+
invocation: { kind: 'direct' },
|
|
175
|
+
scope: {
|
|
176
|
+
context: 'agent',
|
|
177
|
+
wire: 'agentId',
|
|
178
|
+
},
|
|
179
|
+
parameters: [
|
|
180
|
+
{
|
|
181
|
+
name: 'agent',
|
|
182
|
+
wire: 'agentId',
|
|
183
|
+
source: 'lookup',
|
|
184
|
+
lookup: 'agent',
|
|
185
|
+
codec: {
|
|
186
|
+
mode: 'strict',
|
|
187
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
188
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_0$schema,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'request',
|
|
193
|
+
wire: 'request',
|
|
194
|
+
source: 'json',
|
|
195
|
+
codec: {
|
|
196
|
+
mode: 'strict',
|
|
197
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalCreateRequest',
|
|
198
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_create_parameter_1$schema,
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
cancellation: { parameter: 'signal' },
|
|
203
|
+
result: {
|
|
204
|
+
mode: 'strict',
|
|
205
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalInfo',
|
|
206
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_create_result$schema,
|
|
207
|
+
},
|
|
208
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":155,"column":9},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/environment',
|
|
212
|
+
service: 'terminalController',
|
|
213
|
+
namespace: 'terminal',
|
|
214
|
+
method: 'environment',
|
|
215
|
+
invocation: { kind: 'direct' },
|
|
216
|
+
scope: {
|
|
217
|
+
context: 'agent',
|
|
218
|
+
wire: 'agentId',
|
|
219
|
+
},
|
|
220
|
+
parameters: [
|
|
221
|
+
{
|
|
222
|
+
name: 'agent',
|
|
223
|
+
wire: 'agentId',
|
|
224
|
+
source: 'lookup',
|
|
225
|
+
lookup: 'agent',
|
|
226
|
+
codec: {
|
|
227
|
+
mode: 'strict',
|
|
228
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
229
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_environment_parameter_0$schema,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
cancellation: { parameter: 'signal' },
|
|
234
|
+
result: {
|
|
235
|
+
mode: 'strict',
|
|
236
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalEnvironment',
|
|
237
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_environment_result$schema,
|
|
238
|
+
},
|
|
239
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":115,"column":3},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/follow',
|
|
243
|
+
service: 'terminalController',
|
|
244
|
+
namespace: 'terminal',
|
|
245
|
+
method: 'follow',
|
|
246
|
+
mode: 'stream',
|
|
247
|
+
invocation: { kind: 'direct' },
|
|
248
|
+
scope: {
|
|
249
|
+
context: 'agent',
|
|
250
|
+
wire: 'agentId',
|
|
251
|
+
},
|
|
252
|
+
parameters: [
|
|
253
|
+
{
|
|
254
|
+
name: 'agent',
|
|
255
|
+
wire: 'agentId',
|
|
256
|
+
source: 'lookup',
|
|
257
|
+
lookup: 'agent',
|
|
258
|
+
codec: {
|
|
259
|
+
mode: 'strict',
|
|
260
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
261
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_0$schema,
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'id',
|
|
266
|
+
wire: 'id',
|
|
267
|
+
source: 'json',
|
|
268
|
+
codec: {
|
|
269
|
+
mode: 'strict',
|
|
270
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
271
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_1$schema,
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'attachmentId',
|
|
276
|
+
wire: 'attachmentId',
|
|
277
|
+
source: 'json',
|
|
278
|
+
codec: {
|
|
279
|
+
mode: 'strict',
|
|
280
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
281
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_parameter_2$schema,
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
cancellation: { parameter: 'signal' },
|
|
286
|
+
result: {
|
|
287
|
+
mode: 'strict',
|
|
288
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalFrame',
|
|
289
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_follow_result$schema,
|
|
290
|
+
},
|
|
291
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":194,"column":3},
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/list',
|
|
295
|
+
service: 'terminalController',
|
|
296
|
+
namespace: 'terminal',
|
|
297
|
+
method: 'list',
|
|
298
|
+
invocation: { kind: 'direct' },
|
|
299
|
+
parameters: [
|
|
300
|
+
{
|
|
301
|
+
name: 'sessionId',
|
|
302
|
+
wire: 'sessionId',
|
|
303
|
+
source: 'json',
|
|
304
|
+
codec: {
|
|
305
|
+
mode: 'strict',
|
|
306
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
307
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_list_parameter_0$schema,
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
result: {
|
|
312
|
+
mode: 'strict',
|
|
313
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/list:result',
|
|
314
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_list_result$schema,
|
|
315
|
+
},
|
|
316
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":141,"column":3},
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename',
|
|
320
|
+
service: 'terminalController',
|
|
321
|
+
namespace: 'terminal',
|
|
322
|
+
method: 'rename',
|
|
323
|
+
invocation: { kind: 'direct' },
|
|
324
|
+
scope: {
|
|
325
|
+
context: 'agent',
|
|
326
|
+
wire: 'agentId',
|
|
327
|
+
},
|
|
328
|
+
parameters: [
|
|
329
|
+
{
|
|
330
|
+
name: 'agent',
|
|
331
|
+
wire: 'agentId',
|
|
332
|
+
source: 'lookup',
|
|
333
|
+
lookup: 'agent',
|
|
334
|
+
codec: {
|
|
335
|
+
mode: 'strict',
|
|
336
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
337
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_0$schema,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: 'id',
|
|
342
|
+
wire: 'id',
|
|
343
|
+
source: 'json',
|
|
344
|
+
codec: {
|
|
345
|
+
mode: 'strict',
|
|
346
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
347
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_1$schema,
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: 'title',
|
|
352
|
+
wire: 'title',
|
|
353
|
+
source: 'json',
|
|
354
|
+
codec: {
|
|
355
|
+
mode: 'strict',
|
|
356
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename:title',
|
|
357
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_parameter_2$schema,
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
result: {
|
|
362
|
+
mode: 'strict',
|
|
363
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/rename:result',
|
|
364
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_rename_result$schema,
|
|
365
|
+
},
|
|
366
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":235,"column":3},
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize',
|
|
370
|
+
service: 'terminalController',
|
|
371
|
+
namespace: 'terminal',
|
|
372
|
+
method: 'resize',
|
|
373
|
+
invocation: { kind: 'direct' },
|
|
374
|
+
scope: {
|
|
375
|
+
context: 'agent',
|
|
376
|
+
wire: 'agentId',
|
|
377
|
+
},
|
|
378
|
+
parameters: [
|
|
379
|
+
{
|
|
380
|
+
name: 'agent',
|
|
381
|
+
wire: 'agentId',
|
|
382
|
+
source: 'lookup',
|
|
383
|
+
lookup: 'agent',
|
|
384
|
+
codec: {
|
|
385
|
+
mode: 'strict',
|
|
386
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
387
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_0$schema,
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: 'id',
|
|
392
|
+
wire: 'id',
|
|
393
|
+
source: 'json',
|
|
394
|
+
codec: {
|
|
395
|
+
mode: 'strict',
|
|
396
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
397
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_1$schema,
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: 'attachmentId',
|
|
402
|
+
wire: 'attachmentId',
|
|
403
|
+
source: 'json',
|
|
404
|
+
codec: {
|
|
405
|
+
mode: 'strict',
|
|
406
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
407
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_2$schema,
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: 'cols',
|
|
412
|
+
wire: 'cols',
|
|
413
|
+
source: 'json',
|
|
414
|
+
codec: {
|
|
415
|
+
mode: 'strict',
|
|
416
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:cols',
|
|
417
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_3$schema,
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
name: 'rows',
|
|
422
|
+
wire: 'rows',
|
|
423
|
+
source: 'json',
|
|
424
|
+
codec: {
|
|
425
|
+
mode: 'strict',
|
|
426
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:rows',
|
|
427
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_parameter_4$schema,
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
result: {
|
|
432
|
+
mode: 'strict',
|
|
433
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/resize:result',
|
|
434
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_resize_result$schema,
|
|
435
|
+
},
|
|
436
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":223,"column":9},
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/shells',
|
|
440
|
+
service: 'terminalController',
|
|
441
|
+
namespace: 'terminal',
|
|
442
|
+
method: 'shells',
|
|
443
|
+
invocation: { kind: 'direct' },
|
|
444
|
+
scope: {
|
|
445
|
+
context: 'agent',
|
|
446
|
+
wire: 'agentId',
|
|
447
|
+
},
|
|
448
|
+
parameters: [
|
|
449
|
+
{
|
|
450
|
+
name: 'agent',
|
|
451
|
+
wire: 'agentId',
|
|
452
|
+
source: 'lookup',
|
|
453
|
+
lookup: 'agent',
|
|
454
|
+
codec: {
|
|
455
|
+
mode: 'strict',
|
|
456
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
457
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_shells_parameter_0$schema,
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
cancellation: { parameter: 'signal' },
|
|
462
|
+
result: {
|
|
463
|
+
mode: 'strict',
|
|
464
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/shells:result',
|
|
465
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_shells_result$schema,
|
|
466
|
+
},
|
|
467
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":130,"column":3},
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
id: '@deepseek-ai/dsh-api-terminal-controller#terminal/write',
|
|
471
|
+
service: 'terminalController',
|
|
472
|
+
namespace: 'terminal',
|
|
473
|
+
method: 'write',
|
|
474
|
+
invocation: { kind: 'direct' },
|
|
475
|
+
scope: {
|
|
476
|
+
context: 'agent',
|
|
477
|
+
wire: 'agentId',
|
|
478
|
+
},
|
|
479
|
+
parameters: [
|
|
480
|
+
{
|
|
481
|
+
name: 'agent',
|
|
482
|
+
wire: 'agentId',
|
|
483
|
+
source: 'lookup',
|
|
484
|
+
lookup: 'agent',
|
|
485
|
+
codec: {
|
|
486
|
+
mode: 'strict',
|
|
487
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
488
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_0$schema,
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
name: 'id',
|
|
493
|
+
wire: 'id',
|
|
494
|
+
source: 'json',
|
|
495
|
+
codec: {
|
|
496
|
+
mode: 'strict',
|
|
497
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#WebTerminalId',
|
|
498
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_1$schema,
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
name: 'attachmentId',
|
|
503
|
+
wire: 'attachmentId',
|
|
504
|
+
source: 'json',
|
|
505
|
+
codec: {
|
|
506
|
+
mode: 'strict',
|
|
507
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller/types#TerminalAttachmentId',
|
|
508
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_2$schema,
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
name: 'data',
|
|
513
|
+
wire: 'data',
|
|
514
|
+
source: 'json',
|
|
515
|
+
codec: {
|
|
516
|
+
mode: 'strict',
|
|
517
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/write:data',
|
|
518
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_write_parameter_3$schema,
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
],
|
|
522
|
+
result: {
|
|
523
|
+
mode: 'strict',
|
|
524
|
+
typeSymbol: '@deepseek-ai/dsh-api-terminal-controller#terminal/write:result',
|
|
525
|
+
schema: _deepseek_ai_dsh_api_terminal_controller_terminal_write_result$schema,
|
|
526
|
+
},
|
|
527
|
+
sourceLocation: {"file":"packages/api/terminal-controller/src/index.ts","line":208,"column":9},
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
model: {
|
|
531
|
+
"services": [
|
|
532
|
+
{
|
|
533
|
+
"description": "Typed Remote control of transient Session-owned terminal processes.",
|
|
534
|
+
"summary": "Typed Remote control of transient Session-owned terminal processes.",
|
|
535
|
+
"tags": [],
|
|
536
|
+
"jsDoc": "/** Typed Remote control of transient Session-owned terminal processes. */",
|
|
537
|
+
"key": "terminalController",
|
|
538
|
+
"exportName": "TerminalController",
|
|
539
|
+
"members": [
|
|
540
|
+
{
|
|
541
|
+
"kind": "method",
|
|
542
|
+
"name": "environment",
|
|
543
|
+
"signature": "@Remote environment(agent: Agent, signal: AbortSignal): TerminalEnvironment",
|
|
544
|
+
"summary": "Read the Session working directory and terminal limits without resolving a shell.",
|
|
545
|
+
"jsDoc": "/**\n * Read the Session working directory and terminal limits without resolving a shell.\n * @param agent - Session owner supplied by the Gateway.\n * @param signal - request cancellation.\n * @returns the Session workspace directory and terminal limits.\n */"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"kind": "method",
|
|
549
|
+
"name": "shells",
|
|
550
|
+
"signature": "@Remote shells(agent: Agent, signal: AbortSignal): Promise<TerminalShell[]>",
|
|
551
|
+
"summary": "Discover installed shells in the Session's execution environment.",
|
|
552
|
+
"jsDoc": "/**\n * Discover installed shells in the Session's execution environment.\n * @param agent - Session owner supplied by the Gateway.\n * @param signal - request cancellation.\n * @returns verified profiles, with the configured or system default first.\n */"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"kind": "method",
|
|
556
|
+
"name": "list",
|
|
557
|
+
"signature": "@Remote list(sessionId: SessionId): WebTerminalInfo[]",
|
|
558
|
+
"summary": "List retained terminals without resolving or activating an Agent.",
|
|
559
|
+
"jsDoc": "/**\n * List retained terminals without resolving or activating an Agent.\n * @param sessionId - displayed Session identity, including offline history.\n * @returns terminals retained for this Host lifetime.\n */"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"kind": "method",
|
|
563
|
+
"name": "create",
|
|
564
|
+
"signature": "@Remote async create(agent: Agent, request: TerminalCreateRequest, signal: AbortSignal): Promise<WebTerminalInfo>",
|
|
565
|
+
"summary": "Allocate an interactive shell once for a caller-generated identity.",
|
|
566
|
+
"jsDoc": "/**\n * Allocate an interactive shell once for a caller-generated identity.\n * @param agent - Session owner supplied by the Gateway.\n * @param request - initial dimensions and idempotency identity.\n * @param signal - allocation cancellation; committed terminals survive disconnection.\n * @returns the existing or newly committed terminal.\n */"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"kind": "method",
|
|
570
|
+
"name": "follow",
|
|
571
|
+
"signature": "@Remote({ mode: 'stream' }) follow(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, signal: AbortSignal): AsyncIterable<TerminalFrame>",
|
|
572
|
+
"summary": "Attach to a terminal without binding its process lifetime to the transport.",
|
|
573
|
+
"jsDoc": "/**\n * Attach to a terminal without binding its process lifetime to the transport.\n * @param agent - Session owner supplied by the Gateway.\n * @param id - terminal identity.\n * @param attachmentId - new exclusive input attachment.\n * @param signal - physical stream cancellation.\n * @returns screen recovery followed by output and metadata changes.\n */"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"kind": "method",
|
|
577
|
+
"name": "write",
|
|
578
|
+
"signature": "@Remote async write(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, data: string): Promise<void>",
|
|
579
|
+
"summary": "Deliver raw input, including Tab completion and control characters.",
|
|
580
|
+
"jsDoc": "/**\n * Deliver raw input, including Tab completion and control characters.\n * @param agent - Session owner supplied by the Gateway.\n * @param id - terminal identity.\n * @param attachmentId - current writable attachment.\n * @param data - input bytes represented as UTF-8 text.\n * @returns after provider input acceptance.\n */"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"kind": "method",
|
|
584
|
+
"name": "resize",
|
|
585
|
+
"signature": "@Remote async resize(agent: Agent, id: WebTerminalId, attachmentId: TerminalAttachmentId, cols: number, rows: number): Promise<void>",
|
|
586
|
+
"summary": "Update the dimensions of the PTY and recovery screen.",
|
|
587
|
+
"jsDoc": "/**\n * Update the dimensions of the PTY and recovery screen.\n * @param agent - Session owner supplied by the Gateway.\n * @param id - terminal identity.\n * @param attachmentId - current writable attachment.\n * @param cols - column count.\n * @param rows - row count.\n * @returns after the resize completes.\n */"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"kind": "method",
|
|
591
|
+
"name": "rename",
|
|
592
|
+
"signature": "@Remote rename(agent: Agent, id: WebTerminalId, title: string): void",
|
|
593
|
+
"summary": "Rename a terminal without changing its shell.",
|
|
594
|
+
"jsDoc": "/**\n * Rename a terminal without changing its shell.\n * @param agent - Session owner supplied by the Gateway.\n * @param id - terminal identity.\n * @param title - nonempty display title, at most 120 characters.\n */"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"kind": "method",
|
|
598
|
+
"name": "close",
|
|
599
|
+
"signature": "@Remote async close(agent: Agent, id: WebTerminalId): Promise<void>",
|
|
600
|
+
"summary": "Close an identity to future creation and kill its process range; repeated closes succeed.",
|
|
601
|
+
"jsDoc": "/**\n * Close an identity to future creation and kill its process range; repeated closes succeed.\n * @param agent - Session owner supplied by the Gateway.\n * @param id - terminal identity.\n * @returns after provider cleanup succeeds. A failure retains the terminal for retry.\n */"
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"types": [
|
|
605
|
+
{
|
|
606
|
+
"name": "Agent",
|
|
607
|
+
"declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "AgentCancelCause",
|
|
611
|
+
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"name": "AgentMessageSource",
|
|
615
|
+
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"name": "AgentOptions",
|
|
619
|
+
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "AgentStatus",
|
|
623
|
+
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "ApprovalOutcome",
|
|
627
|
+
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "ApprovalPolicy",
|
|
631
|
+
"declaration": "export type ApprovalPolicy = 'ask' | 'never';"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "ApprovalRequestId",
|
|
635
|
+
"declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "AssistantMessage",
|
|
639
|
+
"declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "AssistantProviderMetadata",
|
|
643
|
+
"declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "AssistantStreamRecord",
|
|
647
|
+
"declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"name": "AttachmentId",
|
|
651
|
+
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"name": "Branded",
|
|
655
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "BrandedNumber",
|
|
659
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"name": "CancelOptions",
|
|
663
|
+
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "CommandId",
|
|
667
|
+
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "CommandSource",
|
|
671
|
+
"declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "CommandSourceMap",
|
|
675
|
+
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "CompactionId",
|
|
679
|
+
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"name": "ContentBlock",
|
|
683
|
+
"declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "ContentBlockMap",
|
|
687
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"name": "ContentBlockType",
|
|
691
|
+
"declaration": "export type ContentBlockType = keyof ContentBlockMap;"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"name": "ContextFormed",
|
|
695
|
+
"declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"name": "ContextSnapshotSection",
|
|
699
|
+
"declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "ContinuableSubagentDescriptorData",
|
|
703
|
+
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "EpochHeader",
|
|
707
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "FeedbackCategory",
|
|
711
|
+
"declaration": "export type FeedbackCategory = 'task-result' | 'instruction-following' | 'product-interaction' | 'service-stability' | 'resource-cost' | 'security-privacy-permission' | 'other';"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "FeedbackRecord",
|
|
715
|
+
"declaration": "export interface FeedbackRecord {\n readonly text?: string;\n readonly category?: FeedbackCategory;\n}"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "FileAttachmentRef",
|
|
719
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "FileBlock",
|
|
723
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "FinishReason",
|
|
727
|
+
"declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"name": "FinishReasonMap",
|
|
731
|
+
"declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "GoalBlockReason",
|
|
735
|
+
"declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"name": "GoalChangeMeta",
|
|
739
|
+
"declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": "GoalClearChangeMeta",
|
|
743
|
+
"declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "GoalId",
|
|
747
|
+
"declaration": "export type GoalId = Branded<'GoalId'>;"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "GoalMessageSource",
|
|
751
|
+
"declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"name": "GoalOperation",
|
|
755
|
+
"declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "GoalPhase",
|
|
759
|
+
"declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "GoalRef",
|
|
763
|
+
"declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "GoalSnapshot",
|
|
767
|
+
"declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "GoalSnapshotChangeMeta",
|
|
771
|
+
"declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "ImageAttachmentRef",
|
|
775
|
+
"declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "ImageBlock",
|
|
779
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "ImageMediaType",
|
|
783
|
+
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"name": "ImageOffloadTarget",
|
|
787
|
+
"declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "Inbox",
|
|
791
|
+
"declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "InboxTarget",
|
|
795
|
+
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "JsonValue",
|
|
799
|
+
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "LlmCallConfig",
|
|
803
|
+
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "LlmCallConfigAdapterDefaults",
|
|
807
|
+
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "LlmFailure",
|
|
811
|
+
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "Message",
|
|
815
|
+
"declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "MessageFeedbackDelete",
|
|
819
|
+
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"name": "MessageFeedbackItem",
|
|
823
|
+
"declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly category?: FeedbackCategory;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "MessageFeedbackPut",
|
|
827
|
+
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "MessageFeedbackRating",
|
|
831
|
+
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"name": "MessageFeedbackVersion",
|
|
835
|
+
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "MessageId",
|
|
839
|
+
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "MessageSource",
|
|
843
|
+
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"name": "MessageSourceMap",
|
|
847
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "ModelMessageSource",
|
|
851
|
+
"declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"name": "ModelSelection",
|
|
855
|
+
"declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "OneShotSubagentDescriptorData",
|
|
859
|
+
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"name": "OptionalSessionSeq",
|
|
863
|
+
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"name": "ProviderRequestId",
|
|
867
|
+
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"name": "PtcDispatchEventData",
|
|
871
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"name": "PtcDispatchStartEventData",
|
|
875
|
+
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"name": "ReasoningBlock",
|
|
879
|
+
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "ReasoningEffortId",
|
|
883
|
+
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "ReplayEnvelope",
|
|
887
|
+
"declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"name": "RequestContext",
|
|
891
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "RequestHeaderReason",
|
|
895
|
+
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "SandboxMode",
|
|
899
|
+
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "Session",
|
|
903
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "SessionEvent",
|
|
907
|
+
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "SessionEventMap",
|
|
911
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "SessionEventType",
|
|
915
|
+
"declaration": "export type SessionEventType = keyof SessionEventMap;"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"name": "SessionHeader",
|
|
919
|
+
"declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"name": "SessionId",
|
|
923
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "SessionLogOffset",
|
|
927
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"name": "SessionReferenceSource",
|
|
931
|
+
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "SessionRequestId",
|
|
935
|
+
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "SessionSeq",
|
|
939
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "SessionSurface",
|
|
943
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
"name": "SessionTitleEventData",
|
|
947
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "SessionTitleModelIdentity",
|
|
951
|
+
"declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "SessionTitleProviderId",
|
|
955
|
+
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "SessionTitleSource",
|
|
959
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"name": "SkillInvocationSource",
|
|
963
|
+
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"name": "StreamChunk",
|
|
967
|
+
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "SubagentCatalogEvent",
|
|
971
|
+
"declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"name": "SubagentDescriptorBase",
|
|
975
|
+
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "SubagentDescriptorData",
|
|
979
|
+
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"name": "SubagentSettledMessageSource",
|
|
983
|
+
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"name": "SurfaceEventType",
|
|
987
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"name": "SurfaceIntent",
|
|
991
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "SurfaceOp",
|
|
995
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"name": "SystemMessage",
|
|
999
|
+
"declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "SystemPromptUpdate",
|
|
1003
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "TeamId",
|
|
1007
|
+
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"name": "TeamMemberPhase",
|
|
1011
|
+
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "TeamMemberSnapshot",
|
|
1015
|
+
"declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"name": "TeamMessageId",
|
|
1019
|
+
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"name": "TeamMessageSnapshot",
|
|
1023
|
+
"declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly content: ContentBlock[];\n}"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "TeamMessageSource",
|
|
1027
|
+
"declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"name": "TeamTaskId",
|
|
1031
|
+
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"name": "TeamTaskSnapshot",
|
|
1035
|
+
"declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"name": "TeamTaskStatus",
|
|
1039
|
+
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"name": "TerminalAttachmentId",
|
|
1043
|
+
"declaration": "export type TerminalAttachmentId = Branded<'TerminalAttachmentId'>;"
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "TerminalCreateRequest",
|
|
1047
|
+
"declaration": "export interface TerminalCreateRequest {\n readonly shellPath?: string;\n readonly id: WebTerminalId;\n readonly cols: number;\n readonly rows: number;\n}"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "TerminalEnvironment",
|
|
1051
|
+
"declaration": "export interface TerminalEnvironment {\n readonly cwd: string;\n readonly maxInputBytes: number;\n readonly maxCols: number;\n readonly maxRows: number;\n readonly scrollback: number;\n}"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "TerminalFrame",
|
|
1055
|
+
"declaration": "export type TerminalFrame = { readonly type: 'snapshot'; readonly sequence: number; readonly screen: string; readonly info: WebTerminalInfo; } | { readonly type: 'output'; readonly sequence: number; readonly data: string; } | { readonly type: 'state'; readonly info: WebTerminalInfo; };"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"name": "TerminalShell",
|
|
1059
|
+
"declaration": "export interface TerminalShell {\n readonly path: string;\n readonly args: readonly string[];\n readonly name: string;\n}"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "TextBlock",
|
|
1063
|
+
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "TodoItem",
|
|
1067
|
+
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"name": "TokenUsage",
|
|
1071
|
+
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"name": "ToolCallBlock",
|
|
1075
|
+
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "ToolCallId",
|
|
1079
|
+
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "ToolMessageSource",
|
|
1083
|
+
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"name": "ToolRestriction",
|
|
1087
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "ToolResultBlock",
|
|
1091
|
+
"declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"name": "ToolResultMessage",
|
|
1095
|
+
"declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"name": "ToolSchema",
|
|
1099
|
+
"declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"name": "TurnEndCancelCause",
|
|
1103
|
+
"declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"name": "TurnEndReason",
|
|
1107
|
+
"declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"name": "TurnEndReasonMap",
|
|
1111
|
+
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n}"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"name": "UserMessage",
|
|
1115
|
+
"declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"name": "WebTerminalId",
|
|
1119
|
+
"declaration": "export type WebTerminalId = Branded<'WebTerminalId'>;"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"name": "WebTerminalInfo",
|
|
1123
|
+
"declaration": "export interface WebTerminalInfo {\n readonly id: WebTerminalId;\n readonly title: string;\n readonly shell: TerminalShell;\n readonly cwd: string;\n readonly cols: number;\n readonly rows: number;\n readonly state: 'running' | 'exited' | 'failed';\n readonly exitCode: number | null;\n readonly error?: string;\n readonly controllerId?: TerminalAttachmentId;\n}"
|
|
1124
|
+
}
|
|
1125
|
+
]
|
|
1126
|
+
}
|
|
1127
|
+
],
|
|
1128
|
+
"events": [],
|
|
1129
|
+
"objects": []
|
|
1130
|
+
},
|
|
1131
|
+
}
|