@deepseek-ai/dsh-api-session-controller 0.2.0-rc.2 → 0.2.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,6 +62,7 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
62
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
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(),
64
64
  }).optional(),
65
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
65
66
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
66
67
  'title': z.union([z.literal(null), z.string()]).optional(),
67
68
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -104,6 +105,12 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
104
105
  })), z.intersection(z.object({
105
106
  'id': z.intersection(z.string(), z.unknown()).readonly(),
106
107
  'createdAt': z.number().readonly(),
108
+ }), z.object({
109
+ 'mode': z.literal("external").readonly(),
110
+ 'label': z.string().readonly().optional(),
111
+ })), z.intersection(z.object({
112
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
113
+ 'createdAt': z.number().readonly(),
107
114
  }), z.object({
108
115
  'mode': z.literal("continuable").readonly(),
109
116
  'label': z.string().readonly(),
@@ -131,22 +138,22 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
131
138
  'label': z.string(),
132
139
  'seq': z.intersection(z.number(), z.unknown()),
133
140
  })]).optional(),
134
- 'goal': z.union([z.literal(null), z.object({
135
- 'goal': z.object({
136
- 'objective': z.string().readonly(),
137
- 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
138
- 'blockedReason': z.object({
139
- 'code': z.string().readonly(),
140
- 'message': z.string().readonly(),
141
- }).readonly().optional(),
142
- 'maxGoalRounds': z.number().readonly(),
143
- 'id': z.intersection(z.string(), z.unknown()).readonly(),
144
- 'revision': z.number().readonly(),
145
- }).readonly(),
146
- 'roundsStarted': z.number().readonly(),
147
- 'createdAt': z.number().readonly(),
148
- 'updatedAt': z.number().readonly(),
149
- })]).optional(),
141
+ 'tokenUsage': z.object({
142
+ 'uncachedInputTokens': z.number(),
143
+ 'outputTokens': z.number(),
144
+ 'cacheReadTokens': z.number(),
145
+ 'cacheWriteTokens': z.number(),
146
+ }).optional(),
147
+ 'contextPressure': z.object({
148
+ 'pressureTokens': z.number().optional(),
149
+ 'projectedTokens': z.number().optional(),
150
+ 'contextWindow': z.number().optional(),
151
+ }).optional(),
152
+ 'contextBreakdown': z.object({
153
+ 'systemTokens': z.number(),
154
+ 'toolsTokens': z.number(),
155
+ 'messageTokens': z.number(),
156
+ }).optional(),
150
157
  'userQuestions': z.object({
151
158
  'active': z.array(z.object({
152
159
  'callId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -177,6 +184,22 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
177
184
  })).readonly(),
178
185
  })).readonly(),
179
186
  }).optional(),
187
+ 'goal': z.union([z.literal(null), z.object({
188
+ 'goal': z.object({
189
+ 'objective': z.string().readonly(),
190
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
191
+ 'blockedReason': z.object({
192
+ 'code': z.string().readonly(),
193
+ 'message': z.string().readonly(),
194
+ }).readonly().optional(),
195
+ 'maxGoalRounds': z.number().readonly(),
196
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
197
+ 'revision': z.number().readonly(),
198
+ }).readonly(),
199
+ 'roundsStarted': z.number().readonly(),
200
+ 'createdAt': z.number().readonly(),
201
+ 'updatedAt': z.number().readonly(),
202
+ })]).optional(),
180
203
  }), 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(),
181
204
  })).readonly().readonly(),
182
205
  }).readonly(),
@@ -264,6 +287,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
264
287
  'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3()))])).readonly(),
265
288
  'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3()))])).readonly(),
266
289
  }).optional(),
290
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
267
291
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
268
292
  'title': z.union([z.literal(null), z.string()]).optional(),
269
293
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -306,6 +330,12 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
306
330
  })), z.intersection(z.object({
307
331
  'id': z.intersection(z.string(), z.unknown()).readonly(),
308
332
  'createdAt': z.number().readonly(),
333
+ }), z.object({
334
+ 'mode': z.literal("external").readonly(),
335
+ 'label': z.string().readonly().optional(),
336
+ })), z.intersection(z.object({
337
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
338
+ 'createdAt': z.number().readonly(),
309
339
  }), z.object({
310
340
  'mode': z.literal("continuable").readonly(),
311
341
  'label': z.string().readonly(),
@@ -333,22 +363,22 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
333
363
  'label': z.string(),
334
364
  'seq': z.intersection(z.number(), z.unknown()),
335
365
  })]).optional(),
