@deepseek-ai/dsh-api-session-controller 0.1.6-alpha.2 → 0.1.7-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.
Files changed (36) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +31 -8
  3. package/README.zh.md +31 -8
  4. package/lib/client.js +603 -515
  5. package/lib/index.js +299 -137
  6. package/lib/typert.host.js +373 -183
  7. package/lib/typert.remote-client.d.ts +10 -5
  8. package/lib/typert.remote-client.js +216 -124
  9. package/lib/types/archived-session-gate.d.ts +30 -0
  10. package/lib/types/archived-session-gate.js +52 -0
  11. package/lib/types/client/contract/session.d.ts +2 -0
  12. package/lib/types/client/contract/sessions.d.ts +11 -16
  13. package/lib/types/client/index.d.ts +1 -1
  14. package/lib/types/client/sessions/lineage.d.ts +4 -1
  15. package/lib/types/client/sessions/lineage.js +2 -1
  16. package/lib/types/client/sessions/manager.d.ts +66 -59
  17. package/lib/types/client/sessions/manager.js +249 -277
  18. package/lib/types/client/sessions/projection-store.d.ts +32 -13
  19. package/lib/types/client/sessions/projection-store.js +45 -13
  20. package/lib/types/client/sessions/remotes.d.ts +1 -2
  21. package/lib/types/client/sessions/service.d.ts +23 -35
  22. package/lib/types/client/sessions/service.js +35 -47
  23. package/lib/types/client/sessions/session.d.ts +18 -16
  24. package/lib/types/client/sessions/session.js +112 -50
  25. package/lib/types/commands.d.ts +4 -2
  26. package/lib/types/commands.js +72 -36
  27. package/lib/types/control.d.ts +2 -4
  28. package/lib/types/control.js +2 -44
  29. package/lib/types/history.js +1 -1
  30. package/lib/types/index.d.ts +32 -5
  31. package/lib/types/index.js +117 -13
  32. package/lib/types/list.js +24 -15
  33. package/lib/types/skill-catalog.js +60 -50
  34. package/lib/types/types.d.ts +37 -23
  35. package/lib/types/types.js +0 -1
  36. package/package.json +71 -76
@@ -1,46 +1,6 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
- let ContentBlockRemoteCodec$schema$value
5
- const ContentBlockRemoteCodec$schema = () => (ContentBlockRemoteCodec$schema$value ??= z.union([z.object({
6
- 'type': z.literal("file"),
7
- 'attachment': z.object({
8
- 'attachmentId': z.intersection(z.string(), z.unknown()),
9
- 'name': z.string(),
10
- 'bytes': z.number(),
11
- }),
12
- }), z.object({
13
- 'type': z.literal("text"),
14
- 'text': z.string(),
15
- }), z.object({
16
- 'type': z.literal("image"),
17
- 'attachment': z.object({
18
- 'attachmentId': z.intersection(z.string(), z.unknown()),
19
- 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
20
- 'bytes': z.number(),
21
- 'width': z.number(),
22
- 'height': z.number(),
23
- 'name': z.string().optional(),
24
- 'originalDimensions': z.object({
25
- 'width': z.number(),
26
- 'height': z.number(),
27
- }).optional(),
28
- }),
29
- 'offloaded': z.literal(true).optional(),
30
- }), z.object({
31
- 'type': z.literal("reasoning"),
32
- 'text': z.string(),
33
- }), z.object({
34
- 'type': z.literal("tool-call"),
35
- 'id': z.intersection(z.string(), z.unknown()),
36
- 'name': z.string(),
37
- 'arguments': z.string(),
38
- }), z.object({
39
- 'type': z.literal("tool-result"),
40
- 'toolCallId': z.intersection(z.string(), z.unknown()),
41
- 'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema())),
42
- 'isError': z.boolean().optional(),
43
- })]))
44
4
  let JsonValueRemoteCodec$schema$value
45
5
  const JsonValueRemoteCodec$schema = () => (JsonValueRemoteCodec$schema$value ??= 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()))]))
46
6
  let JsonValueRemoteCodec$schema2$value
@@ -49,6 +9,8 @@ let JsonValueRemoteCodec$schema3$value
49
9
  const JsonValueRemoteCodec$schema3 = () => (JsonValueRemoteCodec$schema3$value ??= 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()))]))
50
10
  let JsonValueRemoteCodec$schema4$value
51
11
  const JsonValueRemoteCodec$schema4 = () => (JsonValueRemoteCodec$schema4$value ??= 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()))]))
12
+ let JsonValueRemoteCodec$schema5$value
13
+ const JsonValueRemoteCodec$schema5 = () => (JsonValueRemoteCodec$schema5$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))]))
52
14
  let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema$value
53
15
  const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
54
16
  let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema$value
@@ -93,27 +55,18 @@ let _deepseek_ai_dsh_api_session_controller_session_control_result$schema$value
93
55
  const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_control_result$schema$value ??= z.union([z.object({
94
56
  'type': z.literal("baseline").readonly(),
95
57
  'value': z.object({
96
- 'jobs': z.record(z.intersection(z.string(), z.unknown()), z.array(z.object({
97
- 'id': z.intersection(z.string(), z.unknown()).readonly(),
98
- 'kind': z.string().readonly(),
99
- 'label': z.string().readonly(),
100
- 'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
101
- 'detail': z.string().readonly().optional(),
102
- 'startedAt': z.number().readonly(),
103
- 'finishedAt': z.number().readonly().optional(),
104
- }))).readonly().readonly(),
105
58
  'projections': z.record(z.intersection(z.string(), z.unknown()), z.object({
106
59
  'asOfSeq': z.number().readonly(),
107
60
  'values': z.intersection(z.object({
108
61
  'inbox': z.object({
109
- '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(),
110
- '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(),
62
+ 'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))])).readonly(),
63
+ 'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))])).readonly(),
111
64
  }).optional(),
112
65
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
113
66
  'title': z.union([z.literal(null), z.string()]).optional(),
114
67
  'todos': z.union([z.literal(null), z.array(z.object({
115
68
  'content': z.string(),
116
- 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
69
+ 'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
117
70
  }))]).optional(),
118
71
  'sessionListMetadata': z.object({
119
72
  'blank': z.boolean().readonly(),
@@ -154,6 +107,12 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
154
107
  }), z.object({
155
108
  'mode': z.literal("continuable").readonly(),
156
109
  'label': z.string().readonly(),
110
+ })), z.intersection(z.object({
111
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
112
+ 'createdAt': z.number().readonly(),
113
+ }), z.object({
114
+ 'mode': z.literal("unknown").readonly(),
115
+ 'label': z.string().readonly().optional(),
157
116
  }))])).optional(),
158
117
  'subagentTiming': z.object({
159
118
  'settledMs': z.number(),
@@ -161,6 +120,7 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
161
120
  'since': z.number(),
162
121
  'through': z.number(),
163
122
  }).optional(),
123
+ 'lastTurnCompleted': z.boolean().optional(),
164
124
  }).optional(),
165
125
  'subagent': z.union([z.literal(null), z.object({
166
126
  'mode': z.literal("one-shot"),
@@ -187,27 +147,15 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
187
147
  'createdAt': z.number().readonly(),
188
148
  'updatedAt': z.number().readonly(),
189
149
  })]).optional(),
190
- }), z.record(z.string(), 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()).readonly(),
150
+ }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))])).readonly()).readonly(),
191
151
  })).readonly().readonly(),
