@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
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1025 1024"><path fill="#000" d="M733.373245 866.20891c-51.925994 51.978359-136.225239 51.978359-188.180813 0-20.439542-20.377984-32.450399-32.470785-32.450399-32.470785s-12.070017 12.092601-32.411625 32.470785c-52.039717 51.978359-136.282001 51.978359-188.262558 0-51.982956-51.994148-51.982956-136.245625 0-188.239773 14.445406-14.422621 159.008192-158.974016 159.008192-158.974016s-144.562786-144.526411-159.008192-158.971817c-51.982956-52.019331-51.982956-136.245625 0-188.239773 51.980557-51.969165 136.220642-51.969165 188.262558 0 20.341808 20.387177 32.411625 32.425416 32.411625 32.425416s12.010857-12.038238 32.450399-32.425416c51.955574-51.969165 136.254619-51.969165 188.180813 0 51.991949 51.994148 51.991949 136.220642 0 188.239973-14.438611 14.445406-158.998999 158.971817-158.998999 158.971817s144.562786 144.553593 158.998999 158.974016C785.365194 729.963485 785.365194 814.214762 733.373245 866.20891L733.373245 866.20891zM512.076284 580.006556c0 0-139.484829 140.8553-158.314863 159.665147-17.907259 17.882276-17.907259 46.934378 0 64.843836 17.884474 17.895867 46.952566 17.895867 64.871217 0 17.218526-17.252703 32.448-32.459393 32.448-32.459393l-49.096113-49.043748 61.679781-61.66619 49.077925 49.080124 49.046147-49.080124 61.679781 61.66619-49.030158 49.043748c0 0 15.14773 15.20689 32.414023 32.459393 17.961822 17.895867 46.96156 17.895867 64.843836 0 17.932242-17.907259 17.932242-46.96176 0-64.843836C652.895209 720.862056 512.076284 580.006556 512.076284 580.006556L512.076284 580.006556zM100.648033 486.572104c-8.93774 8.949132-13.381527 20.680379-13.381527 32.423017 0 11.758628 4.443787 23.476283 13.381527 32.427614 17.907259 17.895867 46.963958 17.895867 64.907593 0 14.538543-14.563526 32.411825-32.427614 32.411825-32.427614s-17.87548-17.870884-32.411825-32.423017C147.611991 468.651055 118.555292 468.651055 100.648033 486.572104L100.648033 486.572104zM671.693464 298.343523c17.932242-17.918651 17.932242-46.975351 0-64.868819-17.882276-17.92085-46.882214-17.92085-64.843836 0-17.266293 17.252703-32.414023 32.434409-32.414023 32.434409l49.030158 49.077925-61.679781 61.632013-49.043748-49.057339-49.077925 49.057339-61.679781-61.632013 49.07113-49.077925c0 0-15.20689-15.181907-32.423017-32.434409-17.918651-17.92085-46.986743-17.92085-64.8962 0-17.882276 17.893668-17.882276 46.950368 0 64.869019 18.855016 18.786863 158.342244 159.63097 158.342244 159.63097S652.895209 317.130386 671.693464 298.343523L671.693464 298.343523zM858.60134 486.572104c-14.538543 14.549935-32.414023 32.423017-32.414023 32.423017s17.873082 17.86169 32.414023 32.427614c17.918651 17.895867 46.998135 17.895867 64.902996 0 8.93774-8.951331 13.429295-20.668986 13.429295-32.427614 0-11.742638-4.493753-23.474085-13.429295-32.423017C905.597077 468.651055 876.517793 468.651055 858.60134 486.572104L858.60134 486.572104zM38.977245 613.109312c-25.981185-25.990379-38.976374-60.027301-38.976374-94.114191 0-34.084691 12.995189-68.119415 38.976374-94.111992 51.973762-52.003342 136.275205-52.003342 188.267155 0 14.888705 14.902296 32.411625 32.425416 32.411625 32.425416l49.043748-49.036953 61.691173 61.643406-49.102908 49.077925 49.102908 49.055141-61.691173 61.643406-49.043748-49.046147c0 0-17.523119 17.561693-32.411625 32.461791C175.250252 665.092267 90.951007 665.092267 38.977245 613.109312L38.977245 613.109312zM985.186316 613.109312c-51.996346 51.980557-136.295592 51.980557-188.27395 0-14.877313-14.902296-32.427614-32.457194-32.427614-32.457194l-49.057339 49.043748-61.66619-61.641207 49.084721-49.059737-49.084721-49.075527 61.66619-61.643406 49.057339 49.034754c0 0 17.550301-17.523119 32.427614-32.425416 51.978359-52.003342 136.282001-52.003342 188.27395 0 25.967594 25.992577 38.971977 60.0295 38.971977 94.114191C1024.158293 553.08201 1011.15391 587.119133 985.186316 613.109312L985.186316 613.109312z"/></svg>
@@ -1,3 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50.000000" height="50.000000" viewBox="0 0 50 50" fill="none">
2
- <path id="path" d="M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z" fill="#fff" fill-opacity="1.000000" fill-rule="nonzero"/>
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1025 1024"><path fill="#E90003" d="M733.373245 866.20891c-51.925994 51.978359-136.225239 51.978359-188.180813 0-20.439542-20.377984-32.450399-32.470785-32.450399-32.470785s-12.070017 12.092601-32.411625 32.470785c-52.039717 51.978359-136.282001 51.978359-188.262558 0-51.982956-51.994148-51.982956-136.245625 0-188.239773 14.445406-14.422621 159.008192-158.974016 159.008192-158.974016s-144.562786-144.526411-159.008192-158.971817c-51.982956-52.019331-51.982956-136.245625 0-188.239773 51.980557-51.969165 136.220642-51.969165 188.262558 0 20.341808 20.387177 32.411625 32.425416 32.411625 32.425416s12.010857-12.038238 32.450399-32.425416c51.955574-51.969165 136.254619-51.969165 188.180813 0 51.991949 51.994148 51.991949 136.220642 0 188.239973-14.438611 14.445406-158.998999 158.971817-158.998999 158.971817s144.562786 144.553593 158.998999 158.974016C785.365194 729.963485 785.365194 814.214762 733.373245 866.20891L733.373245 866.20891zM512.076284 580.006556c0 0-139.484829 140.8553-158.314863 159.665147-17.907259 17.882276-17.907259 46.934378 0 64.843836 17.884474 17.895867 46.952566 17.895867 64.871217 0 17.218526-17.252703 32.448-32.459393 32.448-32.459393l-49.096113-49.043748 61.679781-61.66619 49.077925 49.080124 49.046147-49.080124 61.679781 61.66619-49.030158 49.043748c0 0 15.14773 15.20689 32.414023 32.459393 17.961822 17.895867 46.96156 17.895867 64.843836 0 17.932242-17.907259 17.932242-46.96176 0-64.843836C652.895209 720.862056 512.076284 580.006556 512.076284 580.006556L512.076284 580.006556zM100.648033 486.572104c-8.93774 8.949132-13.381527 20.680379-13.381527 32.423017 0 11.758628 4.443787 23.476283 13.381527 32.427614 17.907259 17.895867 46.963958 17.895867 64.907593 0 14.538543-14.563526 32.411825-32.427614 32.411825-32.427614s-17.87548-17.870884-32.411825-32.423017C147.611991 468.651055 118.555292 468.651055 100.648033 486.572104L100.648033 486.572104zM671.693464 298.343523c17.932242-17.918651 17.932242-46.975351 0-64.868819-17.882276-17.92085-46.882214-17.92085-64.843836 0-17.266293 17.252703-32.414023 32.434409-32.414023 32.434409l49.030158 49.077925-61.679781 61.632013-49.043748-49.057339-49.077925 49.057339-61.679781-61.632013 49.07113-49.077925c0 0-15.20689-15.181907-32.423017-32.434409-17.918651-17.92085-46.986743-17.92085-64.8962 0-17.882276 17.893668-17.882276 46.950368 0 64.869019 18.855016 18.786863 158.342244 159.63097 158.342244 159.63097S652.895209 317.130386 671.693464 298.343523L671.693464 298.343523zM858.60134 486.572104c-14.538543 14.549935-32.414023 32.423017-32.414023 32.423017s17.873082 17.86169 32.414023 32.427614c17.918651 17.895867 46.998135 17.895867 64.902996 0 8.93774-8.951331 13.429295-20.668986 13.429295-32.427614 0-11.742638-4.493753-23.474085-13.429295-32.423017C905.597077 468.651055 876.517793 468.651055 858.60134 486.572104L858.60134 486.572104zM38.977245 613.109312c-25.981185-25.990379-38.976374-60.027301-38.976374-94.114191 0-34.084691 12.995189-68.119415 38.976374-94.111992 51.973762-52.003342 136.275205-52.003342 188.267155 0 14.888705 14.902296 32.411625 32.425416 32.411625 32.425416l49.043748-49.036953 61.691173 61.643406-49.102908 49.077925 49.102908 49.055141-61.691173 61.643406-49.043748-49.046147c0 0-17.523119 17.561693-32.411625 32.461791C175.250252 665.092267 90.951007 665.092267 38.977245 613.109312L38.977245 613.109312zM985.186316 613.109312c-51.996346 51.980557-136.295592 51.980557-188.27395 0-14.877313-14.902296-32.427614-32.457194-32.427614-32.457194l-49.057339 49.043748-61.66619-61.641207 49.084721-49.059737-49.084721-49.075527 61.66619-61.643406 49.057339 49.034754c0 0 17.550301-17.523119 32.427614-32.425416 51.978359-52.003342 136.282001-52.003342 188.27395 0 25.967594 25.992577 38.971977 60.0295 38.971977 94.114191C1024.158293 553.08201 1011.15391 587.119133 985.186316 613.109312L985.186316 613.109312z"/></svg>
@@ -1,3 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50.000000" height="50.000000" viewBox="0 0 50 50" fill="none">
2
- <path id="path" d="M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z" fill="#000" fill-opacity="1.000000" fill-rule="nonzero"/>
3
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1025 1024"><path fill="#E90003" d="M733.373245 866.20891c-51.925994 51.978359-136.225239 51.978359-188.180813 0-20.439542-20.377984-32.450399-32.470785-32.450399-32.470785s-12.070017 12.092601-32.411625 32.470785c-52.039717 51.978359-136.282001 51.978359-188.262558 0-51.982956-51.994148-51.982956-136.245625 0-188.239773 14.445406-14.422621 159.008192-158.974016 159.008192-158.974016s-144.562786-144.526411-159.008192-158.971817c-51.982956-52.019331-51.982956-136.245625 0-188.239773 51.980557-51.969165 136.220642-51.969165 188.262558 0 20.341808 20.387177 32.411625 32.425416 32.411625 32.425416s12.010857-12.038238 32.450399-32.425416c51.955574-51.969165 136.254619-51.969165 188.180813 0 51.991949 51.994148 51.991949 136.220642 0 188.239973-14.438611 14.445406-158.998999 158.971817-158.998999 158.971817s144.562786 144.553593 158.998999 158.974016C785.365194 729.963485 785.365194 814.214762 733.373245 866.20891L733.373245 866.20891zM512.076284 580.006556c0 0-139.484829 140.8553-158.314863 159.665147-17.907259 17.882276-17.907259 46.934378 0 64.843836 17.884474 17.895867 46.952566 17.895867 64.871217 0 17.218526-17.252703 32.448-32.459393 32.448-32.459393l-49.096113-49.043748 61.679781-61.66619 49.077925 49.080124 49.046147-49.080124 61.679781 61.66619-49.030158 49.043748c0 0 15.14773 15.20689 32.414023 32.459393 17.961822 17.895867 46.96156 17.895867 64.843836 0 17.932242-17.907259 17.932242-46.96176 0-64.843836C652.895209 720.862056 512.076284 580.006556 512.076284 580.006556L512.076284 580.006556zM100.648033 486.572104c-8.93774 8.949132-13.381527 20.680379-13.381527 32.423017 0 11.758628 4.443787 23.476283 13.381527 32.427614 17.907259 17.895867 46.963958 17.895867 64.907593 0 14.538543-14.563526 32.411825-32.427614 32.411825-32.427614s-17.87548-17.870884-32.411825-32.423017C147.611991 468.651055 118.555292 468.651055 100.648033 486.572104L100.648033 486.572104zM671.693464 298.343523c17.932242-17.918651 17.932242-46.975351 0-64.868819-17.882276-17.92085-46.882214-17.92085-64.843836 0-17.266293 17.252703-32.414023 32.434409-32.414023 32.434409l49.030158 49.077925-61.679781 61.632013-49.043748-49.057339-49.077925 49.057339-61.679781-61.632013 49.07113-49.077925c0 0-15.20689-15.181907-32.423017-32.434409-17.918651-17.92085-46.986743-17.92085-64.8962 0-17.882276 17.893668-17.882276 46.950368 0 64.869019 18.855016 18.786863 158.342244 159.63097 158.342244 159.63097S652.895209 317.130386 671.693464 298.343523L671.693464 298.343523zM858.60134 486.572104c-14.538543 14.549935-32.414023 32.423017-32.414023 32.423017s17.873082 17.86169 32.414023 32.427614c17.918651 17.895867 46.998135 17.895867 64.902996 0 8.93774-8.951331 13.429295-20.668986 13.429295-32.427614 0-11.742638-4.493753-23.474085-13.429295-32.423017C905.597077 468.651055 876.517793 468.651055 858.60134 486.572104L858.60134 486.572104zM38.977245 613.109312c-25.981185-25.990379-38.976374-60.027301-38.976374-94.114191 0-34.084691 12.995189-68.119415 38.976374-94.111992 51.973762-52.003342 136.275205-52.003342 188.267155 0 14.888705 14.902296 32.411625 32.425416 32.411625 32.425416l49.043748-49.036953 61.691173 61.643406-49.102908 49.077925 49.102908 49.055141-61.691173 61.643406-49.043748-49.046147c0 0-17.523119 17.561693-32.411625 32.461791C175.250252 665.092267 90.951007 665.092267 38.977245 613.109312L38.977245 613.109312zM985.186316 613.109312c-51.996346 51.980557-136.295592 51.980557-188.27395 0-14.877313-14.902296-32.427614-32.457194-32.427614-32.457194l-49.057339 49.043748-61.66619-61.641207 49.084721-49.059737-49.084721-49.075527 61.66619-61.643406 49.057339 49.034754c0 0 17.550301-17.523119 32.427614-32.425416 51.978359-52.003342 136.282001-52.003342 188.27395 0 25.967594 25.992577 38.971977 60.0295 38.971977 94.114191C1024.158293 553.08201 1011.15391 587.119133 985.186316 613.109312L985.186316 613.109312z"/></svg>
@@ -3,14 +3,18 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <!-- Static brand assets work before plugins load; PNG supports older Safari. -->
7
+ <link rel="shortcut icon" type="image/png" sizes="32x32" href="./chatcode-icon-32.png" />
8
+ <link rel="apple-touch-icon" sizes="180x180" href="./chatcode-apple-touch-icon.png" />
9
+ <link rel="mask-icon" href="./chatcode-mask-icon.svg" color="#E90003" />
6
10
  <link rel="manifest" href="./manifest.webmanifest" />
