@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,280 @@
1
+ import { dirname, join } from "node:path";
2
+ import { randomBytes, timingSafeEqual } from "node:crypto";
3
+ import { mkdir, readFile, rm } from "node:fs/promises";
4
+ import { provideCmdline } from "@deepseek-ai/dsh-cmdline";
5
+ import { request } from "node:http";
6
+ import { connect } from "node:net";
7
+ import { Context } from "@deepseek-ai/cordis";
8
+ import { brandString } from "@deepseek-ai/dsh-brand";
9
+ import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
10
+ import * as WebStartup from "@deepseek-ai/dsh-web-app/startup";
11
+ //#region lib/types/web-instance.js
12
+ /** Private, verified Web instance discovery shared by terminal and standalone launches. */
13
+ const CONTROL_PATH = "/.chatcode-cli/web-instance";
14
+ const START_WAIT_MS = 12e4;
15
+ /** A usage diagnostic already printed by the Web app's own argument parser. */
16
+ var WebUsageError = class extends Error {
17
+ exitCode;
18
+ /** @param exitCode - exit status selected by the app argument parser. */
19
+ constructor(exitCode) {
20
+ super("Web command-line parsing finished");
21
+ this.exitCode = exitCode;
22
+ }
23
+ };
24
+ async function validateArguments(args) {
25
+ const ctx = new Context();
26
+ let code;
27
+ provideCmdline(ctx, {
28
+ args,
29
+ exit: (value) => {
30
+ code = value;
31
+ },
32
+ ready: { onReady: () => () => {} }
33
+ });
34
+ try {
35
+ WebStartup.apply(ctx);
36
+ } finally {
37
+ await ctx.fiber.dispose();
38
+ }
39
+ if (code !== void 0) throw new WebUsageError(code);
40
+ }
41
+ /** Resolve the private instance record under the launcher's canonical home.
42
+ * @param home - absolute ChatCode CLI home.
43
+ * @returns the one default Web registration path.
44
+ */
45
+ function webInstancePath(home) {
46
+ return join(home, "web", "instance.json");
47
+ }
48
+ function isRecord(value) {
49
+ return typeof value === "object" && value !== null && !Array.isArray(value);
50
+ }
51
+ function localUrl(value, token) {
52
+ if (typeof value !== "string") return void 0;
53
+ try {
54
+ const url = new URL(value);
55
+ if (url.protocol !== "http:" || url.hostname !== "127.0.0.1" || url.port === "" || url.username !== "" || url.password !== "" || url.hash !== "" || url.pathname !== "/") return void 0;
56
+ if (token ? !url.searchParams.get("token") : url.search !== "") return void 0;
57
+ return url;
58
+ } catch {
59
+ return;
60
+ }
61
+ }
62
+ async function readInstance(path) {
63
+ let text;
64
+ try {
65
+ text = await readFile(path, "utf8");
66
+ } catch (error) {
67
+ if (error.code === "ENOENT") return void 0;
68
+ throw error;
69
+ }
70
+ let value;
71
+ try {
72
+ value = JSON.parse(text);
73
+ } catch (_invalidJson) {
74
+ throw new Error("Web 实例登记无法解析;未启动或关闭任何进程。");
75
+ }
76
+ if (!isRecord(value) || value.version !== 1 || typeof value.id !== "string" || typeof value.pid !== "number" || !Number.isInteger(value.pid) || value.pid < 1 || value.pid > 2147483647 || typeof value.secret !== "string" || !/^[a-f0-9]{64}$/u.test(value.secret) || typeof value.origin !== "string" || localUrl(value.origin, false) === void 0) throw new Error("Web 实例登记无效;未启动或关闭任何进程。");
77
+ return {
78
+ version: 1,
79
+ id: brandString(value.id),
80
+ pid: value.pid,
81
+ origin: value.origin,
82
+ secret: value.secret
83
+ };
84
+ }
85
+ function processExists(pid) {
86
+ try {
87
+ process.kill(pid, 0);
88
+ return true;
89
+ } catch (error) {
90
+ if (error.code === "ESRCH") return false;
91
+ throw error;
92
+ }
93
+ }
94
+ /** Local HTTP avoids inherited proxies and never follows a redirect carrying the management secret. */
95
+ async function control(record, method) {
96
+ return new Promise((resolve, reject) => {
97
+ const req = request(`${record.origin}${CONTROL_PATH}`, {
98
+ method,
99
+ headers: {
100
+ authorization: `Bearer ${record.secret}`,
101
+ connection: "close"
102
+ }
103
+ }, (res) => {
104
+ const chunks = [];
105
+ let size = 0;
106
+ res.on("data", (chunk) => {
107
+ size += chunk.length;
108
+ if (size > 16384) req.destroy(/* @__PURE__ */ new Error("Web 实例响应过大。"));
109
+ else chunks.push(chunk);
110
+ });
111
+ res.on("error", reject);
112
+ res.on("end", () => {
113
+ try {
114
+ if (res.statusCode !== 200) throw new Error("Web 实例未通过认证;不会复用或关闭此端口上的其他服务。");
115
+ const value = JSON.parse(Buffer.concat(chunks).toString("utf8"));
116
+ if (!isRecord(value) || value.id !== record.id || value.pid !== record.pid || localUrl(value.url, true)?.origin !== record.origin || typeof value.url !== "string") throw new Error("Web 实例身份不匹配;未关闭任何进程。");
117
+ resolve({
118
+ id: record.id,
119
+ pid: record.pid,
120
+ url: value.url
121
+ });
122
+ } catch (error) {
123
+ reject(error instanceof Error ? error : new Error("Web 实例响应无效。", { cause: error }));
124
+ }
125
+ });
126
+ });
127
+ req.setTimeout(2e3, () => req.destroy(/* @__PURE__ */ new Error("Web 实例暂未响应;请稍后重试。")));
128
+ req.on("error", (error) => {
129
+ if (error.code === "ECONNREFUSED") resolve(void 0);
130
+ else reject(error);
131
+ });
132
+ req.end();
133
+ });
134
+ }
135
+ /** Install authenticated local control routes and publish only after the profile is ready.
136
+ * @param ctx - root profile context, after the application tree has settled.
137
+ * @param registration - random process identity and private record path.
138
+ * @param stop - whole-profile shutdown, invoked only for authenticated explicit off requests.
139
+ * @returns after the initial registration has been written; returns without registering for help-only launches.
140
+ */
141
+ async function registerWebInstance(ctx, registration, stop) {
142
+ if (ctx.get("webServer") === void 0 || ctx.get("connection") === void 0) return;
143
+ let disposed = false;
144
+ let published = Promise.resolve();
145
+ const status = () => {
146
+ const web = ctx.get("webServer");
147
+ const connection = ctx.get("connection");
148
+ if (web === void 0 || connection === void 0) throw new Error("Web 服务正在重载。");
149
+ return {
150
+ id: registration.id,
151
+ pid: process.pid,
152
+ url: connection.authenticatedUrl(`http://127.0.0.1:${web.port}`)
153
+ };
154
+ };
155
+ ctx.inject(["webServer", "connection"], (owner) => {
156
+ owner.effect(() => owner.webServer.register({
157
+ kind: "exact",
158
+ path: CONTROL_PATH,
159
+ handler(req, res) {
160
+ res.setHeader("cache-control", "no-store");
161
+ const auth = req.headers.authorization ?? "";
162
+ const expected = `Bearer ${registration.secret}`;
163
+ if (![
164
+ "127.0.0.1",
165
+ "::ffff:127.0.0.1",
166
+ "::1"
167
+ ].includes(req.socket.remoteAddress ?? "") || Buffer.byteLength(auth) !== Buffer.byteLength(expected) || !timingSafeEqual(Buffer.from(auth), Buffer.from(expected))) {
168
+ res.writeHead(401).end();
169
+ return;
170
+ }
171
+ if (req.method !== "GET" && req.method !== "POST") {
172
+ res.writeHead(405).end();
173
+ return;
174
+ }
175
+ if (disposed) {
176
+ res.writeHead(503).end();
177
+ return;
178
+ }
179
+ res.setHeader("content-type", "application/json");
180
+ if (req.method === "POST") res.once("finish", stop);
181
+ res.end(JSON.stringify(status()));
182
+ }
183
+ }));
184
+ const current = status();
185
+ published = published.then(() => writeFileAtomic(registration.path, JSON.stringify({
186
+ version: 1,
187
+ id: current.id,
188
+ pid: current.pid,
189
+ origin: new URL(current.url).origin,
190
+ secret: registration.secret
191
+ }), {
192
+ mode: 384,
193
+ dirMode: 448
194
+ }));
195
+ return published;
196
+ });
197
+ ctx.effect(() => async () => {
198
+ disposed = true;
199
+ await published;
200
+ if ((await readInstance(registration.path))?.id === registration.id) await rm(registration.path, { force: true });
201
+ });
202
+ await ctx.loader.await();
203
+ await published;
204
+ }
205
+ function listenerOpen(origin) {
206
+ return new Promise((resolve, reject) => {
207
+ const socket = connect({
208
+ host: "127.0.0.1",
209
+ port: Number(new URL(origin).port)
210
+ });
211
+ socket.once("connect", () => {
212
+ socket.destroy();
213
+ resolve(true);
214
+ });
215
+ socket.setTimeout(1e3, () => {
216
+ socket.destroy();
217
+ resolve(true);
218
+ });
219
+ socket.once("error", (error) => {
220
+ socket.destroy();
221
+ if (error.code === "ECONNREFUSED") resolve(false);
222
+ else reject(error);
223
+ });
224
+ });
225
+ }
226
+ /** Start once or reopen a verified existing instance; off waits for its listener to close.
227
+ * @param options - canonical home, app arguments, and launcher-owned boot/browser operations.
228
+ * @returns after boot, reuse, or an explicit stop has settled.
229
+ */
230
+ async function runManagedWeb(options) {
231
+ const action = options.args[0] === "on" || options.args[0] === "off" ? options.args[0] : "on";
232
+ const args = options.args[0] === action ? options.args.slice(1) : options.args;
233
+ const portFlag = args.findIndex((arg) => arg === "--port" || arg.startsWith("--port="));
234
+ const port = portFlag < 0 ? void 0 : args[portFlag]?.split("=")[1] ?? args[portFlag + 1];
235
+ if (args.includes("--help") || args.includes("-h") || port === "0") {
236
+ if (action === "off" && port === "0") throw new Error("Web off 不支持随机端口。");
237
+ await options.start(void 0, args);
238
+ return;
239
+ }
240
+ await validateArguments(args);
241
+ const path = webInstancePath(options.home);
242
+ await mkdir(dirname(path), {
243
+ recursive: true,
244
+ mode: 448
245
+ });
246
+ await withFileLock(path, async () => {
247
+ const record = await readInstance(path);
248
+ const existing = record !== void 0 && processExists(record.pid) ? await control(record, "GET") : void 0;
249
+ if (record !== void 0 && processExists(record.pid) && existing === void 0) throw new Error("登记的 Web 进程仍在运行,但服务尚未就绪;请稍后重试,不会重复启动。");
250
+ if (existing !== void 0 && record !== void 0) {
251
+ if (port !== void 0 && Number(port) !== Number(new URL(existing.url).port)) throw new Error("已有 Web 实例使用不同端口;请先执行 cco web off,再指定新端口启动。");
252
+ if (action === "off") {
253
+ await control(record, "POST");
254
+ const deadline = Date.now() + 6e3;
255
+ while (await listenerOpen(record.origin)) {
256
+ if (Date.now() >= deadline) throw new Error("Web 正在关闭,但端口尚未释放;请稍后重试。");
257
+ await new Promise((resolve) => setTimeout(resolve, 50));
258
+ }
259
+ if ((await readInstance(path))?.id === record.id) await rm(path, { force: true });
260
+ options.print("cco web: stopped");
261
+ } else {
262
+ options.print(`cco web: ${existing.url}`);
263
+ if (!args.includes("--no-open")) await options.open(existing.url);
264
+ }
265
+ return;
266
+ }
267
+ if (record !== void 0) await rm(path, { force: true });
268
+ if (action === "off") {
269
+ options.print("cco web: stopped");
270
+ return;
271
+ }
272
+ await options.start({
273
+ path,
274
+ id: brandString(randomBytes(16).toString("hex")),
275
+ secret: randomBytes(32).toString("hex")
276
+ }, args);
277
+ }, { waitMs: START_WAIT_MS });
278
+ }
279
+ //#endregion
280
+ export { webInstancePath as i, registerWebInstance as n, runManagedWeb as r, WebUsageError as t };
@@ -1,8 +1,8 @@
1
- import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-DeCjoRQP.js";
1
+ import { a as compositionRoot, i as bindCallerEffect, n as activationFiber, o as concreteService, s as requirePluginCaller } from "./host-access-B0CRAwsX.js";
2
2
  import { fileURLToPath, pathToFileURL } from "node:url";
