@deepseek-ai/dsh-api-session-controller 0.2.0-rc.1 → 0.2.1-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.
@@ -131,6 +131,52 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
131
131
  'label': z.string(),
132
132
  'seq': z.intersection(z.number(), z.unknown()),
133
133
  })]).optional(),
134
+ 'tokenUsage': z.object({
135
+ 'uncachedInputTokens': z.number(),
136
+ 'outputTokens': z.number(),
137
+ 'cacheReadTokens': z.number(),
138
+ 'cacheWriteTokens': z.number(),
139
+ }).optional(),
140
+ 'contextPressure': z.object({
141
+ 'pressureTokens': z.number().optional(),
142
+ 'projectedTokens': z.number().optional(),
143
+ 'contextWindow': z.number().optional(),
144
+ }).optional(),
145
+ 'contextBreakdown': z.object({
146
+ 'systemTokens': z.number(),
147
+ 'toolsTokens': z.number(),
148
+ 'messageTokens': z.number(),
149
+ }).optional(),
150
+ 'userQuestions': z.object({
151
+ 'active': z.array(z.object({
152
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
153
+ 'questions': z.array(z.object({
154
+ 'id': z.string(),
155
+ 'question': z.string(),
156
+ 'detail': z.string().optional(),
157
+ 'header': z.string().optional(),
158
+ 'options': z.array(z.object({
159
+ 'label': z.string(),
160
+ 'description': z.string().optional(),
161
+ })).optional(),
162
+ 'multiSelect': z.boolean().optional(),
163
+ 'intent': z.object({
164
+ 'kind': z.literal("plan-review"),
165
+ 'approve': z.string(),
166
+ 'callId': z.intersection(z.string(), z.unknown()).optional(),
167
+ }).optional(),
168
+ })).readonly(),
169
+ 'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
170
+ })).readonly(),
171
+ 'settled': z.array(z.object({
172
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
173
+ 'answers': z.array(z.object({
174
+ 'id': z.string(),
175
+ 'selected': z.array(z.string()),
176
+ 'custom': z.string().optional(),
177
+ })).readonly(),
178
+ })).readonly(),
179
+ }).optional(),
134
180
  'goal': z.union([z.literal(null), z.object({
135
181
  'goal': z.object({
136
182
  'objective': z.string().readonly(),
@@ -303,6 +349,52 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
303
349
  'label': z.string(),
304
350
  'seq': z.intersection(z.number(), z.unknown()),
305
351
  })]).optional(),
352
+ 'tokenUsage': z.object({
353
+ 'uncachedInputTokens': z.number(),
354
+ 'outputTokens': z.number(),
355
+ 'cacheReadTokens': z.number(),
356
+ 'cacheWriteTokens': z.number(),
357
+ }).optional(),
358
+ 'contextPressure': z.object({
359
+ 'pressureTokens': z.number().optional(),
360
+ 'projectedTokens': z.number().optional(),
361
+ 'contextWindow': z.number().optional(),
362
+ }).optional(),
363
+ 'contextBreakdown': z.object({
364
+ 'systemTokens': z.number(),
365
+ 'toolsTokens': z.number(),
366
+ 'messageTokens': z.number(),
367
+ }).optional(),
368
+ 'userQuestions': z.object({
369
+ 'active': z.array(z.object({
370
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
371
+ 'questions': z.array(z.object({
372
+ 'id': z.string(),
373
+ 'question': z.string(),
374
+ 'detail': z.string().optional(),
375
+ 'header': z.string().optional(),
376
+ 'options': z.array(z.object({
377
+ 'label': z.string(),
378
+ 'description': z.string().optional(),
379
+ })).optional(),
380
+ 'multiSelect': z.boolean().optional(),
381
+ 'intent': z.object({
382
+ 'kind': z.literal("plan-review"),
383
+ 'approve': z.string(),
384
+ 'callId': z.intersection(z.string(), z.unknown()).optional(),
385
+ }).optional(),
386
+ })).readonly(),
387
+ 'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
388
+ })).readonly(),
389
+ 'settled': z.array(z.object({
390
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
391
+ 'answers': z.array(z.object({
392
+ 'id': z.string(),
393
+ 'selected': z.array(z.string()),
394
+ 'custom': z.string().optional(),
395
+ })).readonly(),
396
+ })).readonly(),
397
+ }).optional(),
306
398
  'goal': z.union([z.literal(null), z.object({
307
399
  'goal': z.object({
308
400
  'objective': z.string().readonly(),
@@ -465,6 +557,52 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
465
557
  'label': z.string(),
466
558
  'seq': z.intersection(z.number(), z.unknown()),
467
559
  })]).optional(),
560
+ 'tokenUsage': z.object({
561
+ 'uncachedInputTokens': z.number(),
562
+ 'outputTokens': z.number(),
563
+ 'cacheReadTokens': z.number(),
564
+ 'cacheWriteTokens': z.number(),
565
+ }).optional(),
566
+ 'contextPressure': z.object({
567
+ 'pressureTokens': z.number().optional(),
568
+ 'projectedTokens': z.number().optional(),
569
+ 'contextWindow': z.number().optional(),
570
+ }).optional(),
571
+ 'contextBreakdown': z.object({
572
+ 'systemTokens': z.number(),
573
+ 'toolsTokens': z.number(),
574
+ 'messageTokens': z.number(),
575
+ }).optional(),
576
+ 'userQuestions': z.object({
577
+ 'active': z.array(z.object({
578
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
579
+ 'questions': z.array(z.object({
580
+ 'id': z.string(),
581
+ 'question': z.string(),
582
+ 'detail': z.string().optional(),
583
+ 'header': z.string().optional(),
584
+ 'options': z.array(z.object({
585
+ 'label': z.string(),
586
+ 'description': z.string().optional(),
587
+ })).optional(),
588
+ 'multiSelect': z.boolean().optional(),
589
+ 'intent': z.object({
590
+ 'kind': z.literal("plan-review"),
591
+ 'approve': z.string(),
592
+ 'callId': z.intersection(z.string(), z.unknown()).optional(),
593
+ }).optional(),
594
+ })).readonly(),
595
+ 'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
596
+ })).readonly(),
597
+ 'settled': z.array(z.object({
598
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
599
+ 'answers': z.array(z.object({
600
+ 'id': z.string(),
601
+ 'selected': z.array(z.string()),
602
+ 'custom': z.string().optional(),
603
+ })).readonly(),
604
+ })).readonly(),
605
+ }).optional(),
468
606
  'goal': z.union([z.literal(null), z.object({
469
607
  'goal': z.object({
470
608
  'objective': z.string().readonly(),
@@ -642,6 +780,52 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
642
780
  'label': z.string(),
643
781
  'seq': z.intersection(z.number(), z.unknown()),
644
782
  })]).optional(),
783
+ 'tokenUsage': z.object({
784
+ 'uncachedInputTokens': z.number(),
785
+ 'outputTokens': z.number(),
786
+ 'cacheReadTokens': z.number(),
787
+ 'cacheWriteTokens': z.number(),
788
+ }).optional(),
789
+ 'contextPressure': z.object({
790
+ 'pressureTokens': z.number().optional(),
791
+ 'projectedTokens': z.number().optional(),
792
+ 'contextWindow': z.number().optional(),
793
+ }).optional(),
794
+ 'contextBreakdown': z.object({
795
+ 'systemTokens': z.number(),
796
+ 'toolsTokens': z.number(),
797
+ 'messageTokens': z.number(),
798
+ }).optional(),
799
+ 'userQuestions': z.object({
800
+ 'active': z.array(z.object({
801
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
802
+ 'questions': z.array(z.object({
803
+ 'id': z.string(),
804
+ 'question': z.string(),
805
+ 'detail': z.string().optional(),
806
+ 'header': z.string().optional(),
807
+ 'options': z.array(z.object({
808
+ 'label': z.string(),
809
+ 'description': z.string().optional(),
810
+ })).optional(),
811
+ 'multiSelect': z.boolean().optional(),
812
+ 'intent': z.object({
813
+ 'kind': z.literal("plan-review"),
814
+ 'approve': z.string(),
815
+ 'callId': z.intersection(z.string(), z.unknown()).optional(),
816
+ }).optional(),
817
+ })).readonly(),
818
+ 'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
819
+ })).readonly(),
820
+ 'settled': z.array(z.object({
821
+ 'callId': z.intersection(z.string(), z.unknown()).readonly(),
822
+ 'answers': z.array(z.object({
823
+ 'id': z.string(),
824
+ 'selected': z.array(z.string()),
825
+ 'custom': z.string().optional(),
826
+ })).readonly(),
827
+ })).readonly(),
828
+ }).optional(),
645
829
  'goal': z.union([z.literal(null), z.object({
646
830
  'goal': z.object({
647
831
  'objective': z.string().readonly(),
@@ -836,7 +1020,7 @@ export const TYPERT = {
836
1020
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
837
1021
  create: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
838
1022
  },
839
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":437,"column":3},
1023
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":444,"column":3},
840
1024
  },
841
1025
  {
842
1026
  id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
@@ -861,7 +1045,7 @@ export const TYPERT = {
861
1045
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
862
1046
  create: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
863
1047
  },
864
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":457,"column":3},
1048
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":464,"column":3},
865
1049
  },
866
1050
  {
867
1051
  id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
@@ -876,7 +1060,7 @@ export const TYPERT = {
876
1060
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
877
1061
  create: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
878
1062
  },
879
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":319,"column":3},
1063
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":326,"column":3},
880
1064
  },
881
1065
  {
882
1066
  id: '@deepseek-ai/dsh-api-session-controller#session/control',
@@ -893,7 +1077,7 @@ export const TYPERT = {
893
1077
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
894
1078
  create: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
895
1079
  },
896
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":520,"column":3},
1080
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":527,"column":3},
897
1081
  },
898
1082
  {
899
1083
  id: '@deepseek-ai/dsh-api-session-controller#session/create',
@@ -918,7 +1102,7 @@ export const TYPERT = {
918
1102
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
919
1103
  create: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
920
1104
  },
921
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":273,"column":3},
1105
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":280,"column":3},
922
1106
  },
923
1107
  {
924
1108
  id: '@deepseek-ai/dsh-api-session-controller#session/follow',
@@ -945,7 +1129,7 @@ export const TYPERT = {
945
1129
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
946
1130
  create: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
947
1131
  },
948
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":480,"column":3},
1132
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":487,"column":3},
949
1133
  },
950
1134
  {
951
1135
  id: '@deepseek-ai/dsh-api-session-controller#session/fork',
@@ -970,7 +1154,7 @@ export const TYPERT = {
970
1154
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
971
1155
  create: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
972
1156
  },
973
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":415,"column":3},
1157
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":422,"column":3},
974
1158
  },
975
1159
  {
976
1160
  id: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel',
@@ -985,7 +1169,7 @@ export const TYPERT = {
985
1169
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel:result',
986
1170
  create: _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema,
987
1171
  },
988
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":292,"column":9},
1172
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":299,"column":9},
989
1173
  },
990
1174
  {
991
1175
  id: '@deepseek-ai/dsh-api-session-controller#session/list',
@@ -1011,7 +1195,7 @@ export const TYPERT = {
1011
1195
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
1012
1196
  create: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
1013
1197
  },
1014
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":252,"column":9},
1198
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":259,"column":9},
1015
1199
  },
1016
1200
  {
1017
1201
  id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
@@ -1026,7 +1210,7 @@ export const TYPERT = {
1026
1210
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
1027
1211
  create: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
1028
1212
  },
1029
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":310,"column":3},
1213
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":317,"column":3},
1030
1214
  },
1031
1215
  {
1032
1216
  id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
@@ -1052,7 +1236,7 @@ export const TYPERT = {
1052
1236
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
1053
1237
  create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
1054
1238
  },
1055
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":340,"column":9},
1239
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":9},
1056
1240
  },
1057
1241
  {
1058
1242
  id: '@deepseek-ai/dsh-api-session-controller#session/page',
@@ -1078,7 +1262,7 @@ export const TYPERT = {
1078
1262
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
1079
1263
  create: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
1080
1264
  },
1081
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":468,"column":3},
1265
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":475,"column":3},
1082
1266
  },
1083
1267
  {
1084
1268
  id: '@deepseek-ai/dsh-api-session-controller#session/projections',
@@ -1104,7 +1288,7 @@ export const TYPERT = {
1104
1288
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsValue',
1105
1289
  create: _deepseek_ai_dsh_api_session_controller_session_projections_result$schema,
1106
1290
  },
1107
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":491,"column":9},
1291
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":498,"column":9},
1108
1292
  },
1109
1293
  {
1110
1294
  id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
@@ -1130,7 +1314,7 @@ export const TYPERT = {
1130
1314
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
1131
1315
  create: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
1132
1316
  },
1133
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":426,"column":3},
1317
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":433,"column":3},
1134
1318
  },
1135
1319
  {
1136
1320
  id: '@deepseek-ai/dsh-api-session-controller#session/rename',
@@ -1155,7 +1339,7 @@ export const TYPERT = {
1155
1339
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
1156
1340
  create: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
1157
1341
  },
1158
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":403,"column":3},
1342
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":410,"column":3},
1159
1343
  },
1160
1344
  {
1161
1345
  id: '@deepseek-ai/dsh-api-session-controller#session/search',
@@ -1181,7 +1365,7 @@ export const TYPERT = {
1181
1365
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
1182
1366
  create: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
1183
1367
  },
1184
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":263,"column":3},
1368
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":270,"column":3},
1185
1369
  },
1186
1370
  {
1187
1371
  id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
@@ -1206,7 +1390,7 @@ export const TYPERT = {
1206
1390
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
1207
1391
  create: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
1208
1392
  },
1209
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":283,"column":3},
1393
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":290,"column":3},
1210
1394
  },
1211
1395
  {
1212
1396
  id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
@@ -1231,7 +1415,7 @@ export const TYPERT = {
1231
1415
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
1232
1416
  create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
1233
1417
  },
1234
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":447,"column":3},
1418
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":454,"column":3},
1235
1419
  },
1236
1420
  {
1237
1421
  id: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications',
@@ -1257,7 +1441,7 @@ export const TYPERT = {
1257
1441
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:result',
1258
1442
  create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema,
1259
1443
  },
1260
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":370,"column":9},
1444
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":377,"column":9},
1261
1445
  },
1262
1446
  {
1263
1447
  id: '@deepseek-ai/dsh-api-session-controller#skills/list',
@@ -1315,7 +1499,7 @@ export const TYPERT = {
1315
1499
  "name": "list",
1316
1500
  "signature": "@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>",
1317
1501
  "summary": "Read all visible Session rows without resuming an Agent.",
1318
- "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 */"
1502
+ "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 */"
1319
1503
  },
1320
1504
  {
1321
1505
  "kind": "method",
@@ -1496,6 +1680,22 @@ export const TYPERT = {
1496
1680
  "name": "ApprovalRequestId",
1497
1681
  "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
1498
1682
  },
1683
+ {
1684
+ "name": "AskUserQuestionAnswerItem",
1685
+ "declaration": "export interface AskUserQuestionAnswerItem {\n id: string;\n selected: string[];\n custom?: string;\n}"
1686
+ },
1687
+ {
1688
+ "name": "AskUserQuestionIntent",
1689
+ "declaration": "export type AskUserQuestionIntent = { kind: 'plan-review'; approve: string; callId?: ToolCallId; };"
1690
+ },
1691
+ {
1692
+ "name": "AskUserQuestionItem",
1693
+ "declaration": "export interface AskUserQuestionItem {\n id: string;\n question: string;\n detail?: string;\n header?: string;\n options?: AskUserQuestionOption[];\n multiSelect?: boolean;\n intent?: AskUserQuestionIntent;\n}"
1694
+ },
1695
+ {
1696
+ "name": "AskUserQuestionOption",
1697
+ "declaration": "export interface AskUserQuestionOption {\n label: string;\n description?: string;\n}"
1698
+ },
1499
1699
  {
1500
1700
  "name": "AssistantMessage",
1501
1701
  "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
@@ -1560,10 +1760,18 @@ export const TYPERT = {
1560
1760
  "name": "ContentBlockType",
1561
1761
  "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
1562
1762
  },
1763
+ {
1764
+ "name": "ContextBreakdownProjection",
1765
+ "declaration": "export interface ContextBreakdownProjection {\n systemTokens: number;\n toolsTokens: number;\n messageTokens: number;\n}"
1766
+ },
1563
1767
  {
1564
1768
  "name": "ContextFormed",
1565
1769
  "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'; };"
1566
1770
  },
1771
+ {
1772
+ "name": "ContextPressureProjection",
1773
+ "declaration": "export interface ContextPressureProjection {\n pressureTokens?: number;\n projectedTokens?: number;\n contextWindow?: number;\n}"
1774
+ },
1567
1775
  {
1568
1776
  "name": "ContextSnapshotSection",
1569
1777
  "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
@@ -1732,6 +1940,14 @@ export const TYPERT = {
1732
1940
  "name": "LlmFailure",
1733
1941
  "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}"
1734
1942
  },
1943
+ {
1944
+ "name": "LlmRetryEventData",
1945
+ "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; };"
1946
+ },
1947
+ {
1948
+ "name": "LlmRetryStartedEventData",
1949
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
1950
+ },
1735
1951
  {
1736
1952
  "name": "Message",
1737
1953
  "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
@@ -1774,7 +1990,7 @@ export const TYPERT = {
1774
1990
  },
1775
1991
  {
1776
1992
  "name": "MessageSourceMap",
1777
- "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}"
1993
+ "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 '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}"
1778
1994
  },
1779
1995
  {
1780
1996
  "name": "ModelCatalog",
@@ -1832,6 +2048,10 @@ export const TYPERT = {
1832
2048
  "name": "OptionalSessionSeq",
1833
2049
  "declaration": "export type OptionalSessionSeq = SessionSeq | null;"
1834
2050
  },
2051
+ {
2052
+ "name": "PendingUserQuestion",
2053
+ "declaration": "export interface PendingUserQuestion {\n readonly callId: ToolCallId;\n readonly questions: readonly AskUserQuestionItem[];\n readonly state: UserQuestionState;\n}"
2054
+ },
1835
2055
  {
1836
2056
  "name": "PermissionSelection",
1837
2057
  "declaration": "export interface PermissionSelection {\n currentValue: string;\n}"
@@ -1874,7 +2094,7 @@ export const TYPERT = {
1874
2094
  },
1875
2095
  {
1876
2096
  "name": "RemoteErrorDetailsMap",
1877
- "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 'speech/invalid-audio': { readonly reason: string; };\n 'speech/transcription-failed': { readonly reason: string; };\n 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
2097
+ "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}"
1878
2098
  },
1879
2099
  {
1880
2100
  "name": "ReplayEnvelope",
@@ -1888,6 +2108,10 @@ export const TYPERT = {
1888
2108
  "name": "RequestHeaderReason",
1889
2109
  "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
1890
2110
  },
2111
+ {
2112
+ "name": "RetryId",
2113
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
2114
+ },
1891
2115
  {
1892
2116
  "name": "SandboxMode",
1893
2117
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
@@ -1990,7 +2214,7 @@ export const TYPERT = {
1990
2214
  },
1991
2215
  {
1992
2216
  "name": "SessionEventMap",
1993
- "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}"
2217
+ "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 '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}"
1994
2218
  },
1995
2219
  {
1996
2220
  "name": "SessionEventType",
@@ -2070,7 +2294,7 @@ export const TYPERT = {
2070
2294
  },
2071
2295
  {
2072
2296
  "name": "SessionProjectionMap",
2073
- "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}"
2297
+ "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 tokenUsage: TokenUsageProjection;\n contextPressure: ContextPressureProjection;\n contextBreakdown: ContextBreakdownProjection;\n userQuestions: UserQuestionProjectionView;\n goal: GoalProjection | null;\n}"
2074
2298
  },
2075
2299
  {
2076
2300
  "name": "SessionProjectionsRequest",
@@ -2192,6 +2416,10 @@ export const TYPERT = {
2192
2416
  "name": "SessionWorkspacePathApplication",
2193
2417
  "declaration": "export type SessionWorkspacePathApplication = NativeFileApplication;"
2194
2418
  },
2419
+ {
2420
+ "name": "SettledUserQuestion",
2421
+ "declaration": "export interface SettledUserQuestion {\n readonly callId: ToolCallId;\n readonly answers: readonly AskUserQuestionAnswerItem[];\n}"
2422
+ },
2195
2423
  {
2196
2424
  "name": "SkillInvocationSource",
2197
2425
  "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
@@ -2264,6 +2492,10 @@ export const TYPERT = {
2264
2492
  "name": "TokenUsage",
2265
2493
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2266
2494
  },
2495
+ {
2496
+ "name": "TokenUsageProjection",
2497
+ "declaration": "export interface TokenUsageProjection {\n uncachedInputTokens: number;\n outputTokens: number;\n cacheReadTokens: number;\n cacheWriteTokens: number;\n}"
2498
+ },
2267
2499
  {
2268
2500
  "name": "ToolAdditionBlock",
2269
2501
  "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
@@ -2312,10 +2544,22 @@ export const TYPERT = {
2312
2544
  "name": "TurnEndReasonMap",
2313
2545
  "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}"
2314
2546
  },
2547
+ {
2548
+ "name": "TypertGatewayFaultDetails",
2549
+ "declaration": "export interface TypertGatewayFaultDetails {\n readonly endpoint: string;\n readonly field?: string;\n}"
2550
+ },
2315
2551
  {
2316
2552
  "name": "UserMessage",
2317
2553
  "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
2318
2554
  },
2555
+ {
2556
+ "name": "UserQuestionProjectionView",
2557
+ "declaration": "export interface UserQuestionProjectionView {\n readonly active: readonly PendingUserQuestion[];\n readonly settled: readonly SettledUserQuestion[];\n}"
2558
+ },
2559
+ {
2560
+ "name": "UserQuestionState",
2561
+ "declaration": "export type UserQuestionState = 'open' | 'continued';"
2562
+ },
2319
2563
  {
2320
2564
  "name": "WorkspaceId",
2321
2565
  "declaration": "export type WorkspaceId = Branded<'WorkspaceId'>;"
@@ -2595,6 +2839,14 @@ export const TYPERT = {
2595
2839
  "name": "LlmFailure",
2596
2840
  "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}"
2597
2841
  },
2842
+ {
2843
+ "name": "LlmRetryEventData",
2844
+ "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; };"
2845
+ },
2846
+ {
2847
+ "name": "LlmRetryStartedEventData",
2848
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
2849
+ },
2598
2850
  {
2599
2851
  "name": "Message",
2600
2852
  "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
@@ -2637,7 +2889,7 @@ export const TYPERT = {
2637
2889
  },
2638
2890
  {
2639
2891
  "name": "MessageSourceMap",
2640
- "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}"
2892
+ "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 '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}"
2641
2893
  },
2642
2894
  {
2643
2895
  "name": "ModelMessageSource",
@@ -2691,6 +2943,10 @@ export const TYPERT = {
2691
2943
  "name": "RequestHeaderReason",
2692
2944
  "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2693
2945
  },
2946
+ {
2947
+ "name": "RetryId",
2948
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
2949
+ },
2694
2950
  {
2695
2951
  "name": "SandboxMode",
2696
2952
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
@@ -2725,7 +2981,7 @@ export const TYPERT = {
2725
2981
  },
2726
2982
  {
2727
2983
  "name": "SessionEventMap",
2728
- "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}"
2984
+ "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 '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}"
2729
2985
  },
2730
2986
  {
2731
2987
  "name": "SessionEventType",