7
- <link rel="icon" type="image/svg+xml" href="./favicon-dark.svg" media="(prefers-color-scheme: dark)" />
8
- <link rel="icon" type="image/svg+xml" href="./favicon.svg" media="(prefers-color-scheme: light)" />
11
+ <link rel="icon" type="image/svg+xml" href="./favicon-dark.svg?v=unicom-1" media="(prefers-color-scheme: dark)" />
12
+ <link rel="icon" type="image/svg+xml" href="./favicon.svg?v=unicom-1" media="(prefers-color-scheme: light)" />
9
13
  <title>ChatCode CLI Local Build</title>
10
- <script type="module" crossorigin src="./assets/index-Q6zc2uHV.js"></script>
14
+ <script type="module" crossorigin src="./assets/index-Dz_cDcce.js"></script>
11
15
  <link rel="modulepreload" crossorigin href="./assets/vendor-CCJJTK99.js">
12
16
  <link rel="stylesheet" crossorigin href="./assets/vendor-BNsW4eBh.css">
13
- <link rel="stylesheet" crossorigin href="./assets/index-DUvMhLle.css">
17
+ <link rel="stylesheet" crossorigin href="./assets/index-D5kpKf--.css">
14
18
  </head>
15
19
  <body>
16
20
  <div id="root"></div>
