@khorsheed/dsh-file-preview 0.2.0 → 0.3.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/CHANGELOG.md +19 -0
- package/README.en.md +9 -6
- package/README.i18n.yaml +2 -2
- package/README.md +9 -6
- package/lib/index.js +196 -80
- package/lib/typert.host.js +291 -69
- package/lib/typert.remote-client.d.ts +6 -1
- package/lib/typert.remote-client.js +137 -29
- package/lib/types/fold.d.ts +7 -6
- package/lib/types/fold.js +30 -37
- package/lib/types/index.d.ts +29 -3
- package/lib/types/index.js +76 -59
- package/lib/types/open-external.d.ts +37 -0
- package/lib/types/open-external.js +61 -0
- package/lib/types/types.d.ts +11 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +7 -17
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/typert.remote-client.d.ts.map +0 -1
- package/lib/types/bash-writes.d.ts.map +0 -1
- package/lib/types/fold.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/invariant.d.ts.map +0 -1
- package/lib/types/reveal.d.ts.map +0 -1
- package/lib/types/types.d.ts.map +0 -1
- package/skills/3d-artifact/SKILL.md +0 -52
package/lib/typert.host.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
const
|
|
4
|
+
let _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema$value
|
|
5
|
+
const _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_capabilities_result$schema$value ??= z.object({
|
|
6
|
+
'protocolVersion': z.literal(1),
|
|
7
|
+
}))
|
|
8
|
+
let _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema$value
|
|
9
|
+
const _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
10
|
+
let _khorsheed_dsh_file_preview_filePreview_list_result$schema$value
|
|
11
|
+
const _khorsheed_dsh_file_preview_filePreview_list_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_result$schema$value ??= z.object({
|
|
6
12
|
'entries': z.array(z.object({
|
|
7
13
|
'path': z.string().readonly(),
|
|
8
14
|
'op': z.union([z.literal("read"), z.literal("write"), z.literal("edit")]).readonly(),
|
|
@@ -23,29 +29,50 @@ const _khorsheed_dsh_file_preview_filePreview_list_result$schema = z.object({
|
|
|
23
29
|
})).readonly(),
|
|
24
30
|
'asOfSeq': z.number().readonly(),
|
|
25
31
|
'truncated': z.boolean().readonly(),
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
32
|
+
}))
|
|
33
|
+
let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema$value
|
|
34
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
35
|
+
let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema$value
|
|
36
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema$value ??= z.string())
|
|
37
|
+
let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema$value
|
|
38
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema$value ??= z.string())
|
|
39
|
+
let _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema$value
|
|
40
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_result$schema$value ??= z.union([z.object({
|
|
41
|
+
'opened': z.literal(true).readonly(),
|
|
42
|
+
}), z.object({
|
|
43
|
+
'opened': z.literal(false).readonly(),
|
|
44
|
+
'reason': z.union([z.literal("missing"), z.literal("unknown-app"), z.literal("unsupported-platform"), z.literal("launch-failed")]).readonly(),
|
|
45
|
+
})]))
|
|
46
|
+
let _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema$value
|
|
47
|
+
const _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
48
|
+
let _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema$value
|
|
49
|
+
const _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema$value ??= z.string())
|
|
50
|
+
let _khorsheed_dsh_file_preview_filePreview_read_result$schema$value
|
|
51
|
+
const _khorsheed_dsh_file_preview_filePreview_read_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_result$schema$value ??= z.object({
|
|
30
52
|
'path': z.string().readonly(),
|
|
31
|
-
'kind': z.union([z.literal("
|
|
53
|
+
'kind': z.union([z.literal("missing"), z.literal("too-large"), z.literal("error"), z.literal("text"), z.literal("binary"), z.literal("image")]).readonly(),
|
|
32
54
|
'content': z.string().readonly().optional(),
|
|
33
55
|
'url': z.string().readonly().optional(),
|
|
34
56
|
'truncated': z.boolean().readonly().optional(),
|
|
35
57
|
'htmlScripted': z.boolean().readonly().optional(),
|
|
36
58
|
'size': z.number().readonly().optional(),
|
|
37
59
|
'message': z.string().readonly().optional(),
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
60
|
+
}))
|
|
61
|
+
let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema$value
|
|
62
|
+
const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
63
|
+
let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema$value
|
|
64
|
+
const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema$value ??= z.string())
|
|
65
|
+
let _khorsheed_dsh_file_preview_filePreview_reveal_result$schema$value
|
|
66
|
+
const _khorsheed_dsh_file_preview_filePreview_reveal_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_result$schema$value ??= z.union([z.object({
|
|
42
67
|
'revealed': z.literal(true).readonly(),
|
|
43
68
|
}), z.object({
|
|
44
69
|
'revealed': z.literal(false).readonly(),
|
|
45
70
|
'reason': z.union([z.literal("missing"), z.literal("select-failed")]).readonly(),
|
|
46
|
-
})])
|
|
47
|
-
|
|
48
|
-
const
|
|
71
|
+
})]))
|
|
72
|
+
let _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema$value
|
|
73
|
+
const _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
74
|
+
let _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema$value
|
|
75
|
+
const _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema$value ??= z.object({
|
|
49
76
|
'turns': z.array(z.object({
|
|
50
77
|
'turn': z.number().readonly(),
|
|
51
78
|
'files': z.array(z.object({
|
|
@@ -57,7 +84,7 @@ const _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema = z.object
|
|
|
57
84
|
})).readonly(),
|
|
58
85
|
})).readonly(),
|
|
59
86
|
'asOfSeq': z.number().readonly(),
|
|
60
|
-
})
|
|
87
|
+
}))
|
|
61
88
|
|
|
62
89
|
export const TYPERT = {
|
|
63
90
|
package: '@khorsheed/dsh-file-preview',
|
|
@@ -65,6 +92,22 @@ export const TYPERT = {
|
|
|
65
92
|
schemas: [
|
|
66
93
|
],
|
|
67
94
|
invocations: [
|
|
95
|
+
{
|
|
96
|
+
id: '@khorsheed/dsh-file-preview#filePreview/capabilities',
|
|
97
|
+
service: 'filePreview',
|
|
98
|
+
namespace: 'filePreview',
|
|
99
|
+
method: 'capabilities',
|
|
100
|
+
invocation: { kind: 'direct' },
|
|
101
|
+
parameters: [
|
|
102
|
+
],
|
|
103
|
+
result: {
|
|
104
|
+
mode: 'strict',
|
|
105
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/capabilities:result',
|
|
106
|
+
create: _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema,
|
|
107
|
+
schema: _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema(),
|
|
108
|
+
},
|
|
109
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":196,"column":3},
|
|
110
|
+
},
|
|
68
111
|
{
|
|
69
112
|
id: '@khorsheed/dsh-file-preview#filePreview/list',
|
|
70
113
|
service: 'filePreview',
|
|
@@ -84,16 +127,73 @@ export const TYPERT = {
|
|
|
84
127
|
codec: {
|
|
85
128
|
mode: 'strict',
|
|
86
129
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
87
|
-
|
|
130
|
+
create: _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema,
|
|
131
|
+
schema: _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema(),
|
|
88
132
|
},
|
|
89
133
|
},
|
|
90
134
|
],
|
|
91
135
|
result: {
|
|
92
136
|
mode: 'strict',
|
|
93
137
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewList',
|
|
94
|
-
|
|
138
|
+
create: _khorsheed_dsh_file_preview_filePreview_list_result$schema,
|
|
139
|
+
schema: _khorsheed_dsh_file_preview_filePreview_list_result$schema(),
|
|
95
140
|
},
|
|
96
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
141
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":316,"column":9},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: '@khorsheed/dsh-file-preview#filePreview/openExternal',
|
|
145
|
+
service: 'filePreview',
|
|
146
|
+
namespace: 'filePreview',
|
|
147
|
+
method: 'openExternal',
|
|
148
|
+
invocation: { kind: 'direct' },
|
|
149
|
+
scope: {
|
|
150
|
+
context: 'agent',
|
|
151
|
+
wire: 'agentId',
|
|
152
|
+
},
|
|
153
|
+
parameters: [
|
|
154
|
+
{
|
|
155
|
+
name: 'agent',
|
|
156
|
+
wire: 'agentId',
|
|
157
|
+
source: 'lookup',
|
|
158
|
+
lookup: 'agent',
|
|
159
|
+
codec: {
|
|
160
|
+
mode: 'strict',
|
|
161
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
162
|
+
create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema,
|
|
163
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema(),
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'path',
|
|
168
|
+
wire: 'path',
|
|
169
|
+
source: 'json',
|
|
170
|
+
codec: {
|
|
171
|
+
mode: 'strict',
|
|
172
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:path',
|
|
173
|
+
create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema,
|
|
174
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema(),
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'app',
|
|
179
|
+
wire: 'app',
|
|
180
|
+
source: 'json',
|
|
181
|
+
codec: {
|
|
182
|
+
mode: 'strict',
|
|
183
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:app',
|
|
184
|
+
create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema,
|
|
185
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema(),
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
cancellation: { parameter: 'signal' },
|
|
190
|
+
result: {
|
|
191
|
+
mode: 'strict',
|
|
192
|
+
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewOpenExternal',
|
|
193
|
+
create: _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema,
|
|
194
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema(),
|
|
195
|
+
},
|
|
196
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":539,"column":9},
|
|
97
197
|
},
|
|
98
198
|
{
|
|
99
199
|
id: '@khorsheed/dsh-file-preview#filePreview/read',
|
|
@@ -114,7 +214,8 @@ export const TYPERT = {
|
|
|
114
214
|
codec: {
|
|
115
215
|
mode: 'strict',
|
|
116
216
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
117
|
-
|
|
217
|
+
create: _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema,
|
|
218
|
+
schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema(),
|
|
118
219
|
},
|
|
119
220
|
},
|
|
120
221
|
{
|
|
@@ -124,7 +225,8 @@ export const TYPERT = {
|
|
|
124
225
|
codec: {
|
|
125
226
|
mode: 'strict',
|
|
126
227
|
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/read:path',
|
|
127
|
-
|
|
228
|
+
create: _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema,
|
|
229
|
+
schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema(),
|
|
128
230
|
},
|
|
129
231
|
},
|
|
130
232
|
],
|
|
@@ -132,9 +234,10 @@ export const TYPERT = {
|
|
|
132
234
|
result: {
|
|
133
235
|
mode: 'strict',
|
|
134
236
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewRead',
|
|
135
|
-
|
|
237
|
+
create: _khorsheed_dsh_file_preview_filePreview_read_result$schema,
|
|
238
|
+
schema: _khorsheed_dsh_file_preview_filePreview_read_result$schema(),
|
|
136
239
|
},
|
|
137
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
240
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":409,"column":9},
|
|
138
241
|
},
|
|
139
242
|
{
|
|
140
243
|
id: '@khorsheed/dsh-file-preview#filePreview/reveal',
|
|
@@ -155,7 +258,8 @@ export const TYPERT = {
|
|
|
155
258
|
codec: {
|
|
156
259
|
mode: 'strict',
|
|
157
260
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
158
|
-
|
|
261
|
+
create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema,
|
|
262
|
+
schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema(),
|
|
159
263
|
},
|
|
160
264
|
},
|
|
161
265
|
{
|
|
@@ -165,7 +269,8 @@ export const TYPERT = {
|
|
|
165
269
|
codec: {
|
|
166
270
|
mode: 'strict',
|
|
167
271
|
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/reveal:path',
|
|
168
|
-
|
|
272
|
+
create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema,
|
|
273
|
+
schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema(),
|
|
169
274
|
},
|
|
170
275
|
},
|
|
171
276
|
],
|
|
@@ -173,9 +278,10 @@ export const TYPERT = {
|
|
|
173
278
|
result: {
|
|
174
279
|
mode: 'strict',
|
|
175
280
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewReveal',
|
|
176
|
-
|
|
281
|
+
create: _khorsheed_dsh_file_preview_filePreview_reveal_result$schema,
|
|
282
|
+
schema: _khorsheed_dsh_file_preview_filePreview_reveal_result$schema(),
|
|
177
283
|
},
|
|
178
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
284
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":489,"column":9},
|
|
179
285
|
},
|
|
180
286
|
{
|
|
181
287
|
id: '@khorsheed/dsh-file-preview#filePreview/turnFiles',
|
|
@@ -196,16 +302,18 @@ export const TYPERT = {
|
|
|
196
302
|
codec: {
|
|
197
303
|
mode: 'strict',
|
|
198
304
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
199
|
-
|
|
305
|
+
create: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema,
|
|
306
|
+
schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema(),
|
|
200
307
|
},
|
|
201
308
|
},
|
|
202
309
|
],
|
|
203
310
|
result: {
|
|
204
311
|
mode: 'strict',
|
|
205
312
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewTurnMap',
|
|
206
|
-
|
|
313
|
+
create: _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema,
|
|
314
|
+
schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema(),
|
|
207
315
|
},
|
|
208
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
316
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":353,"column":9},
|
|
209
317
|
},
|
|
210
318
|
],
|
|
211
319
|
model: {
|
|
@@ -218,6 +326,13 @@ export const TYPERT = {
|
|
|
218
326
|
"key": "filePreview",
|
|
219
327
|
"exportName": "FilePreviewService",
|
|
220
328
|
"members": [
|
|
329
|
+
{
|
|
330
|
+
"kind": "method",
|
|
331
|
+
"name": "capabilities",
|
|
332
|
+
"signature": "@Remote('capabilities') capabilities(): { protocolVersion: 1 }",
|
|
333
|
+
"summary": "Zero-session availability handshake for browser companions.",
|
|
334
|
+
"jsDoc": "/** Zero-session availability handshake for browser companions. */"
|
|
335
|
+
},
|
|
221
336
|
{
|
|
222
337
|
"kind": "method",
|
|
223
338
|
"name": "list",
|
|
@@ -230,14 +345,14 @@ export const TYPERT = {
|
|
|
230
345
|
"name": "turnFiles",
|
|
231
346
|
"signature": "@Remote('turnFiles') async turnFiles(agent: Agent): Promise<FilePreviewTurnMap>",
|
|
232
347
|
"summary": "Every turn's file mutations for the turn-tail card — the single source of truth the card renders (the client's old write/edit-only fold retired).",
|
|
233
|
-
"jsDoc": "/**\n * Every turn's file mutations for the turn-tail card — the single source of\n * truth the card renders (the client's old write/edit-only fold retired).\n * Built by folding the session log per turn (write/edit calls,
|
|
348
|
+
"jsDoc": "/**\n * Every turn's file mutations for the turn-tail card — the single source of\n * truth the card renders (the client's old write/edit-only fold retired).\n * Built by folding the session log per turn (write/edit calls, PTC\n * dispatches borrowing the root call's turn, and render-intent paths from\n * result diff meta) and merging the collector's bash-written captures by\n * their own turn. The fold is cached per session and invalidated by the log\n * watermark, so repeated card fetches do not refold. A path touched in two\n * turns appears in BOTH turn groups — per-turn attribution is exact. Only\n * paths that currently exist on disk are returned (a deleted temp script is\n * history, not a product); existence is probed fresh on every call, so the\n * cached fold is filtered per request rather than cached.\n * @param agent - owning live agent; its session log is the data source.\n * @returns existing per-turn file groups plus the scanned watermark.\n */"
|
|
234
349
|
},
|
|
235
350
|
{
|
|
236
351
|
"kind": "method",
|
|
237
352
|
"name": "read",
|
|
238
353
|
"signature": "@Remote('read') async read(agent: Agent, path: string, signal: AbortSignal): Promise<FilePreviewRead>",
|
|
239
354
|
"summary": "Read the current content of one recorded file, resolved against the session cwd and capped by `maxReadBytes`.",
|
|
240
|
-
"jsDoc": "/**\n * Read the current content of one recorded file, resolved against the\n * session cwd and capped by `maxReadBytes
|
|
355
|
+
"jsDoc": "/**\n * Read the current content of one recorded file, resolved against the\n * session cwd and capped by `maxReadBytes`. The text read is a bounded byte\n * window (`readByteRange` of cap + 1 bytes), so an oversized file costs the\n * cap, never its full size; a known oversized stat still short-circuits to\n * `too-large` before any bytes move.\n * @param agent - owning live agent; its session cwd anchors relative paths.\n * @param path - the display path recorded by the write/edit tool call.\n * @param signal - cooperative cancellation from the calling UI request.\n * @returns the classified read; `text` carries content, `image` carries a\n * browser URL, other kinds carry the size or a human-readable reason.\n */"
|
|
241
356
|
},
|
|
242
357
|
{
|
|
243
358
|
"kind": "method",
|
|
@@ -245,6 +360,13 @@ export const TYPERT = {
|
|
|
245
360
|
"signature": "@Remote('reveal') async reveal(agent: Agent, path: string, signal: AbortSignal): Promise<FilePreviewReveal>",
|
|
246
361
|
"summary": "Reveal one recorded file in the host file manager — open its folder and select the file (macOS Finder, Windows Explorer, or a select-capable desktop file manager).",
|
|
247
362
|
"jsDoc": "/**\n * Reveal one recorded file in the host file manager — open its folder and\n * select the file (macOS Finder, Windows Explorer, or a select-capable\n * desktop file manager). The display path resolves against the session cwd;\n * the native reveal runs on the host. A path that does not resolve to an\n * existing target, or a platform that cannot select, answers `revealed:\n * false` and the caller opens the parent folder instead (the pre-reveal\n * \"show in folder\" behavior), so the gesture always lands somewhere visible.\n * @param agent - owning live agent; its session cwd anchors relative paths.\n * @param path - the display path recorded by the read/write/edit tool call.\n * @param signal - cooperative cancellation from the calling UI request.\n * @returns whether the file manager selected the file, or why not.\n */"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"kind": "method",
|
|
366
|
+
"name": "openExternal",
|
|
367
|
+
"signature": "@Remote('openExternal') async openExternal(agent: Agent, path: string, app: string, signal: AbortSignal): Promise<FilePreviewOpenExternal>",
|
|
368
|
+
"summary": "Open one recorded file in a specific host application (the \"open in IDE\" gesture).",
|
|
369
|
+
"jsDoc": "/**\n * Open one recorded file in a specific host application (the \"open in IDE\"\n * gesture). The official open-in-app route only accepts directories — a\n * file path 404s — so file-exact opens go through this method: macOS\n * `open -a <App> <path>` via the same native-command runner reveal uses.\n * The browser names the application by official open-in-app catalog id\n * (probed from `/open-in-app/apps`); the id → app-name map lives in\n * open-external.ts. Non-macOS hosts and unknown ids answer without\n * launching, and the client hides the gesture.\n * @param agent - owning live agent; its session cwd anchors relative paths.\n * @param path - the display path recorded by the read/write/edit tool call.\n * @param app - official open-in-app catalog id (e.g. `cursor`).\n * @param signal - cooperative cancellation from the calling UI request.\n * @returns whether the application launched, or why not.\n */"
|
|
248
370
|
}
|
|
249
371
|
],
|
|
250
372
|
"types": [
|
|
@@ -282,11 +404,15 @@ export const TYPERT = {
|
|
|
282
404
|
},
|
|
283
405
|
{
|
|
284
406
|
"name": "AssistantMessage",
|
|
285
|
-
"declaration": "export interface AssistantMessage extends
|
|
407
|
+
"declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "AssistantProviderMetadata",
|
|
411
|
+
"declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
286
412
|
},
|
|
287
413
|
{
|
|
288
|
-
"name": "
|
|
289
|
-
"declaration": "export
|
|
414
|
+
"name": "AssistantStreamRecord",
|
|
415
|
+
"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; };"
|
|
290
416
|
},
|
|
291
417
|
{
|
|
292
418
|
"name": "AttachmentId",
|
|
@@ -322,7 +448,7 @@ export const TYPERT = {
|
|
|
322
448
|
},
|
|
323
449
|
{
|
|
324
450
|
"name": "ContentBlockMap",
|
|
325
|
-
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-
|
|
451
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
|
|
326
452
|
},
|
|
327
453
|
{
|
|
328
454
|
"name": "ContentBlockType",
|
|
@@ -340,9 +466,21 @@ export const TYPERT = {
|
|
|
340
466
|
"name": "ContinuableSubagentDescriptorData",
|
|
341
467
|
"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}"
|
|
342
468
|
},
|
|
469
|
+
{
|
|
470
|
+
"name": "DeveloperMessage",
|
|
471
|
+
"declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
|
|
472
|
+
},
|
|
343
473
|
{
|
|
344
474
|
"name": "EpochHeader",
|
|
345
|
-
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n
|
|
475
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "FileAttachmentRef",
|
|
479
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "FileBlock",
|
|
483
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
346
484
|
},
|
|
347
485
|
{
|
|
348
486
|
"name": "FilePreviewDiff",
|
|
@@ -360,6 +498,10 @@ export const TYPERT = {
|
|
|
360
498
|
"name": "FilePreviewOp",
|
|
361
499
|
"declaration": "export type FilePreviewOp = 'read' | 'write' | 'edit';"
|
|
362
500
|
},
|
|
501
|
+
{
|
|
502
|
+
"name": "FilePreviewOpenExternal",
|
|
503
|
+
"declaration": "export type FilePreviewOpenExternal = { readonly opened: true; } | { readonly opened: false; readonly reason: 'missing' | 'unknown-app' | 'unsupported-platform' | 'launch-failed'; };"
|
|
504
|
+
},
|
|
363
505
|
{
|
|
364
506
|
"name": "FilePreviewRead",
|
|
365
507
|
"declaration": "export interface FilePreviewRead {\n readonly path: string;\n readonly kind: FilePreviewReadKind;\n readonly content?: string;\n readonly url?: string;\n readonly truncated?: boolean;\n readonly htmlScripted?: boolean;\n readonly size?: number;\n readonly message?: string;\n}"
|
|
@@ -398,15 +540,19 @@ export const TYPERT = {
|
|
|
398
540
|
},
|
|
399
541
|
{
|
|
400
542
|
"name": "ImageBlock",
|
|
401
|
-
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
|
|
543
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
|
|
402
544
|
},
|
|
403
545
|
{
|
|
404
546
|
"name": "ImageMediaType",
|
|
405
547
|
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
406
548
|
},
|
|
549
|
+
{
|
|
550
|
+
"name": "ImageOffloadTarget",
|
|
551
|
+
"declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
|
|
552
|
+
},
|
|
407
553
|
{
|
|
408
554
|
"name": "Inbox",
|
|
409
|
-
"declaration": "export
|
|
555
|
+
"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}"
|
|
410
556
|
},
|
|
411
557
|
{
|
|
412
558
|
"name": "InboxTarget",
|
|
@@ -416,6 +562,10 @@ export const TYPERT = {
|
|
|
416
562
|
"name": "JsonValue",
|
|
417
563
|
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
418
564
|
},
|
|
565
|
+
{
|
|
566
|
+
"name": "KnownCatalogMode",
|
|
567
|
+
"declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
|
|
568
|
+
},
|
|
419
569
|
{
|
|
420
570
|
"name": "LlmCallConfig",
|
|
421
571
|
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
@@ -426,39 +576,75 @@ export const TYPERT = {
|
|
|
426
576
|
},
|
|
427
577
|
{
|
|
428
578
|
"name": "LlmFailure",
|
|
429
|
-
"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}"
|
|
579
|
+
"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}"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"name": "LocalAgentStreamCheckpoint",
|
|
583
|
+
"declaration": "export interface LocalAgentStreamCheckpoint extends Omit<LocalAgentStreamItem, 'revision'> {\n sessionId: string;\n opening?: boolean;\n closed?: boolean;\n append: boolean;\n}"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "LocalAgentStreamItem",
|
|
587
|
+
"declaration": "export interface LocalAgentStreamItem {\n id: string;\n turn: number;\n step: number;\n kind: 'think' | 'text';\n text: string;\n revision: number;\n receivedAt: number;\n}"
|
|
430
588
|
},
|
|
431
589
|
{
|
|
432
590
|
"name": "Message",
|
|
433
|
-
"declaration": "export
|
|
591
|
+
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "MessageBase",
|
|
595
|
+
"declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
434
596
|
},
|
|
435
597
|
{
|
|
436
598
|
"name": "MessageId",
|
|
437
599
|
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
438
600
|
},
|
|
601
|
+
{
|
|
602
|
+
"name": "MessageRoleMap",
|
|
603
|
+
"declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
|
|
604
|
+
},
|
|
439
605
|
{
|
|
440
606
|
"name": "MessageSource",
|
|
441
607
|
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
442
608
|
},
|
|
443
609
|
{
|
|
444
610
|
"name": "MessageSourceMap",
|
|
445
|
-
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n
|
|
611
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'skill-invocation': SkillInvocationSource;\n 'message-tools': { kind: 'message-tools'; readonly op?: MessageToolsOp; } & ContextFormed;\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n room: { kind: 'room'; } & ContextFormed;\n sidechat: { kind: 'sidechat'; } & ContextFormed;\n worktrees: { kind: 'worktrees'; } & ContextFormed;\n}"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"name": "MessageToolsOp",
|
|
615
|
+
"declaration": "export type MessageToolsOp = 'edit' | 'edit-trigger' | 'restore-assistant';"
|
|
446
616
|
},
|
|
447
617
|
{
|
|
448
618
|
"name": "ModelMessageSource",
|
|
449
|
-
"declaration": "export interface ModelMessageSource extends
|
|
619
|
+
"declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
|
|
450
620
|
},
|
|
451
621
|
{
|
|
452
622
|
"name": "OneShotSubagentDescriptorData",
|
|
453
623
|
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
454
624
|
},
|
|
625
|
+
{
|
|
626
|
+
"name": "PlanAttempt",
|
|
627
|
+
"declaration": "export interface PlanAttempt {\n id: string;\n deliveryId: string;\n number: number;\n status: 'queued' | 'running' | 'submitted' | 'accepted' | 'rejected' | 'failed' | 'cancelled' | 'uncertain';\n createdAt: number;\n startedAt?: number;\n settledAt?: number;\n submission?: PlanEvidence;\n review?: { decision: 'accepted' | 'rework'; by: string; reason: string; references: string[]; time: number; };\n error?: string;\n retry?: { by: string; reason: string; time: number; };\n}"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"name": "PlanBudget",
|
|
631
|
+
"declaration": "export interface PlanBudget {\n maxParallel: number;\n maxAttempts: number;\n maxAttemptsPerTask: number;\n maxActiveMs: number;\n}"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "PlanEvidence",
|
|
635
|
+
"declaration": "export interface PlanEvidence {\n summary: string;\n references: string[];\n artifacts: string[];\n}"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "PlanTask",
|
|
639
|
+
"declaration": "export interface PlanTask {\n id: string;\n title: string;\n stageId: string;\n parentId?: string;\n kind: 'group' | 'task';\n ownerMemberId?: string;\n instruction: string;\n criteria: string[];\n inputRefs: string[];\n artifactPaths: string[];\n dependsOn: string[];\n status: 'pending' | 'running' | 'submitted' | 'accepted' | 'failed' | 'cancelled';\n attempts: PlanAttempt[];\n}"
|
|
640
|
+
},
|
|
455
641
|
{
|
|
456
642
|
"name": "ProviderRequestId",
|
|
457
643
|
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
458
644
|
},
|
|
459
645
|
{
|
|
460
646
|
"name": "PtcDispatchEventData",
|
|
461
|
-
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
647
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
462
648
|
},
|
|
463
649
|
{
|
|
464
650
|
"name": "PtcDispatchStartEventData",
|
|
@@ -478,19 +664,27 @@ export const TYPERT = {
|
|
|
478
664
|
},
|
|
479
665
|
{
|
|
480
666
|
"name": "RequestContext",
|
|
481
|
-
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
|
|
667
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
482
668
|
},
|
|
483
669
|
{
|
|
484
670
|
"name": "RequestHeaderReason",
|
|
485
671
|
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
486
672
|
},
|
|
673
|
+
{
|
|
674
|
+
"name": "RoomCoordinatorEvent",
|
|
675
|
+
"declaration": "export interface RoomCoordinatorEvent {\n readonly version: 1;\n readonly memberId: string;\n readonly revision: number;\n readonly previousMemberId: string;\n readonly handoff: string;\n}"
|
|
676
|
+
},
|
|
487
677
|
{
|
|
488
678
|
"name": "RoomCreatedEvent",
|
|
489
679
|
"declaration": "export interface RoomCreatedEvent {\n readonly version: 1;\n}"
|
|
490
680
|
},
|
|
681
|
+
{
|
|
682
|
+
"name": "RoomDeliveryStateEvent",
|
|
683
|
+
"declaration": "export interface RoomDeliveryStateEvent {\n readonly id: string;\n readonly dispatchSeq: number;\n readonly memberId: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed' | 'uncertain';\n readonly text?: string;\n readonly error?: string;\n}"
|
|
684
|
+
},
|
|
491
685
|
{
|
|
492
686
|
"name": "RoomDispatchEvent",
|
|
493
|
-
"declaration": "export interface RoomDispatchEvent {\n readonly targets: readonly string[];\n readonly text: string;\n}"
|
|
687
|
+
"declaration": "export interface RoomDispatchEvent {\n readonly plan?: { readonly goalId: string; readonly taskId?: string; readonly attemptId?: string; };\n readonly requestSignature?: string;\n readonly id?: string;\n readonly targetIds?: readonly string[];\n readonly origin?: 'human' | 'coordinator' | 'report' | 'relay';\n readonly replyTo?: string;\n readonly reportFor?: string;\n readonly targets: readonly string[];\n readonly text: string;\n}"
|
|
494
688
|
},
|
|
495
689
|
{
|
|
496
690
|
"name": "RoomGoalEvent",
|
|
@@ -502,7 +696,7 @@ export const TYPERT = {
|
|
|
502
696
|
},
|
|
503
697
|
{
|
|
504
698
|
"name": "RoomMemberAddedEvent",
|
|
505
|
-
"declaration": "export interface RoomMemberAddedEvent {\n readonly name: string;\n readonly kind: 'main-agent' | 'cli';\n readonly provider?: string;\n readonly instructions?: string;\n readonly invitedBy: 'human' | 'agent';\n readonly cwd?: string;\n readonly childSessionId?: SessionId;\n}"
|
|
699
|
+
"declaration": "export interface RoomMemberAddedEvent {\n readonly id?: string;\n readonly name: string;\n readonly kind: 'main-agent' | 'cli';\n readonly provider?: string;\n readonly instructions?: string;\n readonly invitedBy: 'human' | 'agent';\n readonly cwd?: string;\n readonly model?: string;\n readonly childSessionId?: SessionId;\n}"
|
|
506
700
|
},
|
|
507
701
|
{
|
|
508
702
|
"name": "RoomMemberRemovedEvent",
|
|
@@ -510,7 +704,11 @@ export const TYPERT = {
|
|
|
510
704
|
},
|
|
511
705
|
{
|
|
512
706
|
"name": "RoomMemberUpdatedEvent",
|
|
513
|
-
"declaration": "export interface RoomMemberUpdatedEvent {\n readonly name: string;\n readonly rename?: string;\n readonly instructions?: string | null;\n readonly cwd?: string | null;\n readonly childSessionId?: SessionId;\n}"
|
|
707
|
+
"declaration": "export interface RoomMemberUpdatedEvent {\n readonly name: string;\n readonly rename?: string;\n readonly instructions?: string | null;\n readonly cwd?: string | null;\n readonly model?: string | null;\n readonly childSessionId?: SessionId;\n}"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "RoomPlan",
|
|
711
|
+
"declaration": "export interface RoomPlan {\n version: 1;\n id: string;\n revision: number;\n objective: string;\n status: 'draft' | 'running' | 'paused' | 'completed' | 'cancelled';\n reason?: string;\n budget: PlanBudget;\n activeMs: number;\n resumedAt?: number;\n stages: { id: string; title: string; }[];\n tasks: PlanTask[];\n completion?: PlanEvidence;\n requests: { id: string; signature: string; }[];\n}"
|
|
514
712
|
},
|
|
515
713
|
{
|
|
516
714
|
"name": "RoomRelayEvent",
|
|
@@ -522,15 +720,15 @@ export const TYPERT = {
|
|
|
522
720
|
},
|
|
523
721
|
{
|
|
524
722
|
"name": "RoomRunStateEvent",
|
|
525
|
-
"declaration": "export interface RoomRunStateEvent {\n readonly member: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed';\n readonly startedAt: number;\n readonly elapsedMs?: number;\n readonly error?: string;\n}"
|
|
723
|
+
"declaration": "export interface RoomRunStateEvent {\n readonly runId?: string;\n readonly member: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed';\n readonly startedAt: number;\n readonly elapsedMs?: number;\n readonly error?: string;\n}"
|
|
526
724
|
},
|
|
527
725
|
{
|
|
528
726
|
"name": "RoomSpeechEvent",
|
|
529
|
-
"declaration": "export interface RoomSpeechEvent {\n readonly member: string;\n readonly text: string;\n readonly childSessionId?: SessionId;\n readonly durationMs?: number;\n}"
|
|
727
|
+
"declaration": "export interface RoomSpeechEvent {\n readonly interrupted?: 'cancelled' | 'failed';\n readonly member: string;\n readonly text: string;\n readonly childSessionId?: SessionId;\n readonly durationMs?: number;\n}"
|
|
530
728
|
},
|
|
531
729
|
{
|
|
532
730
|
"name": "RoomTaskAddedEvent",
|
|
533
|
-
"declaration": "export interface RoomTaskAddedEvent {\n readonly id: string;\n readonly member: string;\n readonly title: string;\n readonly status: 'pending' | 'in_progress';\n readonly blockedBy?: string;\n}"
|
|
731
|
+
"declaration": "export interface RoomTaskAddedEvent {\n readonly deliveryId?: string;\n readonly id: string;\n readonly member: string;\n readonly title: string;\n readonly status: 'pending' | 'in_progress';\n readonly blockedBy?: string;\n}"
|
|
534
732
|
},
|
|
535
733
|
{
|
|
536
734
|
"name": "RoomTaskEditedEvent",
|
|
@@ -546,15 +744,15 @@ export const TYPERT = {
|
|
|
546
744
|
},
|
|
547
745
|
{
|
|
548
746
|
"name": "Session",
|
|
549
|
-
"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] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
747
|
+
"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 readonly firstLifecycleSeq: 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}"
|
|
550
748
|
},
|
|
551
749
|
{
|
|
552
750
|
"name": "SessionEvent",
|
|
553
|
-
"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 ? {
|
|
751
|
+
"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];"
|
|
554
752
|
},
|
|
555
753
|
{
|
|
556
754
|
"name": "SessionEventMap",
|
|
557
|
-
"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 '
|
|
755
|
+
"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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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 'subagent/descriptor': SubagentDescriptorData;\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'local-agent/stream': LocalAgentStreamCheckpoint;\n 'room/created': RoomCreatedEvent;\n 'room/member-added': RoomMemberAddedEvent;\n 'room/member-updated': RoomMemberUpdatedEvent;\n 'room/member-removed': RoomMemberRemovedEvent;\n 'room/dispatch': RoomDispatchEvent;\n 'room/speech': RoomSpeechEvent;\n 'room/run-state': RoomRunStateEvent;\n 'room/relay': RoomRelayEvent;\n 'room/relay-resolved': RoomRelayResolvedEvent;\n 'room/task-added': RoomTaskAddedEvent;\n 'room/task-updated': RoomTaskUpdatedEvent;\n 'room/task-edited': RoomTaskEditedEvent;\n 'room/goal': RoomGoalEvent;\n 'room/plan-state': RoomPlan;\n 'room/coordinator': RoomCoordinatorEvent;\n 'room/delivery-state': RoomDeliveryStateEvent;\n}"
|
|
558
756
|
},
|
|
559
757
|
{
|
|
560
758
|
"name": "SessionEventType",
|
|
@@ -562,7 +760,7 @@ export const TYPERT = {
|
|
|
562
760
|
},
|
|
563
761
|
{
|
|
564
762
|
"name": "SessionHeader",
|
|
565
|
-
"declaration": "export interface SessionHeader {\n readonly version:
|
|
763
|
+
"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}"
|
|
566
764
|
},
|
|
567
765
|
{
|
|
568
766
|
"name": "SessionId",
|
|
@@ -578,15 +776,15 @@ export const TYPERT = {
|
|
|
578
776
|
},
|
|
579
777
|
{
|
|
580
778
|
"name": "SessionSurface",
|
|
581
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
779
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
582
780
|
},
|
|
583
781
|
{
|
|
584
782
|
"name": "SessionTitleEventData",
|
|
585
783
|
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
586
784
|
},
|
|
587
785
|
{
|
|
588
|
-
"name": "
|
|
589
|
-
"declaration": "export interface
|
|
786
|
+
"name": "SessionTitleModelIdentity",
|
|
787
|
+
"declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
|
|
590
788
|
},
|
|
591
789
|
{
|
|
592
790
|
"name": "SessionTitleProviderId",
|
|
@@ -594,12 +792,20 @@ export const TYPERT = {
|
|
|
594
792
|
},
|
|
595
793
|
{
|
|
596
794
|
"name": "SessionTitleSource",
|
|
597
|
-
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?:
|
|
795
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "SkillInvocationSource",
|
|
799
|
+
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
598
800
|
},
|
|
599
801
|
{
|
|
600
802
|
"name": "StreamChunk",
|
|
601
803
|
"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; };"
|
|
602
804
|
},
|
|
805
|
+
{
|
|
806
|
+
"name": "SubagentCatalogEvent",
|
|
807
|
+
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
|
|
808
|
+
},
|
|
603
809
|
{
|
|
604
810
|
"name": "SubagentDescriptorBase",
|
|
605
811
|
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
@@ -614,15 +820,27 @@ export const TYPERT = {
|
|
|
614
820
|
},
|
|
615
821
|
{
|
|
616
822
|
"name": "SurfaceEventType",
|
|
617
|
-
"declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
|
|
823
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
618
824
|
},
|
|
619
825
|
{
|
|
620
826
|
"name": "SurfaceIntent",
|
|
621
|
-
"declaration": "export
|
|
827
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
622
828
|
},
|
|
623
829
|
{
|
|
624
830
|
"name": "SurfaceOp",
|
|
625
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace';
|
|
831
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"name": "SystemMessage",
|
|
835
|
+
"declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "SystemPromptMessageSource",
|
|
839
|
+
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "SystemPromptUpdate",
|
|
843
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
626
844
|
},
|
|
627
845
|
{
|
|
628
846
|
"name": "TextBlock",
|
|
@@ -636,6 +854,10 @@ export const TYPERT = {
|
|
|
636
854
|
"name": "TokenUsage",
|
|
637
855
|
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
638
856
|
},
|
|
857
|
+
{
|
|
858
|
+
"name": "ToolAdditionBlock",
|
|
859
|
+
"declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
|
|
860
|
+
},
|
|
639
861
|
{
|
|
640
862
|
"name": "ToolCallBlock",
|
|
641
863
|
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
@@ -649,20 +871,20 @@ export const TYPERT = {
|
|
|
649
871
|
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
650
872
|
},
|
|
651
873
|
{
|
|
652
|
-
"name": "
|
|
653
|
-
"declaration": "export interface
|
|
874
|
+
"name": "ToolRemovalBlock",
|
|
875
|
+
"declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
|
|
654
876
|
},
|
|
655
877
|
{
|
|
656
|
-
"name": "
|
|
657
|
-
"declaration": "export interface
|
|
878
|
+
"name": "ToolRestriction",
|
|
879
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
658
880
|
},
|
|
659
881
|
{
|
|
660
882
|
"name": "ToolResultMessage",
|
|
661
|
-
"declaration": "export interface ToolResultMessage extends
|
|
883
|
+
"declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
|
|
662
884
|
},
|
|
663
885
|
{
|
|
664
886
|
"name": "ToolSchema",
|
|
665
|
-
"declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
887
|
+
"declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
666
888
|
},
|
|
667
889
|
{
|
|
668
890
|
"name": "TurnEndCancelCause",
|
|
@@ -674,11 +896,11 @@ export const TYPERT = {
|
|
|
674
896
|
},
|
|
675
897
|
{
|
|
676
898
|
"name": "TurnEndReasonMap",
|
|
677
|
-
"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}"
|
|
899
|
+
"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 forked: { kind: 'forked'; };\n}"
|
|
678
900
|
},
|
|
679
901
|
{
|
|
680
902
|
"name": "UserMessage",
|
|
681
|
-
"declaration": "export interface UserMessage extends
|
|
903
|
+
"declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
|
|
682
904
|
}
|
|
683
905
|
]
|
|
684
906
|
}
|