@deepseek-ai/dsh-api-workspace-files 0.1.5-alpha.1 → 0.1.5-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +21 -19
- package/README.zh.md +21 -19
- package/lib/client.js +34 -82
- package/lib/index.js +138 -62
- package/lib/typert.host.js +160 -525
- package/lib/typert.remote-client.d.ts +14 -17
- package/lib/typert.remote-client.js +125 -40
- package/lib/types/changes.d.ts +2 -2
- package/lib/types/changes.js +2 -2
- package/lib/types/client/change-feed.d.ts +6 -18
- package/lib/types/client/change-feed.js +6 -38
- package/lib/types/client/index.d.ts +3 -4
- package/lib/types/client/index.js +4 -8
- package/lib/types/client/provider.d.ts +9 -20
- package/lib/types/client/provider.js +13 -33
- package/lib/types/client/types.d.ts +7 -26
- package/lib/types/index.d.ts +65 -50
- package/lib/types/index.js +108 -61
- package/lib/types/types.d.ts +4 -4
- package/package.json +12 -14
package/lib/typert.host.js
CHANGED
|
@@ -40,6 +40,16 @@ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_result$schema = z
|
|
|
40
40
|
'version': z.string().readonly(),
|
|
41
41
|
'bytes': z.number().readonly().optional(),
|
|
42
42
|
})
|
|
43
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
44
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_parameter_1$schema = z.string()
|
|
45
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_result$schema = z.object({
|
|
46
|
+
'offset': z.number().readonly(),
|
|
47
|
+
'data': z.string().readonly(),
|
|
48
|
+
'eof': z.boolean().readonly(),
|
|
49
|
+
'absolutePath': z.string().readonly(),
|
|
50
|
+
'version': z.string().readonly(),
|
|
51
|
+
'bytes': z.number().readonly().optional(),
|
|
52
|
+
})
|
|
43
53
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
44
54
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_1$schema = z.string()
|
|
45
55
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_parameter_2$schema = z.object({
|
|
@@ -54,6 +64,17 @@ const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_result$schem
|
|
|
54
64
|
'version': z.string().readonly(),
|
|
55
65
|
'bytes': z.number().readonly().optional(),
|
|
56
66
|
})
|
|
67
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
68
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_1$schema = z.string()
|
|
69
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_2$schema = z.string()
|
|
70
|
+
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_result$schema = z.object({
|
|
71
|
+
'offset': z.number().readonly(),
|
|
72
|
+
'data': z.string().readonly(),
|
|
73
|
+
'eof': z.boolean().readonly(),
|
|
74
|
+
'absolutePath': z.string().readonly(),
|
|
75
|
+
'version': z.string().readonly(),
|
|
76
|
+
'bytes': z.number().readonly().optional(),
|
|
77
|
+
})
|
|
57
78
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
58
79
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_parameter_1$schema = z.string()
|
|
59
80
|
const _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_result$schema = z.object({
|
|
@@ -75,16 +96,12 @@ export const TYPERT = {
|
|
|
75
96
|
method: 'changes',
|
|
76
97
|
mode: 'stream',
|
|
77
98
|
invocation: { kind: 'direct' },
|
|
78
|
-
scope: {
|
|
79
|
-
context: 'agent',
|
|
80
|
-
wire: 'agentId',
|
|
81
|
-
},
|
|
82
99
|
parameters: [
|
|
83
100
|
{
|
|
84
|
-
name: '
|
|
85
|
-
wire: '
|
|
101
|
+
name: 'workspaceFileScope',
|
|
102
|
+
wire: 'workspaceFileScopeId',
|
|
86
103
|
source: 'lookup',
|
|
87
|
-
lookup: '
|
|
104
|
+
lookup: 'workspaceFileScope',
|
|
88
105
|
codec: {
|
|
89
106
|
mode: 'strict',
|
|
90
107
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
@@ -98,7 +115,7 @@ export const TYPERT = {
|
|
|
98
115
|
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileWatchFrame',
|
|
99
116
|
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_changes_result$schema,
|
|
100
117
|
},
|
|
101
|
-
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":
|
|
118
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":365,"column":3},
|
|
102
119
|
},
|
|
103
120
|
{
|
|
104
121
|
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/list',
|
|
@@ -106,16 +123,12 @@ export const TYPERT = {
|
|
|
106
123
|
namespace: 'workspaceFiles',
|
|
107
124
|
method: 'list',
|
|
108
125
|
invocation: { kind: 'direct' },
|
|
109
|
-
scope: {
|
|
110
|
-
context: 'agent',
|
|
111
|
-
wire: 'agentId',
|
|
112
|
-
},
|
|
113
126
|
parameters: [
|
|
114
127
|
{
|
|
115
|
-
name: '
|
|
116
|
-
wire: '
|
|
128
|
+
name: 'workspaceFileScope',
|
|
129
|
+
wire: 'workspaceFileScopeId',
|
|
117
130
|
source: 'lookup',
|
|
118
|
-
lookup: '
|
|
131
|
+
lookup: 'workspaceFileScope',
|
|
119
132
|
codec: {
|
|
120
133
|
mode: 'strict',
|
|
121
134
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
@@ -139,7 +152,7 @@ export const TYPERT = {
|
|
|
139
152
|
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceDirectoryListing',
|
|
140
153
|
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_list_result$schema,
|
|
141
154
|
},
|
|
142
|
-
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":
|
|
155
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":337,"column":9},
|
|
143
156
|
},
|
|
144
157
|
{
|
|
145
158
|
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/read',
|
|
@@ -147,16 +160,12 @@ export const TYPERT = {
|
|
|
147
160
|
namespace: 'workspaceFiles',
|
|
148
161
|
method: 'read',
|
|
149
162
|
invocation: { kind: 'direct' },
|
|
150
|
-
scope: {
|
|
151
|
-
context: 'agent',
|
|
152
|
-
wire: 'agentId',
|
|
153
|
-
},
|
|
154
163
|
parameters: [
|
|
155
164
|
{
|
|
156
|
-
name: '
|
|
157
|
-
wire: '
|
|
165
|
+
name: 'workspaceFileScope',
|
|
166
|
+
wire: 'workspaceFileScopeId',
|
|
158
167
|
source: 'lookup',
|
|
159
|
-
lookup: '
|
|
168
|
+
lookup: 'workspaceFileScope',
|
|
160
169
|
codec: {
|
|
161
170
|
mode: 'strict',
|
|
162
171
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
@@ -190,7 +199,44 @@ export const TYPERT = {
|
|
|
190
199
|
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileText',
|
|
191
200
|
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_read_result$schema,
|
|
192
201
|
},
|
|
193
|
-
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":
|
|
202
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":232,"column":9},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readAll',
|
|
206
|
+
service: 'workspaceFiles',
|
|
207
|
+
namespace: 'workspaceFiles',
|
|
208
|
+
method: 'readAll',
|
|
209
|
+
invocation: { kind: 'direct' },
|
|
210
|
+
parameters: [
|
|
211
|
+
{
|
|
212
|
+
name: 'workspaceFileScope',
|
|
213
|
+
wire: 'workspaceFileScopeId',
|
|
214
|
+
source: 'lookup',
|
|
215
|
+
lookup: 'workspaceFileScope',
|
|
216
|
+
codec: {
|
|
217
|
+
mode: 'strict',
|
|
218
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
219
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_parameter_0$schema,
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'path',
|
|
224
|
+
wire: 'path',
|
|
225
|
+
source: 'json',
|
|
226
|
+
codec: {
|
|
227
|
+
mode: 'strict',
|
|
228
|
+
typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readAll:path',
|
|
229
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_parameter_1$schema,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
cancellation: { parameter: 'signal' },
|
|
234
|
+
result: {
|
|
235
|
+
mode: 'strict',
|
|
236
|
+
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileBytes',
|
|
237
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readAll_result$schema,
|
|
238
|
+
},
|
|
239
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":278,"column":9},
|
|
194
240
|
},
|
|
195
241
|
{
|
|
196
242
|
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readBytes',
|
|
@@ -198,16 +244,12 @@ export const TYPERT = {
|
|
|
198
244
|
namespace: 'workspaceFiles',
|
|
199
245
|
method: 'readBytes',
|
|
200
246
|
invocation: { kind: 'direct' },
|
|
201
|
-
scope: {
|
|
202
|
-
context: 'agent',
|
|
203
|
-
wire: 'agentId',
|
|
204
|
-
},
|
|
205
247
|
parameters: [
|
|
206
248
|
{
|
|
207
|
-
name: '
|
|
208
|
-
wire: '
|
|
249
|
+
name: 'workspaceFileScope',
|
|
250
|
+
wire: 'workspaceFileScopeId',
|
|
209
251
|
source: 'lookup',
|
|
210
|
-
lookup: '
|
|
252
|
+
lookup: 'workspaceFileScope',
|
|
211
253
|
codec: {
|
|
212
254
|
mode: 'strict',
|
|
213
255
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
@@ -241,7 +283,54 @@ export const TYPERT = {
|
|
|
241
283
|
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileBytes',
|
|
242
284
|
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readBytes_result$schema,
|
|
243
285
|
},
|
|
244
|
-
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":
|
|
286
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":257,"column":9},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readRelated',
|
|
290
|
+
service: 'workspaceFiles',
|
|
291
|
+
namespace: 'workspaceFiles',
|
|
292
|
+
method: 'readRelated',
|
|
293
|
+
invocation: { kind: 'direct' },
|
|
294
|
+
parameters: [
|
|
295
|
+
{
|
|
296
|
+
name: 'workspaceFileScope',
|
|
297
|
+
wire: 'workspaceFileScopeId',
|
|
298
|
+
source: 'lookup',
|
|
299
|
+
lookup: 'workspaceFileScope',
|
|
300
|
+
codec: {
|
|
301
|
+
mode: 'strict',
|
|
302
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
303
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_0$schema,
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'path',
|
|
308
|
+
wire: 'path',
|
|
309
|
+
source: 'json',
|
|
310
|
+
codec: {
|
|
311
|
+
mode: 'strict',
|
|
312
|
+
typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readRelated:path',
|
|
313
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_1$schema,
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: 'relativePath',
|
|
318
|
+
wire: 'relativePath',
|
|
319
|
+
source: 'json',
|
|
320
|
+
codec: {
|
|
321
|
+
mode: 'strict',
|
|
322
|
+
typeSymbol: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/readRelated:relativePath',
|
|
323
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_parameter_2$schema,
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
cancellation: { parameter: 'signal' },
|
|
328
|
+
result: {
|
|
329
|
+
mode: 'strict',
|
|
330
|
+
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileBytes',
|
|
331
|
+
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_readRelated_result$schema,
|
|
332
|
+
},
|
|
333
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":300,"column":9},
|
|
245
334
|
},
|
|
246
335
|
{
|
|
247
336
|
id: '@deepseek-ai/dsh-api-workspace-files#workspaceFiles/stat',
|
|
@@ -249,16 +338,12 @@ export const TYPERT = {
|
|
|
249
338
|
namespace: 'workspaceFiles',
|
|
250
339
|
method: 'stat',
|
|
251
340
|
invocation: { kind: 'direct' },
|
|
252
|
-
scope: {
|
|
253
|
-
context: 'agent',
|
|
254
|
-
wire: 'agentId',
|
|
255
|
-
},
|
|
256
341
|
parameters: [
|
|
257
342
|
{
|
|
258
|
-
name: '
|
|
259
|
-
wire: '
|
|
343
|
+
name: 'workspaceFileScope',
|
|
344
|
+
wire: 'workspaceFileScopeId',
|
|
260
345
|
source: 'lookup',
|
|
261
|
-
lookup: '
|
|
346
|
+
lookup: 'workspaceFileScope',
|
|
262
347
|
codec: {
|
|
263
348
|
mode: 'strict',
|
|
264
349
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
@@ -282,532 +367,78 @@ export const TYPERT = {
|
|
|
282
367
|
typeSymbol: '@deepseek-ai/dsh-api-workspace-files/types#WorkspaceFileStat',
|
|
283
368
|
schema: _deepseek_ai_dsh_api_workspace_files_workspaceFiles_stat_result$schema,
|
|
284
369
|
},
|
|
285
|
-
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":
|
|
370
|
+
sourceLocation: {"file":"packages/api/workspace-files/src/index.ts","line":324,"column":9},
|
|
286
371
|
},
|
|
287
372
|
],
|
|
288
373
|
model: {
|
|
289
374
|
"services": [
|
|
290
375
|
{
|
|
291
|
-
"description": "Host Remote
|
|
292
|
-
"summary": "Host Remote
|
|
376
|
+
"description": "Host Remote file reads and workspace directory observations over the composed filesystem.",
|
|
377
|
+
"summary": "Host Remote file reads and workspace directory observations over the composed filesystem.",
|
|
293
378
|
"tags": [],
|
|
294
|
-
"jsDoc": "/** Host Remote
|
|
379
|
+
"jsDoc": "/** Host Remote file reads and workspace directory observations over the composed filesystem. */",
|
|
295
380
|
"key": "workspaceFiles",
|
|
296
381
|
"exportName": "WorkspaceFiles",
|
|
297
382
|
"members": [
|
|
298
383
|
{
|
|
299
384
|
"kind": "method",
|
|
300
385
|
"name": "read",
|
|
301
|
-
"signature": "@Remote async read(
|
|
302
|
-
"summary": "Read one page of lines from a UTF-8
|
|
303
|
-
"jsDoc": "/**\n * Read one page of lines from a UTF-8
|
|
386
|
+
"signature": "@Remote async read( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceFileRange, signal: AbortSignal, ): Promise<WorkspaceFileText>",
|
|
387
|
+
"summary": "Read one page of lines from a UTF-8 file readable by the filesystem backend.",
|
|
388
|
+
"jsDoc": "/**\n * Read one page of lines from a UTF-8 file readable by the filesystem backend.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - absolute path or path relative to the workspace root; files outside it are allowed.\n * @param range - the line window; omitted fields take the page defaults.\n * @param signal - caller cancellation.\n * @returns the page, the file's version at the stat before it, and whether it reaches the last line.\n */"
|
|
304
389
|
},
|
|
305
390
|
{
|
|
306
391
|
"kind": "method",
|
|
307
392
|
"name": "readBytes",
|
|
308
|
-
"signature": "@Remote async readBytes(
|
|
309
|
-
"summary": "Read one byte window of a regular file
|
|
310
|
-
"jsDoc": "/**\n * Read one byte window of a regular file
|
|
393
|
+
"signature": "@Remote async readBytes( workspaceFileScope: WorkspaceFileScope, path: string, range: WorkspaceByteRange, signal: AbortSignal, ): Promise<WorkspaceFileBytes>",
|
|
394
|
+
"summary": "Read one byte window of a regular file readable by the filesystem backend: raw bytes, no text decoding and no binary rejection.",
|
|
395
|
+
"jsDoc": "/**\n * Read one byte window of a regular file readable by the filesystem backend: raw\n * bytes, no text decoding and no binary rejection.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - absolute path or path relative to the workspace root; files outside it are allowed.\n * @param range - the byte window; omitted fields take the window defaults.\n * @param signal - caller cancellation.\n * @returns the window in base64, the file's version and size at the stat before it, and whether it reaches the last byte.\n */"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "method",
|
|
399
|
+
"name": "readAll",
|
|
400
|
+
"signature": "@Remote async readAll(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceFileBytes>",
|
|
401
|
+
"summary": "Read a complete regular file as bytes, subject to the configured full-file cap.",
|
|
402
|
+
"jsDoc": "/**\n * Read a complete regular file as bytes, subject to the configured full-file cap.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - absolute or workspace-relative file path.\n * @param signal - caller cancellation.\n * @returns one complete base64 window with offset zero and eof true; oversized files fail with too-large.\n */"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"kind": "method",
|
|
406
|
+
"name": "readRelated",
|
|
407
|
+
"signature": "@Remote async readRelated( workspaceFileScope: WorkspaceFileScope, path: string, relativePath: string, signal: AbortSignal, ): Promise<WorkspaceFileBytes>",
|
|
408
|
+
"summary": "Read a complete file relative to another file's directory, including outside the workspace.",
|
|
409
|
+
"jsDoc": "/**\n * Read a complete file relative to another file's directory, including outside the workspace.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - base file, absolute or workspace-relative.\n * @param relativePath - relative filesystem path, not a URL or absolute path.\n * @param signal - caller cancellation.\n * @returns the complete related file using the ordinary file-size and access checks.\n */"
|
|
311
410
|
},
|
|
312
411
|
{
|
|
313
412
|
"kind": "method",
|
|
314
413
|
"name": "stat",
|
|
315
|
-
"signature": "@Remote async stat(
|
|
414
|
+
"signature": "@Remote async stat(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceFileStat>",
|
|
316
415
|
"summary": "Report one regular file's identity, version, and size without its content.",
|
|
317
|
-
"jsDoc": "/**\n * Report one regular file's identity, version, and size without its content.\n * @param
|
|
416
|
+
"jsDoc": "/**\n * Report one regular file's identity, version, and size without its content.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - absolute path or path relative to the workspace root; files outside it are allowed.\n * @param signal - caller cancellation.\n * @returns the file's absolute path, current version, and byte size.\n */"
|
|
318
417
|
},
|
|
319
418
|
{
|
|
320
419
|
"kind": "method",
|
|
321
420
|
"name": "list",
|
|
322
|
-
"signature": "@Remote async list(
|
|
323
|
-
"summary": "List the direct children of one directory inside the
|
|
324
|
-
"jsDoc": "/**\n * List the direct children of one directory inside the
|
|
421
|
+
"signature": "@Remote async list(workspaceFileScope: WorkspaceFileScope, path: string, signal: AbortSignal): Promise<WorkspaceDirectoryListing>",
|
|
422
|
+
"summary": "List the direct children of one directory inside the Session's workspace.",
|
|
423
|
+
"jsDoc": "/**\n * List the direct children of one directory inside the Session's workspace.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param path - workspace path, absolute or relative to the workspace root.\n * @param signal - caller cancellation.\n * @returns the directory's children in the backend's stable name order, bounded by the entry cap.\n */"
|
|
325
424
|
},
|
|
326
425
|
{
|
|
327
426
|
"kind": "method",
|
|
328
427
|
"name": "changes",
|
|
329
|
-
"signature": "@Remote({ mode: 'stream' }) changes(
|
|
330
|
-
"summary": "Stream every `fs/observed` observation of a file inside the
|
|
331
|
-
"jsDoc": "/**\n * Stream every `fs/observed` observation of a file inside the
|
|
428
|
+
"signature": "@Remote({ mode: 'stream' }) changes(workspaceFileScope: WorkspaceFileScope, signal: AbortSignal): AsyncIterable<WorkspaceFileWatchFrame>",
|
|
429
|
+
"summary": "Stream every `fs/observed` observation of a file inside the Session's workspace.",
|
|
430
|
+
"jsDoc": "/**\n * Stream every `fs/observed` observation of a file inside the Session's\n * workspace. Only instrumented filesystem operations report here; the OS is\n * not watched.\n * @param workspaceFileScope - header-derived workspace root for the Session identity on the wire.\n * @param signal - generation cancellation.\n * @returns `ready` once the Host observation queue is active and the workspace\n * root is resolved, then queued and live observations in emission order.\n */"
|
|
332
431
|
}
|
|
333
432
|
],
|
|
334
433
|
"types": [
|
|
335
|
-
{
|
|
336
|
-
"name": "Agent",
|
|
337
|
-
"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}"
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"name": "AgentCancelCause",
|
|
341
|
-
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"name": "AgentMessageSource",
|
|
345
|
-
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"name": "AgentOptions",
|
|
349
|
-
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"name": "AgentStatus",
|
|
353
|
-
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"name": "ApprovalOutcome",
|
|
357
|
-
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"name": "ApprovalPolicy",
|
|
361
|
-
"declaration": "export type ApprovalPolicy = 'ask' | 'never';"
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
"name": "ApprovalRequestId",
|
|
365
|
-
"declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"name": "AssistantMessage",
|
|
369
|
-
"declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"name": "AssistantProvenance",
|
|
373
|
-
"declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
"name": "AssistantStreamRecord",
|
|
377
|
-
"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; };"
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
"name": "AttachmentId",
|
|
381
|
-
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
382
|
-
},
|
|
383
434
|
{
|
|
384
435
|
"name": "Branded",
|
|
385
436
|
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
386
437
|
},
|
|
387
|
-
{
|
|
388
|
-
"name": "BrandedNumber",
|
|
389
|
-
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"name": "CancelOptions",
|
|
393
|
-
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"name": "CommandId",
|
|
397
|
-
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
"name": "CommandSource",
|
|
401
|
-
"declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"name": "CommandSourceMap",
|
|
405
|
-
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
"name": "CompactionId",
|
|
409
|
-
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"name": "ContentBlock",
|
|
413
|
-
"declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
"name": "ContentBlockMap",
|
|
417
|
-
"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}"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"name": "ContentBlockType",
|
|
421
|
-
"declaration": "export type ContentBlockType = keyof ContentBlockMap;"
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"name": "ContextFormed",
|
|
425
|
-
"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'; };"
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"name": "ContextSnapshotSection",
|
|
429
|
-
"declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
|
|
430
|
-
},
|
|
431
|
-
{
|
|
432
|
-
"name": "ContinuableSubagentDescriptorData",
|
|
433
|
-
"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}"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"name": "EpochHeader",
|
|
437
|
-
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"name": "FileAttachmentRef",
|
|
441
|
-
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
"name": "FileBlock",
|
|
445
|
-
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"name": "FinishReason",
|
|
449
|
-
"declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"name": "FinishReasonMap",
|
|
453
|
-
"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}"
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"name": "GoalBlockReason",
|
|
457
|
-
"declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"name": "GoalChangeMeta",
|
|
461
|
-
"declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"name": "GoalClearChangeMeta",
|
|
465
|
-
"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}"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"name": "GoalId",
|
|
469
|
-
"declaration": "export type GoalId = Branded<'GoalId'>;"
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
"name": "GoalMessageSource",
|
|
473
|
-
"declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"name": "GoalOperation",
|
|
477
|
-
"declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"name": "GoalPhase",
|
|
481
|
-
"declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
"name": "GoalRef",
|
|
485
|
-
"declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"name": "GoalSnapshot",
|
|
489
|
-
"declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
"name": "GoalSnapshotChangeMeta",
|
|
493
|
-
"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}"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"name": "ImageAttachmentRef",
|
|
497
|
-
"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}"
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
"name": "ImageBlock",
|
|
501
|
-
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"name": "ImageMediaType",
|
|
505
|
-
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"name": "Inbox",
|
|
509
|
-
"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}"
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
"name": "InboxTarget",
|
|
513
|
-
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
"name": "JsonValue",
|
|
517
|
-
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"name": "LlmCallConfig",
|
|
521
|
-
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
"name": "LlmCallConfigAdapterDefaults",
|
|
525
|
-
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"name": "LlmFailure",
|
|
529
|
-
"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}"
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"name": "Message",
|
|
533
|
-
"declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
"name": "MessageFeedbackDelete",
|
|
537
|
-
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
"name": "MessageFeedbackItem",
|
|
541
|
-
"declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
"name": "MessageFeedbackPut",
|
|
545
|
-
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
"name": "MessageFeedbackRating",
|
|
549
|
-
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"name": "MessageFeedbackVersion",
|
|
553
|
-
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
"name": "MessageId",
|
|
557
|
-
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
"name": "MessageSource",
|
|
561
|
-
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
"name": "MessageSourceMap",
|
|
565
|
-
"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}"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"name": "ModelMessageSource",
|
|
569
|
-
"declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"name": "ModelSelection",
|
|
573
|
-
"declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
"name": "OneShotSubagentDescriptorData",
|
|
577
|
-
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
"name": "OptionalSessionSeq",
|
|
581
|
-
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"name": "ProviderRequestId",
|
|
585
|
-
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"name": "PtcDispatchEventData",
|
|
589
|
-
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
"name": "PtcDispatchStartEventData",
|
|
593
|
-
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
"name": "ReasoningBlock",
|
|
597
|
-
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
"name": "ReasoningEffortId",
|
|
601
|
-
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
"name": "ReplayEnvelope",
|
|
605
|
-
"declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"name": "RequestContext",
|
|
609
|
-
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
"name": "RequestHeaderReason",
|
|
613
|
-
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"name": "SandboxMode",
|
|
617
|
-
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
"name": "Session",
|
|
621
|
-
"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}"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
"name": "SessionEvent",
|
|
625
|
-
"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];"
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
"name": "SessionEventMap",
|
|
629
|
-
"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; }; 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 '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 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\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}"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"name": "SessionEventType",
|
|
633
|
-
"declaration": "export type SessionEventType = keyof SessionEventMap;"
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
"name": "SessionHeader",
|
|
637
|
-
"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}"
|
|
638
|
-
},
|
|
639
438
|
{
|
|
640
439
|
"name": "SessionId",
|
|
641
440
|
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
642
441
|
},
|
|
643
|
-
{
|
|
644
|
-
"name": "SessionLogOffset",
|
|
645
|
-
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"name": "SessionReferenceSource",
|
|
649
|
-
"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}"
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
"name": "SessionRequestId",
|
|
653
|
-
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
"name": "SessionSeq",
|
|
657
|
-
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
"name": "SessionSurface",
|
|
661
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
"name": "SessionTitleEventData",
|
|
665
|
-
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
"name": "SessionTitleModelProvenance",
|
|
669
|
-
"declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
"name": "SessionTitleProviderId",
|
|
673
|
-
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
"name": "SessionTitleSource",
|
|
677
|
-
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
"name": "SkillInvocationSource",
|
|
681
|
-
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"name": "StreamChunk",
|
|
685
|
-
"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; };"
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
"name": "SubagentDescriptorBase",
|
|
689
|
-
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
"name": "SubagentDescriptorData",
|
|
693
|
-
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
"name": "SubagentSettledMessageSource",
|
|
697
|
-
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
"name": "SurfaceEventType",
|
|
701
|
-
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
"name": "SurfaceIntent",
|
|
705
|
-
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
"name": "SurfaceOp",
|
|
709
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
"name": "SystemMessage",
|
|
713
|
-
"declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
"name": "SystemPromptUpdate",
|
|
717
|
-
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
"name": "TeamId",
|
|
721
|
-
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
"name": "TeamMemberPhase",
|
|
725
|
-
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
"name": "TeamMemberSnapshot",
|
|
729
|
-
"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}"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
"name": "TeamMessageId",
|
|
733
|
-
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
"name": "TeamMessageSnapshot",
|
|
737
|
-
"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}"
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
"name": "TeamMessageSource",
|
|
741
|
-
"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}"
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
"name": "TeamTaskId",
|
|
745
|
-
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
746
|
-
},
|
|
747
|
-
{
|
|
748
|
-
"name": "TeamTaskSnapshot",
|
|
749
|
-
"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}"
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
"name": "TeamTaskStatus",
|
|
753
|
-
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
"name": "TextBlock",
|
|
757
|
-
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
"name": "TodoItem",
|
|
761
|
-
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
"name": "TokenUsage",
|
|
765
|
-
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
"name": "ToolCallBlock",
|
|
769
|
-
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
"name": "ToolCallId",
|
|
773
|
-
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
"name": "ToolMessageSource",
|
|
777
|
-
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"name": "ToolRestriction",
|
|
781
|
-
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"name": "ToolResultBlock",
|
|
785
|
-
"declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
"name": "ToolResultMessage",
|
|
789
|
-
"declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
"name": "ToolSchema",
|
|
793
|
-
"declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
"name": "TurnEndCancelCause",
|
|
797
|
-
"declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
"name": "TurnEndReason",
|
|
801
|
-
"declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
|
|
802
|
-
},
|
|
803
|
-
{
|
|
804
|
-
"name": "TurnEndReasonMap",
|
|
805
|
-
"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}"
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
"name": "UserMessage",
|
|
809
|
-
"declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
|
|
810
|
-
},
|
|
811
442
|
{
|
|
812
443
|
"name": "WorkspaceByteRange",
|
|
813
444
|
"declaration": "export interface WorkspaceByteRange {\n readonly offset?: number;\n readonly length?: number;\n}"
|
|
@@ -832,6 +463,10 @@ export const TYPERT = {
|
|
|
832
463
|
"name": "WorkspaceFileRange",
|
|
833
464
|
"declaration": "export interface WorkspaceFileRange {\n readonly offset?: number;\n readonly limit?: number;\n}"
|
|
834
465
|
},
|
|
466
|
+
{
|
|
467
|
+
"name": "WorkspaceFileScope",
|
|
468
|
+
"declaration": "export interface WorkspaceFileScope {\n readonly sessionId: SessionId;\n readonly workspaceRoot: string;\n}"
|
|
469
|
+
},
|
|
835
470
|
{
|
|
836
471
|
"name": "WorkspaceFileStat",
|
|
837
472
|
"declaration": "export interface WorkspaceFileStat {\n readonly absolutePath: string;\n readonly version: string;\n readonly bytes?: number;\n}"
|