@chatcode/chatcode-cli 3.0.3 → 3.0.4-rc.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.
Files changed (243) hide show
  1. package/README.i18n.yaml +10 -10
  2. package/README.md +16 -1
  3. package/README.zh.md +16 -1
  4. package/lib/bin.js +62 -11
  5. package/lib/{command-errors-CBJRI2gy.js → command-errors-CScdshCl.js} +12 -12
  6. package/lib/{command-trees-Dvq4C7a4.js → command-trees-Dc17MYfV.js} +2 -2
  7. package/lib/{component-identity-DPdJglJO.js → component-identity-DFJD_d-P.js} +3 -3
  8. package/lib/{dump-config-CauO75nE.js → dump-config-BcH-VYuv.js} +5 -5
  9. package/lib/dump-config-CyopmD85.js +2 -0
  10. package/lib/{dump-config-schema-CObLWWaW.js → dump-config-schema-DM0fb6Ns.js} +2 -2
  11. package/lib/{extension-events-Be9LWvHD.js → extension-events-qXmhzmHo.js} +20 -20
  12. package/lib/{frames-7PAg0Q9b.js → frames-B89znn_0.js} +4 -4
  13. package/lib/headless-compat.js +2 -2
  14. package/lib/{host-access-DeCjoRQP.js → host-access-B0CRAwsX.js} +1 -1
  15. package/lib/{keymap-CRUxM_qn.js → keymap-CIoVICBI.js} +17 -16
  16. package/lib/{plugin-CDFSDE_y.js → plugin-BKQsL2xn.js} +3264 -2301
  17. package/lib/{plugin-Cn-hyYY8.js → plugin-eJjD6r12.js} +1 -1
  18. package/lib/{profile-boot-SJGbpLgN.js → profile-boot-BNQry1NM.js} +97 -14
  19. package/lib/profile-boot.js +2 -2
  20. package/lib/{scenes-D6jV1EEi.js → scenes-BRf-zMpF.js} +3 -3
  21. package/lib/{settings-sections-DJQRNBo9.js → settings-sections-4gMhveN_.js} +7 -3
  22. package/lib/statusBarSettings-CnmdSHkO.js +382 -0
  23. package/lib/{themes-BCly4_y9.js → themes-Ce97Zsri.js} +13 -13
  24. package/lib/tui-compat-command-trees.js +1 -1
  25. package/lib/tui-compat-extensions.js +3 -3
  26. package/lib/tui-compat-plugin-host.js +5 -5
  27. package/lib/tui-compat-scenes.js +1 -1
  28. package/lib/tui-compat-settings-sections.js +1 -1
  29. package/lib/tui-compat-working-activity.js +4 -4
  30. package/lib/tui-compat-workspaces.js +1 -1
  31. package/lib/tui-compat.js +9 -26
  32. package/lib/types/args.d.ts +2 -0
  33. package/lib/types/permission-bypass.d.ts +16 -0
  34. package/lib/types/profile-boot.d.ts +12 -0
  35. package/lib/types/tui-compat.d.ts +4 -0
  36. package/lib/types/web-browser.d.ts +6 -0
  37. package/lib/types/web-instance.d.ts +42 -0
  38. package/lib/web-browser-Vcgfdsv_.js +46 -0
  39. package/lib/web-instance-B0jec7cq.js +2 -0
  40. package/lib/web-instance-DbP7IHPv.js +280 -0
  41. package/lib/{workspaces-Bb3kCAFb.js → workspaces-1xrm-e3V.js} +2 -2
  42. package/package.json +36 -33
  43. package/runtime/manifest.json +4 -2
  44. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +137 -11
  45. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +27 -1
  46. package/runtime/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -1
  47. package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +2 -0
  48. package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-stream.js +4 -0
  49. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +152 -39
  50. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
  51. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.d.ts +3 -0
  52. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
  53. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +179 -35
  54. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +57 -30
  55. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +31 -19
  56. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +9 -1
  57. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +36 -6
  58. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +1 -1
  59. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +12 -2
  60. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.d.ts +1 -1
  61. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.d.ts +2 -2
  62. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +24 -8
  63. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +4 -3
  64. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +31 -14
  65. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.d.ts +6 -0
  66. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +89 -4
  67. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/remote-events.d.ts +1 -1
  68. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +27 -0
  69. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +28 -1
  70. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +39 -0
  71. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.d.ts +2 -0
  72. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -0
  73. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.d.ts +8 -0
  74. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +19 -1
  75. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +30 -0
  76. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +111 -2
  77. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +104 -11
  78. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.d.ts +5 -1
  79. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +78 -11
  80. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.d.ts +14 -1
  81. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +17 -0
  82. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.d.ts +15 -0
  83. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +12 -0
  84. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.d.ts +13 -1
  85. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +44 -2
  86. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +17 -0
  87. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.d.ts +13 -1
  88. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +22 -0
  89. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/types.d.ts +17 -0
  90. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +67 -19
  91. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/index.d.ts +1 -1
  92. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/profile-context.d.ts +11 -1
  93. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +22 -3
  94. package/runtime/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
  95. package/runtime/node_modules/@deepseek-ai/dsh-base/package.json +2 -1
  96. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +931 -7
  97. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +57 -19
  98. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/client/index.d.ts +5 -2
  99. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/config.d.ts +12 -0
  100. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/events.d.ts +4 -4
  101. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/index.d.ts +3 -8
  102. package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/package.json +6 -2
  103. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +3 -2
  104. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/index.d.ts +2 -2
  105. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +10 -0
  106. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1 -1
  107. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
  108. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  109. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +68 -16
  110. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +3 -1
  111. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/locales.d.ts +6 -0
  112. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css +3 -5
  113. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +23 -27
  114. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/contract/slots.d.ts +3 -1
  115. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  116. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
  117. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +8 -7
  118. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +1 -1
  119. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/settings-document-store.d.ts +2 -1
  120. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +33 -12
  121. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
  122. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  123. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +3 -1
  124. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  125. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1925 -207
  126. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +13 -0
  127. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/contract/slots.d.ts +4 -0
  128. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +42 -0
  129. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/recent.d.ts +11 -0
  130. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/RecentList.d.ts +15 -0
  131. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/Rows.d.ts +6 -1
  132. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +24 -0
  133. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/stores.d.ts +2 -2
  134. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/tree.d.ts +15 -13
  135. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +3 -1
  136. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/index.js +16 -0
  137. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +7 -3
  138. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.remote-client.js +6 -2
  139. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/index.js +20 -0
  140. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/types.d.ts +5 -0
  141. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
  142. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.d.ts +11 -0
  143. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
  144. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.d.ts +28 -0
  145. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
  146. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/package.json +42 -0
  147. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +102 -14
  148. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/types/index.d.ts +34 -4
  149. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/package.json +1 -0
  150. package/runtime/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +5 -2
  151. package/runtime/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +2 -1
  152. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +21 -8
  153. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.d.ts +4 -6
  154. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +18 -7
  155. package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +4 -0
  156. package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +5 -5
  157. package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +5 -5
  158. package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +5 -0
  159. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +21 -0
  160. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +12 -0
  161. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/types/index.d.ts +15 -0
  162. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +95 -2
  163. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/types/index.d.ts +3 -1
  164. package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +25 -1
  165. package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/types/index.d.ts +1 -0
  166. package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +2 -1
  167. package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +13 -0
  168. package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/types/observation.d.ts +5 -0
  169. package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/lib/index.js +26 -0
  170. package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +2 -1
  171. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/index.js +5 -4
  172. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.d.ts +4 -3
  173. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +4 -3
  174. package/runtime/node_modules/@deepseek-ai/dsh-storage/lib/types/backend.d.ts +4 -0
  175. package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +65 -1
  176. package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +17 -2
  177. package/runtime/node_modules/@deepseek-ai/dsh-storage-json/lib/index.js +25 -0
  178. package/runtime/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -0
  179. package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
  180. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +5522 -0
  181. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/command-args.d.ts +17 -0
  182. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/cicd.d.ts +8 -0
  183. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/tianti.d.ts +7 -0
  184. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti-deliver/tianti-deliver.d.ts +8 -0
  185. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +27 -0
  186. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +13 -0
  187. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/memory-config.d.ts +10 -0
  188. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/runtime.d.ts +105 -0
  189. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/aliases.d.ts +11 -0
  190. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/auth.d.ts +20 -0
  191. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/client.d.ts +206 -0
  192. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +22 -0
  193. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/index.d.ts +6 -0
  194. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/log.d.ts +16 -0
  195. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/types.d.ts +136 -0
  196. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/codebase.d.ts +19 -0
  197. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/dynamicWorkflow.d.ts +10 -0
  198. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/engine.d.ts +8 -0
  199. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executor.d.ts +11 -0
  200. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executors.d.ts +15 -0
  201. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/index.d.ts +23 -0
  202. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/memorySuggestions.d.ts +12 -0
  203. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/openspec.d.ts +31 -0
  204. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/recommend.d.ts +8 -0
  205. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/render.d.ts +8 -0
  206. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/requirementContext.d.ts +12 -0
  207. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/scenarioUpgrade.d.ts +24 -0
  208. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/state.d.ts +16 -0
  209. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/store.d.ts +33 -0
  210. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/templates.d.ts +8 -0
  211. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/types.d.ts +385 -0
  212. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/writeReviewSync.d.ts +6 -0
  213. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/index.d.ts +29 -0
  214. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/store.d.ts +20 -0
  215. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/types.d.ts +49 -0
  216. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +12 -0
  217. package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +57 -0
  218. package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +157 -22
  219. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-D5kpKf--.css +1 -0
  220. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js +133 -0
  221. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js.map +1 -0
  222. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-apple-touch-icon.png +0 -0
  223. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-icon-32.png +0 -0
  224. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-mask-icon.svg +1 -0
  225. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +1 -3
  226. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.ico +0 -0
  227. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +1 -3
  228. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +8 -4
  229. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/preview.html +8 -4
  230. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/package.json +2 -1
  231. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +325 -37
  232. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +6 -1
  233. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.d.ts +6 -0
  234. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.js +23 -17
  235. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +41 -0
  236. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +314 -23
  237. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.d.ts +4 -0
  238. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +4 -0
  239. package/lib/dump-config-CijLv_kn.js +0 -2
  240. package/lib/tuiDisplayPrefs-Dm_fULiR.js +0 -204
  241. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DUvMhLle.css +0 -1
  242. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js +0 -127
  243. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js.map +0 -1
