@chatcode/chatcode-cli 3.0.3 → 3.0.4-rc.1

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 (174) 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-BkCHTQHj.js} +12 -12
  6. package/lib/{command-trees-Dvq4C7a4.js → command-trees-5HFyC5sI.js} +2 -2
  7. package/lib/{component-identity-DPdJglJO.js → component-identity-De91VHwW.js} +3 -3
  8. package/lib/{dist-w_sIm4VD.js → dist-CsDWUvQ4.js} +231 -231
  9. package/lib/{dump-config-CauO75nE.js → dump-config-BcH-VYuv.js} +5 -5
  10. package/lib/dump-config-CyopmD85.js +2 -0
  11. package/lib/{dump-config-schema-CObLWWaW.js → dump-config-schema-DM0fb6Ns.js} +2 -2
  12. package/lib/{extension-events-Be9LWvHD.js → extension-events-CdYCRP0o.js} +26 -26
  13. package/lib/{frames-7PAg0Q9b.js → frames-DOX-Jgk8.js} +4 -4
  14. package/lib/headless-compat.js +2 -2
  15. package/lib/{host-access-DeCjoRQP.js → host-access-Bk4xps5E.js} +1 -1
  16. package/lib/{keymap-CRUxM_qn.js → keymap-CJ1kvLR2.js} +17 -16
  17. package/lib/{plugin-CDFSDE_y.js → plugin-XR7ncbnW.js} +2928 -2240
  18. package/lib/{plugin-Cn-hyYY8.js → plugin-eJjD6r12.js} +1 -1
  19. package/lib/{profile-boot-SJGbpLgN.js → profile-boot-BNQry1NM.js} +97 -14
  20. package/lib/profile-boot.js +2 -2
  21. package/lib/{scenes-D6jV1EEi.js → scenes-CAmWncZD.js} +3 -3
  22. package/lib/{settings-sections-DJQRNBo9.js → settings-sections-CakcvBv9.js} +7 -3
  23. package/lib/statusBarSettings-BPPS_Usm.js +382 -0
  24. package/lib/{supports-color-CcW-FGjr.js → supports-color-DyChQwlI.js} +2 -2
  25. package/lib/{themes-BCly4_y9.js → themes-OjcUpZzw.js} +13 -13
  26. package/lib/tui-compat-command-trees.js +1 -1
  27. package/lib/tui-compat-extensions.js +3 -3
  28. package/lib/tui-compat-plugin-host.js +5 -5
  29. package/lib/tui-compat-scenes.js +1 -1
  30. package/lib/tui-compat-settings-sections.js +1 -1
  31. package/lib/tui-compat-working-activity.js +4 -4
  32. package/lib/tui-compat-workspaces.js +1 -1
  33. package/lib/tui-compat.js +9 -26
  34. package/lib/types/args.d.ts +2 -0
  35. package/lib/types/permission-bypass.d.ts +16 -0
  36. package/lib/types/profile-boot.d.ts +12 -0
  37. package/lib/types/tui-compat.d.ts +4 -0
  38. package/lib/types/web-browser.d.ts +6 -0
  39. package/lib/types/web-instance.d.ts +42 -0
  40. package/lib/web-browser-Vcgfdsv_.js +46 -0
  41. package/lib/web-instance-B0jec7cq.js +2 -0
  42. package/lib/web-instance-DbP7IHPv.js +280 -0
  43. package/lib/{workspaces-Bb3kCAFb.js → workspaces-XY7UdfXp.js} +2 -2
  44. package/package.json +34 -32
  45. package/runtime/manifest.json +4 -2
  46. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +34 -4
  47. package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +9 -0
  48. package/runtime/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -1
  49. package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +2 -0
  50. package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-stream.js +4 -0
  51. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +39 -0
  52. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +6 -1
  53. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +10 -3
  54. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +7 -0
  55. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +8 -1
  56. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +10 -0
  57. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +28 -1
  58. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +39 -0
  59. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.d.ts +2 -0
  60. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -0
  61. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.d.ts +8 -0
  62. package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +19 -1
  63. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +28 -0
  64. package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +17 -0
  65. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +67 -19
  66. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/index.d.ts +1 -1
  67. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/profile-context.d.ts +11 -1
  68. package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +22 -3
  69. package/runtime/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
  70. package/runtime/node_modules/@deepseek-ai/dsh-base/package.json +2 -1
  71. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +3 -2
  72. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/index.d.ts +2 -2
  73. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1 -1
  74. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  75. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +60 -12
  76. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +3 -1
  77. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/locales.d.ts +6 -0
  78. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css +3 -5
  79. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +23 -27
  80. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/contract/slots.d.ts +3 -1
  81. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  82. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
  83. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +8 -7
  84. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +1 -1
  85. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/settings-document-store.d.ts +2 -1
  86. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +33 -12
  87. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
  88. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  89. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  90. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  91. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +8 -1
  92. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +2 -0
  93. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
  94. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.d.ts +11 -0
  95. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
  96. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.d.ts +28 -0
  97. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
  98. package/runtime/node_modules/@deepseek-ai/dsh-computer-use/package.json +42 -0
  99. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +102 -14
  100. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/types/index.d.ts +34 -4
  101. package/runtime/node_modules/@deepseek-ai/dsh-config-editor/package.json +1 -0
  102. package/runtime/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +2 -1
  103. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +21 -8
  104. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.d.ts +4 -6
  105. package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +18 -7
  106. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/index.js +5 -4
  107. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.d.ts +4 -3
  108. package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +4 -3
  109. package/runtime/node_modules/@deepseek-ai/dsh-storage/lib/types/backend.d.ts +4 -0
  110. package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +60 -0
  111. package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +15 -0
  112. package/runtime/node_modules/@deepseek-ai/dsh-storage-json/lib/index.js +25 -0
  113. package/runtime/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -0
  114. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +5472 -0
  115. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/command-args.d.ts +17 -0
  116. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/cicd.d.ts +8 -0
  117. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/tianti.d.ts +7 -0
  118. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti-deliver/tianti-deliver.d.ts +8 -0
  119. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +27 -0
  120. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +12 -0
  121. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/memory-config.d.ts +10 -0
  122. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/runtime.d.ts +105 -0
  123. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/aliases.d.ts +11 -0
  124. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/auth.d.ts +20 -0
  125. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/client.d.ts +206 -0
  126. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +20 -0
  127. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/index.d.ts +6 -0
  128. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/log.d.ts +16 -0
  129. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/types.d.ts +136 -0
  130. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/codebase.d.ts +19 -0
  131. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/dynamicWorkflow.d.ts +10 -0
  132. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/engine.d.ts +8 -0
  133. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executor.d.ts +11 -0
  134. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executors.d.ts +15 -0
  135. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/index.d.ts +23 -0
  136. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/memorySuggestions.d.ts +12 -0
  137. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/openspec.d.ts +31 -0
  138. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/recommend.d.ts +8 -0
  139. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/render.d.ts +8 -0
  140. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/requirementContext.d.ts +12 -0
  141. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/scenarioUpgrade.d.ts +24 -0
  142. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/state.d.ts +16 -0
  143. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/store.d.ts +33 -0
  144. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/templates.d.ts +8 -0
  145. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/types.d.ts +385 -0
  146. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/writeReviewSync.d.ts +6 -0
  147. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/index.d.ts +29 -0
  148. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/store.d.ts +20 -0
  149. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/types.d.ts +49 -0
  150. package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +12 -0
  151. package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +55 -0
  152. package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +57 -13
  153. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-D5kpKf--.css +1 -0
  154. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js +133 -0
  155. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js.map +1 -0
  156. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-apple-touch-icon.png +0 -0
  157. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-icon-32.png +0 -0
  158. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-mask-icon.svg +1 -0
  159. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +1 -3
  160. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.ico +0 -0
  161. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +1 -3
  162. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +8 -4
  163. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/preview.html +8 -4
  164. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/package.json +2 -1
  165. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +110 -33
  166. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.d.ts +6 -0
  167. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.js +23 -17
  168. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +10 -0
  169. package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +95 -21
  170. package/lib/dump-config-CijLv_kn.js +0 -2
  171. package/lib/tuiDisplayPrefs-Dm_fULiR.js +0 -204
  172. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DUvMhLle.css +0 -1
  173. package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js +0 -127
  174. 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-Bk4xps5E.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 ../../../dsh-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.1",
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.4",
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.7",
36
+ "@chatcode/cco-market": "1.45.2-rc.4",
37
+ "@chatcode/cco-tui": "0.10.0-rc.17",
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.17",
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.4",
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.7",
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",
@@ -94,44 +96,44 @@
94
96
  "execa": "^10.0.0",
