@ran-sh/dsh-crew 0.5.1 → 0.5.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.
package/lib/client.js CHANGED
@@ -192,6 +192,7 @@ function bridgeState(surface) {
192
192
  function projectHostReadiness({ installStatus, runtime, surface } = {}) {
193
193
  const codex = installStatus?.codex;
194
194
  const claude = installStatus?.claude;
195
+ const zcode = installStatus?.zcode;
195
196
  return [
196
197
  {
197
198
  id: "codex_mcp",
@@ -214,6 +215,18 @@ function projectHostReadiness({ installStatus, runtime, surface } = {}) {
214
215
  "permissions"
215
216
  ])
216
217
  },
218
+ {
219
+ id: "zcode_mcp",
220
+ state: componentState(zcode, [
221
+ "mcp",
222
+ "policy",
223
+ "worker_agent",
224
+ "reviewer_agent",
225
+ "config_prompt",
226
+ "status_prompt",
227
+ "ownership"
228
+ ])
229
+ },
217
230
  {
218
231
  id: "crew_harness",
219
232
  state: runtimeState(runtime),
@@ -354,7 +367,7 @@ const COPY = {
354
367
  jobCount: (count) => `${count} 个任务`,
355
368
  runningCount: (count) => `${count} 个运行中`,
356
369
  sectionNames: {
357
- integrations: "Codex / Claude 集成状态",
370
+ integrations: "Codex / Claude / ZCode 集成状态",
358
371
  workflow: "Crew 工作流设置",
359
372
  flash: "Worker / Flash",
360
373
  pro: "Reviewer / Pro",
@@ -374,6 +387,7 @@ const COPY = {
374
387
  ds_worker: "ds-worker",
375
388
  ds_reviewer: "ds-reviewer",
376
389
  claude_plugin: "Claude plugin",
390
+ zcode_mcp: "ZCode MCP",
377
391
  crew_harness: "Crew Harness",
378
392
  official_bridge: "Official bridge"
379
393
  },
@@ -602,6 +616,11 @@ const COPY = {
602
616
  install: "把 ds-flash / ds-pro 角色和 /dsh-config、/dsh-status 命令复制到 ~/.codex/(MCP 路径按本机自动渲染,含 approve 审批与超时配置)",
603
617
  update: "重新渲染并覆盖角色文件与命令(插件路径或配置变更后用);原文件先备份",
604
618
  restore: "删除 ~/.codex/ 下的 ds-flash / ds-pro 角色与 dsh 命令文件(角色文件先备份)"
619
+ },
620
+ zcode: {
621
+ install: "安装 ZCode 全局规则、ds-worker / ds-reviewer 角色、命令和按来源选择的 MCP 配置到 ~/.zcode/",
622
+ update: "重新渲染 ZCode 角色、命令和 MCP 条目;保留个人文件与其他 MCP 服务",
623
+ restore: "仅移除 dsh-crew 管理的 ZCode 文件和 MCP 条目(保留备份)"
605
624
  }
606
625
  }
607
626
  },
@@ -627,7 +646,7 @@ const COPY = {
627
646
  jobCount: (count) => `${count} jobs`,
628
647
  runningCount: (count) => `${count} running`,
629
648
  sectionNames: {
630
- integrations: "Codex / Claude integration status",
649
+ integrations: "Codex / Claude / ZCode integration status",
631
650
  workflow: "Crew workflow settings",
632
651
  flash: "Worker / Flash",
633
652
  pro: "Reviewer / Pro",
@@ -647,6 +666,7 @@ const COPY = {
647
666
  ds_worker: "ds-worker",
648
667
  ds_reviewer: "ds-reviewer",
649
668
  claude_plugin: "Claude plugin",
669
+ zcode_mcp: "ZCode MCP",
650
670
  crew_harness: "Crew Harness",
651
671
  official_bridge: "Official bridge"
652
672
  },
@@ -875,6 +895,11 @@ const COPY = {
875
895
  install: "Copy ds-flash / ds-pro roles and /dsh-config, /dsh-status prompts into ~/.codex/ (MCP paths rendered for this machine, approve mode + timeout included)",
876
896
  update: "Re-render and overwrite role files and prompts (after path/config changes); originals backed up",
877
897
  restore: "Delete ds-flash / ds-pro roles and dsh prompts from ~/.codex/ (roles backed up first)"
898
+ },
899
+ zcode: {
900
+ install: "Install the ZCode global policy, ds-worker / ds-reviewer agents, commands and source-aware MCP config under ~/.zcode/",
901
+ update: "Re-render ZCode agents, commands and MCP entry; user files and unrelated MCP servers are preserved",
902
+ restore: "Remove only dsh-crew-owned ZCode files and MCP entry (backups kept)"
878
903
  }
879
904
  }
880
905
  }
@@ -1879,6 +1904,10 @@ function WorkersPanel({ ctx }) {
1879
1904
  style: S.chip(!!status?.claude?.ready),
1880
1905
  children: ["Claude ", status?.claude?.ready ? "READY" : "CHECK"]
1881
1906
  }),
1907
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1908
+ style: S.chip(!!status?.zcode?.ready),
1909
+ children: ["ZCode ", status?.zcode?.ready ? "READY" : "CHECK"]
1910
+ }),
1882
1911
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1883
1912
  style: S.chip(jobs.some((job) => job.status === "running")),