192
152
  }).readonly(),
193
- }), z.object({
194
- 'type': z.literal("jobs").readonly(),
195
- 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
196
- 'jobs': z.array(z.object({
197
- 'id': z.intersection(z.string(), z.unknown()).readonly(),
198
- 'kind': z.string().readonly(),
199
- 'label': z.string().readonly(),
200
- 'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
201
- 'detail': z.string().readonly().optional(),
202
- 'startedAt': z.number().readonly(),
203
- 'finishedAt': z.number().readonly().optional(),
204
- })).readonly(),
205
153
  }), z.intersection(z.object({
206
154
  'type': z.literal("projection").readonly(),
207
155
  }), z.object({
208
156
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
209
157
  'key': z.string().readonly(),
210
- 'value': 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(),
158
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))]).readonly(),
211
159
  'seq': z.number().readonly(),
212
160
  }))]))
213
161
  let _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value
@@ -231,7 +179,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema
231
179
  'kind': z.literal("subagent").readonly(),
232
180
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
233
181
  'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
234
- 'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
182
+ 'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
235
183
  })]).readonly(),
236
184
  'maxMessages': z.number().readonly().optional(),
237
185
  'assistantStream': z.literal(true).readonly().optional(),
@@ -286,7 +234,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
286
234
  'title': z.union([z.literal(null), z.string()]).optional(),
287
235
  'todos': z.union([z.literal(null), z.array(z.object({
288
236
  'content': z.string(),
289
- 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
237
+ 'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
290
238
  }))]).optional(),
291
239
  'sessionListMetadata': z.object({
292
240
  'blank': z.boolean().readonly(),
@@ -327,6 +275,12 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
327
275
  }), z.object({
328
276
  'mode': z.literal("continuable").readonly(),
329
277
  'label': z.string().readonly(),
278
+ })), z.intersection(z.object({
279
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
280
+ 'createdAt': z.number().readonly(),
281
+ }), z.object({
282
+ 'mode': z.literal("unknown").readonly(),
283
+ 'label': z.string().readonly().optional(),
330
284
  }))])).optional(),
331
285
  'subagentTiming': z.object({
332
286
  'settledMs': z.number(),
@@ -334,6 +288,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
334
288
  'since': z.number(),
335
289
  'through': z.number(),
336
290
  }).optional(),
291
+ 'lastTurnCompleted': z.boolean().optional(),
337
292
  }).optional(),