336
- 'goal': z.union([z.literal(null), z.object({
337
- 'goal': z.object({
338
- 'objective': z.string().readonly(),
339
- 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
340
- 'blockedReason': z.object({
341
- 'code': z.string().readonly(),
342
- 'message': z.string().readonly(),
343
- }).readonly().optional(),
344
- 'maxGoalRounds': z.number().readonly(),
345
- 'id': z.intersection(z.string(), z.unknown()).readonly(),
346
- 'revision': z.number().readonly(),
347
- }).readonly(),
348
- 'roundsStarted': z.number().readonly(),
349
- 'createdAt': z.number().readonly(),
350
- 'updatedAt': z.number().readonly(),
351
- })]).optional(),
366
+ 'tokenUsage': z.object({
367
+ 'uncachedInputTokens': z.number(),
368
+ 'outputTokens': z.number(),
369
+ 'cacheReadTokens': z.number(),
370
+ 'cacheWriteTokens': z.number(),
371
+ }).optional(),
372
+ 'contextPressure': z.object({
373
+ 'pressureTokens': z.number().optional(),
374
+ 'projectedTokens': z.number().optional(),
375
+ 'contextWindow': z.number().optional(),
376
+ }).optional(),
377
+ 'contextBreakdown': z.object({
378
+ 'systemTokens': z.number(),
379
+ 'toolsTokens': z.number(),
380
+ 'messageTokens': z.number(),
381
+ }).optional(),
352
382
  'userQuestions': z.object({
353
383
  'active': z.array(z.object({
354
384
  'callId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -379,6 +409,22 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
379
409
  })).readonly(),
380
410
  })).readonly(),
381
411
  }).optional(),
412
+ 'goal': z.union([z.literal(null), z.object({
413
+ 'goal': z.object({
414
+ 'objective': z.string().readonly(),
415
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
416
+ 'blockedReason': z.object({
417
+ 'code': z.string().readonly(),
418
+ 'message': z.string().readonly(),
419
+ }).readonly().optional(),
420
+ 'maxGoalRounds': z.number().readonly(),
421
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
422
+ 'revision': z.number().readonly(),
423
+ }).readonly(),
424
+ 'roundsStarted': z.number().readonly(),
425
+ 'createdAt': z.number().readonly(),
426
+ 'updatedAt': z.number().readonly(),
427
+ })]).optional(),
382
428
  }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3()))])).readonly()).readonly(),
383
429
  }).readonly(),
384
430
  'assistantStream': z.object({
@@ -426,6 +472,7 @@ let _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema$valu
426
472
  const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema$value ??= z.object({
427
473
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
428
474
  'atSeq': z.number().readonly().optional(),
475
+ 'allowMigration': z.boolean().readonly().optional(),
429
476
  }))
430
477
  let _deepseek_ai_dsh_api_session_controller_session_fork_result$schema$value
431
478
  const _deepseek_ai_dsh_api_session_controller_session_fork_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_fork_result$schema$value ??= z.object({
@@ -441,6 +488,7 @@ let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value
441
488
  const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_list_result$schema$value ??= z.object({
442
489
  'items': z.array(z.object({
443
490
  'agentAvailable': z.boolean().readonly(),
491
+ 'formatStatus': z.union([z.literal("current"), z.literal("migration-required")]).readonly().optional(),
444
492
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
445
493
  'updatedAt': z.number().readonly(),
446
494
  'running': z.boolean().readonly(),
@@ -456,6 +504,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
456
504
  'next-turn': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema()))])).readonly(),
457
505
  'next-step': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema()))])).readonly(),
458
506
  }).optional(),
507
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
459
508
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
460
509
  'title': z.union([z.literal(null), z.string()]).optional(),
461
510
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -498,6 +547,12 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
498
547
  })), z.intersection(z.object({
499
548
  'id': z.intersection(z.string(), z.unknown()).readonly(),
500
549
  'createdAt': z.number().readonly(),
550
+ }), z.object({
551
+ 'mode': z.literal("external").readonly(),
552
+ 'label': z.string().readonly().optional(),
553
+ })), z.intersection(z.object({
554
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
555
+ 'createdAt': z.number().readonly(),
501
556
  }), z.object({
502
557
  'mode': z.literal("continuable").readonly(),
503
558
  'label': z.string().readonly(),
@@ -525,22 +580,22 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
525
580
  'label': z.string(),
526
581
  'seq': z.intersection(z.number(), z.unknown()),
527
582
  })]).optional(),
528
- 'goal': z.union([z.literal(null), z.object({
529
- 'goal': z.object({
530
- 'objective': z.string().readonly(),
531
- 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
532
- 'blockedReason': z.object({
533
- 'code': z.string().readonly(),
534
- 'message': z.string().readonly(),
535
- }).readonly().optional(),
536
- 'maxGoalRounds': z.number().readonly(),
537
- 'id': z.intersection(z.string(), z.unknown()).readonly(),
538
- 'revision': z.number().readonly(),
539
- }).readonly(),
540
- 'roundsStarted': z.number().readonly(),
541
- 'createdAt': z.number().readonly(),
542
- 'updatedAt': z.number().readonly(),
543
- })]).optional(),
583
+ 'tokenUsage': z.object({
584
+ 'uncachedInputTokens': z.number(),
585
+ 'outputTokens': z.number(),
586
+ 'cacheReadTokens': z.number(),
587
+ 'cacheWriteTokens': z.number(),
588
+ }).optional(),
589
+ 'contextPressure': z.object({
590
+ 'pressureTokens': z.number().optional(),
591
+ 'projectedTokens': z.number().optional(),
592
+ 'contextWindow': z.number().optional(),
593
+ }).optional(),
594
+ 'contextBreakdown': z.object({
595
+ 'systemTokens': z.number(),
596
+ 'toolsTokens': z.number(),
597
+ 'messageTokens': z.number(),
598
+ }).optional(),
544
599
  'userQuestions': z.object({
545
600
  'active': z.array(z.object({
546
601
  'callId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -571,6 +626,22 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
571
626
  })).readonly(),
572
627
  })).readonly(),