95
97
  "ws": "8.21.0",
96
98
  "@deepseek-ai/dsh-acp": "0.1.7-rc.2",
99
+ "@deepseek-ai/dsh-agent-loop": "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",
99
- "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
100
- "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
101
101
  "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
102
+ "@deepseek-ai/dsh-bash-local": "0.1.7-rc.2",
102
103
  "@deepseek-ai/dsh-attachment-local": "0.1.7-rc.2",
104
+ "@deepseek-ai/dsh-credentials-local": "0.1.7-rc.2",
105
+ "@deepseek-ai/dsh-experimental-agent-team": "0.1.7-rc.2",
103
106
  "@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
107
  "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
108
+ "@deepseek-ai/dsh-host-frontend-static": "0.1.7-rc.2",
109
+ "@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.1.7-rc.2",
108
110
  "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
109
111
  "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
110
- "@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",
112
+ "@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2",
113
+ "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
115
114
  "@deepseek-ai/dsh-llm-deepseek-api-key": "0.1.7-rc.2",
115
+ "@deepseek-ai/dsh-llm-mock-server": "0.1.7-rc.2",
116
116
  "@deepseek-ai/dsh-llm-deepseek-account": "0.1.7-rc.2",
117
- "@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
118
117
  "@deepseek-ai/dsh-llm-replay": "0.1.7-rc.2",
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",
118
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.2",
121
119
  "@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",