@@ -60,6 +60,15 @@ let _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema$val
60
60
  const _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema$value ??= z.object({
61
61
  'deleted': z.literal(true).readonly(),
62
62
  }))
63
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema$value
64
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema$value ??= z.object({
65
+ 'expectedSessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
66
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
67
+ }))
68
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema$value
69
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema$value ??= z.object({
70
+ 'sessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
71
+ }))
63
72
  let _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema$value
64
73
  const _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema$value ??= z.union([z.object({
65
74
  'type': z.literal("baseline").readonly(),
@@ -159,6 +168,14 @@ const _deepseek_ai_dsh_api_workspace_controller_workspace_rename_result$schema =
159
168
  'updatedAt': z.string().readonly(),
160
169
  }).readonly(),
161
170
  }))
171
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema$value
172
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema$value ??= z.object({
173
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
174
+ }))
175
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema$value
176
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema$value ??= z.object({
177
+ 'sessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
178
+ }))
162
179
  let _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema$value
163
180
  const _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema$value ??= z.object({
164
181
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -283,7 +300,7 @@ export const TYPERT = {
283
300
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceArchiveValue',
284
301
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_archiveSession_result$schema,
285
302
  },
286
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":155,"column":3},
303
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":156,"column":3},
287
304
  },
288
305
  {
289
306
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/create',
@@ -308,7 +325,7 @@ export const TYPERT = {
308
325
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceCreateValue',
309
326
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_create_result$schema,
310
327
  },
311
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":86,"column":3},
328
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":87,"column":3},
312
329
  },
313
330
  {
314
331
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/delete',
@@ -333,7 +350,32 @@ export const TYPERT = {
333
350
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceDeleteValue',
334
351
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema,
335
352
  },
336
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":125,"column":3},
353
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":126,"column":3},
354
+ },
355
+ {
356
+ id: '@deepseek-ai/dsh-api-workspace-controller#workspace/deleteSession',
357
+ service: 'workspaceController',
358
+ namespace: 'workspace',
359
+ method: 'deleteSession',
360
+ invocation: { kind: 'direct' },
361
+ parameters: [
362
+ {
363
+ name: 'request',
364
+ wire: 'request',
365
+ source: 'json',
366
+ codec: {
367
+ mode: 'strict',
368
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionRequest',
369
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema,
370
+ },
371
+ },
372
+ ],
373
+ result: {
374
+ mode: 'strict',
375
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionValue',
376
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema,
377
+ },
378
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":186,"column":3},
337
379
  },
338
380
  {
339
381
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/follow',
@@ -350,7 +392,7 @@ export const TYPERT = {
350
392
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceFollowFrame',
351
393
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema,
352
394
  },
353
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":195,"column":3},
395
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":216,"column":3},
354
396
  },
355
397
  {
356
398
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/initializeDefault',
@@ -366,7 +408,7 @@ export const TYPERT = {
366
408
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller#workspace/initializeDefault:result',
367
409
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_initializeDefault_result$schema,
368
410
  },
369
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":99,"column":9},
411
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":100,"column":9},
370
412
  },
371
413
  {
372
414
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/insertBefore',
@@ -391,7 +433,7 @@ export const TYPERT = {
391
433
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceOrderValue',
392
434
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_insertBefore_result$schema,
393
435
  },
394
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":135,"column":3},
436
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":136,"column":3},
395
437
  },
396
438
  {
397
439
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/insertSessionBefore',
@@ -416,7 +458,7 @@ export const TYPERT = {
416
458
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceValue',
417
459
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_insertSessionBefore_result$schema,
418
460
  },
419
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":145,"column":3},
461
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":146,"column":3},
420
462
  },
421
463
  {
422
464
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/pinSession',
@@ -441,7 +483,7 @@ export const TYPERT = {
441
483
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspacePinValue',
442
484
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_pinSession_result$schema,
443
485
  },
444
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":175,"column":3},
486
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":196,"column":3},
445
487
  },
446
488
  {
447
489
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/rename',
@@ -466,7 +508,32 @@ export const TYPERT = {
466
508
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceValue',
467
509
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_rename_result$schema,
468
510
  },
469
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":115,"column":3},
511
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":116,"column":3},
512
+ },
513
+ {
514
+ id: '@deepseek-ai/dsh-api-workspace-controller#workspace/sessionDeletionScope',
515
+ service: 'workspaceController',
516
+ namespace: 'workspace',
517
+ method: 'sessionDeletionScope',
518
+ invocation: { kind: 'direct' },
519
+ parameters: [
520
+ {
521
+ name: 'request',
522
+ wire: 'request',
523
+ source: 'json',
524
+ codec: {
525
+ mode: 'strict',
526
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionPreviewRequest',
527
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema,
528
+ },
529
+ },
530
+ ],
531
+ result: {
532
+ mode: 'strict',
533
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionValue',
534
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema,
535
+ },
536
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":176,"column":3},
470
537
  },
471
538
  {
472
539
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/unarchiveSession',
@@ -491,7 +558,7 @@ export const TYPERT = {
491
558
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceArchiveValue',
492
559
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_result$schema,
493
560
  },
494
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":165,"column":3},
561
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":166,"column":3},
495
562
  },
496
563
  {
497
564
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/unpinSession',
@@ -516,7 +583,7 @@ export const TYPERT = {
516
583
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspacePinValue',
517
584
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_unpinSession_result$schema,
518
585
  },
519
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":185,"column":3},
586
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":206,"column":3},
520
587
  },
521
588
  ],