3
3
  import { basename, isAbsolute, resolve } from "node:path";
4
4
  import { Service } from "@deepseek-ai/cordis";
5
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.16_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspaces.js
5
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.19_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspaces.js
6
6
  /**
7
7
  * Workspace-target extension seam for terminal front doors.
8
8
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chatcode/chatcode-cli",
3
3
  "description": "ChatCode CLI: TUI-first coding agent, Web launcher, profiles, and legacy DSH-compatible plugins",
4
- "version": "3.0.3",
4
+ "version": "3.0.4-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -28,14 +28,15 @@
28
28
  "dependencies": {
29
29
  "@agentclientprotocol/sdk": "1.4.0",
30
30
  "@babel/code-frame": "^7.29.0",
31
- "@chatcode/cco-better-sidebar": "0.18.0-rc.3",
31
+ "@chatcode/cco-better-sidebar": "0.18.0-rc.7",
32
32
  "@chatcode/cco-builtin-browser": "0.1.21",
33
- "@chatcode/cco-chat-import": "0.15.0",
34
- "@chatcode/cco-llm-chatcode-config": "0.1.4-rc.4",
35
- "@chatcode/cco-market": "1.45.2-rc.3",
36
- "@chatcode/cco-tui": "0.10.0-rc.16",
33
+ "@chatcode/cco-chat-import": "0.16.0",
34
+ "@chatcode/cco-computer-use": "0.3.2",
35
+ "@chatcode/cco-llm-chatcode-config": "0.1.4-rc.8",
36
+ "@chatcode/cco-market": "1.45.2-rc.4",
37
+ "@chatcode/cco-tui": "0.10.0-rc.19",
37
38
  "@deepseek-ai/libreoffice-kit": "^0.1.1",
38
- "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.16",
39
+ "@deepseek-harness-tui/dsh-tui": "npm:@chatcode/cco-tui@0.10.0-rc.19",
39
40
  "@earendil-works/pi-ai": "^0.85.1",
40
41
  "@eslint-community/regexpp": "^4.12.2",
41
42
  "@joplin/turndown-plugin-gfm": "^1.0.67",
@@ -57,11 +58,12 @@
57
58
  "commander": "^15.0.0",
58
59
  "compression": "^1.8.1",
59
60
  "diff": "^9.0.0",
60
- "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.3",
61
+ "dsh-better-sidebar": "npm:@chatcode/cco-better-sidebar@0.18.0-rc.7",
61
62
  "dsh-builtin-browser": "npm:@chatcode/cco-builtin-browser@0.1.21",
62
- "dsh-chat-import": "npm:@chatcode/cco-chat-import@0.15.0",
63
- "dsh-llm-chatcode-config": "npm:@chatcode/cco-llm-chatcode-config@0.1.4-rc.4",
64
- "dshmarket": "npm:@chatcode/cco-market@1.45.2-rc.3",
63
+ "dsh-chat-import": "npm:@chatcode/cco-chat-import@0.16.0",
64
+ "dsh-computer-use": "npm:@chatcode/cco-computer-use@0.3.2",
65
+ "dsh-llm-chatcode-config": "npm:@chatcode/cco-llm-chatcode-config@0.1.4-rc.8",
66
+ "dshmarket": "npm:@chatcode/cco-market@1.45.2-rc.4",
65
67
  "eventsource-parser": "^3.1.0",
66
68
  "execa": "^10.0.0",
67
69
  "fflate": "^0.8.2",
@@ -87,6 +89,7 @@
87
89
  "zod": "^4.4.3"
88
90
  },
89
91
  "devDependencies": {
92
+ "playwright": "^1.49.0",
90
93
  "@agentclientprotocol/sdk": "1.4.0",
91
94
  "@types/js-yaml": "^4.0.9",
92
95
  "@types/ws": "8.18.1",
@@ -95,45 +98,45 @@
95
98
  "ws": "8.21.0",
96
99
  "@deepseek-ai/dsh-acp": "0.1.7-rc.2",
97
100
  "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
98
- "@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
101
+ "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
99
102
  "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
103
+ "@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
100
104
  "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
101
105
  "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
102
- "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
106
+ "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
107
+ "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
103
108
  "@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.1.7-rc.2",
104
- "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
105
- "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
106
- "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
107
109
  "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
108
- "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
109
- "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
110
+ "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
111
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
110
112
  "@deepseek-ai/dsh-agent-loop": "0.1.7-rc.2",
111
- "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
112
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
113
- "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
114
- "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
115
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
113
+ "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
114
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
116
115
  "@deepseek-ai/dsh-llm-deepseek-account": "0.1.7-rc.2",
117
- "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
116
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
118
117
  "@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
118
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
119
119
  "@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
120
- "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
120
+ "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
121
+ "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
121
122
  "@deepseek-ai/dsh-loader-smoke": "0.1.7-rc.2",
122
- "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
123
- "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
123
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
124
124
  "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
125
+ "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
126
+ "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
125
127
  "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
126
128
  "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
127
- "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
129
+ "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
130
+ "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
128
131
  "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
129
132
  "@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
130
- "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
133
+ "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
131
134
  "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
132
- "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
133
- "@deepseek-ai/dsh-session": "0.1.7-rc.2",
134
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
135
+ "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
136
+ "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2",
135
137
  "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2",
136
- "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2"
138
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
139
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2"
137
140
  },
138
141
  "exports": {
139
142
  "./headless-compat": {
@@ -104,6 +104,7 @@
104
104
  "@deepseek-ai/dsh-compaction-basic",
105
105
  "@deepseek-ai/dsh-compaction-image-offload",
106
106
  "@deepseek-ai/dsh-compaction-tool-result-pruner",
107
+ "@deepseek-ai/dsh-computer-use",
107
108
  "@deepseek-ai/dsh-config-editor",
108
109
  "@deepseek-ai/dsh-cordis-client-runner",
109
110
  "@deepseek-ai/dsh-cordis-host-runner",
@@ -230,6 +231,7 @@
230
231
  "@deepseek-ai/dsh-system-prompt",
231
232
  "@deepseek-ai/dsh-terminal",
232
233
  "@deepseek-ai/dsh-terminal-bash",
234
+ "@deepseek-ai/dsh-tianti",
233
235
  "@deepseek-ai/dsh-time-context",
234
236
  "@deepseek-ai/dsh-timeout",
235
237
  "@deepseek-ai/dsh-tmux-context",
@@ -280,6 +282,6 @@
280
282
  "@deepseek-ai/node-addon-system",
281
283
  "@deepseek-ai/schemastery"
282
284
  ],
283
- "fileCount": 3555,
284
- "byteCount": 66580718
285
+ "fileCount": 3608,
286
+ "byteCount": 68755603
285
287
  }
@@ -1,8 +1,9 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
2
+ import { mkdir } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
3
4
  import { Service } from "@deepseek-ai/cordis";
4
5
  import z from "@deepseek-ai/schemastery";
5
- import { writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
6
+ import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
6
7
  import { resolveChatCodeCliHome } from "@deepseek-ai/dsh-home-paths";
7
8
  import { ReasoningEffortId } from "@deepseek-ai/dsh-llm";
8
9
  //#region lib/types/index.js
@@ -17,18 +18,24 @@ function selection(settings) {
17
18
  };
18
19
  }
19
20
  /** Parse one product-wide model preference without accepting partial records. */