1884
1913
  children: [jobs.filter((job) => job.status === "running").length, " running"]
@@ -1954,7 +1983,7 @@ function WorkersPanel({ ctx }) {
1954
1983
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollapsibleSection, {
1955
1984
  sectionId: "integrations",
1956
1985
  title: copy.sectionNames.integrations,
1957
- summary: sectionSummary(status?.claude?.ready ? "Claude READY" : "Claude CHECK", status?.codex?.ready ? "Codex READY" : "Codex CHECK"),
1986
+ summary: sectionSummary(status?.claude?.ready ? "Claude READY" : "Claude CHECK", `${status?.codex?.ready ? "Codex READY" : "Codex CHECK"} · ${status?.zcode?.ready ? "ZCode READY" : "ZCode CHECK"}`),
1958
1987
  expanded: !!expandedSections.integrations,
1959
1988
  onToggle: () => toggleSection("integrations"),
1960
1989
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2023,7 +2052,15 @@ function WorkersPanel({ ctx }) {
2023
2052
  opacity: .6
2024
2053
  },
2025
2054
  children: (status?.codex?.missing ?? []).join(" · ")
2026
- }), "codex", "codex-uninstall", copy.tips.codex)
2055
+ }), "codex", "codex-uninstall", copy.tips.codex),
2056
+ integrationRow("ZCode", !!status?.zcode?.installed, !!status?.zcode?.ready, status?.zcode?.ready ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2057
+ title: (status?.zcode?.missing ?? []).join(", "),
2058
+ style: {
2059
+ fontSize: 11,
2060
+ opacity: .6
2061
+ },
2062
+ children: (status?.zcode?.missing ?? []).join(" · ")
2063
+ }), "zcode", "zcode-uninstall", copy.tips.zcode)
2027
2064
  ]
2028
2065
  })
2029
2066
  }),