522
589
  model: {
@@ -626,6 +693,20 @@ export const TYPERT = {
626
693
  "summary": "Restore one archived Session to Workspace grouping surfaces.",
627
694
  "jsDoc": "/**\n * Restore one archived Session to Workspace grouping surfaces.\n * @param request - Session identity to unarchive.\n * @returns the complete resulting archive set.\n */"
628
695
  },
696
+ {
697
+ "kind": "method",
698
+ "name": "sessionDeletionScope",
699
+ "signature": "@Remote('sessionDeletionScope') sessionDeletionScope(request: WorkspaceSessionDeletionPreviewRequest): Promise<WorkspaceSessionDeletionValue>",
700
+ "summary": "Preview the archived root and owned subagent Sessions covered by deletion.",
701
+ "jsDoc": "/**\n * Preview the archived root and owned subagent Sessions covered by deletion.\n * @param request - archived root to preview.\n * @returns complete deletion scope for confirmation.\n */"
702
+ },
703
+ {
704
+ "kind": "method",
705
+ "name": "deleteSession",
706
+ "signature": "@Remote('deleteSession') deleteSession(request: WorkspaceSessionDeletionRequest): Promise<WorkspaceSessionDeletionValue>",
707
+ "summary": "Permanently remove an archived Session and its confirmed owned subagents.",
708
+ "jsDoc": "/**\n * Permanently remove an archived Session and its confirmed owned subagents.\n * @param request - archived root and confirmed scope.\n * @returns identities permanently removed.\n */"
709
+ },
629
710
  {
630
711
  "kind": "method",
631
712
  "name": "pinSession",
@@ -721,6 +802,18 @@ export const TYPERT = {
721
802
  "name": "WorkspaceRenameRequest",
722
803
  "declaration": "export interface WorkspaceRenameRequest {\n readonly workspaceId: WorkspaceId;\n readonly title: string;\n}"
723
804
  },
805
+ {
806
+ "name": "WorkspaceSessionDeletionPreviewRequest",
807
+ "declaration": "export interface WorkspaceSessionDeletionPreviewRequest {\n readonly sessionId: SessionId;\n}"
808
+ },
809
+ {
810
+ "name": "WorkspaceSessionDeletionRequest",
811
+ "declaration": "export interface WorkspaceSessionDeletionRequest extends WorkspaceSessionDeletionPreviewRequest {\n readonly expectedSessionIds: readonly SessionId[];\n}"
812
+ },
813
+ {
814
+ "name": "WorkspaceSessionDeletionValue",
815
+ "declaration": "export interface WorkspaceSessionDeletionValue {\n readonly sessionIds: readonly SessionId[];\n}"
816
+ },
724
817
  {
725
818
  "name": "WorkspaceUnarchiveSessionRequest",
726
819
  "declaration": "export interface WorkspaceUnarchiveSessionRequest {\n readonly sessionId: SessionId;\n}"
@@ -4,7 +4,7 @@ import type {
4
4
  RemoteStreamHandle,
5
5
  TypertRemoteContribution,
6
6
  } from '@deepseek-ai/dsh-typert-protocol'
7
- import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceFollowFrame, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue } from '@deepseek-ai/dsh-api-workspace-controller/types'
7
+ import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceFollowFrame, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceSessionDeletionPreviewRequest, WorkspaceSessionDeletionRequest, WorkspaceSessionDeletionValue, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue } from '@deepseek-ai/dsh-api-workspace-controller/types'
8
8
  import type { DirectoryListing } from '@deepseek-ai/dsh-host-directory-picker/types'
9
9
 
10
10
  declare module '@deepseek-ai/dsh-typert-protocol' {
@@ -17,12 +17,14 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
17
17
  archiveSession: (request: WorkspaceArchiveSessionRequest) => Promise<RemoteResult<WorkspaceArchiveValue>>
18
18
  create: (request: WorkspaceCreateRequest) => Promise<RemoteResult<WorkspaceCreateValue>>
19
19
  delete: (request: WorkspaceDeleteRequest) => Promise<RemoteResult<WorkspaceDeleteValue>>
20
+ deleteSession: (request: WorkspaceSessionDeletionRequest) => Promise<RemoteResult<WorkspaceSessionDeletionValue>>
20
21
  follow: (signal?: AbortSignal) => RemoteStreamHandle<WorkspaceFollowFrame, never>
21
22
  initializeDefault: (signal?: AbortSignal) => Promise<RemoteResult<WorkspaceValue | undefined>>
22
23
  insertBefore: (request: WorkspaceInsertBeforeRequest) => Promise<RemoteResult<WorkspaceOrderValue>>
23
24
  insertSessionBefore: (request: WorkspaceInsertSessionBeforeRequest) => Promise<RemoteResult<WorkspaceValue>>
24
25
  pinSession: (request: WorkspacePinSessionRequest) => Promise<RemoteResult<WorkspacePinValue>>
25
26
  rename: (request: WorkspaceRenameRequest) => Promise<RemoteResult<WorkspaceValue>>
27
+ sessionDeletionScope: (request: WorkspaceSessionDeletionPreviewRequest) => Promise<RemoteResult<WorkspaceSessionDeletionValue>>
26
28
  unarchiveSession: (request: WorkspaceUnarchiveSessionRequest) => Promise<RemoteResult<WorkspaceArchiveValue>>
27
29
  unpinSession: (request: WorkspaceUnpinSessionRequest) => Promise<RemoteResult<WorkspacePinValue>>
28
30
  }
@@ -33,12 +35,14 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
33
35
  'workspace/archiveSession': (request: WorkspaceArchiveSessionRequest) => Promise<RemoteResult<WorkspaceArchiveValue>>
34
36
  'workspace/create': (request: WorkspaceCreateRequest) => Promise<RemoteResult<WorkspaceCreateValue>>
35
37
  'workspace/delete': (request: WorkspaceDeleteRequest) => Promise<RemoteResult<WorkspaceDeleteValue>>
38
+ 'workspace/deleteSession': (request: WorkspaceSessionDeletionRequest) => Promise<RemoteResult<WorkspaceSessionDeletionValue>>
36
39
  'workspace/follow': (signal?: AbortSignal) => RemoteStreamHandle<WorkspaceFollowFrame, never>
37
40
  'workspace/initializeDefault': (signal?: AbortSignal) => Promise<RemoteResult<WorkspaceValue | undefined>>
38
41
  'workspace/insertBefore': (request: WorkspaceInsertBeforeRequest) => Promise<RemoteResult<WorkspaceOrderValue>>
39
42
  'workspace/insertSessionBefore': (request: WorkspaceInsertSessionBeforeRequest) => Promise<RemoteResult<WorkspaceValue>>
40
43
  'workspace/pinSession': (request: WorkspacePinSessionRequest) => Promise<RemoteResult<WorkspacePinValue>>
41
44
  'workspace/rename': (request: WorkspaceRenameRequest) => Promise<RemoteResult<WorkspaceValue>>
45
+ 'workspace/sessionDeletionScope': (request: WorkspaceSessionDeletionPreviewRequest) => Promise<RemoteResult<WorkspaceSessionDeletionValue>>
42
46
  'workspace/unarchiveSession': (request: WorkspaceUnarchiveSessionRequest) => Promise<RemoteResult<WorkspaceArchiveValue>>
43
47
  'workspace/unpinSession': (request: WorkspaceUnpinSessionRequest) => Promise<RemoteResult<WorkspacePinValue>>
44
48
  }