338
293
  'subagent': z.union([z.literal(null), z.object({
339
294
  'mode': z.literal("one-shot"),
@@ -419,6 +374,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema =
419
374
  let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value
420
375
  const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_list_result$schema$value ??= z.object({
421
376
  'items': z.array(z.object({
377
+ 'agentAvailable': z.boolean().readonly(),
422
378
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
423
379
  'updatedAt': z.number().readonly(),
424
380
  'running': z.boolean().readonly(),
@@ -427,6 +383,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
427
383
  'origin': z.literal("subagent").readonly().optional(),
428
384
  'cwd': z.string().readonly().optional(),
429
385
  'projections': z.object({
386
+ 'kind': z.union([z.literal("cached"), z.literal("sequenced")]).readonly(),
430
387
  'asOfSeq': z.number().readonly(),
431
388
  'values': z.intersection(z.object({
432
389
  'inbox': z.object({
@@ -437,7 +394,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
437
394
  'title': z.union([z.literal(null), z.string()]).optional(),
438
395
  'todos': z.union([z.literal(null), z.array(z.object({
439
396
  'content': z.string(),
440
- 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
397
+ 'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
441
398
  }))]).optional(),
442
399
  'sessionListMetadata': z.object({
443
400
  'blank': z.boolean().readonly(),
@@ -478,6 +435,12 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
478
435
  }), z.object({
479
436
  'mode': z.literal("continuable").readonly(),
480
437
  'label': z.string().readonly(),
438
+ })), z.intersection(z.object({
439
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
440
+ 'createdAt': z.number().readonly(),
441
+ }), z.object({
442
+ 'mode': z.literal("unknown").readonly(),
443
+ 'label': z.string().readonly().optional(),
481
444
  }))])).optional(),
482
445
  'subagentTiming': z.object({
483
446
  'settledMs': z.number(),
@@ -485,6 +448,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
485
448
  'since': z.number(),
486
449
  'through': z.number(),
487
450
  }).optional(),
451
+ 'lastTurnCompleted': z.boolean().optional(),
488
452
  }).optional(),
489
453
  'subagent': z.union([z.literal(null), z.object({
490
454
  'mode': z.literal("one-shot"),
@@ -549,6 +513,7 @@ const _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema
549
513
  let _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema$value
550
514
  const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema$value ??= z.object({
551
515
  'action': z.literal("reveal").readonly().optional(),
516
+ 'application': z.string().readonly().optional(),
552
517
  'path': z.string().readonly(),
553
518
  }))
554
519
  let _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema$value
@@ -564,7 +529,7 @@ const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema =
564
529
  'kind': z.literal("subagent").readonly(),
565
530
  'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
566
531
  'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
567
- 'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
532
+ 'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
568
533
  })]).readonly(),
569
534
  'throughSeq': z.number().readonly(),
570
535
  'beforeSeq': z.number().readonly().optional(),
@@ -586,6 +551,105 @@ const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = () =>
586
551
  })).readonly(),
587
552
  'hasMore': z.boolean().readonly(),
588
553
  }))
554
+ let _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema$value
555
+ const _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema$value ??= z.object({
556
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
557
+ }))
558
+ let _deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value
559
+ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value ??= z.union([z.literal(null), z.object({
560
+ 'asOfSeq': z.number().readonly(),
561
+ 'values': z.intersection(z.object({
562
+ 'inbox': z.object({
563
+ '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(),
564
+ '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(),
565
+ }).optional(),
566
+ 'agentPreset': z.union([z.literal(null), z.string()]).optional(),
567
+ 'title': z.union([z.literal(null), z.string()]).optional(),
568
+ 'todos': z.union([z.literal(null), z.array(z.object({
569
+ 'content': z.string(),
570
+ 'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
571
+ }))]).optional(),
572
+ 'sessionListMetadata': z.object({
573
+ 'blank': z.boolean().readonly(),
574
+ 'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
575
+ }).optional(),
576
+ 'imageLimits': z.object({
577
+ 'maxImageBytes': z.number(),
578
+ 'maxImagesPerMessage': z.number(),
579
+ 'maxMessageImageBytes': z.number(),
580
+ 'maxImagePixels': z.number(),
581
+ 'maxImageDimension': z.number(),
582
+ 'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
583
+ }).optional(),
584
+ 'modelSelection': z.object({
585
+ 'lastUsed': z.union([z.literal(null), z.object({
586
+ 'provider': z.string().readonly(),
587
+ 'model': z.string().readonly(),
588
+ 'reasoningEffort': z.string().readonly().optional(),
589
+ })]).readonly(),
590
+ 'next': z.union([z.literal(null), z.object({
591
+ 'provider': z.string().readonly(),
592
+ 'model': z.string().readonly(),
593
+ 'reasoningEffort': z.string().readonly().optional(),
594
+ })]).readonly(),
595
+ }).optional(),
596
+ 'permissions': z.object({
597
+ 'currentValue': z.string(),
598
+ }).optional(),
599
+ 'subagentCatalog': z.array(z.union([z.intersection(z.object({
600
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
601
+ 'createdAt': z.number().readonly(),
602
+ }), z.object({
603
+ 'mode': z.literal("one-shot").readonly(),
604
+ 'label': z.string().readonly().optional(),
605
+ })), z.intersection(z.object({
606
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
607
+ 'createdAt': z.number().readonly(),
608
+ }), z.object({
609
+ 'mode': z.literal("continuable").readonly(),
610
+ 'label': z.string().readonly(),
611
+ })), z.intersection(z.object({
612
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
613
+ 'createdAt': z.number().readonly(),
614
+ }), z.object({
615
+ 'mode': z.literal("unknown").readonly(),
616
+ 'label': z.string().readonly().optional(),
617
+ }))])).optional(),
618
+ 'subagentTiming': z.object({
619
+ 'settledMs': z.number(),
620
+ 'active': z.object({
621
+ 'since': z.number(),
622
+ 'through': z.number(),
623
+ }).optional(),
624
+ 'lastTurnCompleted': z.boolean().optional(),
625
+ }).optional(),
626
+ 'subagent': z.union([z.literal(null), z.object({
627
+ 'mode': z.literal("one-shot"),
628
+ 'label': z.string().optional(),
629
+ 'seq': z.intersection(z.number(), z.unknown()),
630
+ }), z.object({
631
+ 'mode': z.literal("continuable"),
632
+ 'label': z.string(),
633
+ 'seq': z.intersection(z.number(), z.unknown()),
634
+ })]).optional(),
635
+ 'goal': z.union([z.literal(null), z.object({
636
+ 'goal': z.object({
637
+ 'objective': z.string().readonly(),
638
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
639
+ 'blockedReason': z.object({
640
+ 'code': z.string().readonly(),
641
+ 'message': z.string().readonly(),
642
+ }).readonly().optional(),
643
+ 'maxGoalRounds': z.number().readonly(),
644
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
645
+ 'revision': z.number().readonly(),
646
+ }).readonly(),
647
+ 'roundsStarted': z.number().readonly(),
648
+ 'createdAt': z.number().readonly(),
649
+ 'updatedAt': z.number().readonly(),
650
+ })]).optional(),
651
+ }), z.record(z.string(), 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()).readonly(),
652
+ })]))
589
653
  let _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema$value
590
654
  const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema$value ??= z.object({
591
655
  'requestId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -652,45 +716,10 @@ const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$sc
652
716
  'itemId': z.intersection(z.string(), z.unknown()).readonly(),
653
717
  'action': z.union([z.object({
654
718
  'kind': z.literal("edit").readonly(),
655
- 'content': z.array(z.union([z.object({
656
- 'type': z.literal("file"),
657
- 'attachment': z.object({
658
- 'attachmentId': z.intersection(z.string(), z.unknown()),
659
- 'name': z.string(),
660
- 'bytes': z.number(),
661
- }),
662
- }), z.object({
719
+ 'content': z.array(z.object({
663
720
  'type': z.literal("text"),
664
721
  'text': z.string(),
665
- }), z.object({
666
- 'type': z.literal("image"),
667
- 'attachment': z.object({
668
- 'attachmentId': z.intersection(z.string(), z.unknown()),
669
- 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
670
- 'bytes': z.number(),
671
- 'width': z.number(),
672
- 'height': z.number(),
673
- 'name': z.string().optional(),
674
- 'originalDimensions': z.object({
675
- 'width': z.number(),
676
- 'height': z.number(),
677
- }).optional(),
678
- }),
679
- 'offloaded': z.literal(true).optional(),
680
- }), z.object({
681
- 'type': z.literal("reasoning"),
682
- 'text': z.string(),
683
- }), z.object({
684
- 'type': z.literal("tool-call"),
685
- 'id': z.intersection(z.string(), z.unknown()),
686
- 'name': z.string(),
687
- 'arguments': z.string(),
688
- }), z.object({
689
- 'type': z.literal("tool-result"),
690
- 'toolCallId': z.intersection(z.string(), z.unknown()),
691
- 'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema())),
692
- 'isError': z.boolean().optional(),
693
- })])).readonly(),
722
+ })).readonly(),
694
723
  }), z.object({
695
724
  'kind': z.literal("remove").readonly(),
696
725
  }), z.object({
@@ -701,6 +730,17 @@ let _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema$va
701
730
  const _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema$value ??= z.object({
702
731
  'accepted': z.literal(true).readonly(),
703
732
  }))
733
+ let _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0$schema$value
734
+ const _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0$schema$value ??= z.object({
735
+ 'path': z.string().readonly(),
736
+ }))
737
+ let _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema$value
738
+ const _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema$value ??= z.array(z.object({
739
+ 'id': z.string().readonly(),
740
+ 'name': z.string().readonly(),
741
+ 'default': z.boolean().readonly(),
742
+ 'icon': z.union([z.literal(null), z.string()]).readonly(),
743
+ })))
704
744
  let _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema$value
705
745
  const _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema$value ??= z.object({
706
746
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -786,7 +826,7 @@ export const TYPERT = {
786
826
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
787
827
  create: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
788
828
  },
789
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":358,"column":3},
829
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":419,"column":3},
790
830
  },
791
831
  {
792
832
  id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
@@ -811,7 +851,7 @@ export const TYPERT = {
811
851
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
812
852
  create: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
813
853
  },
814
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":378,"column":3},
854
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":439,"column":3},
815
855
  },
816
856
  {
817
857
  id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
@@ -826,7 +866,7 @@ export const TYPERT = {
826
866
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
827
867
  create: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
828
868
  },
829
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":273,"column":3},
869
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":301,"column":3},
830
870
  },
831
871
  {
832
872
  id: '@deepseek-ai/dsh-api-session-controller#session/control',
@@ -843,7 +883,7 @@ export const TYPERT = {
843
883
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
844
884
  create: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
845
885
  },
846
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":411,"column":3},
886
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":502,"column":3},
847
887
  },
848
888
  {
849
889
  id: '@deepseek-ai/dsh-api-session-controller#session/create',
@@ -868,7 +908,7 @@ export const TYPERT = {
868
908
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
869
909
  create: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
870
910
  },
871
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":245,"column":3},
911
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":273,"column":3},
872
912
  },
873
913
  {
874
914
  id: '@deepseek-ai/dsh-api-session-controller#session/follow',
@@ -895,7 +935,7 @@ export const TYPERT = {
895
935
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
896
936
  create: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
897
937
  },
898
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":401,"column":3},
938
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":462,"column":3},
899
939
  },
900
940
  {
901
941
  id: '@deepseek-ai/dsh-api-session-controller#session/fork',
@@ -920,7 +960,7 @@ export const TYPERT = {
920
960
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
921
961
  create: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
922
962
  },
923
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":336,"column":3},
963
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":397,"column":3},
924
964
  },
925
965
  {
926
966
  id: '@deepseek-ai/dsh-api-session-controller#session/list',
@@ -946,7 +986,7 @@ export const TYPERT = {
946
986
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
947
987
  create: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
948
988
  },
949
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":224,"column":9},
989
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":252,"column":9},
950
990
  },
951
991
  {
952
992
  id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
@@ -961,7 +1001,7 @@ export const TYPERT = {
961
1001
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
962
1002
  create: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
963
1003
  },
964
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":264,"column":3},
1004
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":292,"column":3},
965
1005
  },
966
1006
  {
967
1007
  id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
@@ -987,7 +1027,7 @@ export const TYPERT = {
987
1027
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
988
1028
  create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
989
1029
  },
990
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":294,"column":9},
1030
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":322,"column":9},
991
1031
  },
992
1032
  {
993
1033
  id: '@deepseek-ai/dsh-api-session-controller#session/page',
@@ -1013,7 +1053,33 @@ export const TYPERT = {
1013
1053
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
1014
1054
  create: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
1015
1055
  },
1016
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":389,"column":3},
1056
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":450,"column":3},
1057
+ },
1058
+ {
1059
+ id: '@deepseek-ai/dsh-api-session-controller#session/projections',
1060
+ service: 'sessionController',
1061
+ namespace: 'session',
1062
+ method: 'projections',
1063
+ invocation: { kind: 'direct' },
1064
+ parameters: [
1065
+ {
1066
+ name: 'request',
1067
+ wire: 'request',
1068
+ source: 'json',
1069
+ codec: {
1070
+ mode: 'strict',
1071
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsRequest',
1072
+ create: _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema,
1073
+ },
1074
+ },
1075
+ ],
1076
+ cancellation: { parameter: 'signal' },
1077
+ result: {
1078
+ mode: 'strict',
1079
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsValue',
1080
+ create: _deepseek_ai_dsh_api_session_controller_session_projections_result$schema,
1081
+ },
1082
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":473,"column":9},
1017
1083
  },
1018
1084
  {
1019
1085
  id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
@@ -1039,7 +1105,7 @@ export const TYPERT = {
1039
1105
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
1040
1106
  create: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
1041
1107
  },
1042
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":3},
1108
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":408,"column":3},
1043
1109
  },
1044
1110
  {
1045
1111
  id: '@deepseek-ai/dsh-api-session-controller#session/rename',
@@ -1064,7 +1130,7 @@ export const TYPERT = {
1064
1130
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
1065
1131
  create: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
1066
1132
  },
1067
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":326,"column":3},
1133
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":385,"column":3},
1068
1134
  },
1069
1135
  {
1070
1136
  id: '@deepseek-ai/dsh-api-session-controller#session/search',
@@ -1090,7 +1156,7 @@ export const TYPERT = {
1090
1156
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
1091
1157
  create: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
1092
1158
  },
1093
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":235,"column":3},
1159
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":263,"column":3},
1094
1160
  },
1095
1161
  {
1096
1162
  id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
@@ -1115,7 +1181,7 @@ export const TYPERT = {
1115
1181
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
1116
1182
  create: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
1117
1183
  },
1118
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":255,"column":3},
1184
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":283,"column":3},
1119
1185
  },
1120
1186
  {
1121
1187
  id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
@@ -1140,7 +1206,33 @@ export const TYPERT = {
1140
1206
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
1141
1207
  create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
1142
1208
  },
1143
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":368,"column":3},
1209
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":429,"column":3},
1210
+ },
1211
+ {
1212
+ id: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications',
1213
+ service: 'sessionController',
1214
+ namespace: 'session',
1215
+ method: 'workspacePathApplications',
1216
+ invocation: { kind: 'direct' },
1217
+ parameters: [
1218
+ {
1219
+ name: 'request',
1220
+ wire: 'request',
1221
+ source: 'json',
1222
+ codec: {
1223
+ mode: 'strict',
1224
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:request',
1225
+ create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0$schema,
1226
+ },
1227
+ },
1228
+ ],
1229
+ cancellation: { parameter: 'signal' },
1230
+ result: {
1231
+ mode: 'strict',
1232
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:result',
1233
+ create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema,
1234
+ },
1235
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":352,"column":9},
1144
1236
  },
1145
1237
  {
1146
1238
  id: '@deepseek-ai/dsh-api-session-controller#skills/list',
@@ -1166,7 +1258,7 @@ export const TYPERT = {
1166
1258
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
1167
1259
  create: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
1168
1260
  },
1169
- sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
1261
+ sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":35,"column":9},
1170
1262
  },
1171
1263
  ],
1172
1264
  model: {
@@ -1246,8 +1338,15 @@ export const TYPERT = {
1246
1338
  "kind": "method",
1247
1339
  "name": "openWorkspacePath",
1248
1340
  "signature": "@Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>",
1249
- "summary": "Open one path prepared by a Session-aware caller on the Host desktop.",
1250
- "jsDoc": "/**\n * Open one path prepared by a Session-aware caller on the Host desktop.\n * @param request - path after best-effort Session workspace resolution.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns confirmation after the native opener accepts the path.\n * @throws RemoteError when the request is invalid, cancelled, or the opener fails.\n */"
1341
+ "summary": "Verify one path through the composed filesystem and open it on the Host desktop.",
1342
+ "jsDoc": "/**\n * Verify one path through the composed filesystem and open it on the Host desktop.\n * @param request - path after best-effort Session workspace resolution.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns confirmation after the native opener accepts the path.\n * @throws RemoteError when the request is invalid, has no verified Host mapping, is cancelled, or the opener fails.\n */"
1343
+ },
1344
+ {
1345
+ "kind": "method",
1346
+ "name": "workspacePathApplications",
1347
+ "signature": "@Remote('workspacePathApplications') async workspacePathApplications( request: { readonly path: string }, signal: AbortSignal, ): Promise<readonly SessionWorkspacePathApplication[]>",
1348
+ "summary": "Query current file handlers on the serving desktop without activating an Agent.",
1349
+ "jsDoc": "/**\n * Query current file handlers on the serving desktop without activating an Agent.\n * @param request - file path in Host filesystem syntax.\n * @param signal - caller lifetime, propagated to filesystem and desktop queries.\n * @returns OS application names, icons, and default selection; empty when desktop opening is unavailable.\n * @throws RemoteError when the path is invalid, the query is cancelled, or native discovery fails.\n */"
1251
1350
  },
1252
1351
  {
1253
1352
  "kind": "method",
@@ -1260,8 +1359,8 @@ export const TYPERT = {
1260
1359
  "kind": "method",
1261
1360
  "name": "fork",
1262
1361
  "signature": "@Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>",
1263
- "summary": "Fork one cold-readable completed-turn prefix into a new Session.",
1264
- "jsDoc": "/**\n * Fork one cold-readable completed-turn prefix into a new Session.\n * @param request - source Session and optional event anchor.\n * @returns the new Session identity.\n */"
1362
+ "summary": "Fork one cold-readable exact event prefix into a new Session.",
1363
+ "jsDoc": "/**\n * Fork one cold-readable exact event prefix into a new Session. An omitted\n * boundary selects the latest completed-turn prefix; an open cut receives\n * synthetic fork closers.\n * @param request - source Session and optional exact inclusive event boundary.\n * @returns the new Session identity.\n */"
1265
1364
  },
1266
1365
  {
1267
1366
  "kind": "method",
@@ -1305,6 +1404,13 @@ export const TYPERT = {
1305
1404
  "summary": "Follow one Session log from its opening or resume cursor.",
1306
1405
  "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 */"
1307
1406
  },
1407
+ {
1408
+ "kind": "method",
1409
+ "name": "projections",
1410
+ "signature": "@Remote('projections') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>",
1411
+ "summary": "Read all registered projections without activating an Agent.",
1412
+ "jsDoc": "/**\n * Read all registered projections without activating an Agent.\n * @param request - Session whose current values are required.\n * @param signal - cancellation for the Session observation.\n * @returns complete baseline, or null when the Session does not exist.\n */"
1413
+ },
1308
1414
  {
1309
1415
  "kind": "method",
1310
1416
  "name": "control",
@@ -1356,7 +1462,7 @@ export const TYPERT = {
1356
1462
  },
1357
1463
  {
1358
1464
  "name": "AssistantMessage",
1359
- "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1465
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1360
1466
  },
1361
1467
  {
1362
1468
  "name": "AssistantProviderMetadata",
@@ -1394,6 +1500,10 @@ export const TYPERT = {
1394
1500
  "name": "CommandSourceMap",
1395
1501
  "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
1396
1502
  },
1503
+ {
1504
+ "name": "CompactionCheckpointSource",
1505
+ "declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
1506
+ },
1397
1507
  {
1398
1508
  "name": "CompactionId",
1399
1509
  "declaration": "export type CompactionId = Branded<'CompactionId'>;"
@@ -1404,7 +1514,7 @@ export const TYPERT = {
1404
1514
  },
1405
1515
  {
1406
1516
  "name": "ContentBlockMap",
1407
- "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}"
1517
+ "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}"
1408
1518
  },
1409
1519
  {
1410
1520
  "name": "ContentBlockType",
@@ -1422,9 +1532,13 @@ export const TYPERT = {
1422
1532
  "name": "ContinuableSubagentDescriptorData",
1423
1533
  "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}"
1424
1534
  },
1535
+ {
1536
+ "name": "DeveloperMessage",
1537
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
1538
+ },
1425
1539
  {
1426
1540
  "name": "EpochHeader",
1427
- "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
1541
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
1428
1542
  },
1429
1543
  {
1430
1544
  "name": "FeedbackCategory",
@@ -1534,6 +1648,10 @@ export const TYPERT = {
1534
1648
  "name": "JsonValue",
1535
1649
  "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
1536
1650
  },
1651
+ {
1652
+ "name": "KnownCatalogMode",
1653
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
1654
+ },
1537
1655
  {
1538
1656
  "name": "LlmAttemptId",
1539
1657
  "declaration": "export type LlmAttemptId = Branded<'LlmAttemptId'>;"
@@ -1552,7 +1670,11 @@ export const TYPERT = {
1552
1670
  },
1553
1671
  {
1554
1672
  "name": "Message",
1555
- "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
1673
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
1674
+ },
1675
+ {
1676
+ "name": "MessageBase",
1677
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
1556
1678
  },
1557
1679
  {
1558
1680
  "name": "MessageFeedbackDelete",
@@ -1578,13 +1700,17 @@ export const TYPERT = {
1578
1700
  "name": "MessageId",
1579
1701
  "declaration": "export type MessageId = Branded<'MessageId'>;"
1580
1702
  },
1703
+ {
1704
+ "name": "MessageRoleMap",
1705
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
1706
+ },
1581
1707
  {
1582
1708
  "name": "MessageSource",
1583
1709
  "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
1584
1710
  },
1585
1711
  {
1586
1712
  "name": "MessageSourceMap",
1587
- "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
1713
+ "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 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
1588
1714
  },
1589
1715
  {
1590
1716
  "name": "ModelCatalog",
@@ -1622,6 +1748,10 @@ export const TYPERT = {
1622
1748
  "name": "ModelSelectionProjection",
1623
1749
  "declaration": "export interface ModelSelectionProjection {\n readonly lastUsed: ModelSelection | null;\n readonly next: ModelSelection | null;\n}"
1624
1750
  },
1751
+ {
1752
+ "name": "NativeFileApplication",
1753
+ "declaration": "export interface NativeFileApplication {\n readonly id: string;\n readonly name: string;\n readonly default: boolean;\n readonly icon: string | null;\n}"
1754
+ },
1625
1755
  {
1626
1756
  "name": "OfficeToPdfErrorCode",
1627
1757
  "declaration": "export type OfficeToPdfErrorCode = 'input-too-large' | 'output-too-large' | 'invalid-document' | 'unsupported-format' | 'invalid-output' | 'timeout' | 'unavailable' | 'failed' | 'busy' | 'source-changed';"
@@ -1656,7 +1786,7 @@ export const TYPERT = {
1656
1786
  },
1657
1787
  {
1658
1788
  "name": "QueueAction",
1659
- "declaration": "export type QueueAction = { readonly kind: 'edit'; readonly content: readonly ContentBlock[]; } | { readonly kind: 'remove'; } | { readonly kind: 'steer'; };"
1789
+ "declaration": "export type QueueAction = { readonly kind: 'edit'; readonly content: readonly TextBlock[]; } | { readonly kind: 'remove'; } | { readonly kind: 'steer'; };"
1660
1790
  },
1661
1791
  {
1662
1792
  "name": "ReasoningBlock",
@@ -1676,7 +1806,7 @@ export const TYPERT = {
1676
1806
  },
1677
1807
  {
1678
1808
  "name": "RemoteErrorDetailsMap",
1679
- "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/writer-held': { readonly sessionId: SessionId; };\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 'terminal/unavailable': Record<string, never>;\n 'terminal/control-unavailable': { readonly reason: 'read-only' | 'not-running'; };\n 'terminal/limit-reached': { readonly limit: number; };\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 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
1809
+ "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 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\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/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'job/not-found': { readonly sessionId: SessionId; readonly jobId: JobId; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/projections-unavailable': Record<string, never>;\n 'session/writer-held': { readonly sessionId: SessionId; };\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 'settings/rejected': { readonly ns: string; };\n 'settings/conflict': { readonly ns: string; readonly expected: number; readonly actual: number; };\n 'credential/rejected': { readonly ref: string; };\n 'terminal/unavailable': Record<string, never>;\n 'terminal/control-unavailable': { readonly reason: 'read-only' | 'not-running'; };\n 'terminal/limit-reached': { readonly limit: number; };\n 'workspace/invalid-path': { readonly path: string; };\n 'workspace/name-conflict': { readonly name: string; };\n 'workspace/session-active': { readonly sessionId: SessionId; readonly activity: readonly SessionActivity[]; };\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/watch-unsupported': { 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 'speech/invalid-audio': { readonly reason: string; };\n 'speech/transcription-failed': { readonly reason: string; };\n 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
1680
1810
  },
1681
1811
  {
1682
1812
  "name": "ReplayEnvelope",
@@ -1696,11 +1826,27 @@ export const TYPERT = {
1696
1826
  },
1697
1827
  {
1698
1828
  "name": "Session",
1699
- "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}"
1829
+ "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}"
1830
+ },
1831
+ {
1832
+ "name": "SessionActivity",
1833
+ "declaration": "export interface SessionActivity {\n readonly kind: SessionActivityKind;\n readonly items?: readonly SessionActivityItem[];\n}"
1834
+ },
1835
+ {
1836
+ "name": "SessionActivityItem",
1837
+ "declaration": "export interface SessionActivityItem {\n readonly id: string;\n readonly label?: string;\n}"
1838
+ },
1839
+ {
1840
+ "name": "SessionActivityKind",
1841
+ "declaration": "export type SessionActivityKind = keyof SessionActivityKindMap;"
1842
+ },
1843
+ {
1844
+ "name": "SessionActivityKindMap",
1845
+ "declaration": "export interface SessionActivityKindMap {\n turn: true;\n job: true;\n subagent: true;\n}"
1700
1846
  },
1701
1847
  {
1702
1848
  "name": "SessionAddress",
1703
- "declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable'; };"
1849
+ "declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable' | 'unknown'; };"
1704
1850
  },
1705
1851
  {
1706
1852
  "name": "SessionAssistantStreamAttempt",
@@ -1732,11 +1878,11 @@ export const TYPERT = {
1732
1878
  },
1733
1879
  {
1734
1880
  "name": "SessionControlBaseline",
1735
- "declaration": "export interface SessionControlBaseline {\n readonly jobs: Readonly<Record<SessionId, readonly SessionJob[]>>;\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
1881
+ "declaration": "export interface SessionControlBaseline {\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
1736
1882
  },
1737
1883
  {
1738
1884
  "name": "SessionControlFrame",
1739
- "declaration": "export type SessionControlFrame = { readonly type: 'baseline'; readonly value: SessionControlBaseline; } | { readonly type: 'jobs'; readonly sessionId: SessionId; readonly jobs: readonly SessionJob[]; } | ({ readonly type: 'projection'; } & SessionProjectionUpdate);"
1885
+ "declaration": "export type SessionControlFrame = { readonly type: 'baseline'; readonly value: SessionControlBaseline; } | ({ readonly type: 'projection'; } & SessionProjectionUpdate);"
1740
1886
  },
1741
1887
  {
1742
1888
  "name": "SessionCreateRequest",
@@ -1756,7 +1902,7 @@ export const TYPERT = {
1756
1902
  },
1757
1903
  {
1758
1904
  "name": "SessionEventMap",
1759
- "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
1905
+ "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 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
1760
1906
  },
1761
1907
  {
1762
1908
  "name": "SessionEventType",
@@ -1794,10 +1940,6 @@ export const TYPERT = {
1794
1940
  "name": "SessionInspection",
1795
1941
  "declaration": "export interface SessionInspection extends SessionStorageMetadata {\n readonly events: readonly SessionEvent[];\n}"
1796
1942
  },
1797
- {
1798
- "name": "SessionJob",
1799
- "declaration": "export interface SessionJob {\n readonly id: JobId;\n readonly kind: string;\n readonly label: string;\n readonly status: 'running' | 'stopping' | 'completed' | 'killed' | 'failed';\n readonly detail?: string;\n readonly startedAt: number;\n readonly finishedAt?: number;\n}"
1800
- },
1801
1943
  {
1802
1944
  "name": "SessionListMetadata",
1803
1945
  "declaration": "export interface SessionListMetadata {\n readonly blank: boolean;\n readonly lastPromptAt: number | null;\n}"
@@ -1816,7 +1958,7 @@ export const TYPERT = {
1816
1958
  },
1817
1959
  {
1818
1960
  "name": "SessionOpenWorkspacePathRequest",
1819
- "declaration": "export interface SessionOpenWorkspacePathRequest {\n readonly action?: 'reveal';\n readonly path: string;\n}"
1961
+ "declaration": "export interface SessionOpenWorkspacePathRequest {\n readonly action?: 'reveal';\n readonly application?: string;\n readonly path: string;\n}"
1820
1962
  },
1821
1963
  {
1822
1964
  "name": "SessionOpenWorkspacePathValue",
@@ -1836,12 +1978,20 @@ export const TYPERT = {
1836
1978
  },
1837
1979
  {
1838
1980
  "name": "SessionProjectionHints",
1839
- "declaration": "export interface SessionProjectionHints {\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
1981
+ "declaration": "export interface SessionProjectionHints {\n readonly kind: 'cached' | 'sequenced';\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
1840
1982
  },
1841
1983
  {
1842
1984
  "name": "SessionProjectionMap",
1843
1985
  "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 permissions: PermissionSelection;\n subagentCatalog: SubagentCatalogEntry[];\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n goal: GoalProjection | null;\n}"
1844
1986
  },
1987
+ {
1988
+ "name": "SessionProjectionsRequest",
1989
+ "declaration": "export interface SessionProjectionsRequest {\n readonly sessionId: SessionId;\n}"
1990
+ },
1991
+ {
1992
+ "name": "SessionProjectionsValue",
1993
+ "declaration": "export type SessionProjectionsValue = SessionProjectionBaseline | null;"
1994
+ },
1845
1995
  {
1846
1996
  "name": "SessionProjectionUpdate",
1847
1997
  "declaration": "export interface SessionProjectionUpdate {\n readonly sessionId: SessionId;\n readonly key: string;\n readonly value: JsonValue;\n readonly seq: number;\n}"
@@ -1912,7 +2062,7 @@ export const TYPERT = {
1912
2062
  },
1913
2063
  {
1914
2064
  "name": "SessionSummary",
1915
- "declaration": "export interface SessionSummary {\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
2065
+ "declaration": "export interface SessionSummary {\n readonly agentAvailable: boolean;\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
1916
2066
  },
1917
2067
  {
1918
2068
  "name": "SessionSurface",
@@ -1950,6 +2100,10 @@ export const TYPERT = {
1950
2100
  "name": "SessionWireHeader",
1951
2101
  "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}"
1952
2102
  },
2103
+ {
2104
+ "name": "SessionWorkspacePathApplication",
2105
+ "declaration": "export type SessionWorkspacePathApplication = NativeFileApplication;"
2106
+ },
1953
2107
  {
1954
2108
  "name": "SkillInvocationSource",
1955
2109
  "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
@@ -1960,11 +2114,11 @@ export const TYPERT = {
1960
2114
  },
1961
2115
  {
1962
2116
  "name": "SubagentCatalogEntry",
1963
- "declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
2117
+ "declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'unknown'; readonly label?: string; });"
1964
2118
  },
1965
2119
  {
1966
2120
  "name": "SubagentCatalogEvent",
1967
- "declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
2121
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
1968
2122
  },
1969
2123
  {
1970
2124
  "name": "SubagentDescriptorBase",
@@ -1984,11 +2138,11 @@ export const TYPERT = {
1984
2138
  },
1985
2139
  {
1986
2140
  "name": "SubagentTimingProjection",
1987
- "declaration": "export interface SubagentTimingProjection {\n settledMs: number;\n active?: { since: number; through: number; };\n}"
2141
+ "declaration": "export interface SubagentTimingProjection {\n settledMs: number;\n active?: { since: number; through: number; };\n lastTurnCompleted?: boolean;\n}"
1988
2142
  },
1989
2143
  {
1990
2144
  "name": "SurfaceEventType",
1991
- "declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2145
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
1992
2146
  },
1993
2147
  {
1994
2148
  "name": "SurfaceIntent",
@@ -2000,7 +2154,11 @@ export const TYPERT = {
2000
2154
  },
2001
2155
  {
2002
2156
  "name": "SystemMessage",
2003
- "declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
2157
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
2158
+ },
2159
+ {
2160
+ "name": "SystemPromptMessageSource",
2161
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
2004
2162
  },
2005
2163
  {
2006
2164
  "name": "SystemPromptUpdate",
@@ -2054,6 +2212,10 @@ export const TYPERT = {
2054
2212
  "name": "TokenUsage",
2055
2213
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2056
2214
  },
2215
+ {
2216
+ "name": "ToolAdditionBlock",
2217
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
2218
+ },
2057
2219
  {
2058
2220
  "name": "ToolCallBlock",
2059
2221
  "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
@@ -2067,20 +2229,20 @@ export const TYPERT = {
2067
2229
  "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
2068
2230
  },
2069
2231
  {
2070
- "name": "ToolRestriction",
2071
- "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2232
+ "name": "ToolRemovalBlock",
2233
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
2072
2234
  },
2073
2235
  {
2074
- "name": "ToolResultBlock",
2075
- "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
2236
+ "name": "ToolRestriction",
2237
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2076
2238
  },
2077
2239
  {
2078
2240
  "name": "ToolResultMessage",
2079
- "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
2241
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
2080
2242
  },
2081
2243
  {
2082
2244
  "name": "ToolSchema",
2083
- "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2245
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2084
2246
  },
2085
2247
  {
2086
2248
  "name": "TurnEndCancelCause",
@@ -2092,11 +2254,11 @@ export const TYPERT = {
2092
2254
  },
2093
2255
  {
2094
2256
  "name": "TurnEndReasonMap",
2095
- "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}"
2257
+ "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}"
2096
2258
  },
2097
2259
  {
2098
2260
  "name": "UserMessage",
2099
- "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
2261
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
2100
2262
  },
2101
2263
  {
2102
2264
  "name": "WorkspaceId",
@@ -2155,7 +2317,7 @@ export const TYPERT = {
2155
2317
  },
2156
2318
  {
2157
2319
  "name": "AssistantMessage",
2158
- "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
2320
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
2159
2321
  },
2160
2322
  {
2161
2323
  "name": "AssistantProviderMetadata",
@@ -2193,6 +2355,10 @@ export const TYPERT = {
2193
2355
  "name": "CommandSourceMap",
2194
2356
  "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
2195
2357
  },
2358
+ {
2359
+ "name": "CompactionCheckpointSource",
2360
+ "declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
2361
+ },
2196
2362
  {
2197
2363
  "name": "CompactionId",
2198
2364
  "declaration": "export type CompactionId = Branded<'CompactionId'>;"
@@ -2203,7 +2369,7 @@ export const TYPERT = {
2203
2369
  },
2204
2370
  {
2205
2371
  "name": "ContentBlockMap",
2206
- "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}"
2372
+ "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}"
2207
2373
  },
2208
2374
  {
2209
2375
  "name": "ContentBlockType",
@@ -2221,9 +2387,13 @@ export const TYPERT = {
2221
2387
  "name": "ContinuableSubagentDescriptorData",
2222
2388
  "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}"
2223
2389
  },
2390
+ {
2391
+ "name": "DeveloperMessage",
2392
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
2393
+ },
2224
2394
  {
2225
2395
  "name": "EpochHeader",
2226
- "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
2396
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
2227
2397
  },
2228
2398
  {
2229
2399
  "name": "FeedbackCategory",
@@ -2321,6 +2491,10 @@ export const TYPERT = {
2321
2491
  "name": "JsonValue",
2322
2492
  "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
2323
2493
  },
2494
+ {
2495
+ "name": "KnownCatalogMode",
2496
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
2497
+ },
2324
2498
  {
2325
2499
  "name": "LlmCallConfig",
2326
2500
  "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
@@ -2335,7 +2509,11 @@ export const TYPERT = {
2335
2509
  },
2336
2510
  {
2337
2511
  "name": "Message",
2338
- "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
2512
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
2513
+ },
2514
+ {
2515
+ "name": "MessageBase",
2516
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
2339
2517
  },
2340
2518
  {
2341
2519
  "name": "MessageFeedbackDelete",
@@ -2361,13 +2539,17 @@ export const TYPERT = {
2361
2539
  "name": "MessageId",
2362
2540
  "declaration": "export type MessageId = Branded<'MessageId'>;"
2363
2541
  },
2542
+ {
2543
+ "name": "MessageRoleMap",
2544
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
2545
+ },
2364
2546
  {
2365
2547
  "name": "MessageSource",
2366
2548
  "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
2367
2549
  },
2368
2550
  {
2369
2551
  "name": "MessageSourceMap",
2370
- "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
2552
+ "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 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
2371
2553
  },
2372
2554
  {
2373
2555
  "name": "ModelMessageSource",
@@ -2423,7 +2605,7 @@ export const TYPERT = {
2423
2605
  },
2424
2606
  {
2425
2607
  "name": "Session",
2426
- "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}"
2608
+ "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}"
2427
2609
  },
2428
2610
  {
2429
2611
  "name": "SessionEvent",
@@ -2431,7 +2613,7 @@ export const TYPERT = {
2431
2613
  },
2432
2614
  {
2433
2615
  "name": "SessionEventMap",
2434
- "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
2616
+ "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 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
2435
2617
  },
2436
2618
  {
2437
2619
  "name": "SessionEventType",
@@ -2491,7 +2673,7 @@ export const TYPERT = {
2491
2673
  },
2492
2674
  {
2493
2675
  "name": "SubagentCatalogEvent",
2494
- "declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
2676
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
2495
2677
  },
2496
2678
  {
2497
2679
  "name": "SubagentDescriptorBase",
@@ -2507,7 +2689,7 @@ export const TYPERT = {
2507
2689
  },
2508
2690
  {
2509
2691
  "name": "SurfaceEventType",
2510
- "declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2692
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2511
2693
  },
2512
2694
  {
2513
2695
  "name": "SurfaceIntent",
@@ -2519,7 +2701,11 @@ export const TYPERT = {
2519
2701
  },
2520
2702
  {
2521
2703
  "name": "SystemMessage",
2522
- "declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
2704
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
2705
+ },
2706
+ {
2707
+ "name": "SystemPromptMessageSource",
2708
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
2523
2709
  },
2524
2710
  {
2525
2711
  "name": "SystemPromptUpdate",
@@ -2573,6 +2759,10 @@ export const TYPERT = {
2573
2759
  "name": "TokenUsage",
2574
2760
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2575
2761
  },
2762
+ {
2763
+ "name": "ToolAdditionBlock",
2764
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
2765
+ },
2576
2766
  {
2577
2767
  "name": "ToolCallBlock",
2578
2768
  "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
@@ -2586,20 +2776,20 @@ export const TYPERT = {
2586
2776
  "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
2587
2777
  },
2588
2778
  {
2589
- "name": "ToolRestriction",
2590
- "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2779
+ "name": "ToolRemovalBlock",
2780
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
2591
2781
  },
2592
2782
  {
2593
- "name": "ToolResultBlock",
2594
- "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
2783
+ "name": "ToolRestriction",
2784
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2595
2785
  },
2596
2786
  {
2597
2787
  "name": "ToolResultMessage",
2598
- "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
2788
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
2599
2789
  },
2600
2790
  {
2601
2791
  "name": "ToolSchema",
2602
- "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2792
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2603
2793
  },
2604
2794
  {
2605
2795
  "name": "TurnEndCancelCause",
@@ -2611,11 +2801,11 @@ export const TYPERT = {
2611
2801
  },
2612
2802
  {
2613
2803
  "name": "TurnEndReasonMap",
2614
- "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}"
2804
+ "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}"
2615
2805
  },
2616
2806
  {
2617
2807
  "name": "UserMessage",
2618
- "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
2808
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
2619
2809
  }
2620
2810
  ]
2621
2811
  },
@@ -2688,8 +2878,8 @@ export const TYPERT = {
2688
2878
  "signature": "'api-session/activity'(sessionId: SessionId, updatedAt: number): void"
2689
2879
  },
2690
2880
  {
2691
- "description": "A Session became visible to Session list consumers.",
2692
- "summary": "A Session became visible to Session list consumers.",
2881
+ "description": "A Session became visible or its Agent was created or disposed. Consumers upsert the summary and replace its current running and availability state.",
2882
+ "summary": "A Session became visible or its Agent was created or disposed.",
2693
2883
  "tags": [
2694
2884
  {
2695
2885
  "name": "mode",
@@ -2699,11 +2889,11 @@ export const TYPERT = {
2699
2889
  {
2700
2890
  "name": "param",
2701
2891
  "argument": "summary",
2702
- "comment": "- initial list row for the Session.",
2703
- "text": "@param summary - initial list row for the Session."
2892
+ "comment": "- current list row for the Session.",
2893
+ "text": "@param summary - current list row for the Session."
2704
2894
  }
2705
2895
  ],
2706
- "jsDoc": "/**\n * A Session became visible to Session list consumers.\n * @mode emit\n * @param summary - initial list row for the Session.\n */",
2896
+ "jsDoc": "/**\n * A Session became visible or its Agent was created or disposed.\n * Consumers upsert the summary and replace its current running and availability state.\n * @mode emit\n * @param summary - current list row for the Session.\n */",
2707
2897
  "name": "api-session/added",
2708
2898
  "mode": "emit",
2709
2899
  "signature": "'api-session/added'(summary: SessionSummary): void"