@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
@@ -301,6 +301,7 @@ let SettingsController = (() => {
301
301
  let _replace_decorators;
302
302
  let _mutate_decorators;
303
303
  let _openSettingsDocument_decorators;
304
+ let _openNamespaceDocument_decorators;
304
305
  return class SettingsController extends _classSuper {
305
306
  static {
306
307
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
@@ -309,6 +310,7 @@ let SettingsController = (() => {
309
310
  _replace_decorators = [Remote];
310
311
  _mutate_decorators = [Remote];
311
312
  _openSettingsDocument_decorators = [Remote];
313
+ _openNamespaceDocument_decorators = [Remote];
312
314
  __esDecorate(this, null, _describe_decorators, {
313
315
  kind: "method",
314
316
  name: "describe",
@@ -364,6 +366,17 @@ let SettingsController = (() => {
364
366
  },
365
367
  metadata: _metadata
366
368
  }, null, _instanceExtraInitializers);
369
+ __esDecorate(this, null, _openNamespaceDocument_decorators, {
370
+ kind: "method",
371
+ name: "openNamespaceDocument",
372
+ static: false,
373
+ private: false,
374
+ access: {
375
+ has: (obj) => "openNamespaceDocument" in obj,
376
+ get: (obj) => obj.openNamespaceDocument
377
+ },
378
+ metadata: _metadata
379
+ }, null, _instanceExtraInitializers);
367
380
  if (_metadata) Object.defineProperty(this, Symbol.metadata, {
368
381
  enumerable: true,
369
382
  configurable: true,
@@ -439,11 +452,25 @@ let SettingsController = (() => {
439
452
  * @throws RemoteError when no document exists, preparation fails, or opening fails.
440
453
  */
441
454
  async openSettingsDocument(signal) {
455
+ return this.openDocument(void 0, signal);
456
+ }
457
+ /** Open the document owning a registered namespace, including shared home-level model configuration.
458
+ * @param ns Registered settings namespace; the Host resolves its owning path.
459
+ * @param signal Caller lifetime before native handoff.
460
+ * @returns Confirmation once the native editor accepts the document.
461
+ * @throws RemoteError for invalid namespaces, preparation failure or rejected native handoff.
462
+ */
463
+ async openNamespaceDocument(ns, signal) {
464
+ const parsed = settingsNamespaceRequestSchema.safeParse({ ns });
465
+ if (!parsed.success) throw new RemoteError("gateway/bad-request", "invalid settings namespace", {});
466
+ return this.openDocument(parsed.data.ns, signal);
467
+ }
468
+ async openDocument(namespace, signal) {
442
469
  const settings = this.provider();
443
470
  if (isAborted(signal)) throw new RemoteError("gateway/cancelled", "settings document open was aborted", {});
444
471
  let path;
445
472
  try {
446
- path = await settings.prepareDocument();
473
+ path = await settings.prepareDocument(namespace);
447
474
  } catch (error) {
448
475
  if (isAborted(signal)) throw new RemoteError("gateway/cancelled", "settings document preparation was aborted", {});
449
476
  throw new RemoteError("gateway/internal", `settings document preparation failed: ${messageOf(error)}`, {}, { cause: error });
@@ -80,6 +80,12 @@ const _deepseek_ai_dsh_api_settings_controller_settings_mutate_result$schema = (
80
80
  })),
81
81
  'revision': z.number(),
82
82
  }))
83
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value
84
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value ??= z.string())
85
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value
86
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value ??= z.object({
87
+ 'opened': z.literal(true).readonly(),
88
+ }))
83
89
  let _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value
84
90
  const _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value ??= z.object({
85
91
  'opened': z.literal(true).readonly(),
@@ -279,6 +285,32 @@ export const TYPERT = {
279
285
  },
280
286
  sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":152,"column":9},
281
287
  },
288
+ {
289
+ id: '@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument',
290
+ service: 'settingsController',
291
+ namespace: 'settings',
292
+ method: 'openNamespaceDocument',
293
+ invocation: { kind: 'direct' },
294
+ parameters: [
295
+ {
296
+ name: 'ns',
297
+ wire: 'ns',
298
+ source: 'json',
299
+ codec: {
300
+ mode: 'strict',
301
+ typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument:ns',
302
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema,
303
+ },
304
+ },
305
+ ],
306
+ cancellation: { parameter: 'signal' },
307
+ result: {
308
+ mode: 'strict',
309
+ typeSymbol: '@deepseek-ai/dsh-api-settings-controller/types#SettingsDocumentOpenValue',
310
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema,
311
+ },
312
+ sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":178,"column":9},
313
+ },
282
314
  {
283
315
  id: '@deepseek-ai/dsh-api-settings-controller#settings/openSettingsDocument',
284
316
  service: 'settingsController',
@@ -469,6 +501,13 @@ export const TYPERT = {
469
501
  "signature": "@Remote async openSettingsDocument(signal: AbortSignal): Promise<SettingsDocumentOpenValue>",
470
502
  "summary": "Materialize the provider-owned settings document and open it in a native text editor.",
471
503
  "jsDoc": "/**\n * Materialize the provider-owned settings document and open it in a native text editor.\n * @param signal - caller lifetime; abort terminates preparation or the native command.\n * @returns confirmation after the native opener accepts the document.\n * @throws RemoteError when no document exists, preparation fails, or opening fails.\n */"
504
+ },
505
+ {
506
+ "kind": "method",
507
+ "name": "openNamespaceDocument",
508
+ "signature": "@Remote async openNamespaceDocument(ns: string, signal: AbortSignal): Promise<SettingsDocumentOpenValue>",
509
+ "summary": "Open the document owning a registered namespace, including shared home-level model configuration.",
510
+ "jsDoc": "/** Open the document owning a registered namespace, including shared home-level model configuration.\n * @param ns Registered settings namespace; the Host resolves its owning path.\n * @param signal Caller lifetime before native handoff.\n * @returns Confirmation once the native editor accepts the document.\n * @throws RemoteError for invalid namespaces, preparation failure or rejected native handoff.\n */"
472
511
  }
473
512
  ],
474
513
  "types": [
@@ -17,6 +17,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
17
17
  interface TypertRemoteNamespace$73657474696e6773 {
18
18
  describe: () => Promise<RemoteResult<SettingsDescribeValue>>
19
19
  mutate: (ns: string, ops: SettingsPathOpView[], expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
20
+ openNamespaceDocument: (ns: string, signal?: AbortSignal) => Promise<RemoteResult<SettingsDocumentOpenValue>>
20
21
  openSettingsDocument: (signal?: AbortSignal) => Promise<RemoteResult<SettingsDocumentOpenValue>>
21
22
  replace: (ns: string, section: Record<string, JsonValue>, expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
22
23
  update: (ns: string, patch: Record<string, JsonValue>, expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
@@ -27,6 +28,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
27
28
  'credentials/unset': (ref: string) => Promise<RemoteResult<void>>
28
29
  'settings/describe': () => Promise<RemoteResult<SettingsDescribeValue>>
29
30
  'settings/mutate': (ns: string, ops: SettingsPathOpView[], expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
31
+ 'settings/openNamespaceDocument': (ns: string, signal?: AbortSignal) => Promise<RemoteResult<SettingsDocumentOpenValue>>
30
32
  'settings/openSettingsDocument': (signal?: AbortSignal) => Promise<RemoteResult<SettingsDocumentOpenValue>>
31
33
  'settings/replace': (ns: string, section: Record<string, JsonValue>, expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
32
34
  'settings/update': (ns: string, patch: Record<string, JsonValue>, expectedRevision: number | undefined) => Promise<RemoteResult<SettingsNamespaceView>>
@@ -80,6 +80,12 @@ const _deepseek_ai_dsh_api_settings_controller_settings_mutate_result$schema = (
80
80
  })),
81
81
  'revision': z.number(),
82
82
  }))
83
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value
84
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value ??= z.string())
85
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value
86
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value ??= z.object({
87
+ 'opened': z.literal(true).readonly(),
88
+ }))
83
89
  let _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value
84
90
  const _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema = () => (_deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value ??= z.object({
85
91
  'opened': z.literal(true).readonly(),
@@ -276,6 +282,32 @@ export const TYPERT_REMOTE = {
276
282
  },
277
283
  sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":152,"column":9},
278
284
  },
285
+ {
286
+ id: '@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument',
287
+ service: 'settingsController',
288
+ namespace: 'settings',
289
+ method: 'openNamespaceDocument',
290
+ invocation: { kind: 'direct' },
291
+ parameters: [
292
+ {
293
+ name: 'ns',
294
+ wire: 'ns',
295
+ source: 'json',
296
+ codec: {
297
+ mode: 'strict',
298
+ typeSymbol: '@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument:ns',
299
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema,
300
+ },
301
+ },
302
+ ],
303
+ cancellation: { parameter: 'signal' },
304
+ result: {
305
+ mode: 'strict',
306
+ typeSymbol: '@deepseek-ai/dsh-api-settings-controller/types#SettingsDocumentOpenValue',
307
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema,
308
+ },
309
+ sourceLocation: {"file":"packages/api/settings-controller/src/index.ts","line":178,"column":9},
310
+ },
279
311
  {
280
312
  id: '@deepseek-ai/dsh-api-settings-controller#settings/openSettingsDocument',
281
313
  service: 'settingsController',
@@ -83,6 +83,14 @@ export declare class SettingsController extends TypertRemoteService {
83
83
  * @throws RemoteError when no document exists, preparation fails, or opening fails.
84
84
  */
85
85
  openSettingsDocument(signal: AbortSignal): Promise<SettingsDocumentOpenValue>;
86
+ /** Open the document owning a registered namespace, including shared home-level model configuration.
87
+ * @param ns Registered settings namespace; the Host resolves its owning path.
88
+ * @param signal Caller lifetime before native handoff.
89
+ * @returns Confirmation once the native editor accepts the document.
90
+ * @throws RemoteError for invalid namespaces, preparation failure or rejected native handoff.
91
+ */
92
+ openNamespaceDocument(ns: string, signal: AbortSignal): Promise<SettingsDocumentOpenValue>;
93
+ private openDocument;
86
94
  private write;
87
95
  /** Resolve the optional provider or report how to supply it. */
88
96
  private provider;
@@ -86,6 +86,7 @@ let SettingsController = (() => {
86
86
  let _replace_decorators;
87
87
  let _mutate_decorators;
88
88
  let _openSettingsDocument_decorators;
89
+ let _openNamespaceDocument_decorators;
89
90
  return class SettingsController extends _classSuper {
90
91
  static {
91
92
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
@@ -94,11 +95,13 @@ let SettingsController = (() => {
94
95
  _replace_decorators = [Remote];
95
96
  _mutate_decorators = [Remote];
96
97
  _openSettingsDocument_decorators = [Remote];
98
+ _openNamespaceDocument_decorators = [Remote];
97
99
  __esDecorate(this, null, _describe_decorators, { kind: "method", name: "describe", static: false, private: false, access: { has: obj => "describe" in obj, get: obj => obj.describe }, metadata: _metadata }, null, _instanceExtraInitializers);
98
100
  __esDecorate(this, null, _update_decorators, { kind: "method", name: "update", static: false, private: false, access: { has: obj => "update" in obj, get: obj => obj.update }, metadata: _metadata }, null, _instanceExtraInitializers);
99
101
  __esDecorate(this, null, _replace_decorators, { kind: "method", name: "replace", static: false, private: false, access: { has: obj => "replace" in obj, get: obj => obj.replace }, metadata: _metadata }, null, _instanceExtraInitializers);
100
102
  __esDecorate(this, null, _mutate_decorators, { kind: "method", name: "mutate", static: false, private: false, access: { has: obj => "mutate" in obj, get: obj => obj.mutate }, metadata: _metadata }, null, _instanceExtraInitializers);
101
103
  __esDecorate(this, null, _openSettingsDocument_decorators, { kind: "method", name: "openSettingsDocument", static: false, private: false, access: { has: obj => "openSettingsDocument" in obj, get: obj => obj.openSettingsDocument }, metadata: _metadata }, null, _instanceExtraInitializers);
104
+ __esDecorate(this, null, _openNamespaceDocument_decorators, { kind: "method", name: "openNamespaceDocument", static: false, private: false, access: { has: obj => "openNamespaceDocument" in obj, get: obj => obj.openNamespaceDocument }, metadata: _metadata }, null, _instanceExtraInitializers);
102
105
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
103
106
  }
104
107
  openTextFile = __runInitializers(this, _instanceExtraInitializers);
@@ -169,12 +172,27 @@ let SettingsController = (() => {
169
172
  * @throws RemoteError when no document exists, preparation fails, or opening fails.
170
173
  */
171
174
  async openSettingsDocument(signal) {
175
+ return this.openDocument(undefined, signal);
176
+ }
177
+ /** Open the document owning a registered namespace, including shared home-level model configuration.
178
+ * @param ns Registered settings namespace; the Host resolves its owning path.
179
+ * @param signal Caller lifetime before native handoff.
180
+ * @returns Confirmation once the native editor accepts the document.
181
+ * @throws RemoteError for invalid namespaces, preparation failure or rejected native handoff.
182
+ */
183
+ async openNamespaceDocument(ns, signal) {
184
+ const parsed = settingsNamespaceRequestSchema.safeParse({ ns });
185
+ if (!parsed.success)
186
+ throw new RemoteError('gateway/bad-request', 'invalid settings namespace', {});
187
+ return this.openDocument(parsed.data.ns, signal);
188
+ }
189
+ async openDocument(namespace, signal) {
172
190
  const settings = this.provider();
173
191
  if (isAborted(signal))
174
192
  throw new RemoteError('gateway/cancelled', 'settings document open was aborted', {});
175
193
  let path;
176
194
  try {
177
- path = await settings.prepareDocument();
195
+ path = await settings.prepareDocument(namespace);
178
196
  }
179
197
  catch (error) {
180
198
  if (isAborted(signal))
@@ -153,6 +153,26 @@ window.__ModuleLoader__.load({
153
153
  return result;
154
154
  }
155
155
  /**
156
+ * Request the Host's deletion scope for an archived root.
157
+ * @param sessionId - archived root to preview.
158
+ * @returns the Host deletion preview.
159
+ */
160
+ sessionDeletionScope(sessionId) {
161
+ return this.remote.sessionDeletionScope({ sessionId });
162
+ }
163
+ /**
164
+ * Request permanent deletion of exactly the confirmed Session scope.
165
+ * @param sessionId - archived root.
166
+ * @param expectedSessionIds - exact scope confirmed by the user.
167
+ * @returns the Host deletion result.
168
+ */
169
+ deleteSession(sessionId, expectedSessionIds) {
170
+ return this.remote.deleteSession({
171
+ sessionId,
172
+ expectedSessionIds
173
+ });
174
+ }
175
+ /**
156
176
  * Pin one Session and install the returned complete pin set.
157
177
  * A reply superseded by a later pin request or a pushed set installs nothing.
158
178
  * @param sessionId - Session to pin.
@@ -421,6 +441,16 @@ window.__ModuleLoader__.load({
421
441
  const result = await this.model.unarchiveSession(sessionId);
422
442
  if (!result.ok) throw commandError("session unarchive", result.error);
423
443
  }
444
+ async sessionDeletionScope(sessionId) {
445
+ const result = await this.model.sessionDeletionScope(sessionId);
446
+ if (!result.ok) throw new WorkspaceArchiveError(result.error);
447
+ return result.value.sessionIds;
448
+ }
449
+ async deleteSession(sessionId, expectedSessionIds) {
450
+ const result = await this.model.deleteSession(sessionId, expectedSessionIds);
451
+ if (!result.ok) throw new WorkspaceArchiveError(result.error);
452
+ return result.value.sessionIds;
453
+ }
424
454
  async pinSession(sessionId) {
425
455
  const result = await this.model.pinSession(sessionId);
426
456
  if (!result.ok) throw commandError("session pin", result.error);
@@ -1,6 +1,6 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { Remote, RemoteError, TypertRemoteService, remoteErrorOf } from "@deepseek-ai/dsh-typert-protocol";
3
- import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceUnknownSessionError, workspaceDomainState, workspaceRecord } from "@deepseek-ai/dsh-workspace";
3
+ import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceSessionDeletionError, WorkspaceUnknownSessionError, workspaceDomainState, workspaceRecord } from "@deepseek-ai/dsh-workspace";
4
4
  import { Deque } from "@deepseek-ai/dsh-deque";
5
5
  import { z as z$1 } from "zod";
6
6
  import { DirectoryPickerError } from "@deepseek-ai/dsh-host-directory-picker";
@@ -54,6 +54,34 @@ var WorkspaceFeed = class {
54
54
  ctx.on("domain/changed", (change) => {
55
55
  this.changed(change);
56
56
  });
57
+ ctx.on("workspace/refreshed", () => {
58
+ const baseline = this.baseline();
59
+ const ids = new Set(baseline.items.map((item) => String(item.workspaceId)));
60
+ for (const id of this.knownIds) if (!ids.has(id)) this.publish({
61
+ type: "remove",
62
+ workspaceId: WorkspaceId(id)
63
+ });
64
+ this.knownIds = ids;
65
+ for (const workspace of baseline.items) this.publish({
66
+ type: "upsert",
67
+ workspace
68
+ });
69
+ this.order = baseline.items.map((item) => String(item.workspaceId));
70
+ this.archived = baseline.archivedSessionIds.map(String);
71
+ this.pinned = baseline.pinnedSessionIds.map(String);
72
+ this.publish({
73
+ type: "order",
74
+ workspaceIds: baseline.items.map((item) => item.workspaceId)
75
+ });
76
+ this.publish({
77
+ type: "archived",
78
+ archivedSessionIds: baseline.archivedSessionIds
79
+ });
80
+ this.publish({
81
+ type: "pinned",
82
+ pinnedSessionIds: baseline.pinnedSessionIds
83
+ });
84
+ });
57
85
  ctx.effect(() => () => {
58
86
  for (const follower of this.followers) follower.close();
59
87
  this.followers.clear();
@@ -315,10 +343,38 @@ var WorkspaceCommands = class {
315
343
  * @returns the complete resulting archive set.
316
344
  */
317
345
  async unarchiveSession(request) {
318
- await this.ctx.workspaceRegistry.unarchiveSession(request.sessionId);
346
+ try {
347
+ await this.ctx.workspaceRegistry.unarchiveSession(request.sessionId);
348
+ } catch (error) {
349
+ throw deletionError(error, request.sessionId);
350
+ }
319
351
  return { archivedSessionIds: [...this.ctx.workspaceRegistry.archivedSessionIds] };
320
352
  }
321
353
  /**
354
+ * Preview the Session identities that would be permanently deleted.
355
+ * @param request - archived root to preview.
356
+ * @returns the complete deletion scope for confirmation.
357
+ */
358
+ async sessionDeletionScope(request) {
359
+ try {
360
+ return { sessionIds: await this.ctx.workspaceRegistry.sessionDeletionScope(request.sessionId) };
361
+ } catch (error) {
362
+ throw deletionError(error, request.sessionId);
363
+ }
364
+ }
365
+ /**
366
+ * Delete an archived root and exactly its confirmed owned subagent scope.
367
+ * @param request - root and user-confirmed deletion scope.
368
+ * @returns identities removed after persistence and owner cleanup complete.
369
+ */
370
+ async deleteSession(request) {
371
+ try {
372
+ return { sessionIds: await this.ctx.workspaceRegistry.deleteSession(request.sessionId, request.expectedSessionIds) };
373
+ } catch (error) {
374
+ throw deletionError(error, request.sessionId);
375
+ }
376
+ }
377
+ /**
322
378
  * Add one known unarchived Session to the registry-global pin set.
323
379
  * @param request - Session identity to pin.
324
380
  * @returns the complete resulting pin set, most recently pinned first.
@@ -358,6 +414,17 @@ var WorkspaceCommands = class {
358
414
  function workspaceNotFound(workspaceId) {
359
415
  return new RemoteError("workspace/not-found", `Workspace "${workspaceId}" not found`, { workspaceId });
360
416
  }
417
+ function deletionError(error, sessionId) {
418
+ if (error instanceof WorkspaceSessionDeletionError) return new RemoteError("workspace/session-delete-refused", "Session deletion refused", {
419
+ sessionId,
420
+ reason: error.reason
421
+ }, { cause: error });
422
+ if (error instanceof WorkspaceActiveSessionError) return new RemoteError("workspace/session-active", error.message, {
423
+ sessionId,
424
+ activity: error.activity
425
+ }, { cause: error });
426
+ return error;
427
+ }
361
428
  function errorMessage$1(error) {
362
429
  return error instanceof Error ? error.message : String(error);
363
430
  }
@@ -692,6 +759,8 @@ let WorkspaceController = (() => {
692
759
  let _insertSessionBefore_decorators;
693
760
  let _archiveSession_decorators;
694
761
  let _unarchiveSession_decorators;
762
+ let _sessionDeletionScope_decorators;
763
+ let _deleteSession_decorators;
695
764
  let _pinSession_decorators;
696
765
  let _unpinSession_decorators;
697
766
  let _follow_decorators;
@@ -706,6 +775,8 @@ let WorkspaceController = (() => {
706
775
  _insertSessionBefore_decorators = [Remote("insertSessionBefore")];
707
776
  _archiveSession_decorators = [Remote("archiveSession")];
708
777
  _unarchiveSession_decorators = [Remote("unarchiveSession")];
778
+ _sessionDeletionScope_decorators = [Remote("sessionDeletionScope")];
779
+ _deleteSession_decorators = [Remote("deleteSession")];
709
780
  _pinSession_decorators = [Remote("pinSession")];
710
781
  _unpinSession_decorators = [Remote("unpinSession")];
711
782
  _follow_decorators = [Remote({ mode: "stream" })];
@@ -797,6 +868,28 @@ let WorkspaceController = (() => {
797
868
  },
798
869
  metadata: _metadata
799
870
  }, null, _instanceExtraInitializers);
871
+ __esDecorate(this, null, _sessionDeletionScope_decorators, {
872
+ kind: "method",
873
+ name: "sessionDeletionScope",
874
+ static: false,
875
+ private: false,
876
+ access: {
877
+ has: (obj) => "sessionDeletionScope" in obj,
878
+ get: (obj) => obj.sessionDeletionScope
879
+ },
880
+ metadata: _metadata
881
+ }, null, _instanceExtraInitializers);
882
+ __esDecorate(this, null, _deleteSession_decorators, {
883
+ kind: "method",
884
+ name: "deleteSession",
885
+ static: false,
886
+ private: false,
887
+ access: {
888
+ has: (obj) => "deleteSession" in obj,
889
+ get: (obj) => obj.deleteSession
890
+ },
891
+ metadata: _metadata
892
+ }, null, _instanceExtraInitializers);
800
893
  __esDecorate(this, null, _pinSession_decorators, {
801
894
  kind: "method",
802
895
  name: "pinSession",
@@ -929,6 +1022,22 @@ let WorkspaceController = (() => {
929
1022
  return this.commands.unarchiveSession(request);
930
1023
  }
931
1024
  /**
1025
+ * Preview the archived root and owned subagent Sessions covered by deletion.
1026
+ * @param request - archived root to preview.
1027
+ * @returns complete deletion scope for confirmation.
1028
+ */
1029
+ sessionDeletionScope(request) {
1030
+ return this.commands.sessionDeletionScope(request);
1031
+ }
1032
+ /**
1033
+ * Permanently remove an archived Session and its confirmed owned subagents.
1034
+ * @param request - archived root and confirmed scope.
1035
+ * @returns identities permanently removed.
1036
+ */
1037
+ deleteSession(request) {
1038
+ return this.commands.deleteSession(request);
1039
+ }
1040
+ /**
932
1041
  * Surface one known unarchived Session ahead of unpinned Sessions.
933
1042
  * @param request - Session identity to pin.
934
1043
  * @returns the complete resulting pin set, most recently pinned first.