@@ -60,6 +60,15 @@ let _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema$val
60
60
  const _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema$value ??= z.object({
61
61
  'deleted': z.literal(true).readonly(),
62
62
  }))
63
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema$value
64
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema$value ??= z.object({
65
+ 'expectedSessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
66
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
67
+ }))
68
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema$value
69
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema$value ??= z.object({
70
+ 'sessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
71
+ }))
63
72
  let _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema$value
64
73
  const _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema$value ??= z.union([z.object({
65
74
  'type': z.literal("baseline").readonly(),
@@ -159,6 +168,14 @@ const _deepseek_ai_dsh_api_workspace_controller_workspace_rename_result$schema =
159
168
  'updatedAt': z.string().readonly(),
160
169
  }).readonly(),
161
170
  }))
171
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema$value
172
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema$value ??= z.object({
173
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
174
+ }))
175
+ let _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema$value
176
+ const _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema$value ??= z.object({
177
+ 'sessionIds': z.array(z.intersection(z.string(), z.unknown())).readonly(),
178
+ }))
162
179
  let _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema$value
163
180
  const _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema = () => (_deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_parameter_0$schema$value ??= z.object({
164
181
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
@@ -280,7 +297,7 @@ export const TYPERT_REMOTE = {
280
297
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceArchiveValue',
281
298
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_archiveSession_result$schema,
282
299
  },
283
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":155,"column":3},
300
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":156,"column":3},
284
301
  },
285
302
  {
286
303
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/create',
@@ -305,7 +322,7 @@ export const TYPERT_REMOTE = {
305
322
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceCreateValue',
306
323
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_create_result$schema,
307
324
  },
308
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":86,"column":3},
325
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":87,"column":3},
309
326
  },
310
327
  {
311
328
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/delete',
@@ -330,7 +347,32 @@ export const TYPERT_REMOTE = {
330
347
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceDeleteValue',
331
348
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_delete_result$schema,
332
349
  },
333
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":125,"column":3},
350
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":126,"column":3},
351
+ },
352
+ {
353
+ id: '@deepseek-ai/dsh-api-workspace-controller#workspace/deleteSession',
354
+ service: 'workspaceController',
355
+ namespace: 'workspace',
356
+ method: 'deleteSession',
357
+ invocation: { kind: 'direct' },
358
+ parameters: [
359
+ {
360
+ name: 'request',
361
+ wire: 'request',
362
+ source: 'json',
363
+ codec: {
364
+ mode: 'strict',
365
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionRequest',
366
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_parameter_0$schema,
367
+ },
368
+ },
369
+ ],
370
+ result: {
371
+ mode: 'strict',
372
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionValue',
373
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_deleteSession_result$schema,
374
+ },
375
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":186,"column":3},
334
376
  },
335
377
  {
336
378
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/follow',
@@ -347,7 +389,7 @@ export const TYPERT_REMOTE = {
347
389
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceFollowFrame',
348
390
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_follow_result$schema,
349
391
  },
350
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":195,"column":3},
392
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":216,"column":3},
351
393
  },
352
394
  {
353
395
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/initializeDefault',
@@ -363,7 +405,7 @@ export const TYPERT_REMOTE = {
363
405
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller#workspace/initializeDefault:result',
364
406
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_initializeDefault_result$schema,
365
407
  },
366
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":99,"column":9},
408
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":100,"column":9},
367
409
  },
368
410
  {
369
411
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/insertBefore',
@@ -388,7 +430,7 @@ export const TYPERT_REMOTE = {
388
430
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceOrderValue',
389
431
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_insertBefore_result$schema,
390
432
  },
391
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":135,"column":3},
433
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":136,"column":3},
392
434
  },
393
435
  {
394
436
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/insertSessionBefore',
@@ -413,7 +455,7 @@ export const TYPERT_REMOTE = {
413
455
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceValue',
414
456
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_insertSessionBefore_result$schema,
415
457
  },
416
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":145,"column":3},
458
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":146,"column":3},
417
459
  },
418
460
  {
419
461
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/pinSession',
@@ -438,7 +480,7 @@ export const TYPERT_REMOTE = {
438
480
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspacePinValue',
439
481
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_pinSession_result$schema,
440
482
  },
441
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":175,"column":3},
483
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":196,"column":3},
442
484
  },
443
485
  {
444
486
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/rename',
@@ -463,7 +505,32 @@ export const TYPERT_REMOTE = {
463
505
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceValue',
464
506
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_rename_result$schema,
465
507
  },
466
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":115,"column":3},
508
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":116,"column":3},
509
+ },
510
+ {
511
+ id: '@deepseek-ai/dsh-api-workspace-controller#workspace/sessionDeletionScope',
512
+ service: 'workspaceController',
513
+ namespace: 'workspace',
514
+ method: 'sessionDeletionScope',
515
+ invocation: { kind: 'direct' },
516
+ parameters: [
517
+ {
518
+ name: 'request',
519
+ wire: 'request',
520
+ source: 'json',
521
+ codec: {
522
+ mode: 'strict',
523
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionPreviewRequest',
524
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_parameter_0$schema,
525
+ },
526
+ },
527
+ ],
528
+ result: {
529
+ mode: 'strict',
530
+ typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceSessionDeletionValue',
531
+ create: _deepseek_ai_dsh_api_workspace_controller_workspace_sessionDeletionScope_result$schema,
532
+ },
533
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":176,"column":3},
467
534
  },
468
535
  {
469
536
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/unarchiveSession',
@@ -488,7 +555,7 @@ export const TYPERT_REMOTE = {
488
555
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspaceArchiveValue',
489
556
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_unarchiveSession_result$schema,
490
557
  },
491
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":165,"column":3},
558
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":166,"column":3},
492
559
  },
493
560
  {
494
561
  id: '@deepseek-ai/dsh-api-workspace-controller#workspace/unpinSession',
@@ -513,7 +580,7 @@ export const TYPERT_REMOTE = {
513
580
  typeSymbol: '@deepseek-ai/dsh-api-workspace-controller/types#WorkspacePinValue',
514
581
  create: _deepseek_ai_dsh_api_workspace_controller_workspace_unpinSession_result$schema,
515
582
  },
516
- sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":185,"column":3},
583
+ sourceLocation: {"file":"packages/api/workspace-controller/src/index.ts","line":206,"column":3},
517
584
  },
518
585
  ],
519
586
  }