573
628
  }).optional(),
629
+ 'goal': z.union([z.literal(null), z.object({
630
+ 'goal': z.object({
631
+ 'objective': z.string().readonly(),
632
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
633
+ 'blockedReason': z.object({
634
+ 'code': z.string().readonly(),
635
+ 'message': z.string().readonly(),
636
+ }).readonly().optional(),
637
+ 'maxGoalRounds': z.number().readonly(),
638
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
639
+ 'revision': z.number().readonly(),
640
+ }).readonly(),
641
+ 'roundsStarted': z.number().readonly(),
642
+ 'createdAt': z.number().readonly(),
643
+ 'updatedAt': z.number().readonly(),
644
+ })]).optional(),
574
645
  }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema()))])).readonly()).readonly(),
575
646
  }).readonly().optional(),
576
647
  })).readonly(),
@@ -656,13 +727,14 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$sc
656
727
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
657
728
  }))
658
729
  let _deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value
659
- 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({
730
+ 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.intersection(z.object({
660
731
  'asOfSeq': z.number().readonly(),
661
732
  'values': z.intersection(z.object({
662
733
  'inbox': z.object({
663
734
  '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(),
664
735
  '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(),
665
736
  }).optional(),
737
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
666
738
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
667
739
  'title': z.union([z.literal(null), z.string()]).optional(),
668
740
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -705,6 +777,12 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
705
777
  })), z.intersection(z.object({
706
778
  'id': z.intersection(z.string(), z.unknown()).readonly(),
707
779
  'createdAt': z.number().readonly(),
780
+ }), z.object({
781
+ 'mode': z.literal("external").readonly(),
782
+ 'label': z.string().readonly().optional(),
783
+ })), z.intersection(z.object({
784
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
785
+ 'createdAt': z.number().readonly(),
708
786
  }), z.object({
709
787
  'mode': z.literal("continuable").readonly(),
710
788
  'label': z.string().readonly(),
@@ -732,6 +810,52 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
732
810
  'label': z.string(),
733
811
  'seq': z.intersection(z.number(), z.unknown()),
734
812
  })]).optional(),
813
+ 'tokenUsage': z.object({
814
+ 'uncachedInputTokens': z.number(),
815
+ 'outputTokens': z.number(),
816
+ 'cacheReadTokens': z.number(),
817
+ 'cacheWriteTokens': z.number(),
818
+ }).optional(),
819
+ 'contextPressure': z.object({
820
+ 'pressureTokens': z.number().optional(),
821
+ 'projectedTokens': z.number().optional(),
822
+ 'contextWindow': z.number().optional(),
823
+ }).optional(),
824
+ 'contextBreakdown': z.object({
825
+ 'systemTokens': z.number(),
826
+ 'toolsTokens': z.number(),
827
+ 'messageTokens': z.number(),
828
+ }).optional(),
829
+ 'userQuestions': z.object({
830
+ 'active': z.array(z.object({
831
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
832
+ 'questions': z.array(z.object({
833
+ 'id': z.string(),
834
+ 'question': z.string(),
835
+ 'detail': z.string().optional(),
836
+ 'header': z.string().optional(),
837
+ 'options': z.array(z.object({
838
+ 'label': z.string(),
839
+ 'description': z.string().optional(),
840
+ })).optional(),
841
+ 'multiSelect': z.boolean().optional(),
842
+ 'intent': z.object({
843
+ 'kind': z.literal("plan-review"),
844
+ 'approve': z.string(),
845
+ 'callId': z.intersection(z.string(), z.unknown()).optional(),
846
+ }).optional(),
847
+ })).readonly(),
848
+ 'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
849
+ })).readonly(),
850
+ 'settled': z.array(z.object({
851
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
852
+ 'answers': z.array(z.object({
853
+ 'id': z.string(),
854
+ 'selected': z.array(z.string()),
855
+ 'custom': z.string().optional(),
856
+ })).readonly(),
857
+ })).readonly(),
858
+ }).optional(),
735
859
  'goal': z.union([z.literal(null), z.object({
736
860
  'goal': z.object({
737
861
  'objective': z.string().readonly(),
@@ -748,6 +872,108 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
748
872
  'createdAt': z.number().readonly(),
749
873
  'updatedAt': z.number().readonly(),
750
874
  })]).optional(),
875
+ }), 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(),
876
+ }), z.object({
877
+ 'kind': z.literal("sequenced").readonly(),
878
+ })), z.object({
879
+ 'kind': z.literal("migration-required").readonly(),
880
+ 'values': z.intersection(z.object({
881
+ 'inbox': z.object({
882
+ '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(),
883
+ '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(),
884
+ }).optional(),
885
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
886
+ 'agentPreset': z.union([z.literal(null), z.string()]).optional(),
887
+ 'title': z.union([z.literal(null), z.string()]).optional(),
888
+ 'todos': z.union([z.literal(null), z.array(z.object({
889
+ 'content': z.string(),
890
+ 'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
891
+ }))]).optional(),
892
+ 'sessionListMetadata': z.object({
893
+ 'blank': z.boolean().readonly(),
894
+ 'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
895
+ }).optional(),
896
+ 'imageLimits': z.object({
897
+ 'maxImageBytes': z.number(),
898
+ 'maxImagesPerMessage': z.number(),
899
+ 'maxMessageImageBytes': z.number(),
900
+ 'maxImagePixels': z.number(),
901
+ 'maxImageDimension': z.number(),
902
+ 'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
903
+ }).optional(),
904
+ 'modelSelection': z.object({
905
+ 'lastUsed': z.union([z.literal(null), z.object({
906
+ 'provider': z.string().readonly(),
907
+ 'model': z.string().readonly(),
908
+ 'reasoningEffort': z.string().readonly().optional(),
909
+ })]).readonly(),
910
+ 'next': z.union([z.literal(null), z.object({
911
+ 'provider': z.string().readonly(),
912
+ 'model': z.string().readonly(),
913
+ 'reasoningEffort': z.string().readonly().optional(),
914
+ })]).readonly(),
915
+ }).optional(),
916
+ 'permissions': z.object({
917
+ 'currentValue': z.string(),
918
+ }).optional(),
919
+ 'subagentCatalog': z.array(z.union([z.intersection(z.object({
920
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
921
+ 'createdAt': z.number().readonly(),
922
+ }), z.object({
923
+ 'mode': z.literal("one-shot").readonly(),
924
+ 'label': z.string().readonly().optional(),
925
+ })), z.intersection(z.object({
926
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
927
+ 'createdAt': z.number().readonly(),
928
+ }), z.object({
929
+ 'mode': z.literal("external").readonly(),
930
+ 'label': z.string().readonly().optional(),
931
+ })), z.intersection(z.object({
932
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
933
+ 'createdAt': z.number().readonly(),
934
+ }), z.object({
935
+ 'mode': z.literal("continuable").readonly(),
936
+ 'label': z.string().readonly(),
937
+ })), z.intersection(z.object({
938
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
939
+ 'createdAt': z.number().readonly(),
940
+ }), z.object({
941
+ 'mode': z.literal("unknown").readonly(),
942
+ 'label': z.string().readonly().optional(),
943
+ }))])).optional(),
944
+ 'subagentTiming': z.object({
945
+ 'settledMs': z.number(),
946
+ 'active': z.object({
947
+ 'since': z.number(),
948
+ 'through': z.number(),
949
+ }).optional(),
950
+ 'lastTurnCompleted': z.boolean().optional(),
951
+ }).optional(),
952
+ 'subagent': z.union([z.literal(null), z.object({
953
+ 'mode': z.literal("one-shot"),
954
+ 'label': z.string().optional(),
955
+ 'seq': z.intersection(z.number(), z.unknown()),
956
+ }), z.object({
957
+ 'mode': z.literal("continuable"),
958
+ 'label': z.string(),
959
+ 'seq': z.intersection(z.number(), z.unknown()),
960
+ })]).optional(),
961
+ 'tokenUsage': z.object({
962
+ 'uncachedInputTokens': z.number(),
963
+ 'outputTokens': z.number(),
964
+ 'cacheReadTokens': z.number(),
965
+ 'cacheWriteTokens': z.number(),
966
+ }).optional(),
967
+ 'contextPressure': z.object({
968
+ 'pressureTokens': z.number().optional(),
969
+ 'projectedTokens': z.number().optional(),
970
+ 'contextWindow': z.number().optional(),
971
+ }).optional(),
972
+ 'contextBreakdown': z.object({
973
+ 'systemTokens': z.number(),
974
+ 'toolsTokens': z.number(),
975
+ 'messageTokens': z.number(),
976
+ }).optional(),
751
977
  'userQuestions': z.object({
752
978
  'active': z.array(z.object({
753
979
  'callId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -778,6 +1004,22 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
778
1004
  })).readonly(),
779
1005
  })).readonly(),
780
1006
  }).optional(),
1007
+ 'goal': z.union([z.literal(null), z.object({
1008
+ 'goal': z.object({
1009
+ 'objective': z.string().readonly(),
1010
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
1011
+ 'blockedReason': z.object({
1012
+ 'code': z.string().readonly(),
1013
+ 'message': z.string().readonly(),
1014
+ }).readonly().optional(),
1015
+ 'maxGoalRounds': z.number().readonly(),
1016
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
1017
+ 'revision': z.number().readonly(),
1018
+ }).readonly(),
1019
+ 'roundsStarted': z.number().readonly(),
1020
+ 'createdAt': z.number().readonly(),
1021
+ 'updatedAt': z.number().readonly(),
1022
+ })]).optional(),
781
1023
  }), 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(),
782
1024
  })]))
