@deepseek-ai/dsh-api-session-controller 0.2.1-alpha.1 → 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(),
@@ -280,6 +287,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
280
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(),
281
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(),
282
289
  }).optional(),
290
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
283
291
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
284
292
  'title': z.union([z.literal(null), z.string()]).optional(),
285
293
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -322,6 +330,12 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
322
330
  })), z.intersection(z.object({
323
331
  'id': z.intersection(z.string(), z.unknown()).readonly(),
324
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(),
325
339
  }), z.object({
326
340
  'mode': z.literal("continuable").readonly(),
327
341
  'label': z.string().readonly(),
@@ -458,6 +472,7 @@ let _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema$valu
458
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({
459
473
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
460
474
  'atSeq': z.number().readonly().optional(),
475
+ 'allowMigration': z.boolean().readonly().optional(),
461
476
  }))
462
477
  let _deepseek_ai_dsh_api_session_controller_session_fork_result$schema$value
463
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({
@@ -473,6 +488,7 @@ let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value
473
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({
474
489
  'items': z.array(z.object({
475
490
  'agentAvailable': z.boolean().readonly(),
491
+ 'formatStatus': z.union([z.literal("current"), z.literal("migration-required")]).readonly().optional(),
476
492
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
477
493
  'updatedAt': z.number().readonly(),
478
494
  'running': z.boolean().readonly(),
@@ -488,6 +504,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
488
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(),
489
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(),
490
506
  }).optional(),
507
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
491
508
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
492
509
  'title': z.union([z.literal(null), z.string()]).optional(),
493
510
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -530,6 +547,12 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
530
547
  })), z.intersection(z.object({
531
548
  'id': z.intersection(z.string(), z.unknown()).readonly(),
532
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(),
533
556
  }), z.object({
534
557
  'mode': z.literal("continuable").readonly(),
535
558
  'label': z.string().readonly(),
@@ -704,13 +727,14 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$sc
704
727
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
705
728
  }))
706
729
  let _deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value
707
- 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({
708
731
  'asOfSeq': z.number().readonly(),
709
732
  'values': z.intersection(z.object({
710
733
  'inbox': z.object({
711
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(),
712
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(),
713
736
  }).optional(),
737
+ 'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
714
738
  'agentPreset': z.union([z.literal(null), z.string()]).optional(),
715
739
  'title': z.union([z.literal(null), z.string()]).optional(),
716
740
  'todos': z.union([z.literal(null), z.array(z.object({
@@ -753,6 +777,160 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
753
777
  })), z.intersection(z.object({
754
778
  'id': z.intersection(z.string(), z.unknown()).readonly(),
755
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(),
786
+ }), z.object({
787
+ 'mode': z.literal("continuable").readonly(),
788
+ 'label': z.string().readonly(),
789
+ })), z.intersection(z.object({
790
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
791
+ 'createdAt': z.number().readonly(),
792
+ }), z.object({
793
+ 'mode': z.literal("unknown").readonly(),
794
+ 'label': z.string().readonly().optional(),
795
+ }))])).optional(),
796
+ 'subagentTiming': z.object({
797
+ 'settledMs': z.number(),
798
+ 'active': z.object({
799
+ 'since': z.number(),
800
+ 'through': z.number(),
801
+ }).optional(),
802
+ 'lastTurnCompleted': z.boolean().optional(),
803
+ }).optional(),
804
+ 'subagent': z.union([z.literal(null), z.object({
805
+ 'mode': z.literal("one-shot"),
806
+ 'label': z.string().optional(),
807
+ 'seq': z.intersection(z.number(), z.unknown()),
808
+ }), z.object({
809
+ 'mode': z.literal("continuable"),
810
+ 'label': z.string(),
811
+ 'seq': z.intersection(z.number(), z.unknown()),
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(),
859
+ 'goal': z.union([z.literal(null), z.object({
860
+ 'goal': z.object({
861
+ 'objective': z.string().readonly(),
862
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
863
+ 'blockedReason': z.object({
864
+ 'code': z.string().readonly(),
865
+ 'message': z.string().readonly(),
866
+ }).readonly().optional(),
867
+ 'maxGoalRounds': z.number().readonly(),
868
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
869
+ 'revision': z.number().readonly(),
870
+ }).readonly(),
871
+ 'roundsStarted': z.number().readonly(),
872
+ 'createdAt': z.number().readonly(),
873
+ 'updatedAt': z.number().readonly(),
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(),
756
934
  }), z.object({
757
935
  'mode': z.literal("continuable").readonly(),
758
936
  'label': z.string().readonly(),
@@ -1017,7 +1195,7 @@ export const TYPERT_REMOTE = {
1017
1195
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
1018
1196
  create: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
1019
1197
  },
1020
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":444,"column":3},
1198
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":453,"column":3},
1021
1199
  },
1022
1200
  {
1023
1201
  id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
@@ -1042,7 +1220,7 @@ export const TYPERT_REMOTE = {
1042
1220
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
1043
1221
  create: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
1044
1222
  },
1045
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":464,"column":3},
1223
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":473,"column":3},
1046
1224
  },
1047
1225
  {
1048
1226
  id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
@@ -1057,7 +1235,7 @@ export const TYPERT_REMOTE = {
1057
1235
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
1058
1236
  create: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
1059
1237
  },
1060
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":326,"column":3},
1238
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":327,"column":3},
1061
1239
  },
1062
1240
  {
1063
1241
  id: '@deepseek-ai/dsh-api-session-controller#session/control',
@@ -1074,7 +1252,7 @@ export const TYPERT_REMOTE = {
1074
1252
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
1075
1253
  create: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
1076
1254
  },
1077
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":527,"column":3},
1255
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":558,"column":3},
1078
1256
  },
1079
1257
  {
1080
1258
  id: '@deepseek-ai/dsh-api-session-controller#session/create',
@@ -1099,7 +1277,7 @@ export const TYPERT_REMOTE = {
1099
1277
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
1100
1278
  create: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
1101
1279
  },
1102
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":280,"column":3},
1280
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":281,"column":3},
1103
1281
  },
1104
1282
  {
1105
1283
  id: '@deepseek-ai/dsh-api-session-controller#session/follow',
@@ -1126,7 +1304,7 @@ export const TYPERT_REMOTE = {
1126
1304
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
1127
1305
  create: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
1128
1306
  },
1129
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":487,"column":3},
1307
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":496,"column":3},
1130
1308
  },
1131
1309
  {
1132
1310
  id: '@deepseek-ai/dsh-api-session-controller#session/fork',
@@ -1151,7 +1329,7 @@ export const TYPERT_REMOTE = {
1151
1329
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
1152
1330
  create: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
1153
1331
  },
1154
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":422,"column":3},
1332
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":423,"column":9},
1155
1333
  },
1156
1334
  {
1157
1335
  id: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel',
@@ -1166,7 +1344,7 @@ export const TYPERT_REMOTE = {
1166
1344
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel:result',
1167
1345
  create: _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema,
1168
1346
  },
1169
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":299,"column":9},
1347
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":300,"column":9},
1170
1348
  },
1171
1349
  {
1172
1350
  id: '@deepseek-ai/dsh-api-session-controller#session/list',
@@ -1192,7 +1370,7 @@ export const TYPERT_REMOTE = {
1192
1370
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
1193
1371
  create: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
1194
1372
  },
1195
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":259,"column":9},
1373
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":260,"column":9},
1196
1374
  },
1197
1375
  {
1198
1376
  id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
@@ -1207,7 +1385,7 @@ export const TYPERT_REMOTE = {
1207
1385
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
1208
1386
  create: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
1209
1387
  },
1210
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":317,"column":3},
1388
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":318,"column":3},
1211
1389
  },
1212
1390
  {
1213
1391
  id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
@@ -1233,7 +1411,7 @@ export const TYPERT_REMOTE = {
1233
1411
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
1234
1412
  create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
1235
1413
  },
1236
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":9},
1414
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":348,"column":9},
1237
1415
  },
1238
1416
  {
1239
1417
  id: '@deepseek-ai/dsh-api-session-controller#session/page',
@@ -1259,7 +1437,7 @@ export const TYPERT_REMOTE = {
1259
1437
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
1260
1438
  create: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
1261
1439
  },
1262
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":475,"column":3},
1440
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":484,"column":3},
1263
1441
  },
1264
1442
  {
1265
1443
  id: '@deepseek-ai/dsh-api-session-controller#session/projections',
@@ -1285,7 +1463,7 @@ export const TYPERT_REMOTE = {
1285
1463
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsValue',
1286
1464
  create: _deepseek_ai_dsh_api_session_controller_session_projections_result$schema,
1287
1465
  },
1288
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":498,"column":9},
1466
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":507,"column":9},
1289
1467
  },
1290
1468
  {
1291
1469
  id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
@@ -1311,7 +1489,7 @@ export const TYPERT_REMOTE = {
1311
1489
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
1312
1490
  create: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
1313
1491
  },
1314
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":433,"column":3},
1492
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":442,"column":3},
1315
1493
  },
1316
1494
  {
1317
1495
  id: '@deepseek-ai/dsh-api-session-controller#session/rename',
@@ -1336,7 +1514,7 @@ export const TYPERT_REMOTE = {
1336
1514
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
1337
1515
  create: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
1338
1516
  },
1339
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":410,"column":3},
1517
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":411,"column":3},
1340
1518
  },
1341
1519
  {
1342
1520
  id: '@deepseek-ai/dsh-api-session-controller#session/search',
@@ -1362,7 +1540,7 @@ export const TYPERT_REMOTE = {
1362
1540
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
1363
1541
  create: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
1364
1542
  },
1365
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":270,"column":3},
1543
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":271,"column":3},
1366
1544
  },
1367
1545
  {
1368
1546
  id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
@@ -1387,7 +1565,7 @@ export const TYPERT_REMOTE = {
1387
1565
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
1388
1566
  create: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
1389
1567
  },
1390
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":290,"column":3},
1568
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":291,"column":3},
1391
1569
  },
1392
1570
  {
1393
1571
  id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
@@ -1412,7 +1590,7 @@ export const TYPERT_REMOTE = {
1412
1590
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
1413
1591
  create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
1414
1592
  },
1415
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":454,"column":3},
1593
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":463,"column":3},
1416
1594
  },
1417
1595
  {
1418
1596
  id: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications',
@@ -1438,7 +1616,7 @@ export const TYPERT_REMOTE = {
1438
1616
  typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:result',
1439
1617
  create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema,
1440
1618
  },
1441
- sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":377,"column":9},
1619
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":378,"column":9},
1442
1620
  },
1443
1621
  {
1444
1622
  id: '@deepseek-ai/dsh-api-session-controller#skills/list',
@@ -1464,7 +1642,7 @@ export const TYPERT_REMOTE = {
1464
1642
  typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
1465
1643
  create: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
1466
1644
  },
1467
- sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":35,"column":9},
1645
+ sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
1468
1646
  },
1469
1647
  ],
1470
1648
  }
@@ -85,11 +85,11 @@ export interface ISessions {
85
85
  /**
86
86
  * Resolve an already discovered direct-parent address without opening it.
87
87
  * @param id - possible addressed child id.
88
- * @returns a retained or loaded-catalog address, without retaining a new selection or scope.
88
+ * @returns a retained, catalog-derived, or unknown-mode listed address, without retaining a new selection or scope.
89
89
  */
90
90
  subagentAddress(id: SessionId): SubagentAddress | undefined;
91
91
  /**
92
- * Load all Session projections once per connection; retry an unsuccessful initial read.
92
+ * Read projections without starting migration; retry failed or migration-deferred reads.
93
93
  * @param sessionId - Session to inspect without opening its conversation.
94
94
  * @returns completion of the current or newly started refresh.
95
95
  */
@@ -126,6 +126,8 @@ export interface ISessions {
126
126
  atSeq?: number;
127
127
  increaseTitle?: boolean;
128
128
  onCreated?: (childId: SessionId) => void;
129
+ /** False refuses source migration; omission preserves the Host default. */
130
+ allowMigration?: boolean;
129
131
  }): Promise<SessionId>;
130
132
  /**
131
133
  * Borrow an already-retained Agent-scoped Context without extending its lifetime.
@@ -21,6 +21,8 @@ export interface SessionListEntry {
21
21
  parentSessionId?: SessionId;
22
22
  /** Coarse durable origin for navigation filtering; not a continuation capability. */
23
23
  origin?: 'subagent';
24
+ /** Format classification supplied by the Host list. */
25
+ formatStatus?: SessionSummary['formatStatus'];
24
26
  cwd?: string;
25
27
  /** Current host-computed projection values for list consumers. */
26
28
  projectionValues?: Readonly<Partial<SessionProjectionMap>>;
@@ -35,7 +35,7 @@ export interface SessionListSnapshot {
35
35
  /** Shared projection values and the lifecycle of their explicit baseline read. */
36
36
  export interface SessionProjectionSnapshot {
37
37
  readonly values: Readonly<Partial<SessionProjectionMap>>;
38
- readonly state: 'idle' | 'loading' | 'ready' | 'error';
38
+ readonly state: 'idle' | 'loading' | 'ready' | 'migration-required' | 'error';
39
39
  readonly error: RemoteFailure | null;
40
40
  }
41
41
  /** Instance cluster + frame entry + the session list. */
@@ -86,8 +86,9 @@ export declare class SessionManager {
86
86
  resolveTarget(target: SessionTarget): SessionId;
87
87
  /**
88
88
  * Resolve an address for breadcrumb navigation without retaining transport authority.
89
- * @param sessionId - possible child id in an already-loaded catalog.
90
- * @returns A retained or catalog-derived direct-parent address.
89
+ * @param sessionId - possible child id in received Session metadata.
90
+ * @returns A retained address, then a catalog address, then an unknown-mode address
91
+ * from a listed subagent header; undefined without that evidence.
91
92
  */
92
93
  subagentAddress(sessionId: SessionId): SubagentAddress | undefined;
93
94
  /**
@@ -130,7 +131,7 @@ export declare class SessionManager {
130
131
  /** Resident per-session projection store (create-on-demand; outlives instantiation). */
131
132
  private projectionStore;
132
133
  /**
133
- * Load a complete projection baseline once per connection; retry unsuccessful reads.
134
+ * Read projections without starting migration; retry failed or migration-deferred reads.
134
135
  * @param sessionId - Session to inspect without opening its conversation.
135
136
  * @returns completion of the current or newly started read.
136
137
  */
@@ -171,12 +172,13 @@ export declare class SessionManager {
171
172
  * preserve it or lower it after an exact cut before the first `turn/start`;
172
173
  * lineage rides parentSessionId. A child published before Workspace
173
174
  * attachment fails is also reconciled into the list.
174
- * @param opts - source session and the optional exact inclusive boundary seq.
175
+ * @param opts - source session, optional exact inclusive boundary seq, and permission to start migration.
175
176
  * @returns the fork result (the child session id).
176
177
  */
177
178
  fork(opts: {
178
179
  sessionId: SessionId;
179
180
  atSeq?: SessionSeq;
181
+ allowMigration?: boolean;
180
182
  }): Promise<RemoteResult<{
181
183
  sessionId: SessionId;
182
184
  }>>;
@@ -78,8 +78,9 @@ export class SessionManager {
78
78
  }
79
79
  /**
80
80
  * Resolve an address for breadcrumb navigation without retaining transport authority.
81
- * @param sessionId - possible child id in an already-loaded catalog.
82
- * @returns A retained or catalog-derived direct-parent address.
81
+ * @param sessionId - possible child id in received Session metadata.
82
+ * @returns A retained address, then a catalog address, then an unknown-mode address
83
+ * from a listed subagent header; undefined without that evidence.
83
84
  */
84
85
  subagentAddress(sessionId) {
85
86
  const retained = this.addresses.get(sessionId);
@@ -88,7 +89,7 @@ export class SessionManager {
88
89
  for (const parentSessionId of this.projectionStores.keys()) {
89
90
  const child = this.projectionStores.get(parentSessionId)?.values().subagentCatalog
90
91
  ?.find(entry => entry.id === sessionId);
91
- if (child !== undefined) {
92
+ if (child !== undefined && child.mode !== 'external') {
92
93
  return {
93
94
  parentSessionId,
94
95
  childSessionId: sessionId,
@@ -96,7 +97,14 @@ export class SessionManager {
96
97
  };
97
98
  }
98
99
  }
99
- return undefined;
100
+ const summary = this.summaries.find(summary => summary.sessionId === sessionId);
101
+ if (summary?.origin !== 'subagent' || summary.parentSessionId === undefined)
102
+ return undefined;
103
+ return {
104
+ parentSessionId: summary.parentSessionId,
105
+ childSessionId: sessionId,
106
+ mode: 'unknown',
107
+ };
100
108
  }
101
109
  // ---- Instance management ----
102
110
  /**
@@ -169,7 +177,7 @@ export class SessionManager {
169
177
  const address = this.addresses.get(sessionId);
170
178
  const child = address === undefined ? undefined : this.projectionStores.get(address.parentSessionId)?.values().subagentCatalog
171
179
  ?.find(entry => entry.id === sessionId);
172
- if (child !== undefined) {
180
+ if (child !== undefined && child.mode !== 'external') {
173
181
  // A catalogued child exists only after its delegated session has
174
182
  // durable history, even though child rows do not carry `blank`.
175
183
  session.handleBlank(false);
@@ -252,7 +260,7 @@ export class SessionManager {
252
260
  return store;
253
261
  }
254
262
  /**
255
- * Load a complete projection baseline once per connection; retry unsuccessful reads.
263
+ * Read projections without starting migration; retry failed or migration-deferred reads.
256
264
  * @param sessionId - Session to inspect without opening its conversation.
257
265
  * @returns completion of the current or newly started read.
258
266
  */
@@ -273,14 +281,27 @@ export class SessionManager {
273
281
  if (controller.signal.aborted)
274
282
  return;
275
283
  if (result.ok) {
276
- if (result.value !== null) {
277
- store.seed({ ...result.value, asOfSeq: sessionSeqCursor(result.value.asOfSeq) });
284
+ const value = result.value;
285
+ if (value !== null) {
286
+ switch (value.kind) {
287
+ case 'sequenced':
288
+ store.seed({ values: value.values, asOfSeq: sessionSeqCursor(value.asOfSeq) });
289
+ break;
290
+ case 'migration-required':
291
+ store.applyCached(value.values);
292
+ break;
293
+ default:
294
+ assertNever(value, 'session projections result');
295
+ }
278
296
  }
279
297
  else if (store.values() === initialValues) {
280
298
  // A later frame proves existence independently of an earlier missing read.
281
299
  store.clear();
282
300
  }
283
- this.projectionLoads.set(sessionId, { state: 'ready', error: null });
301
+ this.projectionLoads.set(sessionId, {
302
+ state: value?.kind === 'migration-required' ? 'migration-required' : 'ready',
303
+ error: null,
304
+ });
284
305
  }
285
306
  else {
286
307
  this.projectionLoads.set(sessionId, { state: 'error', error: result.error });
@@ -454,7 +475,7 @@ export class SessionManager {
454
475
  * preserve it or lower it after an exact cut before the first `turn/start`;
455
476
  * lineage rides parentSessionId. A child published before Workspace
456
477
  * attachment fails is also reconciled into the list.
457
- * @param opts - source session and the optional exact inclusive boundary seq.
478
+ * @param opts - source session, optional exact inclusive boundary seq, and permission to start migration.
458
479
  * @returns the fork result (the child session id).
459
480
  */
460
481
  async fork(opts) {
@@ -462,6 +483,7 @@ export class SessionManager {
462
483
  const result = await this.remote.session.fork({
463
484
  sessionId: opts.sessionId,
464
485
  ...opts.atSeq === undefined ? {} : { atSeq: opts.atSeq },
486
+ ...opts.allowMigration === undefined ? {} : { allowMigration: opts.allowMigration },
465
487
  });
466
488
  const childId = result.ok
467
489
  ? result.value.sessionId
@@ -691,6 +713,7 @@ export class SessionManager {
691
713
  && prev.blank === entry.blank
692
714
  && prev.parentSessionId === entry.parentSessionId && prev.cwd === entry.cwd
693
715
  && prev.origin === entry.origin && prev.title === entry.title && prev.depth === entry.depth
716
+ && prev.formatStatus === entry.formatStatus
694
717
  && prev.projectionValues === entry.projectionValues)
695
718
  return prev;
696
719
  this.entryCache.set(entry.sessionId, entry);
@@ -732,6 +755,7 @@ function applyMutation(summaries, mutation) {
732
755
  ...(mutation.kind === 'upsert' ? {
733
756
  agentAvailable: mutation.summary.agentAvailable,
734
757
  running: mutation.summary.running,
758
+ ...(mutation.summary.formatStatus === undefined ? {} : { formatStatus: mutation.summary.formatStatus }),
735
759
  } : {}),
736
760
  ...(existing.cwd === undefined && mutation.summary.cwd !== undefined ? { cwd: mutation.summary.cwd } : {}),
737
761
  ...(existing.parentSessionId === undefined && mutation.summary.parentSessionId !== undefined
@@ -741,7 +765,8 @@ function applyMutation(summaries, mutation) {
741
765
  };
742
766
  if (filled.cwd === existing.cwd && filled.parentSessionId === existing.parentSessionId
743
767
  && filled.origin === existing.origin && filled.blank === existing.blank
744
- && filled.agentAvailable === existing.agentAvailable && filled.running === existing.running)
768
+ && filled.agentAvailable === existing.agentAvailable && filled.running === existing.running
769
+ && filled.formatStatus === existing.formatStatus)
745
770
  return [...summaries];
746
771
  return summaries.map(summary => summary.sessionId === mutation.summary.sessionId ? filled : summary);
747
772
  }