@@ -1,6 +1,6 @@
1
1
  /** Client-side Workspace state model shared by Remote transport and UI projection. */
2
2
  import type { RemoteFailure, RemoteResult, TypertClientRemote } from '@deepseek-ai/dsh-typert-protocol';
3
- import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceBaseline, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteValue, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue, WorkspaceId, WorkspaceView } from '../types.ts';
3
+ import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceSessionDeletionValue, WorkspaceBaseline, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteValue, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue, WorkspaceId, WorkspaceView } from '../types.ts';
4
4
  /** Complete generated `ctx.remote.workspace` namespace. */
5
5
  export type WorkspaceRemote = TypertClientRemote['workspace'];
6
6
  /** Monotone Workspace-list arrival lifecycle. */
@@ -117,6 +117,19 @@ export declare class ClientWorkspaceModel implements WorkspaceFollowSink {
117
117
  * @returns generated Remote result.
118
118
  */
119
119
  unarchiveSession(sessionId: WorkspaceUnarchiveSessionRequest['sessionId']): Promise<RemoteResult<WorkspaceArchiveValue>>;
120
+ /**
121
+ * Request the Host's deletion scope for an archived root.
122
+ * @param sessionId - archived root to preview.
123
+ * @returns the Host deletion preview.
124
+ */
125
+ sessionDeletionScope(sessionId: import('@deepseek-ai/dsh-session/types').SessionId): Promise<RemoteResult<WorkspaceSessionDeletionValue>>;
126
+ /**
127
+ * Request permanent deletion of exactly the confirmed Session scope.
128
+ * @param sessionId - archived root.
129
+ * @param expectedSessionIds - exact scope confirmed by the user.
130
+ * @returns the Host deletion result.
131
+ */
132
+ deleteSession(sessionId: import('@deepseek-ai/dsh-session/types').SessionId, expectedSessionIds: readonly import('@deepseek-ai/dsh-session/types').SessionId[]): Promise<RemoteResult<WorkspaceSessionDeletionValue>>;
120
133
  /**
121
134
  * Pin one Session and install the returned complete pin set.
122
135
  * A reply superseded by a later pin request or a pushed set installs nothing.
@@ -153,6 +153,23 @@ export class ClientWorkspaceModel {
153
153
  }
154
154
  return result;
155
155
  }
156
+ /**
157
+ * Request the Host's deletion scope for an archived root.
158
+ * @param sessionId - archived root to preview.
159
+ * @returns the Host deletion preview.
160
+ */
161
+ sessionDeletionScope(sessionId) {
162
+ return this.remote.sessionDeletionScope({ sessionId });
163
+ }
164
+ /**
165
+ * Request permanent deletion of exactly the confirmed Session scope.
166
+ * @param sessionId - archived root.
167
+ * @param expectedSessionIds - exact scope confirmed by the user.
168
+ * @returns the Host deletion result.
169
+ */
170
+ deleteSession(sessionId, expectedSessionIds) {
171
+ return this.remote.deleteSession({ sessionId, expectedSessionIds });
172
+ }
156
173
  /**
157
174
  * Pin one Session and install the returned complete pin set.
158
175
  * A reply superseded by a later pin request or a pushed set installs nothing.
@@ -85,6 +85,19 @@ export interface IWorkspaces {
85
85
  * @param sessionId - Session to unarchive.
86
86
  */
87
87
  unarchiveSession(sessionId: SessionId): Promise<void>;
88
+ /**
89
+ * Preview the archived root and owned subagent identities before confirmation.
90
+ * @param sessionId - archived root identity.
91
+ * @returns the identities covered by confirmation.
92
+ */
93
+ sessionDeletionScope(sessionId: SessionId): Promise<readonly SessionId[]>;
94
+ /**
95
+ * Permanently delete exactly the confirmed scope; live or changed scopes reject.
96
+ * @param sessionId - archived root identity.
97
+ * @param expectedSessionIds - identities confirmed by the user.
98
+ * @returns the identities removed after durable cleanup.
99
+ */
100
+ deleteSession(sessionId: SessionId, expectedSessionIds: readonly SessionId[]): Promise<readonly SessionId[]>;
88
101
  /**
89
102
  * Pin a Session ahead of unpinned Sessions on Workspace grouping surfaces.
90
103
  * @param sessionId - Session to pin.
@@ -124,6 +137,8 @@ export declare class WorkspaceController extends Service implements IWorkspaces
124
137
  readonly stopActivity?: boolean;
125
138
  }): Promise<void>;
126
139
  unarchiveSession(sessionId: SessionId): Promise<void>;
140
+ sessionDeletionScope(sessionId: SessionId): Promise<readonly SessionId[]>;
141
+ deleteSession(sessionId: SessionId, expectedSessionIds: readonly SessionId[]): Promise<readonly SessionId[]>;
127
142
  pinSession(sessionId: SessionId): Promise<void>;
128
143
  unpinSession(sessionId: SessionId): Promise<void>;
129
144
  insertSessionBefore(workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId): Promise<WorkspaceView>;
@@ -75,6 +75,18 @@ export class WorkspaceController extends Service {
75
75
  if (!result.ok)
76
76
  throw commandError('session unarchive', result.error);
77
77
  }
78
+ async sessionDeletionScope(sessionId) {
79
+ const result = await this.model.sessionDeletionScope(sessionId);
80
+ if (!result.ok)
81
+ throw new WorkspaceArchiveError(result.error);
82
+ return result.value.sessionIds;
83
+ }
84
+ async deleteSession(sessionId, expectedSessionIds) {
85
+ const result = await this.model.deleteSession(sessionId, expectedSessionIds);
86
+ if (!result.ok)
87
+ throw new WorkspaceArchiveError(result.error);
88
+ return result.value.sessionIds;
89
+ }
78
90
  async pinSession(sessionId) {
79
91
  const result = await this.model.pinSession(sessionId);
80
92
  if (!result.ok)
@@ -1,6 +1,6 @@
1
1
  /** Workspace command implementation and stable Remote failure mapping. */
2
2
  import type { Context } from '@deepseek-ai/cordis';
3
- import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue } from './types.ts';
3
+ import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue, WorkspaceSessionDeletionPreviewRequest, WorkspaceSessionDeletionRequest, WorkspaceSessionDeletionValue } from './types.ts';
4
4
  /** Implements Workspace mutations against the authoritative registry. */