783
1025
  let _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema$value
@@ -956,7 +1198,7 @@ export const TYPERT = {
956
1198
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
957
1199
  create: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
958
1200
  },
959
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":437,"column":3},
1201
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":453,"column":3},
960
1202
  },
961
1203
  {
962
1204
  id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
@@ -981,7 +1223,7 @@ export const TYPERT = {
981
1223
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
982
1224
  create: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
983
1225
  },
984
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":457,"column":3},
1226
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":473,"column":3},
985
1227
  },
986
1228
  {
987
1229
  id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
@@ -996,7 +1238,7 @@ export const TYPERT = {
996
1238
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
997
1239
  create: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
998
1240
  },
999
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":319,"column":3},
1241
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":327,"column":3},
1000
1242
  },
1001
1243
  {
1002
1244
  id: '@deepseek-ai/dsh-api-session-controller#session/control',
@@ -1013,7 +1255,7 @@ export const TYPERT = {
1013
1255
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
1014
1256
  create: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
1015
1257
  },
1016
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":520,"column":3},
1258
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":558,"column":3},
1017
1259
  },
1018
1260
  {
1019
1261
  id: '@deepseek-ai/dsh-api-session-controller#session/create',
@@ -1038,7 +1280,7 @@ export const TYPERT = {
1038
1280
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
1039
1281
  create: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
1040
1282
  },
1041
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":273,"column":3},
1283
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":281,"column":3},
1042
1284
  },