@@ -192,6 +192,7 @@ function bridgeState(surface) {
192
192
  function projectHostReadiness({ installStatus, runtime, surface } = {}) {
193
193
  const codex = installStatus?.codex;
194
194
  const claude = installStatus?.claude;
195
+ const zcode = installStatus?.zcode;
195
196
  return [
196
197
  {
197
198
  id: "codex_mcp",
@@ -214,6 +215,18 @@ function projectHostReadiness({ installStatus, runtime, surface } = {}) {
214
215
  "permissions"
215
216
  ])
216
217
  },
218
+ {
219
+ id: "zcode_mcp",
220
+ state: componentState(zcode, [
221
+ "mcp",
222
+ "policy",
223
+ "worker_agent",
224
+ "reviewer_agent",
225
+ "config_prompt",
226
+ "status_prompt",
227
+ "ownership"
228
+ ])
229
+ },
217
230
  {
218
231
  id: "crew_harness",
219
232
  state: runtimeState(runtime),
@@ -354,7 +367,7 @@ const COPY = {
354
367
  jobCount: (count) => `${count} 个任务`,
355
368
  runningCount: (count) => `${count} 个运行中`,
356
369
  sectionNames: {
357
- integrations: "Codex / Claude 集成状态",
370
+ integrations: "Codex / Claude / ZCode 集成状态",
358
371
  workflow: "Crew 工作流设置",
359
372
  flash: "Worker / Flash",
360
373
  pro: "Reviewer / Pro",
@@ -374,6 +387,7 @@ const COPY = {
374
387
  ds_worker: "ds-worker",
375
388
  ds_reviewer: "ds-reviewer",
376
389
  claude_plugin: "Claude plugin",
390
+ zcode_mcp: "ZCode MCP",
377
391
  crew_harness: "Crew Harness",
378
392
  official_bridge: "Official bridge"
379
393
  },
@@ -602,6 +616,11 @@ const COPY = {
602
616
  install: "把 ds-flash / ds-pro 角色和 /dsh-config、/dsh-status 命令复制到 ~/.codex/(MCP 路径按本机自动渲染,含 approve 审批与超时配置)",
603
617
  update: "重新渲染并覆盖角色文件与命令(插件路径或配置变更后用);原文件先备份",
604
618
  restore: "删除 ~/.codex/ 下的 ds-flash / ds-pro 角色与 dsh 命令文件(角色文件先备份)"
619
+ },
620
+ zcode: {
621
+ install: "安装 ZCode 全局规则、ds-worker / ds-reviewer 角色、命令和按来源选择的 MCP 配置到 ~/.zcode/",
622
+ update: "重新渲染 ZCode 角色、命令和 MCP 条目;保留个人文件与其他 MCP 服务",
623
+ restore: "仅移除 dsh-crew 管理的 ZCode 文件和 MCP 条目(保留备份)"
605
624
  }
606
625
  }
607
626
  },
@@ -627,7 +646,7 @@ const COPY = {
627
646
  jobCount: (count) => `${count} jobs`,
628
647
  runningCount: (count) => `${count} running`,
629
648
  sectionNames: {
630
- integrations: "Codex / Claude integration status",
649
+ integrations: "Codex / Claude / ZCode integration status",
631
650
  workflow: "Crew workflow settings",
632
651
  flash: "Worker / Flash",
633
652
  pro: "Reviewer / Pro",
@@ -647,6 +666,7 @@ const COPY = {
647
666
  ds_worker: "ds-worker",
648
667
  ds_reviewer: "ds-reviewer",
649
668
  claude_plugin: "Claude plugin",
669
+ zcode_mcp: "ZCode MCP",
650
670
  crew_harness: "Crew Harness",
651
671
  official_bridge: "Official bridge"
652
672
  },
@@ -875,6 +895,11 @@ const COPY = {
875
895
  install: "Copy ds-flash / ds-pro roles and /dsh-config, /dsh-status prompts into ~/.codex/ (MCP paths rendered for this machine, approve mode + timeout included)",
876
896
  update: "Re-render and overwrite role files and prompts (after path/config changes); originals backed up",
877
897
  restore: "Delete ds-flash / ds-pro roles and dsh prompts from ~/.codex/ (roles backed up first)"
898
+ },
899
+ zcode: {
900
+ install: "Install the ZCode global policy, ds-worker / ds-reviewer agents, commands and source-aware MCP config under ~/.zcode/",
901
+ update: "Re-render ZCode agents, commands and MCP entry; user files and unrelated MCP servers are preserved",
902
+ restore: "Remove only dsh-crew-owned ZCode files and MCP entry (backups kept)"
878
903
  }
879
904
  }
880
905
  }
@@ -1879,6 +1904,10 @@ function WorkersPanel({ ctx }) {
1879
1904
  style: S.chip(!!status?.claude?.ready),
1880
1905
  children: ["Claude ", status?.claude?.ready ? "READY" : "CHECK"]
1881
1906
  }),
1907
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1908
+ style: S.chip(!!status?.zcode?.ready),
1909
+ children: ["ZCode ", status?.zcode?.ready ? "READY" : "CHECK"]
1910
+ }),
1882
1911
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1883
1912
  style: S.chip(jobs.some((job) => job.status === "running")),
1884
1913
  children: [jobs.filter((job) => job.status === "running").length, " running"]
@@ -1954,7 +1983,7 @@ function WorkersPanel({ ctx }) {
1954
1983
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollapsibleSection, {
1955
1984
  sectionId: "integrations",
1956
1985
  title: copy.sectionNames.integrations,
1957
- summary: sectionSummary(status?.claude?.ready ? "Claude READY" : "Claude CHECK", status?.codex?.ready ? "Codex READY" : "Codex CHECK"),
1986
+ summary: sectionSummary(status?.claude?.ready ? "Claude READY" : "Claude CHECK", `${status?.codex?.ready ? "Codex READY" : "Codex CHECK"} · ${status?.zcode?.ready ? "ZCode READY" : "ZCode CHECK"}`),
1958
1987
  expanded: !!expandedSections.integrations,
1959
1988
  onToggle: () => toggleSection("integrations"),
1960
1989
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2023,7 +2052,15 @@ function WorkersPanel({ ctx }) {
2023
2052
  opacity: .6
2024
2053
  },
2025
2054
  children: (status?.codex?.missing ?? []).join(" · ")
2026
- }), "codex", "codex-uninstall", copy.tips.codex)
2055
+ }), "codex", "codex-uninstall", copy.tips.codex),
2056
+ integrationRow("ZCode", !!status?.zcode?.installed, !!status?.zcode?.ready, status?.zcode?.ready ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2057
+ title: (status?.zcode?.missing ?? []).join(", "),
2058
+ style: {
2059
+ fontSize: 11,
2060
+ opacity: .6
2061
+ },
2062
+ children: (status?.zcode?.missing ?? []).join(" · ")
2063
+ }), "zcode", "zcode-uninstall", copy.tips.zcode)
2027
2064
  ]