5
5
  export declare class WorkspaceCommands {
6
6
  private readonly ctx;
@@ -54,6 +54,18 @@ export declare class WorkspaceCommands {
54
54
  * @returns the complete resulting archive set.
55
55
  */
56
56
  unarchiveSession(request: WorkspaceUnarchiveSessionRequest): Promise<WorkspaceArchiveValue>;
57
+ /**
58
+ * Preview the Session identities that would be permanently deleted.
59
+ * @param request - archived root to preview.
60
+ * @returns the complete deletion scope for confirmation.
61
+ */
62
+ sessionDeletionScope(request: WorkspaceSessionDeletionPreviewRequest): Promise<WorkspaceSessionDeletionValue>;
63
+ /**
64
+ * Delete an archived root and exactly its confirmed owned subagent scope.
65
+ * @param request - root and user-confirmed deletion scope.
66
+ * @returns identities removed after persistence and owner cleanup complete.
67
+ */
68
+ deleteSession(request: WorkspaceSessionDeletionRequest): Promise<WorkspaceSessionDeletionValue>;
57
69
  /**
58
70
  * Add one known unarchived Session to the registry-global pin set.
59
71
  * @param request - Session identity to pin.
@@ -1,5 +1,5 @@
1
1
  /** Workspace command implementation and stable Remote failure mapping. */
2
- import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceUnknownSessionError, } from '@deepseek-ai/dsh-workspace';
2
+ import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceUnknownSessionError, WorkspaceSessionDeletionError, } from '@deepseek-ai/dsh-workspace';
3
3
  import { RemoteError, remoteErrorOf } from '@deepseek-ai/dsh-typert-protocol';