@@ -3,14 +3,18 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <!-- Static brand assets work before plugins load; PNG supports older Safari. -->
7
+ <link rel="shortcut icon" type="image/png" sizes="32x32" href="./chatcode-icon-32.png" />
8
+ <link rel="apple-touch-icon" sizes="180x180" href="./chatcode-apple-touch-icon.png" />
9
+ <link rel="mask-icon" href="./chatcode-mask-icon.svg" color="#E90003" />
6
10
  <link rel="manifest" href="./manifest.webmanifest" />
7
- <link rel="icon" type="image/svg+xml" href="./favicon-dark.svg" media="(prefers-color-scheme: dark)" />
8
- <link rel="icon" type="image/svg+xml" href="./favicon.svg" media="(prefers-color-scheme: light)" />
11
+ <link rel="icon" type="image/svg+xml" href="./favicon-dark.svg?v=unicom-1" media="(prefers-color-scheme: dark)" />
12
+ <link rel="icon" type="image/svg+xml" href="./favicon.svg?v=unicom-1" media="(prefers-color-scheme: light)" />
9
13
  <title>ChatCode CLI Local Build</title>
10
- <script type="module" crossorigin src="./preview/bootstrap-DlVeEFeU.js"></script><script type="module" crossorigin src="./assets/index-Q6zc2uHV.js"></script>
14
+ <script type="module" crossorigin src="./preview/bootstrap-DlVeEFeU.js"></script><script type="module" crossorigin src="./assets/index-Dz_cDcce.js"></script>
11
15
  <link rel="modulepreload" crossorigin href="./assets/vendor-CCJJTK99.js">