120
+ "@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.1.7-rc.2",
121
+ "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
124
122
  "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
123
+ "@deepseek-ai/dsh-sdk-client": "0.1.7-rc.2",
124
+ "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
125
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
125
126
  "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.7-rc.2",
127
+ "@deepseek-ai/dsh-session-query": "0.1.7-rc.2",
128
+ "@deepseek-ai/dsh-session-checkpoint-policy": "0.1.7-rc.2",
129
+ "@deepseek-ai/dsh-shell-env": "0.1.7-rc.2",
126
130
  "@deepseek-ai/dsh-settings": "0.1.7-rc.2",
127
- "@deepseek-ai/dsh-session-log-deepseek": "0.1.7-rc.2",
128
- "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
129
131
  "@deepseek-ai/dsh-subagent": "0.1.7-rc.2",
130
- "@deepseek-ai/dsh-sandbox-local": "0.1.7-rc.2",
132
+ "@deepseek-ai/dsh-experimental-tool-agent-team": "0.1.7-rc.2",
133
+ "@deepseek-ai/dsh-subagent-fork-in-process": "0.1.7-rc.2",
134
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.7-rc.2",
131
135
  "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
132
136
  "@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
137
  "@deepseek-ai/dsh-user-approval": "0.1.7-rc.2",
136
138
  "@deepseek-ai/dsh-subprocess-local": "0.1.7-rc.2"
137
139
  },
@@ -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": 3603,
286
+ "byteCount": 68549295
285
287
  }
@@ -17,17 +17,22 @@ function selection(settings) {
17
17
  };
18
18
  }
19
19
  /** Parse one product-wide model preference without accepting partial records. */
20
- function sharedSelection(path) {
20
+ function sharedPreference(path) {
21
21
  try {
22
22
  const parsed = JSON.parse(readFileSync(path, "utf8"));
23
23
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
24
24
  const record = parsed;
25
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
+ const route = selection({
27
27
  provider: record.provider,
28
28
  model: record.model,
29
29
  ...typeof record.reasoningEffort === "string" && record.reasoningEffort.length > 0 ? { reasoningEffort: record.reasoningEffort } : {}
30
30
  });
31
+ const displayName = typeof record.displayName === "string" ? record.displayName.trim() : "";
32
+ return {
33
+ selection: route,
34
+ ...displayName === "" ? {} : { displayName }
35
+ };
31
36
  } catch (_error) {
32
37
  return;
33
38
  }
@@ -53,7 +58,7 @@ var AgentDefaultModelConfig = class extends Service {
53
58
  this.ownerContext = ownerContext;
54
59
  this.config = config;
55
60
  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));
61
+ if (this.sharedPath !== void 0) this.shared = sharedPreference(existsSync(this.sharedPath) ? this.sharedPath : join(resolveChatCodeCliHome(), "tui", SHARED_MODEL_FILENAME))?.selection;
57
62
  ownerContext.inject(["settings"], (child) => {
58
63
  child.effect(() => child.settings.configure({ auto: false }, ownerContext.fiber));
59
64
  });
@@ -71,10 +76,24 @@ var AgentDefaultModelConfig = class extends Service {
71
76
  ...reasoningEffort === void 0 ? {} : { reasoningEffort }
72
77
  });