4
4
  import { workspaceView } from "./feed.js";
5
5
  /** Implements Workspace mutations against the authoritative registry. */
@@ -138,9 +138,40 @@ export class WorkspaceCommands {
138
138
  * @returns the complete resulting archive set.
139
139
  */
140
140
  async unarchiveSession(request) {
141
- await this.ctx.workspaceRegistry.unarchiveSession(request.sessionId);
141
+ try {
142
+ await this.ctx.workspaceRegistry.unarchiveSession(request.sessionId);
143
+ }
144
+ catch (error) {
145
+ throw deletionError(error, request.sessionId);
146
+ }
142
147
  return { archivedSessionIds: [...this.ctx.workspaceRegistry.archivedSessionIds] };
143
148
  }
149
+ /**
150
+ * Preview the Session identities that would be permanently deleted.
151
+ * @param request - archived root to preview.
152
+ * @returns the complete deletion scope for confirmation.
153
+ */
154
+ async sessionDeletionScope(request) {
155
+ try {
156
+ return { sessionIds: await this.ctx.workspaceRegistry.sessionDeletionScope(request.sessionId) };
157
+ }
158
+ catch (error) {
159
+ throw deletionError(error, request.sessionId);
160
+ }
161
+ }
162
+ /**
163
+ * Delete an archived root and exactly its confirmed owned subagent scope.
164
+ * @param request - root and user-confirmed deletion scope.
165
+ * @returns identities removed after persistence and owner cleanup complete.
166
+ */
167
+ async deleteSession(request) {
168
+ try {
169
+ return { sessionIds: await this.ctx.workspaceRegistry.deleteSession(request.sessionId, request.expectedSessionIds) };
170
+ }
171
+ catch (error) {
172
+ throw deletionError(error, request.sessionId);
173
+ }
174
+ }
144
175
  /**
145
176
  * Add one known unarchived Session to the registry-global pin set.
146
177
  * @param request - Session identity to pin.
@@ -187,6 +218,17 @@ export class WorkspaceCommands {
187
218
  function workspaceNotFound(workspaceId) {
188
219
  return new RemoteError('workspace/not-found', `Workspace "${workspaceId}" not found`, { workspaceId });
189
220
  }
221
+ function deletionError(error, sessionId) {
222
+ if (error instanceof WorkspaceSessionDeletionError) {
223
+ return new RemoteError('workspace/session-delete-refused', 'Session deletion refused', {
224
+ sessionId, reason: error.reason,
225
+ }, { cause: error });
226
+ }
227
+ if (error instanceof WorkspaceActiveSessionError) {
228
+ return new RemoteError('workspace/session-active', error.message, { sessionId, activity: error.activity }, { cause: error });
229
+ }
230
+ return error;
231
+ }
190
232
  function errorMessage(error) {
191
233
  return error instanceof Error ? error.message : String(error);
192
234
  }