1043
1285
  {
1044
1286
  id: '@deepseek-ai/dsh-api-session-controller#session/follow',
@@ -1065,7 +1307,7 @@ export const TYPERT = {
1065
1307
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
1066
1308
  create: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
1067
1309
  },
1068
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":480,"column":3},
1310
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":496,"column":3},
1069
1311
  },
1070
1312
  {
1071
1313
  id: '@deepseek-ai/dsh-api-session-controller#session/fork',
@@ -1090,7 +1332,7 @@ export const TYPERT = {
1090
1332
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
1091
1333
  create: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
1092
1334
  },
1093
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":415,"column":3},
1335
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":423,"column":9},
1094
1336
  },
1095
1337
  {
1096
1338
  id: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel',
@@ -1105,7 +1347,7 @@ export const TYPERT = {
1105
1347
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel:result',
1106
1348
  create: _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema,
1107
1349
  },
1108
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":292,"column":9},
1350
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":300,"column":9},
1109
1351
  },
1110
1352
  {
1111
1353
  id: '@deepseek-ai/dsh-api-session-controller#session/list',
@@ -1131,7 +1373,7 @@ export const TYPERT = {
1131
1373
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
1132
1374
  create: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
1133
1375
  },
1134
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":252,"column":9},
1376
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":260,"column":9},
1135
1377
  },
1136
1378
  {
1137
1379
  id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
@@ -1146,7 +1388,7 @@ export const TYPERT = {
1146
1388
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
1147
1389
  create: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
1148
1390
  },
1149
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":310,"column":3},
1391
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":318,"column":3},
1150
1392
  },
1151
1393
  {
1152
1394
  id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
@@ -1172,7 +1414,7 @@ export const TYPERT = {
1172
1414
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
1173
1415
  create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
1174
1416
  },
1175
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":340,"column":9},
1417
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":348,"column":9},
1176
1418
  },
1177
1419
  {
1178
1420
  id: '@deepseek-ai/dsh-api-session-controller#session/page',
@@ -1198,7 +1440,7 @@ export const TYPERT = {
1198
1440
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
1199
1441
  create: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
1200
1442
  },
1201
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":468,"column":3},
1443
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":484,"column":3},
1202
1444
  },
1203
1445
  {
1204
1446
  id: '@deepseek-ai/dsh-api-session-controller#session/projections',
@@ -1224,7 +1466,7 @@ export const TYPERT = {
1224
1466
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsValue',
1225
1467
  create: _deepseek_ai_dsh_api_session_controller_session_projections_result$schema,
1226
1468
  },
1227
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":491,"column":9},
1469
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":507,"column":9},
1228
1470
  },
1229
1471
  {
1230
1472
  id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
@@ -1250,7 +1492,7 @@ export const TYPERT = {
1250
1492
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
1251
1493
  create: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
1252
1494
  },
1253
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":426,"column":3},
1495
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":442,"column":3},
1254
1496
  },
1255
1497
  {
1256
1498
  id: '@deepseek-ai/dsh-api-session-controller#session/rename',
@@ -1275,7 +1517,7 @@ export const TYPERT = {
1275
1517
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
1276
1518
  create: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
1277
1519
  },
1278
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":403,"column":3},
1520
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":411,"column":3},
1279
1521
  },
1280
1522
  {
1281
1523
  id: '@deepseek-ai/dsh-api-session-controller#session/search',
@@ -1301,7 +1543,7 @@ export const TYPERT = {
1301
1543
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
1302
1544
  create: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
1303
1545
  },
1304
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":263,"column":3},
1546
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":271,"column":3},
1305
1547
  },
1306
1548
  {
1307
1549
  id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
@@ -1326,7 +1568,7 @@ export const TYPERT = {
1326
1568
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
1327
1569
  create: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
1328
1570
  },
1329
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":283,"column":3},
1571
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":291,"column":3},
1330
1572
  },
1331
1573
  {
1332
1574
  id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
@@ -1351,7 +1593,7 @@ export const TYPERT = {
1351
1593
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
1352
1594
  create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
1353
1595
  },
1354
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":447,"column":3},
1596
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":463,"column":3},
1355
1597
  },
1356
1598
  {
1357
1599
  id: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications',
@@ -1377,7 +1619,7 @@ export const TYPERT = {
1377
1619
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:result',
1378
1620
  create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema,
1379
1621
  },
1380
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":370,"column":9},
1622
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":378,"column":9},
1381
1623
  },