12
16
  <link rel="stylesheet" crossorigin href="./assets/vendor-BNsW4eBh.css">
13
- <link rel="stylesheet" crossorigin href="./assets/index-DUvMhLle.css">
17
+ <link rel="stylesheet" crossorigin href="./assets/index-D5kpKf--.css">
14
18
  </head>
15
19
  <body>
16
20
  <div id="root"></div>
@@ -65,6 +65,7 @@
65
65
  "@deepseek-ai/dsh-subprocess-local": "workspace:*",
66
66
  "@deepseek-ai/dsh-experimental-auto-review": "workspace:*",
67
67
  "@deepseek-ai/dsh-experimental-speech-to-text": "workspace:*",
68
- "@deepseek-ai/dsh-experimental-voice-input-bundle": "workspace:*"
68
+ "@deepseek-ai/dsh-experimental-voice-input-bundle": "workspace:*",
69
+ "core-js": "3.50.0"
69
70
  }
70
71
  }
@@ -1,6 +1,7 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import { mkdir, realpath, stat } from "node:fs/promises";
3
3
  import { Service } from "@deepseek-ai/cordis";
4
+ import { SessionAlreadyOwnedError } from "@deepseek-ai/dsh-session-persistence";
4
5
  import { posix, win32 } from "node:path";
5
6
  import { z } from "zod";
6
7
  import { brandString } from "@deepseek-ai/dsh-brand";
@@ -87,6 +88,12 @@ var WorkspaceEntity = class {
87
88
  this.id = id;
88
89
  this.record = record;
89
90
  }
91
+ /** Replace the cached record without changing this entity's identity.
92
+ * @param record Latest validated workspace record.
93
+ */
94
+ replace(record) {
95
+ this.record = record;
96
+ }
90
97
  get path() {
91
98
  return this.record.path;
92
99
  }
@@ -171,23 +178,25 @@ var WorkspaceEntity = class {
171
178
  * rewrites the medium nor emits a change event.
172
179
  */
173
180
  async mutate(fn) {
174
- let next;
175
- try {
176
- next = await this.host.table().update(this.id, (current) => {
177
- const changed = fn(current);
178
- const sessionIds = changed.sessionIds.filter((id) => this.host.sessionPath(id) === changed.path);
179
- if (changed === current && sessionIds.length === current.sessionIds.length) throw unchangedSentinel;
180
- return {
181
- ...changed,
182
- sessionIds,
183
- updatedAt: (/* @__PURE__ */ new Date()).toISOString()
184
- };
185
- });
186
- } catch (error) {
187
- if (error === unchangedSentinel) return;
188
- throw error;
189
- }
190
- this.record = next;
181
+ await this.host.enqueue(async () => {
182
+ let next;
183
+ try {
184
+ next = await this.host.table().update(this.id, (current) => {
185
+ const changed = fn(current);
186
+ const sessionIds = changed.sessionIds.filter((id) => this.host.sessionPath(id) === changed.path);
187
+ if (changed === current && sessionIds.length === current.sessionIds.length) throw unchangedSentinel;
188
+ return {
189
+ ...changed,
190
+ sessionIds,
191
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
192
+ };
193
+ });
194
+ } catch (error) {
195
+ if (error === unchangedSentinel) return;
196
+ throw error;
197
+ }
198
+ this.record = next;
199
+ });
191
200
  }
192
201
  };
193
202
  //#endregion
@@ -244,7 +253,11 @@ const workspaceDomainState = z.object({
244
253
  workspaceIds: z.array(workspaceId),
245
254
  archivedSessionIds: z.array(sessionId).default([]),
246
255
  pinnedSessionIds: z.array(sessionId).default([]),
247
- pendingMutation: workspacePendingMutation.optional()
256
+ pendingMutation: workspacePendingMutation.optional(),
257
+ /** Payload deletion committed identities; old processes must never restore these Sessions. */
258
+ deletedSessionIds: z.array(sessionId).optional(),
259
+ /** Complete deletion scope retained until payloads and secondary owners finish cleanup. */
260
+ pendingSessionDeletion: z.array(sessionId).optional()
248
261
  });