73
78
  }
79
+ /** Read the latest shared display name without changing this process's model selection.
80
+ * @returns The saved provider/model/name tuple, or undefined for missing or invalid name metadata.
81
+ */
82
+ sharedDisplayName() {
83
+ if (this.sharedPath === void 0) return void 0;
84
+ const stored = sharedPreference(this.sharedPath);
85
+ if (stored?.displayName === void 0) return void 0;
86
+ return {
87
+ provider: stored.selection.provider,
88
+ model: stored.selection.model,
89
+ name: stored.displayName
90
+ };
91
+ }
74
92
  /**
75
93
  * Save the complete default model selection to the shared ChatCode Home file,
76
94
  * or the owning profile entry in other deployments. Saves commit in submission
77
95
  * order; a failed save rejects its caller without blocking later saves.
96
+ * A shared save also retains an available catalog name; metadata failures do not reject the route save.
78
97
  * @param next - resolved selection accepted by an entry point.
79
98
  * @returns fulfillment after the preference or optional profile write settles.
80
99
  */
@@ -89,7 +108,18 @@ var AgentDefaultModelConfig = class extends Service {
89
108
  if ((entry === void 0 || editor === void 0) && this.sharedPath === void 0) return;
90
109
  const saved = this.saves.then(async () => {
91
110
  if (this.sharedPath !== void 0) {
92
- await writeFileAtomic(this.sharedPath, `${JSON.stringify(config, null, 2)}\n`, {
111
+ const previous = this.sharedDisplayName();
112
+ let displayName = previous?.provider === config.provider && previous.model === config.model ? previous.name : void 0;
113
+ const llm = this.ctx.get("llm");
114
+ if (llm !== void 0) try {
115
+ const name = (await llm.listModels(config.provider)).find((model) => model.id === config.model)?.name.trim();
116
+ if (name !== void 0 && name !== "" && (name !== config.model || displayName === void 0)) displayName = name;
117
+ } catch (_error) {}
118
+ const preference = {
119
+ ...config,
120
+ ...displayName === void 0 ? {} : { displayName }
121
+ };
122
+ await writeFileAtomic(this.sharedPath, `${JSON.stringify(preference, null, 2)}\n`, {
93
123
  mode: 384,
94
124
  dirMode: 448
95
125
  });
@@ -43,10 +43,19 @@ export declare class AgentDefaultModelConfig extends Service {
43
43
  * @returns a detached provider, model, and optional reasoning selection.
44
44
  */
45
45
  currentSelection(): ModelSelection;
46
+ /** Read the latest shared display name without changing this process's model selection.
47
+ * @returns The saved provider/model/name tuple, or undefined for missing or invalid name metadata.
48
+ */
49
+ sharedDisplayName(): {
50
+ provider: string;
51
+ model: string;
52
+ name: string;
53
+ } | undefined;
46
54
  /**
47
55
  * Save the complete default model selection to the shared ChatCode Home file,
48
56
  * or the owning profile entry in other deployments. Saves commit in submission
49
57
  * order; a failed save rejects its caller without blocking later saves.
58
+ * A shared save also retains an available catalog name; metadata failures do not reject the route save.
50
59
  * @param next - resolved selection accepted by an entry point.
51
60
  * @returns fulfillment after the preference or optional profile write settles.
52
61
  */
@@ -34,7 +34,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
34
34
 
35
35
  | Package | Config | Description |
36
36
  |---|---|---|
37
- | `@deepseek-ai/dsh-config-editor` | no | Persist plugin configuration through profile patches and Loader reconciliation |
37
+ | `@deepseek-ai/dsh-config-editor` | yes | Persist plugin configuration through profile patches and Loader reconciliation |
38
38
  | `@deepseek-ai/dsh-hmr` | yes | Coordinated module and profile configuration hot reload |
39
39
  | `@deepseek-ai/dsh-plugin-manager` | yes | Current-profile plugin and bundle management shared by dsh CLI, Web and agent tools |
40
40
 
@@ -493,6 +493,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
493
493
 
494
494
  | Package | Config | Description |
495
495
  |---|---|---|
496
+ | `@deepseek-ai/dsh-tianti` | yes | Tianti commands, resource tools, and guided development delivery for ChatCode CLI |
496
497
  | `@deepseek-ai/dsh-tool-ralph` | yes | Model-facing fresh-agent Ralph loop over the workflow and subagent seams |
497
498
  | `@deepseek-ai/dsh-tool-workflow` | yes | Model-facing workflow tool: run a JavaScript orchestration script over ctx.workflowEngine |
498
499
  | `@deepseek-ai/dsh-workflow-ptc` | yes | Workflow orchestration in the shared sandboxed Node PTC runtime |
@@ -1069,6 +1069,8 @@ window.__ModuleLoader__.load({
1069
1069
  if (!generationAbort.signal.aborted) generationAbort.abort(/* @__PURE__ */ new Error(`${this.options.name} generation ended`));
1070
1070
  }
1071
1071
  }
1072
+ } catch (error) {
1073
+ throw terminalStreamFailure(error);
1072
1074
  } finally {
1073
1075
  if (!this.lifetime.signal.aborted) this.lifetime.abort(/* @__PURE__ */ new Error(`${this.options.name} consumer closed`));
1074
1076
  this.generationAbort?.abort(this.lifetime.signal.reason);
@@ -135,6 +135,10 @@ export class RemoteStream {
135
135
  }
136
136
  }
137
137
  }
138
+ catch (error) {
139
+ // Setup failures need the same marked outcome as failures from an opened stream.
140
+ throw terminalStreamFailure(error);
141
+ }
138
142
  finally {
139
143
  if (!this.lifetime.signal.aborted) {
140
144
  this.lifetime.abort(new Error(`${this.options.name} consumer closed`));
@@ -5340,6 +5340,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5340
5340
  })),
5341
5341
  "revision": number()
5342
5342
  });
5343
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value;
5344
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema = () => _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema$value ??= string();
5345
+ let _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value;
5346
+ const _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema = () => _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema$value ??= object({ "opened": literal(true).readonly() });
5343
5347
  let _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value;
5344
5348
  const _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema = () => _deepseek_ai_dsh_api_settings_controller_settings_openSettingsDocument_result$schema$value ??= object({ "opened": literal(true).readonly() });
5345
5349
  let _deepseek_ai_dsh_api_settings_controller_settings_replace_parameter_0$schema$value;
@@ -5625,6 +5629,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5625
5629
  "column": 9
5626
5630
  }
5627
5631
  },