1382
1624
  {
1383
1625
  id: '@deepseek-ai/dsh-api-session-controller#skills/list',
@@ -1403,7 +1645,7 @@ export const TYPERT = {
1403
1645
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
1404
1646
  create: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
1405
1647
  },
1406
- sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":35,"column":9},
1648
+ sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
1407
1649
  },
1408
1650
  ],
1409
1651
  model: {
@@ -1435,7 +1677,7 @@ export const TYPERT = {
1435
1677
  "name": "list",
1436
1678
  "signature": "@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>",
1437
1679
  "summary": "Read all visible Session rows without resuming an Agent.",
1438
- "jsDoc": "/**\n * Read all visible Session rows without resuming an Agent.\n * @param _request - reserved empty list request.\n * @param signal - cancellation for persistence reads.\n * @returns visible Session summaries ordered by activity.\n */"
1680
+ "jsDoc": "/**\n * Read all visible Session rows without resuming an Agent.\n * @param _request - reserved empty list request.\n * @param signal - cancellation for persistence reads and summary generation.\n * @returns visible Session summaries ordered by activity.\n */"
1439
1681
  },
1440
1682
  {
1441
1683
  "kind": "method",
@@ -1510,9 +1752,9 @@ export const TYPERT = {
1510
1752
  {
1511
1753
  "kind": "method",
1512
1754
  "name": "fork",
1513
- "signature": "@Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>",
1755
+ "signature": "@Remote('fork') async fork(request: SessionForkRequest): Promise<SessionForkValue>",
1514
1756
  "summary": "Fork one cold-readable exact event prefix into a new Session.",
1515
- "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 */"
1757
+ "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, optional exact inclusive event boundary, and migration preflight choice.\n * @returns the new Session identity.\n */"
1516
1758
  },
1517
1759
  {
1518
1760
  "kind": "method",
@@ -1560,8 +1802,8 @@ export const TYPERT = {
1560
1802
  "kind": "method",
1561
1803
  "name": "projections",
1562
1804
  "signature": "@Remote('projections') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>",
1563
- "summary": "Read all registered projections without activating an Agent.",
1564
- "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 */"
1805
+ "summary": "Read exact projections, returning cached hints only when migration is required.",
1806
+ "jsDoc": "/**\n * Read exact projections, returning cached hints only when migration is required.\n * @param request - Session whose current values are required.\n * @param signal - cancellation for the Session read.\n * @returns a sequenced baseline, cached hints when migration is deferred, or null when absent.\n */"
1565
1807
  },
1566
1808
  {
1567
1809
  "kind": "method",
@@ -1696,10 +1938,18 @@ export const TYPERT = {
1696
1938
  "name": "ContentBlockType",
1697
1939
  "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
1698
1940
  },
1941
+ {
1942
+ "name": "ContextBreakdownProjection",
1943
+ "declaration": "export interface ContextBreakdownProjection {\n systemTokens: number;\n toolsTokens: number;\n messageTokens: number;\n}"
1944
+ },
1699
1945
  {
1700
1946
  "name": "ContextFormed",
1701
1947
  "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
1702
1948
  },
1949
+ {
1950
+ "name": "ContextPressureProjection",
1951
+ "declaration": "export interface ContextPressureProjection {\n pressureTokens?: number;\n projectedTokens?: number;\n contextWindow?: number;\n}"
1952
+ },
1703
1953
  {
1704
1954
  "name": "ContextSnapshotSection",
1705
1955
  "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
@@ -1858,16 +2108,28 @@ export const TYPERT = {
1858
2108
  },
1859
2109
  {
1860
2110
  "name": "LlmCallConfig",
1861
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
2111
+ "declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
1862
2112
  },
1863
2113
  {
1864
2114
  "name": "LlmCallConfigAdapterDefaults",
1865
2115
  "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
1866
2116
  },
2117
+ {
2118
+ "name": "LlmCallControls",
2119
+ "declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
2120
+ },
1867
2121
  {
1868
2122
  "name": "LlmFailure",
1869
2123
  "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
1870
2124
  },
2125
+ {
2126
+ "name": "LlmRetryEventData",
2127
+ "declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
2128
+ },
2129
+ {
2130
+ "name": "LlmRetryStartedEventData",
2131
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
2132
+ },
1871
2133
  {
1872
2134
  "name": "Message",
1873
2135
  "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
@@ -1910,7 +2172,7 @@ export const TYPERT = {
1910
2172
  },
1911
2173
  {
1912
2174
  "name": "MessageSourceMap",
1913
- "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 goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n}"
2175
+ "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 'working-directory': { kind: 'working-directory'; };\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 'compact-checkpoint': CompactionCheckpointSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n}"
1914
2176
  },
1915
2177
  {
1916
2178
  "name": "ModelCatalog",
@@ -1986,7 +2248,7 @@ export const TYPERT = {
1986
2248
  },
1987
2249
  {
1988
2250
  "name": "PtcDispatchEventData",
1989
- "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
2251
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
1990
2252
  },
1991
2253
  {
1992
2254
  "name": "PtcDispatchStartEventData",
@@ -2014,7 +2276,7 @@ export const TYPERT = {
2014
2276
  },
2015
2277
  {
2016
2278
  "name": "RemoteErrorDetailsMap",
2017
- "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/provider-credentials-unavailable': Record<string, never>;\n 'session/provider-models-unavailable': { readonly provider: string; };\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 'gateway/ambiguous-endpoint': TypertGatewayFaultDetails;\n 'gateway/arguments-invalid': TypertGatewayFaultDetails;\n 'gateway/binding-invalid': TypertGatewayFaultDetails;\n 'gateway/context-failed': TypertGatewayFaultDetails;\n 'gateway/context-not-found': TypertGatewayFaultDetails;\n 'gateway/context-unavailable': TypertGatewayFaultDetails;\n 'gateway/definition-unavailable': TypertGatewayFaultDetails;\n 'gateway/input-invalid': TypertGatewayFaultDetails;\n 'gateway/invocation-unavailable': TypertGatewayFaultDetails;\n 'gateway/lookup-failed': TypertGatewayFaultDetails;\n 'gateway/lookup-not-found': TypertGatewayFaultDetails;\n 'gateway/lookup-unavailable': TypertGatewayFaultDetails;\n 'gateway/method-unavailable': TypertGatewayFaultDetails;\n 'gateway/protocol': TypertGatewayFaultDetails;\n 'gateway/provider-mismatch': TypertGatewayFaultDetails;\n 'gateway/result-invalid': TypertGatewayFaultDetails;\n 'gateway/service-unavailable': TypertGatewayFaultDetails;\n 'gateway/signature-invalid': TypertGatewayFaultDetails;\n 'gateway/uplink-overflow': TypertGatewayFaultDetails;\n 'speech/invalid-audio': { readonly reason: string; };\n 'speech/transcription-failed': { readonly reason: string; };\n 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
2279
+ "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/provider-credentials-unavailable': Record<string, never>;\n 'session/provider-models-unavailable': { readonly provider: string; };\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 'session/migration-required': { 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 'gateway/ambiguous-endpoint': TypertGatewayFaultDetails;\n 'gateway/arguments-invalid': TypertGatewayFaultDetails;\n 'gateway/binding-invalid': TypertGatewayFaultDetails;\n 'gateway/context-failed': TypertGatewayFaultDetails;\n 'gateway/context-not-found': TypertGatewayFaultDetails;\n 'gateway/context-unavailable': TypertGatewayFaultDetails;\n 'gateway/definition-unavailable': TypertGatewayFaultDetails;\n 'gateway/input-invalid': TypertGatewayFaultDetails;\n 'gateway/invocation-unavailable': TypertGatewayFaultDetails;\n 'gateway/lookup-failed': TypertGatewayFaultDetails;\n 'gateway/lookup-not-found': TypertGatewayFaultDetails;\n 'gateway/lookup-unavailable': TypertGatewayFaultDetails;\n 'gateway/method-unavailable': TypertGatewayFaultDetails;\n 'gateway/protocol': TypertGatewayFaultDetails;\n 'gateway/provider-mismatch': TypertGatewayFaultDetails;\n 'gateway/result-invalid': TypertGatewayFaultDetails;\n 'gateway/service-unavailable': TypertGatewayFaultDetails;\n 'gateway/signature-invalid': TypertGatewayFaultDetails;\n 'gateway/uplink-overflow': TypertGatewayFaultDetails;\n 'speech/invalid-audio': { readonly reason: string; };\n 'speech/transcription-failed': { readonly reason: string; };\n 'cotTranslation/failed': Record<string, never>;\n 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
2018
2280
  },
2019
2281
  {
2020
2282
  "name": "ReplayEnvelope",
@@ -2028,6 +2290,10 @@ export const TYPERT = {
2028
2290
  "name": "RequestHeaderReason",
2029
2291
  "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2030
2292
  },
2293
+ {
2294
+ "name": "RetryId",
2295
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
2296
+ },
2031
2297
  {
2032
2298
  "name": "SandboxMode",
2033
2299
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
@@ -2130,7 +2396,7 @@ export const TYPERT = {
2130
2396
  },
2131
2397
  {
2132
2398
  "name": "SessionEventMap",
2133
- "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 '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 'feedback/record': FeedbackRecord;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
2399
+ "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 'working-directory/change': { cwd: string; };\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 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\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 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
2134
2400
  },
2135
2401
  {
2136
2402
  "name": "SessionEventType",
@@ -2146,7 +2412,7 @@ export const TYPERT = {
2146
2412
  },
2147
2413
  {
2148
2414
  "name": "SessionForkRequest",
2149
- "declaration": "export interface SessionForkRequest {\n readonly sessionId: SessionId;\n readonly atSeq?: number;\n}"
2415
+ "declaration": "export interface SessionForkRequest {\n readonly sessionId: SessionId;\n readonly atSeq?: number;\n readonly allowMigration?: boolean;\n}"
2150
2416
  },
2151
2417
  {
2152
2418
  "name": "SessionForkValue",
@@ -2210,7 +2476,7 @@ export const TYPERT = {
2210
2476
  },
2211
2477
  {
2212
2478
  "name": "SessionProjectionMap",
2213
- "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 userQuestions: UserQuestionProjectionView;\n}"
2479
+ "declaration": "export interface SessionProjectionMap {\n inbox: InboxWireState;\n workingDirectory: string | null;\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 tokenUsage: TokenUsageProjection;\n contextPressure: ContextPressureProjection;\n contextBreakdown: ContextBreakdownProjection;\n userQuestions: UserQuestionProjectionView;\n goal: GoalProjection | null;\n}"
2214
2480
  },
2215
2481
  {
2216
2482
  "name": "SessionProjectionsRequest",
@@ -2218,7 +2484,7 @@ export const TYPERT = {
2218
2484
  },
2219
2485
  {
2220
2486
  "name": "SessionProjectionsValue",
2221
- "declaration": "export type SessionProjectionsValue = SessionProjectionBaseline | null;"
2487
+ "declaration": "export type SessionProjectionsValue = (SessionProjectionBaseline & { readonly kind: 'sequenced'; }) | { readonly kind: 'migration-required'; readonly values: SessionProjectionValues; } | null;"
2222
2488
  },
2223
2489
  {
2224
2490
  "name": "SessionProjectionUpdate",
@@ -2290,7 +2556,7 @@ export const TYPERT = {
2290
2556
  },
2291
2557
  {
2292
2558
  "name": "SessionSummary",
2293
- "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}"
2559
+ "declaration": "export interface SessionSummary {\n readonly agentAvailable: boolean;\n readonly formatStatus?: 'current' | 'migration-required';\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}"
2294
2560
  },
2295
2561
  {
2296
2562
  "name": "SessionSurface",
@@ -2346,11 +2612,11 @@ export const TYPERT = {
2346
2612
  },
2347
2613
  {
2348
2614
  "name": "SubagentCatalogEntry",
2349
- "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; });"
2615
+ "declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'external'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'unknown'; readonly label?: string; });"
2350
2616
  },
2351
2617
  {
2352
2618
  "name": "SubagentCatalogEvent",
2353
- "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
2619
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
2354
2620
  },
2355
2621
  {
2356
2622
  "name": "SubagentDescriptorBase",
@@ -2408,6 +2674,10 @@ export const TYPERT = {
2408
2674
  "name": "TokenUsage",
2409
2675
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2410
2676
  },
2677
+ {
2678
+ "name": "TokenUsageProjection",
2679
+ "declaration": "export interface TokenUsageProjection {\n uncachedInputTokens: number;\n outputTokens: number;\n cacheReadTokens: number;\n cacheWriteTokens: number;\n}"
2680
+ },
2411
2681
  {
2412
2682
  "name": "ToolAdditionBlock",
2413
2683
  "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
@@ -2741,16 +3011,28 @@ export const TYPERT = {
2741
3011
  },
2742
3012
  {
2743
3013
  "name": "LlmCallConfig",
2744
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
3014
+ "declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
2745
3015
  },
2746
3016
  {
2747
3017
  "name": "LlmCallConfigAdapterDefaults",
2748
3018
  "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
2749
3019
  },
3020
+ {
3021
+ "name": "LlmCallControls",
3022
+ "declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
3023
+ },
2750
3024
  {
2751
3025
  "name": "LlmFailure",
2752
3026
  "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
2753
3027
  },
3028
+ {
3029
+ "name": "LlmRetryEventData",
3030
+ "declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
3031
+ },
3032
+ {
3033
+ "name": "LlmRetryStartedEventData",
3034
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
3035
+ },
2754
3036
  {
2755
3037
  "name": "Message",
2756
3038
  "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
@@ -2793,7 +3075,7 @@ export const TYPERT = {
2793
3075
  },
2794
3076
  {
2795
3077
  "name": "MessageSourceMap",
2796
- "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 goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n}"
3078
+ "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 'working-directory': { kind: 'working-directory'; };\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 'compact-checkpoint': CompactionCheckpointSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n}"
2797
3079
  },
2798
3080
  {
2799
3081
  "name": "ModelMessageSource",
@@ -2821,7 +3103,7 @@ export const TYPERT = {
2821
3103
  },
2822
3104
  {
2823
3105
  "name": "PtcDispatchEventData",
2824
- "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
3106
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
2825
3107
  },
2826
3108
  {
2827
3109
  "name": "PtcDispatchStartEventData",
@@ -2847,6 +3129,10 @@ export const TYPERT = {
2847
3129
  "name": "RequestHeaderReason",
2848
3130
  "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2849
3131
  },
3132
+ {
3133
+ "name": "RetryId",
3134
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
3135
+ },
2850
3136
  {
2851
3137
  "name": "SandboxMode",
2852
3138
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
@@ -2881,7 +3167,7 @@ export const TYPERT = {
2881
3167
  },
2882
3168
  {
2883
3169
  "name": "SessionEventMap",
2884
- "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 '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 'feedback/record': FeedbackRecord;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
3170
+ "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 'working-directory/change': { cwd: string; };\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 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\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 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
2885
3171
  },
2886
3172
  {
2887
3173
  "name": "SessionEventType",
@@ -2941,7 +3227,7 @@ export const TYPERT = {
2941
3227
  },
2942
3228
  {
2943
3229
  "name": "SubagentCatalogEvent",
2944
- "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
3230
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
2945
3231
  },
2946
3232
  {
2947
3233
  "name": "SubagentDescriptorBase",