20
- function sharedSelection(path) {
21
+ function sharedPreference(path, warn) {
21
22
  try {
22
23
  const parsed = JSON.parse(readFileSync(path, "utf8"));
23
- if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
24
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("expected a model preference object");
24
25
  const record = parsed;
25
- if (typeof record.provider !== "string" || record.provider.length === 0 || typeof record.model !== "string" || record.model.length === 0) return void 0;
26
- return selection({
26
+ if (typeof record.provider !== "string" || record.provider.length === 0 || typeof record.model !== "string" || record.model.length === 0) throw new Error("expected non-empty provider and model IDs");
27
+ const route = selection({
27
28
  provider: record.provider,
28
29
  model: record.model,
29
30
  ...typeof record.reasoningEffort === "string" && record.reasoningEffort.length > 0 ? { reasoningEffort: record.reasoningEffort } : {}
30
31
  });
31
- } catch (_error) {
32
+ const displayName = typeof record.displayName === "string" ? record.displayName.trim() : "";
33
+ return {
34
+ selection: route,
35
+ ...displayName === "" ? {} : { displayName }
36
+ };
37
+ } catch (error) {
38
+ if (error.code !== "ENOENT") warn(`Cannot read model preference at ${path}: ${String(error)}`);
32
39
  return;
33
40
  }
34
41
  }
@@ -43,6 +50,9 @@ var AgentDefaultModelConfig = class extends Service {
43
50
  saves = Promise.resolve();
44
51
  sharedPath;
45
52
  shared;
53
+ displayName;
54
+ awaitingDefault = false;
55
+ allowCatalogDefault = false;
46
56
  static Config = z.object({
47
57
  provider: z.string().required().volatile(),
48
58
  model: z.string().required().volatile(),
@@ -53,16 +63,47 @@ var AgentDefaultModelConfig = class extends Service {
53
63
  this.ownerContext = ownerContext;
54
64
  this.config = config;
55
65
  this.sharedPath = process.env[PRODUCT_VERSION_ENV]?.trim() ? join(resolveChatCodeCliHome(), SHARED_MODEL_FILENAME) : void 0;
56
- if (this.sharedPath !== void 0) this.shared = sharedSelection(existsSync(this.sharedPath) ? this.sharedPath : join(resolveChatCodeCliHome(), "tui", SHARED_MODEL_FILENAME));
66
+ if (this.sharedPath !== void 0) {
67
+ const stored = sharedPreference(existsSync(this.sharedPath) ? this.sharedPath : join(resolveChatCodeCliHome(), "tui", SHARED_MODEL_FILENAME), (message) => {
68
+ ownerContext.logger.warn(message);
69
+ });
70
+ const reasoningEffort = config.reasoningEffort.get();
71
+ this.shared = stored?.selection ?? selection({
72
+ provider: config.provider.get(),
73
+ model: config.model.get(),
74
+ ...reasoningEffort === void 0 ? {} : { reasoningEffort }
75
+ });
76
+ this.awaitingDefault = stored === void 0 && (this.shared.provider === "" || this.shared.model === "");
77
+ this.allowCatalogDefault = stored === void 0;
78
+ this.displayName = stored?.displayName;
79
+ }
57
80
  ownerContext.inject(["settings"], (child) => {
58
81
  child.effect(() => child.settings.configure({ auto: false }, ownerContext.fiber));
59
82
  });
83
+ ownerContext.effect(() => () => this.saves);
60
84
  }
61
85
  /**
62
86
  * Read the current default model selection.
87
+ * A first launch without a valid preference adopts the first complete Config
88
+ * default when it arrives; that process-local choice then stays cached.
63
89
  * @returns a detached provider, model, and optional reasoning selection.
64
90
  */
65
91
  currentSelection() {
92
+ if (this.awaitingDefault) {
93
+ const provider = this.config.provider.get();
94
+ const model = this.config.model.get();
95
+ if (provider === "" || model === "") return {
96
+ provider: "",
97
+ model: ""
98
+ };
99
+ const reasoningEffort = this.config.reasoningEffort.get();
100
+ this.shared = selection({
101
+ provider,
102
+ model,
103
+ ...reasoningEffort === void 0 ? {} : { reasoningEffort }
104
+ });
105
+ this.awaitingDefault = false;
106
+ }
66
107
  if (this.shared !== void 0) return { ...this.shared };
67
108
  const reasoningEffort = this.config.reasoningEffort.get();
68
109
  return selection({
@@ -71,14 +112,84 @@ var AgentDefaultModelConfig = class extends Service {
71
112
  ...reasoningEffort === void 0 ? {} : { reasoningEffort }
72
113
  });
73
114
  }
115
+ /** Whether this product uses a process-local selection initialized from Home at startup.
116
+ * @returns true for the integrated ChatCode CLI and Web profiles.
117
+ */
118
+ usesSharedPreference() {
119
+ return this.sharedPath !== void 0;
120
+ }
121
+ /** Resolve the cached route against the live catalog without reading or writing preferences.
122
+ * A first launch without a valid preference may adopt an advertised fallback
123
+ * until its first available default is resolved. Saved or initialized choices
124
+ * never switch implicitly. Catalog errors preserve the candidate for retry.
125
+ * @returns the exact available selection, an unverified candidate, or an empty provider/model pair.
126
+ */
127
+ async resolveSelection() {
128
+ const route = this.currentSelection();
129
+ if (!this.usesSharedPreference()) return route;
130
+ const llm = this.ctx.get("llm");
131
+ if (llm === void 0) return route;
132
+ const cached = this.shared;
133
+ const providers = llm.listProviders();
134
+ let routeModels = [];
135
+ if (providers.some((provider) => provider.id === route.provider)) {
136
+ try {
137
+ routeModels = await llm.listModels(route.provider);
138
+ } catch (_error) {
139
+ if (this.shared !== cached) return this.resolveSelection();
140
+ return route;
141
+ }
142
+ if (this.shared !== cached) return this.resolveSelection();
143
+ if (routeModels.some((model) => model.id === route.model)) {
144
+ this.allowCatalogDefault = false;
145
+ return route;
146
+ }
147
+ }
148
+ if (!this.allowCatalogDefault) return {
149
+ provider: "",
150
+ model: ""
151
+ };
152
+ for (const provider of providers) {
153
+ const models = provider.id === route.provider ? routeModels : await llm.listModels(provider.id).catch(() => []);
154
+ if (this.shared !== cached) return this.resolveSelection();
155
+ const model = models[0];
156
+ if (model === void 0) continue;
157
+ this.shared = {
158
+ provider: provider.id,
159
+ model: model.id
160
+ };
161
+ this.awaitingDefault = false;
162
+ this.allowCatalogDefault = false;
163
+ return { ...this.shared };
164
+ }
165
+ return {
166
+ provider: "",
167
+ model: ""
168
+ };
169
+ }
170
+ /** Read this process's cached display name without observing another process's saves.
171
+ * @returns The saved provider/model/name tuple, or undefined for missing or invalid name metadata.
172
+ */
173
+ sharedDisplayName() {
174
+ if (this.sharedPath === void 0) return void 0;
175
+ if (this.displayName === void 0) return void 0;
176
+ const route = this.currentSelection();
177
+ return {
178
+ provider: route.provider,
179
+ model: route.model,
180
+ name: this.displayName
181
+ };
182
+ }
74
183
  /**
75
184
  * Save the complete default model selection to the shared ChatCode Home file,
76
185
  * or the owning profile entry in other deployments. Saves commit in submission
77
186
  * order; a failed save rejects its caller without blocking later saves.
187
+ * A shared save uses the caller's already resolved catalog name without an additional lookup.
78
188
  * @param next - resolved selection accepted by an entry point.
189
+ * @param name - optional display name from the entry point's catalog.
79
190
  * @returns fulfillment after the preference or optional profile write settles.
80
191
  */
81
- async saveSelection(next) {
192
+ async saveSelection(next, name) {
82
193
  const entry = this.ownerContext.fiber.entry;
83
194
  const editor = this.ctx.get("configEditor");
84
195
  const config = {
@@ -89,11 +200,26 @@ var AgentDefaultModelConfig = class extends Service {
89
200
  if ((entry === void 0 || editor === void 0) && this.sharedPath === void 0) return;
90
201
  const saved = this.saves.then(async () => {
91
202
  if (this.sharedPath !== void 0) {
92
- await writeFileAtomic(this.sharedPath, `${JSON.stringify(config, null, 2)}\n`, {
203
+ const previous = this.sharedDisplayName();
204
+ let displayName = previous?.provider === config.provider && previous.model === config.model ? previous.name : void 0;
205
+ if (name?.trim()) displayName = name.trim();
206
+ const preference = {
207
+ ...config,
208
+ ...displayName === void 0 ? {} : { displayName }
209
+ };
210
+ const path = this.sharedPath;
211
+ await mkdir(dirname(path), {
212
+ recursive: true,
213
+ mode: 448
214
+ });
215
+ await withFileLock(path, () => writeFileAtomic(path, `${JSON.stringify(preference, null, 2)}\n`, {
93
216
  mode: 384,
94
217
  dirMode: 448
95
- });
218
+ }));
96
219
  this.shared = selection(config);
220
+ this.displayName = displayName;
221
+ this.awaitingDefault = false;
222
+ this.allowCatalogDefault = false;
97
223
  } else if (entry !== void 0 && editor !== void 0) await editor.edit(entry, () => config);
98
224
  });
99
225
  this.saves = saved.catch(() => {});