249
262
  /**
250
263
  * The workspace domain spec: one `workspaces` table keyed by
@@ -274,6 +287,64 @@ const workspaceDomainSpec = defineDomain({
274
287
  * domain data form.
275
288
  * @module @deepseek-ai/dsh-workspace
276
289
  */
290
+ var __addDisposableResource = function(env, value, async) {
291
+ if (value !== null && value !== void 0) {
292
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
293
+ var dispose, inner;
294
+ if (async) {
295
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
296
+ dispose = value[Symbol.asyncDispose];
297
+ }
298
+ if (dispose === void 0) {
299
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
300
+ dispose = value[Symbol.dispose];
301
+ if (async) inner = dispose;
302
+ }
303
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
304
+ if (inner) dispose = function() {
305
+ try {
306
+ inner.call(this);
307
+ } catch (e) {
308
+ return Promise.reject(e);
309
+ }
310
+ };
311
+ env.stack.push({
312
+ value,
313
+ dispose,
314
+ async
315
+ });
316
+ } else if (async) env.stack.push({ async: true });
317
+ return value;
318
+ };
319
+ var __disposeResources = (function(SuppressedError) {
320
+ return function(env) {
321
+ function fail(e) {
322
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
323
+ env.hasError = true;
324
+ }
325
+ var r, s = 0;
326
+ function next() {
327
+ while (r = env.stack.pop()) try {
328
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
329
+ if (r.dispose) {
330
+ var result = r.dispose.call(r.value);
331
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
332
+ fail(e);
333
+ return next();
334
+ });
335
+ } else s |= 1;
336
+ } catch (e) {
337
+ fail(e);
338
+ }
339
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
340
+ if (env.hasError) throw env.error;
341
+ }
342
+ return next();
343
+ };
344
+ })(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
345
+ var e = new Error(message);
346
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
347
+ });
277
348
  /**
278
349
  * Brand a string as a {@link WorkspaceId}.
279
350
  * @param id - Raw workspace id string.
@@ -330,6 +401,21 @@ var WorkspaceArchivedSessionPinError = class extends Error {
330
401
  this.name = "WorkspaceArchivedSessionPinError";
331
402
  }
332
403
  };
404
+ /** Permanent deletion requires an archived root and no active Session ownership. */
405
+ var WorkspaceSessionDeletionError = class extends Error {
406
+ sessionId;
407
+ reason;
408
+ /**
409
+ * @param sessionId - identity whose lifecycle prevents the requested operation.
410
+ * @param reason - stable refusal discriminant shared by the Web and TUI.
411
+ */
412
+ constructor(sessionId, reason) {
413
+ super(`cannot delete session '${sessionId}': ${reason}`);
414
+ this.sessionId = sessionId;
415
+ this.reason = reason;
416
+ this.name = "WorkspaceSessionDeletionError";
417
+ }
418
+ };
333
419
  /** A workspace reorder named a source or anchor absent from the durable registry order. */