2028
2065
  })
2029
2066
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ran-sh/dsh-crew",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "main": "./src/hub/entry.mjs",
6
6
  "bin": {
@@ -126,6 +126,8 @@
126
126
  "deepseek",
127
127
  "claude-code",
128
128
  "codex",
129
+ "zcode",
130
+ "windows",
129
131
  "subagent",
130
132
  "worker",
131
133
  "multimodal",
@@ -140,8 +142,10 @@
140
142
  "agents",
141
143
  "commands",
142
144
  "codex",
145
+ "zcode",
143
146
  "statusline",
144
147
  "official-web-bridge",
148
+ "windows",
145
149
  "cordis.patch.yml",
146
150
  "worker.cordis.yml",
147
151
  ".claude-plugin",
@@ -152,6 +156,7 @@
152
156
  "docs/readiness-matrix.md",
153
157
  "docs/gpt-relay-extension.md",
154
158
  "docs/ui-surfaces.md",
159
+ "docs/installation.md",
155
160
  "docs/images/dsh-crew-logo.png",
156
161
  "docs/images/dsh-crew-overview.png",
157
162
  "docs/images/dsh-crew-host.png",
package/scripts/setup.mjs CHANGED
@@ -167,12 +167,36 @@ export async function setupInstall({
167
167
  mark(log, true, `DSH crew profile linked offline (dedicated Crew DSH_HOME, profile dsh-crew; ${registration.changed ? 'updated' : 'already current'})`);
168
168
  }
169
169
 
170
- if (dryRun) mark(log, true, 'Codex Desktop integration (dry-run)');
171
- else {
170
+ if (dryRun) mark(log, true, 'Codex Desktop integration (dry-run)');
171
+ else {
172
172
  const r = installer.installCodex ? installer.installCodex({ home }) : realInstaller.installCodex({ home });
173
173
  mark(log, r.ok !== false, r.ok === false ? `Codex Desktop integration failed: ${(r.actions ?? []).join('; ')}` : 'Codex Desktop integration');
174
- if (r.ok === false) return { ok: false, error: 'Codex integration failed' };
175
- }
174
+ if (r.ok === false) return { ok: false, error: 'Codex integration failed' };
175
+ }
176
+
177
+ if (dryRun) mark(log, true, 'ZCode integration (dry-run)');
178
+ else {
179
+ const r = installer.installZCode
180
+ ? installer.installZCode({ home, root })
181
+ : realInstaller.installZCode({ home, root });
182
+ if (r.ok === false) {
183
+ mark(log, false, `ZCode integration failed (${r.code ?? 'unknown'})`);
184
+ return { ok: false, error: 'ZCode integration failed' };
185
+ }
186
+ mark(log, true, 'ZCode integration');
187
+ }
188
+
189
+ if (dryRun) mark(log, true, 'Windows login startup (dry-run)');
190
+ else {
191
+ const r = installer.installWindowsStartup
192
+ ? installer.installWindowsStartup({ home, root })
193
+ : realInstaller.installWindowsStartup({ home, root });
194
+ if (r.ok === false) {
195
+ mark(log, false, `Windows login startup failed (${r.code ?? 'unknown'})`);
196
+ return { ok: false, error: 'Windows login startup failed' };
197
+ }
198
+ if (r.supported) mark(log, true, 'Windows login startup');
199
+ }
176
200
 
177
201
  if (commandExists('claude')) {
178
202
  if (dryRun) mark(log, true, 'Claude Code integration (dry-run)');
@@ -203,17 +227,31 @@ export async function setupUninstall({
203
227
  const fail = (name, text) => { mark(log, false, text || `${name} failed`); failures.push(name); };
204
228
 
205
229
  if (dryRun) {
206
- mark(log, true, 'Codex Desktop integration would be removed');
207
- mark(log, true, 'Claude Code integration would be removed');
208
- mark(log, true, 'DSH crew profile would be removed');
230
+ mark(log, true, 'Codex Desktop integration would be removed');
231
+ mark(log, true, 'ZCode integration would be removed');
232
+ mark(log, true, 'Claude Code integration would be removed');
233
+ mark(log, true, 'Windows login startup would be removed');
234
+ mark(log, true, 'DSH crew profile would be removed');
209
235
  } else {
210
236
  const cx = installer.uninstallCodex ? installer.uninstallCodex({ home }) : realInstaller.uninstallCodex({ home });
211
- if (cx.ok !== false) mark(log, true, 'Codex Desktop integration removed');
212
- else fail('codex', 'Codex Desktop integration removal failed');
237
+ if (cx.ok !== false) mark(log, true, 'Codex Desktop integration removed');
238
+ else fail('codex', 'Codex Desktop integration removal failed');
239
+
240
+ const zc = installer.uninstallZCode
241
+ ? installer.uninstallZCode({ home, root })
242
+ : realInstaller.uninstallZCode({ home, root });
243
+ if (zc.ok !== false) mark(log, true, 'ZCode integration removed');
244
+ else fail('zcode', 'ZCode integration removal failed');
213
245
 
214
- const cl = installer.uninstallClaudeCode ? installer.uninstallClaudeCode({ home }) : realInstaller.uninstallClaudeCode({ home });
215
- if (cl.ok !== false) mark(log, true, 'Claude Code integration removed');
216
- else fail('claude', 'Claude Code integration removal failed');
246
+ const cl = installer.uninstallClaudeCode ? installer.uninstallClaudeCode({ home }) : realInstaller.uninstallClaudeCode({ home });
247
+ if (cl.ok !== false) mark(log, true, 'Claude Code integration removed');
248
+ else fail('claude', 'Claude Code integration removal failed');
249
+
250
+ const startup = installer.uninstallWindowsStartup
251
+ ? installer.uninstallWindowsStartup({ home })
252
+ : realInstaller.uninstallWindowsStartup({ home });
253
+ if (startup.ok === false) fail('startup', 'Windows login startup removal failed');
254
+ else if (startup.supported) mark(log, true, 'Windows login startup removed');
217
255
 
218
256
  const name = readPackageName(root);
219
257
  if (!name) fail('dsh', 'DSH plugin removal failed: package name missing');
@@ -243,9 +281,15 @@ export async function setupUninstall({
243
281
  }
244
282
 
245
283
  export async function setupStatus({ log = console.log, root = ROOT, home = homedir(), installer = realInstaller } = {}) {
246
- const st = installer.installStatus ? installer.installStatus({ home }) : realInstaller.installStatus({ home });
247
- const claude = st?.claude?.installed ? 'installed' : 'not installed';
248
- const codex = st?.codex?.installed ? 'installed' : 'not installed';
284
+ const st = installer.installStatus ? installer.installStatus({ home, root }) : realInstaller.installStatus({ home, root });
285
+ const claude = st?.claude?.installed ? 'installed' : 'not installed';
286
+ const codex = st?.codex?.installed ? 'installed' : 'not installed';
287
+ const zcode = st?.zcode?.installed ? 'installed' : 'not installed';
288
+ const startupState = installer.windowsStartupStatus
289
+ ? installer.windowsStartupStatus({ home })
290
+ : realInstaller.windowsStartupStatus({ home });
291
+ const windowsStartup = !startupState.supported ? 'not supported'
292
+ : startupState.ready ? 'installed' : startupState.installed ? 'needs repair' : 'not installed';
249
293
  // Crew status reads ONLY the dedicated Crew profile under the Crew DSH_HOME;
250
294
  // the official web profile layout under the default DSH home is intentionally
251
295
  // never inspected.
@@ -260,10 +304,12 @@ export async function setupStatus({ log = console.log, root = ROOT, home = homed
260
304
  } catch { dshPlugin = 'unknown'; }
261
305
  }
262
306
  log(`DSH plugin: ${dshPlugin} (dedicated dsh-crew profile; official web profile ignored)`);
263
- log(`Codex Desktop integration: ${codex}`);
264
- log(`Claude Code integration: ${claude}`);
265
- return { ok: true, dshPlugin, codex, claude };
266
- }
307
+ log(`Codex Desktop integration: ${codex}`);
308
+ log(`ZCode integration: ${zcode}`);
309
+ log(`Claude Code integration: ${claude}`);
310
+ log(`Windows login startup: ${windowsStartup}`);
311
+ return { ok: true, dshPlugin, codex, zcode, claude, windowsStartup };
312
+ }
267
313
 
268
314
  export async function runSetupCli({ argv = process.argv.slice(2), run: actions = {}, log = console.log } = {}) {
269
315
  const action = argv[0];
@@ -33,13 +33,14 @@ function bridgeState(surface) {
33
33
  export function projectHostReadiness({ installStatus, runtime, surface } = {}) {
34
34
  const codex = installStatus?.codex;
35
35
  const claude = installStatus?.claude;
36
+ const zcode = installStatus?.zcode;
36
37
  return [
37
38
  { id: 'codex_mcp', state: componentState(codex, ['mcp'], { aligned: true }) },
38
39
  { id: 'ds_worker', state: componentState(codex, ['worker_role'], { aligned: true }) },
39
40
  { id: 'ds_reviewer', state: componentState(codex, ['reviewer_role'], { aligned: true }) },
40
41
  { id: 'claude_plugin', state: componentState(claude, ['enabled', 'marketplace', 'snapshot', 'permissions']) },
42
+ { id: 'zcode_mcp', state: componentState(zcode, ['mcp', 'policy', 'worker_agent', 'reviewer_agent', 'config_prompt', 'status_prompt', 'ownership']) },
41
43
  { id: 'crew_harness', state: runtimeState(runtime), detail: runtime?.runtime_version ?? null },
42
44
  { id: 'official_bridge', state: bridgeState(surface) },
43
45
  ];
44
46
  }
45
-
@@ -52,11 +52,11 @@ const COPY = {
52
52
  expandAll: '全部展开', collapseAll: '全部折叠',
53
53
  modelCount: (count: number) => `${count} 个模型`, providerCount: (count: number) => `${count} 个 Provider`,
54
54
  jobCount: (count: number) => `${count} 个任务`, runningCount: (count: number) => `${count} 个运行中`,
55
- sectionNames: { integrations: 'Codex / Claude 集成状态', workflow: 'Crew 工作流设置', flash: 'Worker / Flash', pro: 'Reviewer / Pro', dispatch: '模型优先级与派发', adaptive: '自适应路由', runtime: '运行 / 生效边界', multimodal: '视觉与生图', providers: '自定义 Provider', jobs: '任务状态' },
55
+ sectionNames: { integrations: 'Codex / Claude / ZCode 集成状态', workflow: 'Crew 工作流设置', flash: 'Worker / Flash', pro: 'Reviewer / Pro', dispatch: '模型优先级与派发', adaptive: '自适应路由', runtime: '运行 / 生效边界', multimodal: '视觉与生图', providers: '自定义 Provider', jobs: '任务状态' },
56
56
  openHarness: '打开 3210 Crew Harness →',
57
57
  harnessHint: '底层 Provider、Harness Models 与运行时配置',
58
58
  hostReadiness: '宿主集成就绪度', hostReadinessHint: '只使用结构化安装与运行时证据;缺少证据不会显示 READY。',
59
- readinessLabels: { codex_mcp: 'Codex MCP', ds_worker: 'ds-worker', ds_reviewer: 'ds-reviewer', claude_plugin: 'Claude plugin', crew_harness: 'Crew Harness', official_bridge: 'Official bridge' },
59
+ readinessLabels: { codex_mcp: 'Codex MCP', ds_worker: 'ds-worker', ds_reviewer: 'ds-reviewer', claude_plugin: 'Claude plugin', zcode_mcp: 'ZCode MCP', crew_harness: 'Crew Harness', official_bridge: 'Official bridge' },
60
60
  readinessStates: { READY: 'READY', DEGRADED: 'DEGRADED', UNAVAILABLE: 'UNAVAILABLE', UNKNOWN: 'UNKNOWN' },
61
61
  globalHint: '修改即时保存到 ~/.config/dsh-crew/config.json;CC / Codex 的新会话自动读取为默认值(会话内可用 /dsh-crew:config 临时覆盖)。',
62
62
  orchestration: 'Agent 编排',
@@ -154,11 +154,16 @@ const COPY = {
154
154
  update: '重跑安装流程:刷新注册与权限、迁移旧格式配置、更新 HUD 接线;幂等,可放心点',
155
155
  restore: '从 Claude Code 移除集成:清除 marketplace 注册、插件启用项与权限规则(settings 先备份);不删除插件源码与已跑任务',
156
156
  },
157
- codex: {
158
- install: '把 ds-flash / ds-pro 角色和 /dsh-config、/dsh-status 命令复制到 ~/.codex/(MCP 路径按本机自动渲染,含 approve 审批与超时配置)',
159
- update: '重新渲染并覆盖角色文件与命令(插件路径或配置变更后用);原文件先备份',
160
- restore: '删除 ~/.codex/ 下的 ds-flash / ds-pro 角色与 dsh 命令文件(角色文件先备份)',
161
- },
157
+ codex: {
158
+ install: '把 ds-flash / ds-pro 角色和 /dsh-config、/dsh-status 命令复制到 ~/.codex/(MCP 路径按本机自动渲染,含 approve 审批与超时配置)',
159
+ update: '重新渲染并覆盖角色文件与命令(插件路径或配置变更后用);原文件先备份',
160
+ restore: '删除 ~/.codex/ 下的 ds-flash / ds-pro 角色与 dsh 命令文件(角色文件先备份)',
161
+ },
162
+ zcode: {
163
+ install: '安装 ZCode 全局规则、ds-worker / ds-reviewer 角色、命令和按来源选择的 MCP 配置到 ~/.zcode/',
164
+ update: '重新渲染 ZCode 角色、命令和 MCP 条目;保留个人文件与其他 MCP 服务',
165
+ restore: '仅移除 dsh-crew 管理的 ZCode 文件和 MCP 条目(保留备份)',
166
+ },
162
167
  },
163
168
  },
164
169
  en: {
@@ -173,11 +178,11 @@ const COPY = {
173
178
  expandAll: 'Expand all', collapseAll: 'Collapse all',
174
179
  modelCount: (count: number) => `${count} models`, providerCount: (count: number) => `${count} providers`,
175
180
  jobCount: (count: number) => `${count} jobs`, runningCount: (count: number) => `${count} running`,
176
- sectionNames: { integrations: 'Codex / Claude integration status', workflow: 'Crew workflow settings', flash: 'Worker / Flash', pro: 'Reviewer / Pro', dispatch: 'Model priority & dispatch', adaptive: 'Adaptive routing', runtime: 'Runtime / activation boundaries', multimodal: 'Vision & image generation', providers: 'Custom providers', jobs: 'Task status' },
181
+ sectionNames: { integrations: 'Codex / Claude / ZCode integration status', workflow: 'Crew workflow settings', flash: 'Worker / Flash', pro: 'Reviewer / Pro', dispatch: 'Model priority & dispatch', adaptive: 'Adaptive routing', runtime: 'Runtime / activation boundaries', multimodal: 'Vision & image generation', providers: 'Custom providers', jobs: 'Task status' },
177
182
  openHarness: 'Open 3210 Crew Harness →',
178
183
  harnessHint: 'Low-level providers, Harness Models, and runtime configuration',
179
184
  hostReadiness: 'Host integration readiness', hostReadinessHint: 'Uses structured installer and runtime evidence only; missing evidence is never READY.',
180
- readinessLabels: { codex_mcp: 'Codex MCP', ds_worker: 'ds-worker', ds_reviewer: 'ds-reviewer', claude_plugin: 'Claude plugin', crew_harness: 'Crew Harness', official_bridge: 'Official bridge' },
185
+ readinessLabels: { codex_mcp: 'Codex MCP', ds_worker: 'ds-worker', ds_reviewer: 'ds-reviewer', claude_plugin: 'Claude plugin', zcode_mcp: 'ZCode MCP', crew_harness: 'Crew Harness', official_bridge: 'Official bridge' },
181
186
  readinessStates: { READY: 'READY', DEGRADED: 'DEGRADED', UNAVAILABLE: 'UNAVAILABLE', UNKNOWN: 'UNKNOWN' },
182
187
  globalHint: 'Changes save instantly to ~/.config/dsh-crew/config.json; new CC / Codex sessions pick them up as defaults (override per session with /dsh-crew:config).',
183
188
  orchestration: 'Agent orchestration',
@@ -275,11 +280,16 @@ const COPY = {
275
280
  update: 'Re-run the installer: refresh registration & permissions, migrate legacy config, update HUD wiring; idempotent',
276
281
  restore: 'Remove the integration from Claude Code: marketplace registration, plugin enablement and permission rules (settings backed up); plugin source and past jobs untouched',
277
282
  },
278
- codex: {
279
- install: 'Copy ds-flash / ds-pro roles and /dsh-config, /dsh-status prompts into ~/.codex/ (MCP paths rendered for this machine, approve mode + timeout included)',
280
- update: 'Re-render and overwrite role files and prompts (after path/config changes); originals backed up',
281
- restore: 'Delete ds-flash / ds-pro roles and dsh prompts from ~/.codex/ (roles backed up first)',
282
- },
283
+ codex: {
284
+ install: 'Copy ds-flash / ds-pro roles and /dsh-config, /dsh-status prompts into ~/.codex/ (MCP paths rendered for this machine, approve mode + timeout included)',
285
+ update: 'Re-render and overwrite role files and prompts (after path/config changes); originals backed up',
286
+ restore: 'Delete ds-flash / ds-pro roles and dsh prompts from ~/.codex/ (roles backed up first)',
287
+ },
288
+ zcode: {
289
+ install: 'Install the ZCode global policy, ds-worker / ds-reviewer agents, commands and source-aware MCP config under ~/.zcode/',
290
+ update: 'Re-render ZCode agents, commands and MCP entry; user files and unrelated MCP servers are preserved',
291
+ restore: 'Remove only dsh-crew-owned ZCode files and MCP entry (backups kept)',
292
+ },
283
293
  },
284
294
  },
285
295
  };
@@ -817,6 +827,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
817
827
  <div style={{ display: 'flex', gap: 6, marginTop: 8, flexWrap: 'wrap' }}>
818
828
  <span style={S.chip(!!status?.codex?.ready)}>Codex {status?.codex?.ready ? 'READY' : 'CHECK'}</span>
819
829
  <span style={S.chip(!!status?.claude?.ready)}>Claude {status?.claude?.ready ? 'READY' : 'CHECK'}</span>
830
+ <span style={S.chip(!!status?.zcode?.ready)}>ZCode {status?.zcode?.ready ? 'READY' : 'CHECK'}</span>
820
831
  <span style={S.chip(jobs.some((job) => job.status === 'running'))}>{jobs.filter((job) => job.status === 'running').length} running</span>
821
832
  </div>
822
833
  </div>
@@ -836,7 +847,7 @@ function WorkersPanel({ ctx }: { ctx: any }) {
836
847
  </div>
837
848
 
838
849
  <CollapsibleSection sectionId="integrations" title={copy.sectionNames.integrations}
839
- summary={sectionSummary(status?.claude?.ready ? 'Claude READY' : 'Claude CHECK', status?.codex?.ready ? 'Codex READY' : 'Codex CHECK')}
850
+ summary={sectionSummary(status?.claude?.ready ? 'Claude READY' : 'Claude CHECK', `${status?.codex?.ready ? 'Codex READY' : 'Codex CHECK'} · ${status?.zcode?.ready ? 'ZCode READY' : 'ZCode CHECK'}`)}
840
851
  expanded={!!expandedSections.integrations} onToggle={() => toggleSection('integrations')}>
841
852
  <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
842
853
  <div style={S.block}>
@@ -860,6 +871,9 @@ function WorkersPanel({ ctx }: { ctx: any }) {
860
871
  {integrationRow('Codex', !!status?.codex?.installed, !!status?.codex?.ready,
861
872
  status?.codex?.ready ? null : <span title={(status?.codex?.missing ?? []).join(', ')} style={{ fontSize: 11, opacity: 0.6 }}>{(status?.codex?.missing ?? []).join(' · ')}</span>,
862
873
  'codex', 'codex-uninstall', (copy as any).tips.codex)}
874
+ {integrationRow('ZCode', !!status?.zcode?.installed, !!status?.zcode?.ready,
875
+ status?.zcode?.ready ? null : <span title={(status?.zcode?.missing ?? []).join(', ')} style={{ fontSize: 11, opacity: 0.6 }}>{(status?.zcode?.missing ?? []).join(' · ')}</span>,
876
+ 'zcode', 'zcode-uninstall', (copy as any).tips.zcode)}
863
877
  </div>
864
878
  </CollapsibleSection>
865
879
 
package/src/hub/index.mjs CHANGED
@@ -1033,8 +1033,8 @@ export async function apply(ctx) {
1033
1033
  // Cache-busted import: the installer must always run the code
1034
1034
  // currently on disk, not whatever this process first loaded —
1035
1035
  // a stale cached copy once re-broke user settings after a fix.
1036
- const { installClaudeCode, installCodex, installHudSegment, uninstallClaudeCode, uninstallCodex } =
1037
- await import(`../install/install.mjs?t=${Date.now()}`);
1036
+ const { installClaudeCode, installCodex, installHudSegment, uninstallClaudeCode, uninstallCodex, installZCode, uninstallZCode } =
1037
+ await import(`../install/install.mjs?t=${Date.now()}`);
1038
1038
  if (target === 'claude') {
1039
1039
  const base = await installClaudeCode({ statusline: !!statusline });
1040
1040
  const hud = installHudSegment({});
@@ -1043,10 +1043,12 @@ export async function apply(ctx) {
1043
1043
  actions: [...base.actions, ...hud.actions.map((a) => `hud: ${a}`)],
1044
1044
  });
1045
1045
  }
1046
- if (target === 'codex') return sendJson(res, 200, installCodex({}));
1047
- if (target === 'claude-uninstall') return sendJson(res, 200, uninstallClaudeCode({}));
1048
- if (target === 'codex-uninstall') return sendJson(res, 200, uninstallCodex({}));
1049
- return sendJson(res, 400, { ok: false, error: 'target must be claude | codex | claude-uninstall | codex-uninstall' });
1046
+ if (target === 'codex') return sendJson(res, 200, installCodex({}));
1047
+ if (target === 'zcode') return sendJson(res, 200, installZCode({}));
1048
+ if (target === 'claude-uninstall') return sendJson(res, 200, uninstallClaudeCode({}));
1049
+ if (target === 'codex-uninstall') return sendJson(res, 200, uninstallCodex({}));
1050
+ if (target === 'zcode-uninstall') return sendJson(res, 200, uninstallZCode({}));
1051
+ return sendJson(res, 400, { ok: false, error: 'target must be claude | codex | zcode | claude-uninstall | codex-uninstall | zcode-uninstall' });
1050
1052
  } catch (err) {
1051
1053
  return sendJson(res, 500, { ok: false, error: err?.message ?? String(err) });
1052
1054
  }