5632
+ {
5633
+ id: "@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument",
5634
+ service: "settingsController",
5635
+ namespace: "settings",
5636
+ method: "openNamespaceDocument",
5637
+ invocation: { kind: "direct" },
5638
+ parameters: [{
5639
+ name: "ns",
5640
+ wire: "ns",
5641
+ source: "json",
5642
+ codec: {
5643
+ mode: "strict",
5644
+ typeSymbol: "@deepseek-ai/dsh-api-settings-controller#settings/openNamespaceDocument:ns",
5645
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_parameter_0$schema
5646
+ }
5647
+ }],
5648
+ cancellation: { parameter: "signal" },
5649
+ result: {
5650
+ mode: "strict",
5651
+ typeSymbol: "@deepseek-ai/dsh-api-settings-controller/types#SettingsDocumentOpenValue",
5652
+ create: _deepseek_ai_dsh_api_settings_controller_settings_openNamespaceDocument_result$schema
5653
+ },
5654
+ sourceLocation: {
5655
+ "file": "packages/api/settings-controller/src/index.ts",
5656
+ "line": 178,
5657
+ "column": 9
5658
+ }
5659
+ },
5628
5660
  {
5629
5661
  id: "@deepseek-ai/dsh-api-settings-controller#settings/openSettingsDocument",
5630
5662
  service: "settingsController",
@@ -10357,13 +10389,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10357
10389
  "model": string().readonly(),
10358
10390
  "reasoningEffort": string().readonly().optional()
10359
10391
  }).readonly(),
10392
+ "savedDisplayName": object({
10393
+ "provider": string().readonly(),
10394
+ "model": string().readonly(),
10395
+ "name": string().readonly()
10396
+ }).readonly().optional(),
10360
10397
  "routableProviders": array(string()).readonly(),
10361
10398
  "groups": array(object({
10362
10399
  "id": string().readonly(),
10363
10400
  "name": string().readonly(),
10401
+ "custom": boolean().readonly().optional(),
10364
10402
  "models": array(object({
10365
10403
  "id": string().readonly(),
10366
10404
  "name": string().readonly(),
10405
+ "inputModalities": array(union([literal("text"), literal("image")])).readonly().optional(),
10367
10406
  "description": string().readonly().optional(),
10368
10407
  "reasoning": object({
10369
10408
  "efforts": array(object({