@deepseek-ai/dsh-api-session-controller 0.1.2-rc.1 → 0.1.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +16 -6
- package/README.zh.md +16 -6
- package/lib/client.js +838 -58
- package/lib/index.js +376 -243
- package/lib/typert.host.js +236 -178
- package/lib/typert.remote-client.js +97 -115
- package/lib/types/agent.js +6 -8
- package/lib/types/assistant-stream.d.ts +26 -0
- package/lib/types/assistant-stream.js +83 -0
- package/lib/types/client/contract/events.d.ts +38 -7
- package/lib/types/client/contract/events.js +21 -0
- package/lib/types/client/contract/session.d.ts +7 -7
- package/lib/types/client/contract/snapshot.d.ts +15 -2
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/index.js +2 -0
- package/lib/types/client/session-wire-event.d.ts +11 -0
- package/lib/types/client/session-wire-event.js +43 -0
- package/lib/types/client/sessions/assistant-stream.d.ts +51 -0
- package/lib/types/client/sessions/assistant-stream.js +168 -0
- package/lib/types/client/sessions/history-records.d.ts +2 -2
- package/lib/types/client/sessions/history-records.js +3 -8
- package/lib/types/client/sessions/queue-mirror.js +3 -3
- package/lib/types/client/sessions/remotes.d.ts +2 -2
- package/lib/types/client/sessions/session.d.ts +3 -1
- package/lib/types/client/sessions/session.js +63 -15
- package/lib/types/client/transport.d.ts +7 -3
- package/lib/types/client/transport.js +24 -3
- package/lib/types/commands.d.ts +1 -1
- package/lib/types/commands.js +112 -32
- package/lib/types/control.d.ts +0 -1
- package/lib/types/control.js +19 -22
- package/lib/types/history.d.ts +2 -1
- package/lib/types/history.js +66 -37
- package/lib/types/index.d.ts +4 -4
- package/lib/types/index.js +15 -5
- package/lib/types/list.d.ts +2 -9
- package/lib/types/list.js +10 -124
- package/lib/types/media-references.d.ts +16 -0
- package/lib/types/media-references.js +77 -0
- package/lib/types/types.d.ts +85 -35
- package/package.json +71 -58
package/lib/typert.host.js
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
4
|
const ContentBlockRemoteCodec$schema = z.union([z.object({
|
|
5
|
+
'type': z.literal("file"),
|
|
6
|
+
'attachment': z.object({
|
|
7
|
+
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
8
|
+
'name': z.string(),
|
|
9
|
+
'bytes': z.number(),
|
|
10
|
+
}),
|
|
11
|
+
}), z.object({
|
|
5
12
|
'type': z.literal("text"),
|
|
6
13
|
'text': z.string(),
|
|
7
14
|
}), z.object({
|
|
@@ -92,6 +99,10 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = z.
|
|
|
92
99
|
'projections': z.record(z.intersection(z.string(), z.unknown()), z.object({
|
|
93
100
|
'asOfSeq': z.number().readonly(),
|
|
94
101
|
'values': z.intersection(z.object({
|
|
102
|
+
'inbox': z.object({
|
|
103
|
+
'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
|
|
104
|
+
'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
|
|
105
|
+
}).optional(),
|
|
95
106
|
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
96
107
|
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
97
108
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
@@ -210,6 +221,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema
|
|
|
210
221
|
'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
|
|
211
222
|
})]).readonly(),
|
|
212
223
|
'maxMessages': z.number().readonly().optional(),
|
|
224
|
+
'assistantStream': z.literal(true).readonly().optional(),
|
|
213
225
|
})
|
|
214
226
|
const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.union([z.object({
|
|
215
227
|
'type': z.literal("event").readonly(),
|
|
@@ -219,12 +231,8 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.u
|
|
|
219
231
|
'time': z.number().readonly(),
|
|
220
232
|
'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
|
|
221
233
|
'ignorable': z.literal(true).readonly().optional(),
|
|
222
|
-
'sourceEventSeqs': z.
|
|
223
|
-
'surfaceOp': z.union([z.literal(
|
|
224
|
-
'op': z.literal("replace").readonly(),
|
|
225
|
-
'start': z.number().readonly(),
|
|
226
|
-
'end': z.number().readonly(),
|
|
227
|
-
})]).readonly().optional(),
|
|
234
|
+
'sourceEventSeqs': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly().optional(),
|
|
235
|
+
'surfaceOp': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly().optional(),
|
|
228
236
|
}).readonly(),
|
|
229
237
|
}), z.object({
|
|
230
238
|
'type': z.literal("snapshot").readonly(),
|
|
@@ -234,13 +242,13 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.u
|
|
|
234
242
|
'createdAt': z.number().readonly(),
|
|
235
243
|
'cwd': z.string().readonly().optional(),
|
|
236
244
|
'parentSession': z.intersection(z.string(), z.unknown()).readonly().optional(),
|
|
237
|
-
'
|
|
245
|
+
'isSeeded': z.boolean().readonly(),
|
|
238
246
|
'origin': z.literal("subagent").readonly().optional(),
|
|
239
247
|
'delegationDepth': z.number().readonly().optional(),
|
|
240
248
|
'agentPreset': z.string().readonly().optional(),
|
|
241
249
|
}).readonly(),
|
|
242
250
|
'cursor': z.number().readonly(),
|
|
243
|
-
'records': z.array(z.
|
|
251
|
+
'records': z.array(z.object({
|
|
244
252
|
'type': z.literal("event").readonly(),
|
|
245
253
|
'event': z.object({
|
|
246
254
|
'type': z.string().readonly(),
|
|
@@ -248,56 +256,18 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.u
|
|
|
248
256
|
'time': z.number().readonly(),
|
|
249
257
|
'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
|
|
250
258
|
'ignorable': z.literal(true).readonly().optional(),
|
|
251
|
-
'sourceEventSeqs': z.
|
|
252
|
-
'surfaceOp': z.union([z.literal(
|
|
253
|
-
'op': z.literal("replace").readonly(),
|
|
254
|
-
'start': z.number().readonly(),
|
|
255
|
-
'end': z.number().readonly(),
|
|
256
|
-
})]).readonly().optional(),
|
|
259
|
+
'sourceEventSeqs': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly().optional(),
|
|
260
|
+
'surfaceOp': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly().optional(),
|
|
257
261
|
}).readonly(),
|
|
258
|
-
})
|
|
259
|
-
'type': z.literal("chunks").readonly(),
|
|
260
|
-
'event': z.union([z.object({
|
|
261
|
-
'type': z.literal("chunkrow/text-chunks").readonly(),
|
|
262
|
-
'seq': z.number().readonly(),
|
|
263
|
-
'time': z.number().readonly(),
|
|
264
|
-
'data': z.object({
|
|
265
|
-
'texts': z.array(z.string()),
|
|
266
|
-
'turn': z.number(),
|
|
267
|
-
'step': z.number(),
|
|
268
|
-
'index': z.number(),
|
|
269
|
-
'dt': z.array(z.number()),
|
|
270
|
-
}).readonly(),
|
|
271
|
-
}), z.object({
|
|
272
|
-
'type': z.literal("chunkrow/reasoning-chunks").readonly(),
|
|
273
|
-
'seq': z.number().readonly(),
|
|
274
|
-
'time': z.number().readonly(),
|
|
275
|
-
'data': z.object({
|
|
276
|
-
'texts': z.array(z.string()),
|
|
277
|
-
'turn': z.number(),
|
|
278
|
-
'step': z.number(),
|
|
279
|
-
'index': z.number(),
|
|
280
|
-
'dt': z.array(z.number()),
|
|
281
|
-
}).readonly(),
|
|
282
|
-
}), z.object({
|
|
283
|
-
'type': z.literal("chunkrow/tool-call-chunks").readonly(),
|
|
284
|
-
'seq': z.number().readonly(),
|
|
285
|
-
'time': z.number().readonly(),
|
|
286
|
-
'data': z.object({
|
|
287
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
288
|
-
'name': z.string().optional(),
|
|
289
|
-
'args': z.array(z.string()),
|
|
290
|
-
'turn': z.number(),
|
|
291
|
-
'step': z.number(),
|
|
292
|
-
'index': z.number(),
|
|
293
|
-
'dt': z.array(z.number()),
|
|
294
|
-
}).readonly(),
|
|
295
|
-
})]).readonly(),
|
|
296
|
-
})])).readonly(),
|
|
262
|
+
})).readonly(),
|
|
297
263
|
'hasMore': z.boolean().readonly(),
|
|
298
264
|
'projections': z.object({
|
|
299
265
|
'asOfSeq': z.number().readonly(),
|
|
300
266
|
'values': z.intersection(z.object({
|
|
267
|
+
'inbox': z.object({
|
|
268
|
+
'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly(),
|
|
269
|
+
'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly(),
|
|
270
|
+
}).optional(),
|
|
301
271
|
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
302
272
|
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
303
273
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
@@ -362,6 +332,46 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.u
|
|
|
362
332
|
})]).optional(),
|
|
363
333
|
}), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly()).readonly(),
|
|
364
334
|
}).readonly(),
|
|
335
|
+
'assistantStream': z.object({
|
|
336
|
+
'revision': z.number().readonly(),
|
|
337
|
+
'activeAttempt': z.object({
|
|
338
|
+
'attemptId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
339
|
+
'startedAfterSeq': z.union([z.intersection(z.number(), z.unknown()), z.literal(-1)]).readonly(),
|
|
340
|
+
'turn': z.number().readonly(),
|
|
341
|
+
'step': z.number().readonly(),
|
|
342
|
+
'nextIndex': z.number().readonly(),
|
|
343
|
+
'stream': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly(),
|
|
344
|
+
}).readonly().optional(),
|
|
345
|
+
}).readonly().optional(),
|
|
346
|
+
}), z.object({
|
|
347
|
+
'type': z.literal("assistant-stream").readonly(),
|
|
348
|
+
'frame': z.union([z.object({
|
|
349
|
+
'type': z.literal("start").readonly(),
|
|
350
|
+
'attemptId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
351
|
+
'revision': z.number().readonly(),
|
|
352
|
+
'startedAfterSeq': z.union([z.intersection(z.number(), z.unknown()), z.literal(-1)]).readonly(),
|
|
353
|
+
'turn': z.number().readonly(),
|
|
354
|
+
'step': z.number().readonly(),
|
|
355
|
+
}), z.object({
|
|
356
|
+
'type': z.literal("chunk").readonly(),
|
|
357
|
+
'attemptId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
358
|
+
'revision': z.number().readonly(),
|
|
359
|
+
'index': z.number().readonly(),
|
|
360
|
+
'time': z.number().readonly(),
|
|
361
|
+
'chunk': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
|
|
362
|
+
}), z.object({
|
|
363
|
+
'type': z.literal("end").readonly(),
|
|
364
|
+
'attemptId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
365
|
+
'revision': z.number().readonly(),
|
|
366
|
+
'index': z.number().readonly(),
|
|
367
|
+
'outcome': z.union([z.object({
|
|
368
|
+
'kind': z.literal("committed").readonly(),
|
|
369
|
+
'eventType': z.union([z.literal("assistant/message"), z.literal("assistant/attempt")]).readonly(),
|
|
370
|
+
'seq': z.number().readonly(),
|
|
371
|
+
}), z.object({
|
|
372
|
+
'kind': z.literal("abandoned").readonly(),
|
|
373
|
+
})]).readonly(),
|
|
374
|
+
})]).readonly(),
|
|
365
375
|
})])
|
|
366
376
|
const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema = z.object({
|
|
367
377
|
'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
@@ -385,6 +395,10 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = z.obj
|
|
|
385
395
|
'projections': z.object({
|
|
386
396
|
'asOfSeq': z.number().readonly(),
|
|
387
397
|
'values': z.intersection(z.object({
|
|
398
|
+
'inbox': z.object({
|
|
399
|
+
'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])).readonly(),
|
|
400
|
+
'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])).readonly(),
|
|
401
|
+
}).optional(),
|
|
388
402
|
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
389
403
|
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
390
404
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
@@ -502,7 +516,7 @@ const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema =
|
|
|
502
516
|
'maxMessages': z.number().readonly().optional(),
|
|
503
517
|
})
|
|
504
518
|
const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = z.object({
|
|
505
|
-
'records': z.array(z.
|
|
519
|
+
'records': z.array(z.object({
|
|
506
520
|
'type': z.literal("event").readonly(),
|
|
507
521
|
'event': z.object({
|
|
508
522
|
'type': z.string().readonly(),
|
|
@@ -510,52 +524,10 @@ const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = z.obj
|
|
|
510
524
|
'time': z.number().readonly(),
|
|
511
525
|
'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))]).readonly(),
|
|
512
526
|
'ignorable': z.literal(true).readonly().optional(),
|
|
513
|
-
'sourceEventSeqs': z.
|
|
514
|
-
'surfaceOp': z.union([z.literal(
|
|
515
|
-
'op': z.literal("replace").readonly(),
|
|
516
|
-
'start': z.number().readonly(),
|
|
517
|
-
'end': z.number().readonly(),
|
|
518
|
-
})]).readonly().optional(),
|
|
519
|
-
}).readonly(),
|
|
520
|
-
}), z.object({
|
|
521
|
-
'type': z.literal("chunks").readonly(),
|
|
522
|
-
'event': z.union([z.object({
|
|
523
|
-
'type': z.literal("chunkrow/text-chunks").readonly(),
|
|
524
|
-
'seq': z.number().readonly(),
|
|
525
|
-
'time': z.number().readonly(),
|
|
526
|
-
'data': z.object({
|
|
527
|
-
'texts': z.array(z.string()),
|
|
528
|
-
'turn': z.number(),
|
|
529
|
-
'step': z.number(),
|
|
530
|
-
'index': z.number(),
|
|
531
|
-
'dt': z.array(z.number()),
|
|
532
|
-
}).readonly(),
|
|
533
|
-
}), z.object({
|
|
534
|
-
'type': z.literal("chunkrow/reasoning-chunks").readonly(),
|
|
535
|
-
'seq': z.number().readonly(),
|
|
536
|
-
'time': z.number().readonly(),
|
|
537
|
-
'data': z.object({
|
|
538
|
-
'texts': z.array(z.string()),
|
|
539
|
-
'turn': z.number(),
|
|
540
|
-
'step': z.number(),
|
|
541
|
-
'index': z.number(),
|
|
542
|
-
'dt': z.array(z.number()),
|
|
543
|
-
}).readonly(),
|
|
544
|
-
}), z.object({
|
|
545
|
-
'type': z.literal("chunkrow/tool-call-chunks").readonly(),
|
|
546
|
-
'seq': z.number().readonly(),
|
|
547
|
-
'time': z.number().readonly(),
|
|
548
|
-
'data': z.object({
|
|
549
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
550
|
-
'name': z.string().optional(),
|
|
551
|
-
'args': z.array(z.string()),
|
|
552
|
-
'turn': z.number(),
|
|
553
|
-
'step': z.number(),
|
|
554
|
-
'index': z.number(),
|
|
555
|
-
'dt': z.array(z.number()),
|
|
527
|
+
'sourceEventSeqs': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))]).readonly().optional(),
|
|
528
|
+
'surfaceOp': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))]).readonly().optional(),
|
|
556
529
|
}).readonly(),
|
|
557
|
-
})
|
|
558
|
-
})])).readonly(),
|
|
530
|
+
})).readonly(),
|
|
559
531
|
'hasMore': z.boolean().readonly(),
|
|
560
532
|
})
|
|
561
533
|
const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema = z.object({
|
|
@@ -570,6 +542,9 @@ const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema
|
|
|
570
542
|
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
571
543
|
'data': z.string().readonly(),
|
|
572
544
|
'name': z.string().readonly().optional(),
|
|
545
|
+
}), z.object({
|
|
546
|
+
'type': z.literal("file").readonly(),
|
|
547
|
+
'receiptId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
573
548
|
})])).readonly(),
|
|
574
549
|
'clientTimeZone': z.string().readonly().optional(),
|
|
575
550
|
})
|
|
@@ -613,6 +588,13 @@ const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$sc
|
|
|
613
588
|
'action': z.union([z.object({
|
|
614
589
|
'kind': z.literal("edit").readonly(),
|
|
615
590
|
'content': z.array(z.union([z.object({
|
|
591
|
+
'type': z.literal("file"),
|
|
592
|
+
'attachment': z.object({
|
|
593
|
+
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
594
|
+
'name': z.string(),
|
|
595
|
+
'bytes': z.number(),
|
|
596
|
+
}),
|
|
597
|
+
}), z.object({
|
|
616
598
|
'type': z.literal("text"),
|
|
617
599
|
'text': z.string(),
|
|
618
600
|
}), z.object({
|
|
@@ -734,7 +716,7 @@ export const TYPERT = {
|
|
|
734
716
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
|
|
735
717
|
schema: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
|
|
736
718
|
},
|
|
737
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
719
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":342,"column":3},
|
|
738
720
|
},
|
|
739
721
|
{
|
|
740
722
|
id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
|
|
@@ -759,7 +741,7 @@ export const TYPERT = {
|
|
|
759
741
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
|
|
760
742
|
schema: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
|
|
761
743
|
},
|
|
762
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
744
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":362,"column":3},
|
|
763
745
|
},
|
|
764
746
|
{
|
|
765
747
|
id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
|
|
@@ -774,7 +756,7 @@ export const TYPERT = {
|
|
|
774
756
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
|
|
775
757
|
schema: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
|
|
776
758
|
},
|
|
777
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
759
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":267,"column":3},
|
|
778
760
|
},
|
|
779
761
|
{
|
|
780
762
|
id: '@deepseek-ai/dsh-api-session-controller#session/control',
|
|
@@ -791,7 +773,7 @@ export const TYPERT = {
|
|
|
791
773
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
|
|
792
774
|
schema: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
|
|
793
775
|
},
|
|
794
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
776
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":395,"column":3},
|
|
795
777
|
},
|
|
796
778
|
{
|
|
797
779
|
id: '@deepseek-ai/dsh-api-session-controller#session/create',
|
|
@@ -816,7 +798,7 @@ export const TYPERT = {
|
|
|
816
798
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
|
|
817
799
|
schema: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
|
|
818
800
|
},
|
|
819
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
801
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":239,"column":3},
|
|
820
802
|
},
|
|
821
803
|
{
|
|
822
804
|
id: '@deepseek-ai/dsh-api-session-controller#session/follow',
|
|
@@ -843,7 +825,7 @@ export const TYPERT = {
|
|
|
843
825
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
|
|
844
826
|
schema: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
|
|
845
827
|
},
|
|
846
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
828
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":385,"column":3},
|
|
847
829
|
},
|
|
848
830
|
{
|
|
849
831
|
id: '@deepseek-ai/dsh-api-session-controller#session/fork',
|
|
@@ -868,7 +850,7 @@ export const TYPERT = {
|
|
|
868
850
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
|
|
869
851
|
schema: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
|
|
870
852
|
},
|
|
871
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
853
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":320,"column":3},
|
|
872
854
|
},
|
|
873
855
|
{
|
|
874
856
|
id: '@deepseek-ai/dsh-api-session-controller#session/list',
|
|
@@ -894,7 +876,7 @@ export const TYPERT = {
|
|
|
894
876
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
|
|
895
877
|
schema: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
|
|
896
878
|
},
|
|
897
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
879
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":218,"column":9},
|
|
898
880
|
},
|
|
899
881
|
{
|
|
900
882
|
id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
|
|
@@ -909,7 +891,7 @@ export const TYPERT = {
|
|
|
909
891
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
|
|
910
892
|
schema: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
|
|
911
893
|
},
|
|
912
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
894
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":258,"column":3},
|
|
913
895
|
},
|
|
914
896
|
{
|
|
915
897
|
id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
|
|
@@ -935,7 +917,7 @@ export const TYPERT = {
|
|
|
935
917
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
|
|
936
918
|
schema: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
|
|
937
919
|
},
|
|
938
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
920
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":279,"column":9},
|
|
939
921
|
},
|
|
940
922
|
{
|
|
941
923
|
id: '@deepseek-ai/dsh-api-session-controller#session/page',
|
|
@@ -961,7 +943,7 @@ export const TYPERT = {
|
|
|
961
943
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
|
|
962
944
|
schema: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
|
|
963
945
|
},
|
|
964
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
946
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":373,"column":3},
|
|
965
947
|
},
|
|
966
948
|
{
|
|
967
949
|
id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
|
|
@@ -987,7 +969,7 @@ export const TYPERT = {
|
|
|
987
969
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
|
|
988
970
|
schema: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
|
|
989
971
|
},
|
|
990
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
972
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":331,"column":3},
|
|
991
973
|
},
|
|
992
974
|
{
|
|
993
975
|
id: '@deepseek-ai/dsh-api-session-controller#session/rename',
|
|
@@ -1012,7 +994,7 @@ export const TYPERT = {
|
|
|
1012
994
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
|
|
1013
995
|
schema: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
|
|
1014
996
|
},
|
|
1015
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
997
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":310,"column":3},
|
|
1016
998
|
},
|
|
1017
999
|
{
|
|
1018
1000
|
id: '@deepseek-ai/dsh-api-session-controller#session/search',
|
|
@@ -1038,7 +1020,7 @@ export const TYPERT = {
|
|
|
1038
1020
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
|
|
1039
1021
|
schema: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
|
|
1040
1022
|
},
|
|
1041
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1023
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":229,"column":3},
|
|
1042
1024
|
},
|
|
1043
1025
|
{
|
|
1044
1026
|
id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
|
|
@@ -1063,7 +1045,7 @@ export const TYPERT = {
|
|
|
1063
1045
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
|
|
1064
1046
|
schema: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
|
|
1065
1047
|
},
|
|
1066
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1048
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":249,"column":3},
|
|
1067
1049
|
},
|
|
1068
1050
|
{
|
|
1069
1051
|
id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
|
|
@@ -1088,7 +1070,7 @@ export const TYPERT = {
|
|
|
1088
1070
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
|
|
1089
1071
|
schema: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
|
|
1090
1072
|
},
|
|
1091
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1073
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":352,"column":3},
|
|
1092
1074
|
},
|
|
1093
1075
|
{
|
|
1094
1076
|
id: '@deepseek-ai/dsh-api-session-controller#skills/list',
|
|
@@ -1244,7 +1226,7 @@ export const TYPERT = {
|
|
|
1244
1226
|
"name": "follow",
|
|
1245
1227
|
"signature": "@Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
|
|
1246
1228
|
"summary": "Follow one Session log from its opening or resume cursor.",
|
|
1247
|
-
"jsDoc": "/**\n * Follow one Session log from its opening or resume cursor.\n * @param request - durable address and last committed sequence already held by the caller.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns a complete opening snapshot followed by gap-free event frames.\n */"
|
|
1229
|
+
"jsDoc": "/**\n * Follow one Session log from its opening or resume cursor.\n * @param request - durable address and last committed sequence already held by the caller.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns a complete opening snapshot followed by gap-free durable event\n * frames and optional cursorless assistant-stream frames.\n */"
|
|
1248
1230
|
},
|
|
1249
1231
|
{
|
|
1250
1232
|
"kind": "method",
|
|
@@ -1303,6 +1285,10 @@ export const TYPERT = {
|
|
|
1303
1285
|
"name": "AssistantProvenance",
|
|
1304
1286
|
"declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
1305
1287
|
},
|
|
1288
|
+
{
|
|
1289
|
+
"name": "AssistantStreamRecord",
|
|
1290
|
+
"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; };"
|
|
1291
|
+
},
|
|
1306
1292
|
{
|
|
1307
1293
|
"name": "AttachmentId",
|
|
1308
1294
|
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
@@ -1319,14 +1305,6 @@ export const TYPERT = {
|
|
|
1319
1305
|
"name": "CancelOptions",
|
|
1320
1306
|
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
1321
1307
|
},
|
|
1322
|
-
{
|
|
1323
|
-
"name": "ChunkRow",
|
|
1324
|
-
"declaration": "export type ChunkRow = { type: 'text-chunks'; seq0: SessionSeqType; time0: number; data: TextRunData; } | { type: 'reasoning-chunks'; seq0: SessionSeqType; time0: number; data: TextRunData; } | { type: 'tool-call-chunks'; seq0: SessionSeqType; time0: number; data: ToolCallRunData; };"
|
|
1325
|
-
},
|
|
1326
|
-
{
|
|
1327
|
-
"name": "ChunkRowEvent",
|
|
1328
|
-
"declaration": "export type ChunkRowEvent = { [Kind in ChunkRow['type']]: { readonly type: `chunkrow/${Kind}`; readonly seq: number; readonly time: number; readonly data: Extract<ChunkRow, { readonly type: Kind; }>['data']; } }[ChunkRow['type']];"
|
|
1329
|
-
},
|
|
1330
1308
|
{
|
|
1331
1309
|
"name": "CommandId",
|
|
1332
1310
|
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
@@ -1349,7 +1327,7 @@ export const TYPERT = {
|
|
|
1349
1327
|
},
|
|
1350
1328
|
{
|
|
1351
1329
|
"name": "ContentBlockMap",
|
|
1352
|
-
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
1330
|
+
"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}"
|
|
1353
1331
|
},
|
|
1354
1332
|
{
|
|
1355
1333
|
"name": "ContentBlockType",
|
|
@@ -1369,7 +1347,15 @@ export const TYPERT = {
|
|
|
1369
1347
|
},
|
|
1370
1348
|
{
|
|
1371
1349
|
"name": "EpochHeader",
|
|
1372
|
-
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n
|
|
1350
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"name": "FileAttachmentRef",
|
|
1354
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"name": "FileBlock",
|
|
1358
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
1373
1359
|
},
|
|
1374
1360
|
{
|
|
1375
1361
|
"name": "FinishReason",
|
|
@@ -1441,12 +1427,16 @@ export const TYPERT = {
|
|
|
1441
1427
|
},
|
|
1442
1428
|
{
|
|
1443
1429
|
"name": "Inbox",
|
|
1444
|
-
"declaration": "export
|
|
1430
|
+
"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}"
|
|
1445
1431
|
},
|
|
1446
1432
|
{
|
|
1447
1433
|
"name": "InboxTarget",
|
|
1448
1434
|
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
1449
1435
|
},
|
|
1436
|
+
{
|
|
1437
|
+
"name": "InboxWireState",
|
|
1438
|
+
"declaration": "export interface InboxWireState {\n readonly 'next-turn': readonly JsonValue[];\n readonly 'next-step': readonly JsonValue[];\n}"
|
|
1439
|
+
},
|
|
1450
1440
|
{
|
|
1451
1441
|
"name": "JobId",
|
|
1452
1442
|
"declaration": "export type JobId = Branded<'JobId'>;"
|
|
@@ -1455,6 +1445,10 @@ export const TYPERT = {
|
|
|
1455
1445
|
"name": "JsonValue",
|
|
1456
1446
|
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
1457
1447
|
},
|
|
1448
|
+
{
|
|
1449
|
+
"name": "LlmAttemptId",
|
|
1450
|
+
"declaration": "export type LlmAttemptId = Branded<'LlmAttemptId'>;"
|
|
1451
|
+
},
|
|
1458
1452
|
{
|
|
1459
1453
|
"name": "LlmCallConfig",
|
|
1460
1454
|
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
@@ -1471,6 +1465,26 @@ export const TYPERT = {
|
|
|
1471
1465
|
"name": "Message",
|
|
1472
1466
|
"declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
1473
1467
|
},
|
|
1468
|
+
{
|
|
1469
|
+
"name": "MessageFeedbackDelete",
|
|
1470
|
+
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "MessageFeedbackItem",
|
|
1474
|
+
"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}"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
"name": "MessageFeedbackPut",
|
|
1478
|
+
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"name": "MessageFeedbackRating",
|
|
1482
|
+
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"name": "MessageFeedbackVersion",
|
|
1486
|
+
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
1487
|
+
},
|
|
1474
1488
|
{
|
|
1475
1489
|
"name": "MessageId",
|
|
1476
1490
|
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
@@ -1529,7 +1543,7 @@ export const TYPERT = {
|
|
|
1529
1543
|
},
|
|
1530
1544
|
{
|
|
1531
1545
|
"name": "PromptContentPart",
|
|
1532
|
-
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
|
|
1546
|
+
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; } | { readonly type: 'file'; readonly receiptId: Branded<'file-upload-receipt-id'>; };"
|
|
1533
1547
|
},
|
|
1534
1548
|
{
|
|
1535
1549
|
"name": "ProviderRequestId",
|
|
@@ -1565,7 +1579,7 @@ export const TYPERT = {
|
|
|
1565
1579
|
},
|
|
1566
1580
|
{
|
|
1567
1581
|
"name": "RemoteErrorDetailsMap",
|
|
1568
|
-
"declaration": "export interface RemoteErrorDetailsMap {\n 'gateway/bad-request': { readonly issues?: readonly object[]; };\n 'gateway/cancelled': {};\n 'gateway/internal': {};\n 'llm/model-discovery-rejected': { readonly settingsNs: string; readonly baseURL?: string; };\n 'session/not-found': { readonly sessionId: SessionId; };\n 'agent-preset/not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n 'agent-preset/invalid': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/read-only': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/agent-busy': { readonly reason: string; };\n 'session/invalid-time-zone': { readonly value: string; };\n 'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n 'agent-preset/conflict': { readonly sessionId: SessionId; readonly requestedPreset: string; readonly existingPreset?: string; };\n 'session/attachment-invalid': { readonly reason: string; };\n 'session/queue-item-not-found': { readonly itemId: MessageId; };\n 'session/steer-unavailable': { readonly itemId: MessageId; };\n 'session/title-invalid': { readonly sessionId: SessionId; };\n 'session/fork-unavailable': { readonly sessionId: SessionId; };\n 'subagent/not-found': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; };\n 'subagent/catalog-diagnostic': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };\n 'subagent/invalid-time-zone': { readonly value: string; };\n 'subagent/parent-unavailable': { readonly parentSessionId: SessionId; };\n 'subagent/not-resumable': { readonly childSessionId: SessionId; };\n 'subagent/unauthorized': { readonly childSessionId: SessionId; };\n 'subagent/attachment-invalid': { readonly reason: string; };\n 'subagent/delivery-unavailable': { readonly childSessionId: SessionId; };\n 'subagent/projections-unavailable': {};\n 'settings/rejected': { readonly ns: string; };\n 'settings/conflict': { readonly ns: string; readonly expected: number; readonly actual: number; };\n 'credential/rejected': { readonly ref: string; };\n 'workspace/invalid-path': { readonly path: string; };\n 'workspace/name-conflict': { readonly name: string; };\n 'workspace/move-invalid': { readonly workspaceId: WorkspaceId; readonly sessionId: SessionId; readonly beforeSessionId?: SessionId; };\n 'directory-picker/unavailable': { readonly capability: string; };\n 'directory-picker/unreadable': { readonly path: string; };\n 'directory-picker/exists': { readonly path: string; };\n 'directory-picker/create-failed': { readonly path: string; };\n}"
|
|
1582
|
+
"declaration": "export interface RemoteErrorDetailsMap {\n 'gateway/bad-request': { readonly issues?: readonly object[]; };\n 'gateway/cancelled': {};\n 'gateway/internal': {};\n 'llm/model-discovery-rejected': { readonly settingsNs: string; readonly baseURL?: string; };\n 'session/not-found': { readonly sessionId: SessionId; };\n 'agent-preset/not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n 'agent-preset/invalid': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/read-only': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/agent-busy': { readonly reason: string; };\n 'session/invalid-time-zone': { readonly value: string; };\n 'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n 'agent-preset/conflict': { readonly sessionId: SessionId; readonly requestedPreset: string; readonly existingPreset?: string; };\n 'session/attachment-invalid': { readonly reason: string; };\n 'session/queue-item-not-found': { readonly itemId: MessageId; };\n 'session/steer-unavailable': { readonly itemId: MessageId; };\n 'session/title-invalid': { readonly sessionId: SessionId; };\n 'session/fork-unavailable': { readonly sessionId: SessionId; };\n 'subagent/not-found': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; };\n 'subagent/catalog-diagnostic': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };\n 'subagent/invalid-time-zone': { readonly value: string; };\n 'subagent/parent-unavailable': { readonly parentSessionId: SessionId; };\n 'subagent/not-resumable': { readonly childSessionId: SessionId; };\n 'subagent/unauthorized': { readonly childSessionId: SessionId; };\n 'subagent/attachment-invalid': { readonly reason: string; };\n 'subagent/delivery-unavailable': { readonly childSessionId: SessionId; };\n 'subagent/projections-unavailable': {};\n 'settings/rejected': { readonly ns: string; };\n 'settings/conflict': { readonly ns: string; readonly expected: number; readonly actual: number; };\n 'credential/rejected': { readonly ref: string; };\n 'workspace/invalid-path': { readonly path: string; };\n 'workspace/name-conflict': { readonly name: string; };\n 'workspace/move-invalid': { readonly workspaceId: WorkspaceId; readonly sessionId: SessionId; readonly beforeSessionId?: SessionId; };\n 'directory-picker/unavailable': { readonly capability: string; };\n 'directory-picker/unreadable': { readonly path: string; };\n 'directory-picker/exists': { readonly path: string; };\n 'directory-picker/create-failed': { readonly path: string; };\n 'workspace-file/not-found': { readonly path: string; };\n 'workspace-file/outside-workspace': { readonly path: string; };\n 'workspace-file/too-large': { readonly path: string; readonly limit: number; };\n 'workspace-file/not-text': { readonly path: string; };\n 'workspace-file/not-regular-file': { readonly path: string; readonly kind: 'directory' | 'symlink' | 'other'; };\n 'workspace-file/not-directory': { readonly path: string; readonly kind: 'file' | 'symlink' | 'other'; };\n}"
|
|
1569
1583
|
},
|
|
1570
1584
|
{
|
|
1571
1585
|
"name": "ReplayEnvelope",
|
|
@@ -1573,28 +1587,36 @@ export const TYPERT = {
|
|
|
1573
1587
|
},
|
|
1574
1588
|
{
|
|
1575
1589
|
"name": "RequestContext",
|
|
1576
|
-
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
|
|
1590
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
1577
1591
|
},
|
|
1578
1592
|
{
|
|
1579
1593
|
"name": "RequestHeaderReason",
|
|
1580
1594
|
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
1581
1595
|
},
|
|
1582
|
-
{
|
|
1583
|
-
"name": "RunDataBase",
|
|
1584
|
-
"declaration": "export interface RunDataBase {\n turn: number;\n step: number;\n index: number;\n dt: number[];\n}"
|
|
1585
|
-
},
|
|
1586
1596
|
{
|
|
1587
1597
|
"name": "SandboxMode",
|
|
1588
1598
|
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
1589
1599
|
},
|
|
1590
1600
|
{
|
|
1591
1601
|
"name": "Session",
|
|
1592
|
-
"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}"
|
|
1602
|
+
"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}"
|
|
1593
1603
|
},
|
|
1594
1604
|
{
|
|
1595
1605
|
"name": "SessionAddress",
|
|
1596
1606
|
"declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable'; };"
|
|
1597
1607
|
},
|
|
1608
|
+
{
|
|
1609
|
+
"name": "SessionAssistantStreamAttempt",
|
|
1610
|
+
"declaration": "export interface SessionAssistantStreamAttempt {\n readonly attemptId: LlmAttemptId;\n readonly startedAfterSeq: SessionSeqCursor;\n readonly turn: number;\n readonly step: number;\n readonly nextIndex: number;\n readonly stream: readonly JsonValue[];\n}"
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"name": "SessionAssistantStreamBaseline",
|
|
1614
|
+
"declaration": "export interface SessionAssistantStreamBaseline {\n readonly revision: number;\n readonly activeAttempt?: SessionAssistantStreamAttempt;\n}"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "SessionAssistantStreamFrame",
|
|
1618
|
+
"declaration": "export type SessionAssistantStreamFrame = { readonly type: 'start'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly startedAfterSeq: SessionSeqCursor; readonly turn: number; readonly step: number; } | { readonly type: 'chunk'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly index: number; readonly time: number; readonly chunk: JsonValue; } | { readonly type: 'end'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly index: number; readonly outcome: { readonly kind: 'committed'; readonly eventType: 'assistant/message' | 'assistant/attempt'; readonly seq: number; } | { readonly kind: 'abandoned'; }; };"
|
|
1619
|
+
},
|
|
1598
1620
|
{
|
|
1599
1621
|
"name": "SessionAttachmentRequest",
|
|
1600
1622
|
"declaration": "export interface SessionAttachmentRequest {\n readonly sessionId: SessionId;\n readonly attachmentId: AttachmentIdType;\n}"
|
|
@@ -1611,10 +1633,6 @@ export const TYPERT = {
|
|
|
1611
1633
|
"name": "SessionCancelValue",
|
|
1612
1634
|
"declaration": "export interface SessionCancelValue {\n readonly accepted: true;\n}"
|
|
1613
1635
|
},
|
|
1614
|
-
{
|
|
1615
|
-
"name": "SessionChunkRun",
|
|
1616
|
-
"declaration": "export interface SessionChunkRun {\n readonly type: 'chunks';\n readonly event: ChunkRowEvent;\n}"
|
|
1617
|
-
},
|
|
1618
1636
|
{
|
|
1619
1637
|
"name": "SessionControlBaseline",
|
|
1620
1638
|
"declaration": "export interface SessionControlBaseline {\n readonly queues: Readonly<Record<SessionId, readonly SessionQueuedItem[]>>;\n readonly jobs: Readonly<Record<SessionId, readonly SessionJob[]>>;\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
|
|
@@ -1633,7 +1651,7 @@ export const TYPERT = {
|
|
|
1633
1651
|
},
|
|
1634
1652
|
{
|
|
1635
1653
|
"name": "SessionEvent",
|
|
1636
|
-
"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 ? {
|
|
1654
|
+
"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];"
|
|
1637
1655
|
},
|
|
1638
1656
|
{
|
|
1639
1657
|
"name": "SessionEventEntry",
|
|
@@ -1641,7 +1659,7 @@ export const TYPERT = {
|
|
|
1641
1659
|
},
|
|
1642
1660
|
{
|
|
1643
1661
|
"name": "SessionEventMap",
|
|
1644
|
-
"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 '
|
|
1662
|
+
"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}"
|
|
1645
1663
|
},
|
|
1646
1664
|
{
|
|
1647
1665
|
"name": "SessionEventType",
|
|
@@ -1649,11 +1667,11 @@ export const TYPERT = {
|
|
|
1649
1667
|
},
|
|
1650
1668
|
{
|
|
1651
1669
|
"name": "SessionFollowFrame",
|
|
1652
|
-
"declaration": "export type SessionFollowFrame = { readonly type: 'snapshot'; readonly header: SessionWireHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; } | SessionEventEntry;"
|
|
1670
|
+
"declaration": "export type SessionFollowFrame = { readonly type: 'snapshot'; readonly header: SessionWireHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; readonly assistantStream?: SessionAssistantStreamBaseline; } | SessionEventEntry | { readonly type: 'assistant-stream'; readonly frame: SessionAssistantStreamFrame; };"
|
|
1653
1671
|
},
|
|
1654
1672
|
{
|
|
1655
1673
|
"name": "SessionFollowRequest",
|
|
1656
|
-
"declaration": "export interface SessionFollowRequest {\n readonly address: SessionAddress;\n readonly maxMessages?: number;\n}"
|
|
1674
|
+
"declaration": "export interface SessionFollowRequest {\n readonly address: SessionAddress;\n readonly maxMessages?: number;\n readonly assistantStream?: true;\n}"
|
|
1657
1675
|
},
|
|
1658
1676
|
{
|
|
1659
1677
|
"name": "SessionForkRequest",
|
|
@@ -1665,11 +1683,11 @@ export const TYPERT = {
|
|
|
1665
1683
|
},
|
|
1666
1684
|
{
|
|
1667
1685
|
"name": "SessionHeader",
|
|
1668
|
-
"declaration": "export interface SessionHeader {\n readonly version:
|
|
1686
|
+
"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}"
|
|
1669
1687
|
},
|
|
1670
1688
|
{
|
|
1671
1689
|
"name": "SessionHistoryRecord",
|
|
1672
|
-
"declaration": "export type SessionHistoryRecord = SessionEventEntry
|
|
1690
|
+
"declaration": "export type SessionHistoryRecord = SessionEventEntry;"
|
|
1673
1691
|
},
|
|
1674
1692
|
{
|
|
1675
1693
|
"name": "SessionId",
|
|
@@ -1725,7 +1743,7 @@ export const TYPERT = {
|
|
|
1725
1743
|
},
|
|
1726
1744
|
{
|
|
1727
1745
|
"name": "SessionProjectionMap",
|
|
1728
|
-
"declaration": "export interface SessionProjectionMap {\n agentPreset: string | null;\n title: string | null;\n todos: TodoItem[] | null;\n sessionListMetadata: SessionListMetadata;\n imageLimits: ImageAttachmentLimits;\n modelSelection: ModelSelectionProjection;\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n goal: GoalProjection | null;\n}"
|
|
1746
|
+
"declaration": "export interface SessionProjectionMap {\n inbox: InboxWireState;\n agentPreset: string | null;\n title: string | null;\n todos: TodoItem[] | null;\n sessionListMetadata: SessionListMetadata;\n imageLimits: ImageAttachmentLimits;\n modelSelection: ModelSelectionProjection;\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n goal: GoalProjection | null;\n}"
|
|
1729
1747
|
},
|
|
1730
1748
|
{
|
|
1731
1749
|
"name": "SessionProjectionUpdate",
|
|
@@ -1753,7 +1771,7 @@ export const TYPERT = {
|
|
|
1753
1771
|
},
|
|
1754
1772
|
{
|
|
1755
1773
|
"name": "SessionReferenceSource",
|
|
1756
|
-
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
1774
|
+
"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}"
|
|
1757
1775
|
},
|
|
1758
1776
|
{
|
|
1759
1777
|
"name": "SessionRenameRequest",
|
|
@@ -1791,6 +1809,10 @@ export const TYPERT = {
|
|
|
1791
1809
|
"name": "SessionSeq",
|
|
1792
1810
|
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
1793
1811
|
},
|
|
1812
|
+
{
|
|
1813
|
+
"name": "SessionSeqCursor",
|
|
1814
|
+
"declaration": "export type SessionSeqCursor = SessionSeq | -1;"
|
|
1815
|
+
},
|
|
1794
1816
|
{
|
|
1795
1817
|
"name": "SessionStorageMetadata",
|
|
1796
1818
|
"declaration": "export interface SessionStorageMetadata {\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n}"
|
|
@@ -1829,15 +1851,11 @@ export const TYPERT = {
|
|
|
1829
1851
|
},
|
|
1830
1852
|
{
|
|
1831
1853
|
"name": "SessionWireEvent",
|
|
1832
|
-
"declaration": "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?:
|
|
1854
|
+
"declaration": "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: JsonValue;\n readonly surfaceOp?: JsonValue;\n}"
|
|
1833
1855
|
},
|
|
1834
1856
|
{
|
|
1835
1857
|
"name": "SessionWireHeader",
|
|
1836
|
-
"declaration": "export interface SessionWireHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly
|
|
1837
|
-
},
|
|
1838
|
-
{
|
|
1839
|
-
"name": "SessionWireSurfaceOp",
|
|
1840
|
-
"declaration": "export type SessionWireSurfaceOp = 'append' | { readonly op: 'replace'; readonly start: number; readonly end: number; };"
|
|
1858
|
+
"declaration": "export interface SessionWireHeader {\n readonly version: number;\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}"
|
|
1841
1859
|
},
|
|
1842
1860
|
{
|
|
1843
1861
|
"name": "SkillInvocationSource",
|
|
@@ -1869,15 +1887,23 @@ export const TYPERT = {
|
|
|
1869
1887
|
},
|
|
1870
1888
|
{
|
|
1871
1889
|
"name": "SurfaceEventType",
|
|
1872
|
-
"declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
|
|
1890
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
1873
1891
|
},
|
|
1874
1892
|
{
|
|
1875
1893
|
"name": "SurfaceIntent",
|
|
1876
|
-
"declaration": "export
|
|
1894
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
1877
1895
|
},
|
|
1878
1896
|
{
|
|
1879
1897
|
"name": "SurfaceOp",
|
|
1880
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace';
|
|
1898
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
"name": "SystemMessage",
|
|
1902
|
+
"declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
"name": "SystemPromptUpdate",
|
|
1906
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
1881
1907
|
},
|
|
1882
1908
|
{
|
|
1883
1909
|
"name": "TeamId",
|
|
@@ -1897,7 +1923,7 @@ export const TYPERT = {
|
|
|
1897
1923
|
},
|
|
1898
1924
|
{
|
|
1899
1925
|
"name": "TeamMessageSnapshot",
|
|
1900
|
-
"declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly
|
|
1926
|
+
"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}"
|
|
1901
1927
|
},
|
|
1902
1928
|
{
|
|
1903
1929
|
"name": "TeamMessageSource",
|
|
@@ -1919,10 +1945,6 @@ export const TYPERT = {
|
|
|
1919
1945
|
"name": "TextBlock",
|
|
1920
1946
|
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
1921
1947
|
},
|
|
1922
|
-
{
|
|
1923
|
-
"name": "TextRunData",
|
|
1924
|
-
"declaration": "export interface TextRunData extends RunDataBase {\n texts: string[];\n}"
|
|
1925
|
-
},
|
|
1926
1948
|
{
|
|
1927
1949
|
"name": "TodoItem",
|
|
1928
1950
|
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
@@ -1939,10 +1961,6 @@ export const TYPERT = {
|
|
|
1939
1961
|
"name": "ToolCallId",
|
|
1940
1962
|
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
1941
1963
|
},
|
|
1942
|
-
{
|
|
1943
|
-
"name": "ToolCallRunData",
|
|
1944
|
-
"declaration": "export interface ToolCallRunData extends RunDataBase {\n id: ToolCallId;\n name?: string;\n args: string[];\n}"
|
|
1945
|
-
},
|
|
1946
1964
|
{
|
|
1947
1965
|
"name": "ToolMessageSource",
|
|
1948
1966
|
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
@@ -2042,6 +2060,10 @@ export const TYPERT = {
|
|
|
2042
2060
|
"name": "AssistantProvenance",
|
|
2043
2061
|
"declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
2044
2062
|
},
|
|
2063
|
+
{
|
|
2064
|
+
"name": "AssistantStreamRecord",
|
|
2065
|
+
"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; };"
|
|
2066
|
+
},
|
|
2045
2067
|
{
|
|
2046
2068
|
"name": "AttachmentId",
|
|
2047
2069
|
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
@@ -2080,7 +2102,7 @@ export const TYPERT = {
|
|
|
2080
2102
|
},
|
|
2081
2103
|
{
|
|
2082
2104
|
"name": "ContentBlockMap",
|
|
2083
|
-
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
2105
|
+
"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}"
|
|
2084
2106
|
},
|
|
2085
2107
|
{
|
|
2086
2108
|
"name": "ContentBlockType",
|
|
@@ -2100,7 +2122,15 @@ export const TYPERT = {
|
|
|
2100
2122
|
},
|
|
2101
2123
|
{
|
|
2102
2124
|
"name": "EpochHeader",
|
|
2103
|
-
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n
|
|
2125
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"name": "FileAttachmentRef",
|
|
2129
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
"name": "FileBlock",
|
|
2133
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
2104
2134
|
},
|
|
2105
2135
|
{
|
|
2106
2136
|
"name": "FileReferenceCandidate",
|
|
@@ -2168,7 +2198,7 @@ export const TYPERT = {
|
|
|
2168
2198
|
},
|
|
2169
2199
|
{
|
|
2170
2200
|
"name": "Inbox",
|
|
2171
|
-
"declaration": "export
|
|
2201
|
+
"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}"
|
|
2172
2202
|
},
|
|
2173
2203
|
{
|
|
2174
2204
|
"name": "InboxTarget",
|
|
@@ -2194,6 +2224,26 @@ export const TYPERT = {
|
|
|
2194
2224
|
"name": "Message",
|
|
2195
2225
|
"declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
2196
2226
|
},
|
|
2227
|
+
{
|
|
2228
|
+
"name": "MessageFeedbackDelete",
|
|
2229
|
+
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
2230
|
+
},
|
|
2231
|
+
{
|
|
2232
|
+
"name": "MessageFeedbackItem",
|
|
2233
|
+
"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}"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
"name": "MessageFeedbackPut",
|
|
2237
|
+
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
"name": "MessageFeedbackRating",
|
|
2241
|
+
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"name": "MessageFeedbackVersion",
|
|
2245
|
+
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
2246
|
+
},
|
|
2197
2247
|
{
|
|
2198
2248
|
"name": "MessageId",
|
|
2199
2249
|
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
@@ -2248,7 +2298,7 @@ export const TYPERT = {
|
|
|
2248
2298
|
},
|
|
2249
2299
|
{
|
|
2250
2300
|
"name": "RequestContext",
|
|
2251
|
-
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
|
|
2301
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
2252
2302
|
},
|
|
2253
2303
|
{
|
|
2254
2304
|
"name": "RequestHeaderReason",
|
|
@@ -2260,15 +2310,15 @@ export const TYPERT = {
|
|
|
2260
2310
|
},
|
|
2261
2311
|
{
|
|
2262
2312
|
"name": "Session",
|
|
2263
|
-
"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}"
|
|
2313
|
+
"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}"
|
|
2264
2314
|
},
|
|
2265
2315
|
{
|
|
2266
2316
|
"name": "SessionEvent",
|
|
2267
|
-
"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 ? {
|
|
2317
|
+
"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];"
|
|
2268
2318
|
},
|
|
2269
2319
|
{
|
|
2270
2320
|
"name": "SessionEventMap",
|
|
2271
|
-
"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 '
|
|
2321
|
+
"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}"
|
|
2272
2322
|
},
|
|
2273
2323
|
{
|
|
2274
2324
|
"name": "SessionEventType",
|
|
@@ -2276,7 +2326,7 @@ export const TYPERT = {
|
|
|
2276
2326
|
},
|
|
2277
2327
|
{
|
|
2278
2328
|
"name": "SessionHeader",
|
|
2279
|
-
"declaration": "export interface SessionHeader {\n readonly version:
|
|
2329
|
+
"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}"
|
|
2280
2330
|
},
|
|
2281
2331
|
{
|
|
2282
2332
|
"name": "SessionId",
|
|
@@ -2288,7 +2338,7 @@ export const TYPERT = {
|
|
|
2288
2338
|
},
|
|
2289
2339
|
{
|
|
2290
2340
|
"name": "SessionReferenceSource",
|
|
2291
|
-
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
2341
|
+
"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}"
|
|
2292
2342
|
},
|
|
2293
2343
|
{
|
|
2294
2344
|
"name": "SessionRequestId",
|
|
@@ -2340,15 +2390,23 @@ export const TYPERT = {
|
|
|
2340
2390
|
},
|
|
2341
2391
|
{
|
|
2342
2392
|
"name": "SurfaceEventType",
|
|
2343
|
-
"declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
|
|
2393
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
2344
2394
|
},
|
|
2345
2395
|
{
|
|
2346
2396
|
"name": "SurfaceIntent",
|
|
2347
|
-
"declaration": "export
|
|
2397
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
2348
2398
|
},
|
|
2349
2399
|
{
|
|
2350
2400
|
"name": "SurfaceOp",
|
|
2351
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace';
|
|
2401
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
"name": "SystemMessage",
|
|
2405
|
+
"declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"name": "SystemPromptUpdate",
|
|
2409
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
2352
2410
|
},
|
|
2353
2411
|
{
|
|
2354
2412
|
"name": "TeamId",
|
|
@@ -2368,7 +2426,7 @@ export const TYPERT = {
|
|
|
2368
2426
|
},
|
|
2369
2427
|
{
|
|
2370
2428
|
"name": "TeamMessageSnapshot",
|
|
2371
|
-
"declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly
|
|
2429
|
+
"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}"
|
|
2372
2430
|
},
|
|
2373
2431
|
{
|
|
2374
2432
|
"name": "TeamMessageSource",
|