334
420
  var WorkspaceOrderInvalidError = class extends Error {
335
421
  workspaceId;
@@ -354,6 +440,7 @@ const compareHeaders = (left, right) => right.createdAt - left.createdAt || Stri
354
440
  var WorkspaceRegistry = class extends Service {
355
441
  static inject = ["storageDomain", "sessionPersistence"];
356
442
  table;
443
+ domain;
357
444
  global;
358
445
  state;
359
446
  entities = /* @__PURE__ */ new Map();
@@ -361,8 +448,11 @@ var WorkspaceRegistry = class extends Service {
361
448
  sessionPaths = /* @__PURE__ */ new Map();
362
449
  invalidSessionPaths = /* @__PURE__ */ new Map();
363
450
  operationTail = Promise.resolve();
451
+ stopping = false;
452
+ refreshedState = "";
364
453
  host = {
365
454
  table: () => this.requireTable(),
455
+ enqueue: (operation) => this.enqueueOperation(operation),
366
456
  sessionPath: (id) => this.sessionPaths.get(id),
367
457
  readSessionHeader: (id) => this.readSessionHeader(id),
368
458
  rememberSessionPath: (id, path) => {
@@ -376,21 +466,56 @@ var WorkspaceRegistry = class extends Service {
376
466
  /** Open the domain, finish bootstrap when required, and rebuild the ordered cache. */
377
467
  async [Service.init]() {
378
468
  const domain = await this.ctx.storageDomain.open(workspaceDomainSpec);
379
- this.ctx.effect(() => () => domain.close(), "workspace.domainClose");
469
+ this.domain = domain;
470
+ let timer;
471
+ this.ctx.effect(() => async () => {
472
+ this.stopping = true;
473
+ clearTimeout(timer);
474
+ await this.operationTail;
475
+ await domain.close();
476
+ }, "workspace.domainClose");
380
477
  this.table = domain.table("workspaces");
381
478
  this.global = domain.global;
382
479
  this.state = domain.global.get();
383
- await this.recoverPendingMutation();
384
- this.validateStoredState(this.state);
385
- if (!this.state.initialized) {
386
- const headers = await this.listStoredHeaders();
387
- await this.replaceHeaderIndex(headers);
388
- await this.bootstrap(headers);
389
- } else if (this.table.size > 0) await this.replaceHeaderIndex(await this.listStoredHeaders());
390
- await this.indexLiveSessions();
391
- this.validateStoredState(this.requireState());
392
- this.rebuildEntities();
393
- this.reportFilteredCandidates();
480
+ await domain.exclusive(async () => {
481
+ await domain.refresh();
482
+ this.state = domain.global.get();
483
+ await this.recoverPendingMutation();
484
+ await this.recoverSessionDeletion();
485
+ this.validateStoredState(this.requireState());
486
+ if (!this.requireState().initialized) {
487
+ const headers = await this.listStoredHeaders();
488
+ await this.replaceHeaderIndex(headers);
489
+ await this.bootstrap(headers);
490
+ } else if (this.requireTable().size > 0) await this.replaceHeaderIndex(await this.listStoredHeaders());
491
+ await this.indexLiveSessions();
492
+ this.validateStoredState(this.requireState());
493
+ this.rebuildEntities();
494
+ this.reportFilteredCandidates();
495
+ this.refreshedState = this.snapshotIdentity();
496
+ });
497
+ const poll = async () => {
498
+ try {
499
+ await this.refresh();
500
+ } catch (error) {
501
+ this.ctx.logger.warn(`workspace: shared state refresh failed: ${String(error)}`);
502
+ } finally {
503
+ if (!this.stopping) {
504
+ timer = setTimeout(() => {
505
+ poll();
506
+ }, 1500);
507
+ timer.unref();
508
+ }
509
+ }
510
+ };
511
+ timer = setTimeout(() => {
512
+ poll();
513
+ }, 1500);
514
+ timer.unref();
515
+ }
516
+ /** Refresh shared membership, pins and archives before reading a new view; never auto-attach detached sessions. */
517
+ refresh() {
518
+ return this.enqueueOperation(async () => {});
394
519
  }
395
520
  /**
396
521
  * Create or reuse a workspace for an existing directory. The fully qualified
@@ -504,6 +629,130 @@ var WorkspaceRegistry = class extends Service {
504
629
  get archivedSessionIds() {
505
630
  return this.requireState().archivedSessionIds;
506
631
  }
632
+ /** Permanently deleted identities retained for cross-process invalidation and stale-operation refusal. */
633
+ get deletedSessionIds() {
634
+ return this.requireState().deletedSessionIds ?? [];
635
+ }
636
+ /**
637
+ * Permanently delete an archived, inactive root and its owned subagent descendants.
638
+ * Independent forks are preserved. Reserve every writer before recording a recovery
639
+ * marker; a failure after that marker is retried on refresh or restart.
640
+ * @param sessionId - archived root identity; repeated deletion is idempotent.
641
+ * @param expectedIds - identities confirmed by the user; a changed scope refuses deletion.
642
+ * @returns deleted root and descendant identities after durable cleanup.
643
+ */
644
+ deleteSession(sessionId, expectedIds) {
645
+ return this.enqueueOperation(async () => {
646
+ const env_1 = {
647
+ stack: [],
648
+ error: void 0,
649
+ hasError: false
650
+ };
651
+ try {
652
+ if (this.deletedSessionIds.includes(sessionId)) return [sessionId];
653
+ if (!this.archivedSessionIds.includes(sessionId)) throw new WorkspaceSessionDeletionError(sessionId, "not-archived");
654
+ const ids = new Set(await this.collectSessionDeletionScope(sessionId));
655
+ if (expectedIds !== void 0 && (expectedIds.length !== ids.size || new Set(expectedIds).size !== ids.size || expectedIds.some((id) => !ids.has(id)))) throw new WorkspaceSessionDeletionError(sessionId, "scope-changed");
656
+ for (const id of ids) {
657
+ const activity = await this.ctx.waterfall("workspace/session-activity", { sessionId: id }, () => Promise.resolve([]));
658
+ if (activity.length > 0) throw new WorkspaceActiveSessionError(id, activity);
659
+ }
660
+ const targets = [...ids];
661
+ await this.ctx.parallel("session/delete-release", { sessionIds: targets });
662
+ for (const id of ids) if (this.ctx.get("sessions")?.get(id) !== void 0) throw new WorkspaceSessionDeletionError(id, "in-use");
663
+ const reservation = __addDisposableResource(env_1, await this.ctx.sessionPersistence.prepareDeletion(targets).catch((error) => {
664
+ if (error instanceof SessionAlreadyOwnedError) throw new WorkspaceSessionDeletionError(sessionId, "in-use");
665
+ throw error;
666
+ }), true);
667
+ await this.setState({
668
+ ...this.requireState(),
669
+ pendingSessionDeletion: targets
670
+ });
671
+ await reservation.commit();
672
+ await this.finishSessionDeletion(targets);
673
+ return targets;
674
+ } catch (e_1) {
675
+ env_1.error = e_1;
676
+ env_1.hasError = true;
677
+ } finally {
678
+ const result_1 = __disposeResources(env_1);
679
+ if (result_1) await result_1;
680
+ }
681
+ });
682
+ }
683
+ /**
684
+ * Preview the root and owned descendants without opening their histories.
685
+ * @param sessionId - archived root to preview.
686
+ * @returns identities to show in the deletion confirmation.
687
+ */
688
+ sessionDeletionScope(sessionId) {
689
+ return this.enqueueOperation(async () => {
690
+ if (!this.archivedSessionIds.includes(sessionId)) throw new WorkspaceSessionDeletionError(sessionId, "not-archived");
691
+ return this.collectSessionDeletionScope(sessionId);
692
+ });
693
+ }
694
+ async collectSessionDeletionScope(sessionId) {
695
+ const headers = await this.listStoredHeaders();
696
+ const ids = new Set([sessionId]);
697
+ for (let changed = true; changed;) {
698
+ changed = false;
699
+ for (const header of headers) if (header.origin === "subagent" && header.parentSession !== void 0 && ids.has(header.parentSession) && !ids.has(header.id)) {
700
+ ids.add(header.id);
701
+ changed = true;
702
+ }
703
+ }
704
+ return [...ids];
705
+ }
706
+ async recoverSessionDeletion() {
707
+ const env_2 = {
708
+ stack: [],
709
+ error: void 0,
710
+ hasError: false
711
+ };
712
+ try {
713
+ const ids = this.requireState().pendingSessionDeletion;
714
+ if (ids === void 0) return;
715
+ await __addDisposableResource(env_2, await this.ctx.sessionPersistence.prepareDeletion(ids), true).commit();
716
+ await this.finishSessionDeletion(ids);
717
+ } catch (e_2) {
718
+ env_2.error = e_2;
719
+ env_2.hasError = true;
720
+ } finally {
721
+ const result_2 = __disposeResources(env_2);
722
+ if (result_2) await result_2;
723
+ }
724
+ }
725
+ notifyDeleted(ids) {
726
+ try {
727
+ this.ctx.emit("session/deleted", ids);
728
+ } catch (error) {
729
+ this.ctx.logger.warn(`workspace: deletion listener failed: ${String(error)}`);
730
+ }
731
+ }
732
+ async finishSessionDeletion(ids) {
733
+ await this.ctx.parallel("session/deleting", { sessionIds: ids });
734
+ const removed = new Set(ids);
735
+ for (const [id, record] of this.requireTable().entries()) if (record.sessionIds.some((member) => removed.has(member))) await this.requireTable().update(id, (current) => ({
736
+ ...current,
737
+ sessionIds: current.sessionIds.filter((member) => !removed.has(member)),
738
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
739
+ }));
740
+ const state = this.requireState();
741
+ await this.setState({
742
+ ...state,
743
+ archivedSessionIds: state.archivedSessionIds.filter((id) => !removed.has(id)),
744
+ pinnedSessionIds: state.pinnedSessionIds.filter((id) => !removed.has(id)),
745
+ deletedSessionIds: [...new Set([...state.deletedSessionIds ?? [], ...ids])],
746
+ pendingSessionDeletion: void 0
747
+ });
748
+ for (const id of ids) {
749
+ this.headers.delete(id);
750
+ this.sessionPaths.delete(id);
751
+ this.invalidSessionPaths.delete(id);
752
+ }
753
+ this.rebuildEntities();
754
+ this.notifyDeleted(ids);
755
+ }
507
756
  /**
508
757
  * Archive one session durably. The session must exist (live or in session
509
758
  * persistence); its workspace accounting — or lack of one — is irrelevant.
@@ -550,6 +799,7 @@ var WorkspaceRegistry = class extends Service {
550
799
  */
551
800
  unarchiveSession(sessionId) {
552
801
  return this.enqueueOperation(async () => {
802
+ if (this.deletedSessionIds.includes(sessionId)) throw new WorkspaceSessionDeletionError(sessionId, "deleted");
553
803
  const state = this.requireState();
554
804
  if (!state.archivedSessionIds.includes(sessionId)) return;
555
805
  await this.setState({
@@ -610,6 +860,7 @@ var WorkspaceRegistry = class extends Service {
610
860
  * masquerade as an unknown session.
611
861
  */
612
862
  async sessionKnown(id) {
863
+ if (this.deletedSessionIds.includes(id)) return false;
613
864
  if (this.ctx.get("sessions")?.get(id) !== void 0) return true;
614
865
  if (this.headers.has(id)) return true;
615
866
  await this.indexHeaders(await this.listStoredHeaders());
@@ -854,10 +1105,13 @@ var WorkspaceRegistry = class extends Service {
854
1105
  }
855
1106
  }
856
1107
  rebuildEntities() {
857
- this.entities.clear();
1108
+ const ids = new Set(this.requireState().workspaceIds);
1109
+ for (const id of this.entities.keys()) if (!ids.has(id)) this.entities.delete(id);
858
1110
  for (const id of this.requireState().workspaceIds) {
859
1111
  const record = this.requireTable().get(id);
860
- this.entities.set(id, new WorkspaceEntity(this.host, id, record));
1112
+ const entity = this.entities.get(id);
1113
+ if (entity === void 0) this.entities.set(id, new WorkspaceEntity(this.host, id, record));
1114
+ else entity.replace(record);
861
1115
  }
862
1116
  }
863
1117
  async replaceHeaderIndex(headers) {
@@ -890,12 +1144,14 @@ var WorkspaceRegistry = class extends Service {
890
1144
  }
891
1145
  /** Every stored session's header, projected from the persistence snapshot listing. */
892
1146
  async listStoredHeaders() {
893
- return (await this.ctx.sessionPersistence.list()).map((snapshot) => snapshot.header);
1147
+ const snapshots = await this.ctx.sessionPersistence.list();
1148
+ const deleted = new Set(this.deletedSessionIds);
1149
+ return snapshots.map((snapshot) => snapshot.header).filter((header) => !deleted.has(header.id));
894
1150
  }
895
1151
  async indexLiveSessions() {
896
1152
  const sessions = this.ctx.get("sessions");
897
1153
  if (sessions === void 0) return;
898
- await this.indexHeaders(sessions.list().map((session) => session.header));
1154
+ await this.indexHeaders(sessions.list().filter((session) => !this.deletedSessionIds.includes(session.id)).map((session) => session.header));
899
1155
  }
900
1156
  reportFilteredCandidates() {
901
1157
  for (const entity of this.entities.values()) {
@@ -935,14 +1191,46 @@ var WorkspaceRegistry = class extends Service {
935
1191
  this.state = state;
936
1192
  }
937
1193
  enqueueOperation(operation) {
1194
+ if (this.stopping) return Promise.reject(/* @__PURE__ */ new Error("workspace registry is closing"));
938
1195
  const result = this.operationTail.then(async () => {
939
- await this.recoverPendingMutation();
940
- return await operation();
1196
+ const domain = this.domain;
1197
+ if (domain === void 0) throw new Error("workspace registry is not started yet");
1198
+ return await domain.exclusive(async () => {
1199
+ const before = JSON.stringify([...this.entities.values()].map((entity) => [entity.id, entity.sessionIds]));
1200
+ const previousDeleted = new Set(this.deletedSessionIds);
1201
+ await domain.refresh();
1202
+ const changed = this.snapshotIdentity() !== this.refreshedState;
1203
+ this.state = domain.global.get();
1204
+ const missingHeaders = [...this.requireTable().entries()].some(([, record]) => record.sessionIds.some((id) => !this.sessionPaths.has(id)));
1205
+ if (changed || missingHeaders) {
1206
+ await this.replaceHeaderIndex(await this.listStoredHeaders());
1207
+ await this.indexLiveSessions();
1208
+ this.rebuildEntities();
1209
+ }
1210
+ await this.recoverPendingMutation();
1211
+ await this.recoverSessionDeletion();
1212
+ const newlyDeleted = this.deletedSessionIds.filter((id) => !previousDeleted.has(id));
1213
+ if (newlyDeleted.length > 0) this.notifyDeleted(newlyDeleted);
1214
+ this.validateStoredState(this.requireState());
1215
+ const after = JSON.stringify([...this.entities.values()].map((entity) => [entity.id, entity.sessionIds]));
1216
+ if (changed || before !== after) try {
1217
+ this.ctx.emit("workspace/refreshed");
1218
+ } catch (error) {
1219
+ this.ctx.logger.warn(`workspace: refresh listener failed: ${String(error)}`);
1220
+ }
1221
+ this.refreshedState = this.snapshotIdentity();
1222
+ const result = await operation();
1223
+ this.refreshedState = this.snapshotIdentity();
1224
+ return result;
1225
+ });
941
1226
  });
942
1227
  this.operationTail = result.then(() => {}, () => {});
943
1228
  return result;
944
1229
  }
1230
+ snapshotIdentity() {
1231
+ return JSON.stringify([this.domain?.global.get(), [...this.requireTable().entries()]]);
1232
+ }
945
1233
  };
946
1234
  const sameSessionIds = (left, right) => left.length === right.length && left.every((id, index) => id === right[index]);
947
1235
  //#endregion
948
- export { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceRegistry, WorkspaceRegistry as default, WorkspaceUnknownSessionError, realpathNormalize, workspaceDomainSpec, workspaceDomainState, workspaceRecord };
1236
+ export { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceRegistry, WorkspaceRegistry as default, WorkspaceSessionDeletionError, WorkspaceUnknownSessionError, realpathNormalize, workspaceDomainSpec, workspaceDomainState, workspaceRecord };
@@ -1,6 +1,7 @@
1
1
  import "node:crypto";
2
2
  import "node:fs/promises";
3
3
  import { Service } from "@deepseek-ai/cordis";
4
+ import "@deepseek-ai/dsh-session-persistence";
4
5
  import "node:path";
5
6
  import { z } from "zod";
6
7
  import { brandString } from "@deepseek-ai/dsh-brand";
@@ -51,7 +52,11 @@ defineDomain({
51
52
  workspaceIds: z.array(workspaceId),
52
53
  archivedSessionIds: z.array(sessionId).default([]),
53
54
  pinnedSessionIds: z.array(sessionId).default([]),
54
- pendingMutation: workspacePendingMutation.optional()
55
+ pendingMutation: workspacePendingMutation.optional(),
56
+ /** Payload deletion committed identities; old processes must never restore these Sessions. */
57
+ deletedSessionIds: z.array(sessionId).optional(),
58
+ /** Complete deletion scope retained until payloads and secondary owners finish cleanup. */
59
+ pendingSessionDeletion: z.array(sessionId).optional()
55
60
  }),
56
61
  initial: {
57
62
  initialized: false,
@@ -24,6 +24,8 @@ export declare class WorkspaceMoveInvalidError extends Error {
24
24
  * index backing the `sessionIds` projection, and attach-time header reads.
25
25
  */
26
26
  export interface WorkspaceEntityHost {
27
+ /** Serialize entity writes with registry mutations and reload shared state under the writer lock. */
28
+ enqueue<T>(operation: () => Promise<T>): Promise<T>;
27
29
  /**
28
30
  * Resolve the open `workspaces` table.
29
31
  * @returns the table; throws while the registry has not started yet.
@@ -61,6 +63,10 @@ export declare class WorkspaceEntity implements Workspace {
61
63
  * @param record - The validated record snapshot loaded or just written.
62
64
  */
63
65
  constructor(host: WorkspaceEntityHost, id: WorkspaceId, record: WorkspaceRecord);
66
+ /** Replace the cached record without changing this entity's identity.
67
+ * @param record Latest validated workspace record.
68
+ */
69
+ replace(record: WorkspaceRecord): void;
64
70
  get path(): string;
65
71
  get title(): string;
66
72
  get createdAt(): string;