kimi-plugin-cc 2.4.5 → 2.5.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 (109) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +42 -26
  5. package/dist/dsh/companion.js +174 -0
  6. package/dist/dsh/index.js +156 -0
  7. package/dist/hooks/install-paths.js +2 -2
  8. package/dist/version.js +1 -1
  9. package/docs/models.md +5 -1
  10. package/docs/registry-releases.md +20 -17
  11. package/docs/safety.md +22 -9
  12. package/docs/upstream-2.4.1-certification.md +6 -0
  13. package/package.json +40 -6
  14. package/plugins/kimi-codex/.codex-plugin/plugin.json +1 -1
  15. package/plugins/kimi-codex/dist/dsh/companion.js +174 -0
  16. package/plugins/kimi-codex/dist/dsh/index.js +156 -0
  17. package/plugins/kimi-codex/dist/hooks/install-paths.js +2 -2
  18. package/plugins/kimi-codex/dist/version.js +1 -1
  19. package/plugins/kimi-dsh/LICENSE +201 -0
  20. package/plugins/kimi-dsh/README.md +80 -0
  21. package/plugins/kimi-dsh/cordis.patch.yml +45 -0
  22. package/plugins/kimi-dsh/dist/background-spawn.js +216 -0
  23. package/plugins/kimi-dsh/dist/cli-cancellation.js +43 -0
  24. package/plugins/kimi-dsh/dist/cli-client.js +876 -0
  25. package/plugins/kimi-dsh/dist/commands/ask.js +336 -0
  26. package/plugins/kimi-dsh/dist/commands/cancel.js +216 -0
  27. package/plugins/kimi-dsh/dist/commands/cli-helpers.js +201 -0
  28. package/plugins/kimi-dsh/dist/commands/models.js +140 -0
  29. package/plugins/kimi-dsh/dist/commands/not-implemented.js +4 -0
  30. package/plugins/kimi-dsh/dist/commands/pursue.js +307 -0
  31. package/plugins/kimi-dsh/dist/commands/recover-swarm.js +135 -0
  32. package/plugins/kimi-dsh/dist/commands/registry.js +74 -0
  33. package/plugins/kimi-dsh/dist/commands/repair-sessions.js +160 -0
  34. package/plugins/kimi-dsh/dist/commands/replay.js +124 -0
  35. package/plugins/kimi-dsh/dist/commands/rescue.js +347 -0
  36. package/plugins/kimi-dsh/dist/commands/result.js +66 -0
  37. package/plugins/kimi-dsh/dist/commands/review-gate.js +390 -0
  38. package/plugins/kimi-dsh/dist/commands/review.js +220 -0
  39. package/plugins/kimi-dsh/dist/commands/setup.js +1047 -0
  40. package/plugins/kimi-dsh/dist/commands/status.js +27 -0
  41. package/plugins/kimi-dsh/dist/commands/swarm.js +754 -0
  42. package/plugins/kimi-dsh/dist/commands/worker.js +25 -0
  43. package/plugins/kimi-dsh/dist/companion.js +97 -0
  44. package/plugins/kimi-dsh/dist/config.js +22 -0
  45. package/plugins/kimi-dsh/dist/dsh/companion.js +174 -0
  46. package/plugins/kimi-dsh/dist/dsh/index.js +156 -0
  47. package/plugins/kimi-dsh/dist/errors.js +40 -0
  48. package/plugins/kimi-dsh/dist/git.js +224 -0
  49. package/plugins/kimi-dsh/dist/help.js +43 -0
  50. package/plugins/kimi-dsh/dist/hook-escape.js +71 -0
  51. package/plugins/kimi-dsh/dist/hooks/approval-hook.js +101 -0
  52. package/plugins/kimi-dsh/dist/hooks/approval-policy.js +211 -0
  53. package/plugins/kimi-dsh/dist/hooks/config-safety.js +653 -0
  54. package/plugins/kimi-dsh/dist/hooks/install-paths.js +428 -0
  55. package/plugins/kimi-dsh/dist/hooks/install.js +210 -0
  56. package/plugins/kimi-dsh/dist/hooks/managed-block.js +619 -0
  57. package/plugins/kimi-dsh/dist/hooks/review-gate-stop.js +19 -0
  58. package/plugins/kimi-dsh/dist/job-id.js +12 -0
  59. package/plugins/kimi-dsh/dist/job-store.js +659 -0
  60. package/plugins/kimi-dsh/dist/jobs.js +217 -0
  61. package/plugins/kimi-dsh/dist/kimi-command.js +70 -0
  62. package/plugins/kimi-dsh/dist/kimi-engine.js +632 -0
  63. package/plugins/kimi-dsh/dist/kimi-errors.js +260 -0
  64. package/plugins/kimi-dsh/dist/kimi-home.js +9 -0
  65. package/plugins/kimi-dsh/dist/kimi-timeouts.js +52 -0
  66. package/plugins/kimi-dsh/dist/kimi-version-probe.js +216 -0
  67. package/plugins/kimi-dsh/dist/logging.js +22 -0
  68. package/plugins/kimi-dsh/dist/mcp/binding.js +58 -0
  69. package/plugins/kimi-dsh/dist/mcp/job-control.js +345 -0
  70. package/plugins/kimi-dsh/dist/mcp/launcher.js +257 -0
  71. package/plugins/kimi-dsh/dist/mcp/operations.js +301 -0
  72. package/plugins/kimi-dsh/dist/mcp/protocol.js +275 -0
  73. package/plugins/kimi-dsh/dist/mcp/server.js +8 -0
  74. package/plugins/kimi-dsh/dist/mcp/stdio.js +78 -0
  75. package/plugins/kimi-dsh/dist/mcp/supervised-child.js +15 -0
  76. package/plugins/kimi-dsh/dist/mcp/tool-result.js +7 -0
  77. package/plugins/kimi-dsh/dist/mcp/workspace.js +34 -0
  78. package/plugins/kimi-dsh/dist/model-command.js +32 -0
  79. package/plugins/kimi-dsh/dist/native-v2-preflight.js +417 -0
  80. package/plugins/kimi-dsh/dist/package.json +1 -0
  81. package/plugins/kimi-dsh/dist/parsing.js +620 -0
  82. package/plugins/kimi-dsh/dist/paths.js +27 -0
  83. package/plugins/kimi-dsh/dist/plugin-data.js +98 -0
  84. package/plugins/kimi-dsh/dist/process-tree.js +479 -0
  85. package/plugins/kimi-dsh/dist/prompt-size.js +18 -0
  86. package/plugins/kimi-dsh/dist/render.js +177 -0
  87. package/plugins/kimi-dsh/dist/rescue-approval.js +865 -0
  88. package/plugins/kimi-dsh/dist/schemas/review-gate-output.js +43 -0
  89. package/plugins/kimi-dsh/dist/session-recovery.js +200 -0
  90. package/plugins/kimi-dsh/dist/session-title.js +293 -0
  91. package/plugins/kimi-dsh/dist/stream-json.js +346 -0
  92. package/plugins/kimi-dsh/dist/swarm-activation.js +834 -0
  93. package/plugins/kimi-dsh/dist/swarm-recovery.js +134 -0
  94. package/plugins/kimi-dsh/dist/types.js +1 -0
  95. package/plugins/kimi-dsh/dist/vendor/shell-quote/LICENSE +24 -0
  96. package/plugins/kimi-dsh/dist/vendor/shell-quote/index.js +1 -0
  97. package/plugins/kimi-dsh/dist/vendor/shell-quote/parse.js +229 -0
  98. package/plugins/kimi-dsh/dist/vendor/smol-toml/LICENSE +24 -0
  99. package/plugins/kimi-dsh/dist/vendor/smol-toml/date.js +156 -0
  100. package/plugins/kimi-dsh/dist/vendor/smol-toml/error.js +67 -0
  101. package/plugins/kimi-dsh/dist/vendor/smol-toml/extract.js +293 -0
  102. package/plugins/kimi-dsh/dist/vendor/smol-toml/parse.js +164 -0
  103. package/plugins/kimi-dsh/dist/vendor/smol-toml/primitive.js +151 -0
  104. package/plugins/kimi-dsh/dist/vendor/smol-toml/struct.js +156 -0
  105. package/plugins/kimi-dsh/dist/vendor/smol-toml/util.js +57 -0
  106. package/plugins/kimi-dsh/dist/version.js +7 -0
  107. package/plugins/kimi-dsh/package.json +48 -0
  108. package/plugins/kimi-dsh/scripts/companion.sh +37 -0
  109. package/plugins/kimi-dsh/scripts/review-gate-hook.sh +32 -0
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Kimi for Claude Code: code questions, reviews, fixes, parallel tasks, and MCP tasks through the local Kimi Code CLI.",
8
- "version": "2.4.5"
8
+ "version": "2.5.1"
9
9
  },
10
10
  "plugins": [
11
11
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kimi",
3
3
  "description": "Kimi for Claude Code: code questions, independent reviews, bounded fixes, autonomous goals, parallel tasks, and MCP tasks through the local Kimi Code CLI, with PreToolUse safety hooks.",
4
- "version": "2.4.5",
4
+ "version": "2.5.1",
5
5
  "homepage": "https://github.com/linxule/kimi-plugin-cc",
6
6
  "repository": "https://github.com/linxule/kimi-plugin-cc",
7
7
  "license": "Apache-2.0",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  > **Post-1.0 release history (v1.0.1 -> present) lives in [ROADMAP-TO-GA.md § Post-GA audit log](./ROADMAP-TO-GA.md#post-ga-audit-log)** and the "Version" / "Upstream compat" lines of [AGENTS.md](./AGENTS.md). Docs-only kimi-code compat checkups that don't bump the plugin version (e.g. the 0.14.2 / 0.14.3 patches) are recorded there, not here. Notable releases are summarized below; the GA entry and full pre-GA detail follow.
4
4
 
5
+ ## 2.5.1 — 2026-11-01
6
+
7
+ - Consolidate DSH distribution into the existing `kimi-plugin-cc` npm package and its established OIDC publication path. DSH users install the same root artifact with `dsh plugin --profile <name> add kimi-plugin-cc`; no second npm package or Trusted Publishing binding is required.
8
+ - Declare the root DSH bundle entry, runtime dependencies, and peer compatibility directly in `package.json`, and validate root-tarball installation, seven-tool composition, and Web boot in an isolated DSH profile.
9
+ - Pin safe transitive `zod` and `undici` versions, remove the unnecessary full DSH CLI development dependency, install pnpm explicitly in CI, and exclude dependency directories from installed-script fixtures.
10
+
11
+ ## 2.5.0 — 2026-11-01
12
+
13
+ - Add DeepSeek Harness as a third host with native `kimi_ask`, `kimi_review`, `kimi_challenge`, `kimi_rescue`, `kimi_pursue`, `kimi_swarm`, and `kimi_swarm_write` providers. Reuse the existing companion and `kimi -p` transport, managed hooks, exact-version certification, SQLite jobs, budgets, artifacts, and process lifecycle; no ACP transport.
14
+ - Add DSH-owned setup, model inventory, host-scoped uninstall, and job controls, plus profile-level model, thinking, budget, review-base, data-root, environment, output, and teardown settings. Preserve read-only denials, real-workspace rescue/pursue writes, and patch-only swarm-write.
15
+ - Package `dsh-kimi-plugin-cc` as an independently installable npm bundle with its own pack/install/composition/Web-boot gate. Publish root and DSH tarballs together through the existing OIDC workflow, with Node 24 CI and verified composition on DSH 0.2.1-rc.5 and 0.2.2-alpha.2.
16
+ - Verify live DSH delegation: `kimi_ask` returns `4`, a managed-hook write denial creates no file, rescue writes only `DSH_OK`, and a two-target swarm-write returns a valid patch without applying it or touching the real workspace.
17
+ - Update installation, safety, model, registry, contributor, and multilingual README guidance. Reduce `AGENTS.md` from 32,704 to 21,291 bytes by keeping detailed mechanics in owning references, and enforce a 24 KB ceiling.
18
+
5
19
  ## 2.4.5 — 2026-10-31
6
20
 
7
21
  - Certify exact kimi-code 2.4.1 for all eight native-v2 operations after exact-source review, plan and swarm controls, and candidate/production smoke. See [evidence](docs/upstream-2.4.1-certification.md).
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Kimi for Claude Code and Codex
1
+ # Kimi for Claude Code, Codex, and DeepSeek Harness
2
2
 
3
3
  [![Latest release](https://img.shields.io/github/v/release/linxule/kimi-plugin-cc)](https://github.com/linxule/kimi-plugin-cc/releases/latest) [![CI](https://github.com/linxule/kimi-plugin-cc/actions/workflows/ci.yml/badge.svg)](https://github.com/linxule/kimi-plugin-cc/actions/workflows/ci.yml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
4
4
 
5
- Use Kimi to explain code, review changes, challenge a design, or work toward a goal — an independent second opinion from a different model family, inside the Claude Code or Codex session you're already in.
5
+ Use Kimi to explain code, review changes, challenge a design, or work toward a goal — an independent second opinion from a different model family, inside the Claude Code, Codex, or DeepSeek Harness session you're already in.
6
6
 
7
7
  [![Kimi Ambassador — academia](./assets/kimi-ambassador-academia.webp)](https://www.kimi.ai/lp/kimi-ambassador)
8
8
 
@@ -27,19 +27,19 @@ Choose a language below. Each guide opens on this page.
27
27
 
28
28
  ## Use Kimi in your coding tasks
29
29
 
30
- Ask Kimi to explain code, review changes, challenge a design, or make a focused fix. You can use this plugin in Claude Code or Codex.
30
+ Ask Kimi to explain code, review changes, challenge a design, or make a focused fix. You can use this plugin in Claude Code, Codex, or DeepSeek Harness (DSH).
31
31
 
32
- The plugin runs the Kimi Code CLI on your computer. It uses your Kimi subscription or a provider you configure in Kimi. Calls count against that subscription or API account. Your Claude Code or Codex login stays unchanged. The selected provider receives the prompts and code needed for your task.
32
+ The plugin runs the Kimi Code CLI on your computer. It uses your Kimi subscription or a provider you configure in Kimi. Calls count against that subscription or API account. Your host application's login stays unchanged. The selected provider receives the prompts and code needed for your task.
33
33
 
34
- Start with a question or a review. Their tool rules allow reading files and deny file writes and shell commands. Other modes can change files. Read the [safety limits](./docs/safety.md) before asking Kimi to make changes.
34
+ Start with a question or a review. Their tool rules allow reading files and deny file writes and shell commands. Other modes can change files. DSH provides the same seven operations with the same write boundaries. Read the [safety limits](./docs/safety.md) before asking Kimi to make changes.
35
35
 
36
36
  ## Before you install
37
37
 
38
38
  You need:
39
39
 
40
40
  - macOS or Linux
41
- - Claude Code or Codex with plugin support
42
- - Node.js 22.5 or newer
41
+ - Claude Code, Codex, or DSH with plugin support
42
+ - Node.js 22.5 or newer (24.9 or newer for DSH)
43
43
  - Kimi Code CLI 2.4.1 (certified; 2.4.0, 2.3.3, 2.3.2, 2.3.1 and 2.3.0 are also certified)
44
44
 
45
45
  Windows is not currently supported. Contributors can help with the [no-model Windows diagnostics checks](./docs/windows-validation.md). Check your versions in a terminal:
@@ -95,20 +95,36 @@ The hook checks Kimi's tool calls against the plugin's rules. The `Probe:` line
95
95
  Use $kimi-ask to explain how this project's main entry point works.
96
96
  ```
97
97
 
98
- If you use both Claude Code and Codex, run setup in each. Each app has its own hook in the shared Kimi configuration.
98
+ If you use multiple hosts, run setup in each. Each app has its own hook in the shared Kimi configuration.
99
+
100
+ ## Install in DeepSeek Harness
101
+
102
+ The DSH bundle provides the same seven operations as the other hosts: `kimi_ask`, `kimi_review`, `kimi_challenge`, `kimi_rescue`, `kimi_pursue`, `kimi_swarm`, and `kimi_swarm_write`. They use the same companion runtime, safety hooks, jobs, budgets, and artifacts. Rescue and pursue edit the selected workspace; swarm-write returns a patch without applying or committing it.
103
+
104
+ From this repository checkout, run:
105
+
106
+ ```sh
107
+ dsh plugin --profile web add ./plugins/kimi-dsh
108
+ ```
109
+
110
+ For the published npm bundle, run `dsh plugin --profile web add kimi-plugin-cc` instead.
111
+
112
+ Restart DSH when requested, then run `/kimi-setup` and `/kimi-setup --check`. Ask DSH to use one of the seven tools with a self-contained task. Job controls are `/kimi-status`, `/kimi-result`, and `/kimi-cancel`. `/kimi-setup --models` lists configured models, and `/kimi-setup --uninstall` removes only the DSH hook.
113
+
114
+ DSH requires Node.js 24.9 or newer and DSH `>=0.2.1-rc.5 <0.3.0`. See the [DSH bundle guide](./plugins/kimi-dsh/README.md) for profile-level model, thinking, budget, review-base, and other configuration.
99
115
 
100
116
  ## npm distribution (optional)
101
117
 
102
118
  The existing marketplace commands above remain the default for Claude Code and
103
119
  Codex. Published releases are also available as
104
120
  [`kimi-plugin-cc` on npm](https://www.npmjs.com/package/kimi-plugin-cc), including
105
- both compiled plugin distributions. No Bun, TypeScript, or install scripts are
121
+ all three compiled plugin distributions. No Bun, TypeScript, or install scripts are
106
122
  needed to use the package. Kimi Code CLI and Node are still prerequisites.
107
123
 
108
- For an explicitly versioned local Claude Code plugin, this example pins the 2.4.5 package:
124
+ For an explicitly versioned local Claude Code plugin, this example pins the 2.5.1 package:
109
125
 
110
126
  ```sh
111
- npm install --prefix ~/.local/share/kimi-plugin-cc kimi-plugin-cc@2.4.5
127
+ npm install --prefix ~/.local/share/kimi-plugin-cc kimi-plugin-cc@2.5.1
112
128
  claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
113
129
  ```
114
130
 
@@ -251,19 +267,19 @@ Contributors need Bun to run `bun run check`. The detailed engineering documents
251
267
 
252
268
  ## 用 Kimi 辅助编程
253
269
 
254
- 你可以让 Kimi 解释代码、审查修改、指出设计中的问题,或完成一项范围明确的修复。本插件支持 Claude Code 和 Codex。
270
+ 你可以让 Kimi 解释代码、审查修改、指出设计中的问题,或完成一项范围明确的修复。本插件支持 Claude Code、Codex 和 DeepSeek Harness(DSH)。
255
271
 
256
- 插件在你的电脑上调用 Kimi Code CLI,使用你的 Kimi 订阅或在 Kimi 中配置的服务商。调用会消耗相应的订阅额度或产生 API 费用。Claude Code 和 Codex 的登录状态不变。任务所需的提示词和代码会发送给所选服务商。
272
+ 插件在你的电脑上调用 Kimi Code CLI,使用你的 Kimi 订阅或在 Kimi 中配置的服务商。调用会消耗相应的订阅额度或产生 API 费用。宿主应用的登录状态不变。任务所需的提示词和代码会发送给所选服务商。
257
273
 
258
- 建议先尝试提问或代码审查。这两类任务允许读取文件,禁止写入文件和执行 shell 命令。其他模式可以修改文件。让 Kimi 动手修改前,请先了解[安全限制](./docs/safety.md)。
274
+ 建议先尝试提问或代码审查。这两类任务允许读取文件,禁止写入文件和执行 shell 命令。其他模式可以修改文件;DSH 同样提供七类操作,并遵循相同的写入边界。让 Kimi 动手修改前,请先了解[安全限制](./docs/safety.md)。DSH 的安装方法见[英文说明](#install-in-deepseek-harness)。
259
275
 
260
276
  ## 安装前准备
261
277
 
262
278
  你需要:
263
279
 
264
280
  - macOS 或 Linux
265
- - 支持插件的 Claude Code 或 Codex
266
- - Node.js 22.5 或更高版本
281
+ - 支持插件的 Claude Code、Codex 或 DSH
282
+ - Node.js 22.5 或更高版本(DSH 需要 24.9 或更高版本)
267
283
  - Kimi Code CLI 2.4.1(已认证;2.4.0、2.3.3、2.3.2、2.3.1 和 2.3.0 也已认证)
268
284
 
269
285
  目前不支持 Windows。在终端检查版本:
@@ -450,19 +466,19 @@ Ask、review、challenge 和只读 swarm 的工具规则禁止写入文件和执
450
466
 
451
467
  ## Utiliser Kimi pour vos tâches de développement
452
468
 
453
- Demandez à Kimi d'expliquer du code, de faire une revue de code, de remettre en question une approche ou de corriger un problème précis. Ce plugin fonctionne dans Claude Code et Codex.
469
+ Demandez à Kimi d'expliquer du code, de faire une revue de code, de remettre en question une approche ou de corriger un problème précis. Ce plugin fonctionne dans Claude Code, Codex et DeepSeek Harness (DSH).
454
470
 
455
- Le plugin exécute Kimi Code CLI sur votre ordinateur. Il utilise votre abonnement Kimi ou un fournisseur configuré dans Kimi. Les appels consomment votre quota d'abonnement ou sont facturés sur votre compte API. Votre connexion à Claude Code ou à Codex ne change pas. Le fournisseur choisi reçoit les prompts et le code nécessaires à la tâche.
471
+ Le plugin exécute Kimi Code CLI sur votre ordinateur. Il utilise votre abonnement Kimi ou un fournisseur configuré dans Kimi. Les appels consomment votre quota d'abonnement ou sont facturés sur votre compte API. La connexion à l'application hôte ne change pas. Le fournisseur choisi reçoit les prompts et le code nécessaires à la tâche.
456
472
 
457
- Commencez par une question ou une revue de code. Ces modes autorisent la lecture des fichiers, mais interdisent leur modification et l'exécution de commandes shell. D'autres modes peuvent modifier des fichiers. Consultez les [limites de sécurité](./docs/safety.md) avant de demander des modifications à Kimi.
473
+ Commencez par une question ou une revue de code. Ces modes autorisent la lecture des fichiers, mais interdisent leur modification et l'exécution de commandes shell. D'autres modes peuvent modifier des fichiers ; DSH propose les sept mêmes opérations avec les mêmes limites d'écriture. Consultez les [limites de sécurité](./docs/safety.md) avant de demander des modifications à Kimi. Voir le [guide DSH en anglais](#install-in-deepseek-harness) pour l'installation.
458
474
 
459
475
  ## Préparer l'installation
460
476
 
461
477
  Il vous faut :
462
478
 
463
479
  - macOS ou Linux
464
- - une version de Claude Code ou de Codex prenant en charge les plugins
465
- - Node.js 22.5 ou une version ultérieure
480
+ - une version de Claude Code, Codex ou DSH prenant en charge les plugins
481
+ - Node.js 22.5 ou une version ultérieure (24.9 ou ultérieure pour DSH)
466
482
  - Kimi Code CLI 2.4.1 (certifiée ; les versions 2.4.0, 2.3.3, 2.3.2, 2.3.1 et 2.3.0 sont également certifiées)
467
483
 
468
484
  Windows n'est pas pris en charge actuellement. Vérifiez les versions dans un terminal :
@@ -649,19 +665,19 @@ Les contributeurs ont besoin de Bun pour exécuter `bun run check`. La documenta
649
665
 
650
666
  ## Kimi を開発に使う
651
667
 
652
- コードの説明、変更のレビュー、設計の問題点の指摘、範囲を絞った修正を Kimi に依頼できます。このプラグインは Claude Code と Codex で使えます。
668
+ コードの説明、変更のレビュー、設計の問題点の指摘、範囲を絞った修正を Kimi に依頼できます。このプラグインは Claude Code、Codex、DeepSeek Harness(DSH)で使えます。
653
669
 
654
- プラグインは、お使いのコンピューターで Kimi Code CLI を実行します。Kimi のサブスクリプション、または Kimi に設定したプロバイダーを利用します。呼び出しは、そのサブスクリプションの利用枠を消費するか、API アカウントに課金されます。Claude Code や Codex のログイン状態は変わりません。タスクに必要なプロンプトとコードは、選択したプロバイダーに送信されます。
670
+ プラグインは、お使いのコンピューターで Kimi Code CLI を実行します。Kimi のサブスクリプション、または Kimi に設定したプロバイダーを利用します。呼び出しは、そのサブスクリプションの利用枠を消費するか、API アカウントに課金されます。ホストアプリのログイン状態は変わりません。タスクに必要なプロンプトとコードは、選択したプロバイダーに送信されます。
655
671
 
656
- まずは質問かコードレビューを試してください。これらのモードではファイルの読み取りを許可し、書き込みとシェルコマンドの実行を禁止しています。ほかのモードではファイルを変更できます。変更を依頼する前に、[安全上の制限](./docs/safety.md)を確認してください。
672
+ まずは質問かコードレビューを試してください。これらのモードではファイルの読み取りを許可し、書き込みとシェルコマンドの実行を禁止しています。ほかのモードではファイルを変更できます。DSH でも同じ 7 種類の操作を同じ書き込み範囲で提供します。変更を依頼する前に、[安全上の制限](./docs/safety.md)を確認してください。DSH のインストール方法は[英語の案内](#install-in-deepseek-harness)を参照してください。
657
673
 
658
674
  ## インストール前の準備
659
675
 
660
676
  次の環境が必要です。
661
677
 
662
678
  - macOS または Linux
663
- - プラグインに対応した Claude Code または Codex
664
- - Node.js 22.5 以降
679
+ - プラグインに対応した Claude Code、Codex、または DSH
680
+ - Node.js 22.5 以降(DSH では 24.9 以降)
665
681
  - Kimi Code CLI 2.4.1(認証済み。2.4.0、2.3.3、2.3.2、2.3.1 と 2.3.0 も認証済み)
666
682
 
667
683
  現在、Windows には対応していません。ターミナルでバージョンを確認します。
@@ -0,0 +1,174 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { brandString } from "@deepseek-ai/dsh-brand";
3
+ import { assertUsableCwd, settleRunResult, subprocessRunHandle, } from "@deepseek-ai/dsh-subagent";
4
+ export const DSH_COMPANION_OPERATIONS = [
5
+ "ask",
6
+ "review",
7
+ "challenge",
8
+ "rescue",
9
+ "pursue",
10
+ "swarm",
11
+ "swarm-write",
12
+ ];
13
+ export function companionTextTask(prompt) {
14
+ if (prompt.length === 0 || prompt.some((block) => block.type !== "text")) {
15
+ throw new Error("kimi-plugin-cc: a delegation must contain only text blocks");
16
+ }
17
+ const text = prompt.map((block) => block.type === "text" ? block.text : "").join("\n\n");
18
+ if (text.trim().length === 0) {
19
+ throw new Error("kimi-plugin-cc: a delegation must not be empty");
20
+ }
21
+ return text;
22
+ }
23
+ export function companionArgv(operation, prompt, companionPath, nodeBin = process.execPath, options = {}) {
24
+ const command = operation === "ask" || operation === "review"
25
+ ? [operation]
26
+ : operation === "swarm-write"
27
+ ? ["task", "swarm", "--write"]
28
+ : ["task", operation];
29
+ return [
30
+ nodeBin,
31
+ companionPath,
32
+ ...command,
33
+ ...(operation === "ask" || operation === "rescue" ? ["--fresh"] : []),
34
+ ...(options.model === undefined ? [] : ["-m", options.model]),
35
+ ...(options.thinkingEffort === undefined ? [] : ["--thinking", options.thinkingEffort]),
36
+ ...(options.budget === undefined ? [] : ["--budget", options.budget]),
37
+ ...((operation === "review" || operation === "challenge") && options.reviewBase !== undefined
38
+ ? ["--base", options.reviewBase]
39
+ : []),
40
+ "--",
41
+ prompt,
42
+ ];
43
+ }
44
+ export function companionEnvironment(dataRoot, cwd, env, nodeBin = process.execPath) {
45
+ return {
46
+ ...env,
47
+ KIMI_PLUGIN_CC_DATA: dataRoot,
48
+ KIMI_PLUGIN_CC_HOST_ID: "dsh",
49
+ KIMI_PLUGIN_CC_NODE_BIN: nodeBin,
50
+ KIMI_PLUGIN_CC_WORKSPACE_CWD: cwd,
51
+ CLAUDE_PLUGIN_DATA: undefined,
52
+ PLUGIN_DATA: undefined,
53
+ CLAUDE_PLUGIN_ROOT: undefined,
54
+ PLUGIN_ROOT: undefined,
55
+ KIMI_PLUGIN_CC_SHELL_LAUNCH: undefined,
56
+ KIMI_PLUGIN_CC_MCP_WORKSPACE: undefined,
57
+ KIMI_PLUGIN_CC_WORKSPACE_ROOT: undefined,
58
+ KIMI_PLUGIN_CC_HOOK_SCRIPT: undefined,
59
+ KIMI_PLUGIN_CC_SKIP_HOOK_CHECK: undefined,
60
+ KIMI_PLUGIN_CC_SKIP_VERSION_PROBE: undefined,
61
+ KIMI_CODE_TRUST_WORKSPACE: undefined,
62
+ };
63
+ }
64
+ export async function startCompanionRun(request, operation, spec) {
65
+ const prompt = companionTextTask(request.prompt);
66
+ if (request.signal.aborted) {
67
+ throw new Error("kimi-plugin-cc: delegation was aborted before companion startup");
68
+ }
69
+ const cwd = assertUsableCwd("kimi-plugin-cc", "child cwd", request.cwd ?? process.cwd());
70
+ const termination = new AbortController();
71
+ let cancelled = false;
72
+ const requestCancel = () => {
73
+ cancelled = true;
74
+ if (!termination.signal.aborted) {
75
+ termination.abort(new Error("kimi-plugin-cc: delegation cancelled"));
76
+ }
77
+ };
78
+ const onAbort = () => requestCancel();
79
+ request.signal.addEventListener("abort", onAbort, { once: true });
80
+ let child;
81
+ try {
82
+ child = spec.spawn({
83
+ argv: companionArgv(operation, prompt, spec.companionPath, process.execPath, spec),
84
+ cwd,
85
+ stdio: {
86
+ stdin: "ignore",
87
+ stdout: { maxBytes: spec.maxOutputBytes },
88
+ stderr: "inherit",
89
+ },
90
+ graceMs: spec.disposeGraceMs,
91
+ signal: termination.signal,
92
+ env: companionEnvironment(spec.dataRoot, cwd, spec.env),
93
+ });
94
+ }
95
+ catch (error) {
96
+ request.signal.removeEventListener("abort", onAbort);
97
+ throw error;
98
+ }
99
+ let diagnostic;
100
+ const result = settleRunResult({
101
+ attempt: async () => {
102
+ let outcome;
103
+ try {
104
+ outcome = await child.done;
105
+ }
106
+ catch (error) {
107
+ diagnostic = `Kimi ${operation} companion failed before producing a terminal exit`;
108
+ throw error;
109
+ }
110
+ const collected = child.collected.stdout?.readFrom(0);
111
+ const text = collected?.text.trimEnd() ?? "";
112
+ if (!cancelled && outcome.exitCode === 0 && collected && !collected.lossy && text.trim().length > 0) {
113
+ return { output: [{ type: "text", text }], stopReason: "completed" };
114
+ }
115
+ const facts = [
116
+ `exit code: ${outcome.exitCode ?? "none"}`,
117
+ `signal: ${outcome.signal ?? "none"}`,
118
+ ...(collected?.lossy ? ["stdout truncated"] : []),
119
+ ...(text.trim().length === 0 ? ["stdout empty"] : []),
120
+ ];
121
+ diagnostic = `Kimi ${operation} companion failed (${facts.join("; ")})`;
122
+ return { output: [], diagnostic, stopReason: cancelled ? "aborted" : "error" };
123
+ },
124
+ collectOutput: () => [],
125
+ collectDiagnostic: () => diagnostic,
126
+ cancelled: () => cancelled,
127
+ signal: request.signal,
128
+ onAbort,
129
+ });
130
+ return subprocessRunHandle({
131
+ id: brandString(randomUUID()),
132
+ result,
133
+ signal: request.signal,
134
+ onAbort,
135
+ requestCancel,
136
+ teardown: async () => {
137
+ child.terminate();
138
+ await child.waitForExit();
139
+ await child.done.catch(() => { });
140
+ },
141
+ });
142
+ }
143
+ export async function runCompanionCommand(argv, cwd, spec, signal) {
144
+ const child = spec.spawn({
145
+ argv: [process.execPath, spec.companionPath, ...argv],
146
+ cwd,
147
+ stdio: {
148
+ stdin: "ignore",
149
+ stdout: { maxBytes: spec.maxOutputBytes },
150
+ stderr: { maxBytes: spec.maxOutputBytes },
151
+ },
152
+ graceMs: spec.disposeGraceMs,
153
+ signal,
154
+ env: companionEnvironment(spec.dataRoot, cwd, spec.env),
155
+ });
156
+ try {
157
+ const outcome = await child.done;
158
+ await child.waitForExit();
159
+ const stdout = child.collected.stdout?.readFrom(0);
160
+ const stderr = child.collected.stderr?.readFrom(0);
161
+ return {
162
+ exitCode: outcome.exitCode,
163
+ signal: outcome.signal,
164
+ stdout: stdout?.text ?? "",
165
+ stderr: stderr?.text ?? "",
166
+ truncated: Boolean(stdout?.lossy || stderr?.lossy),
167
+ };
168
+ }
169
+ catch (error) {
170
+ child.terminate();
171
+ await child.waitForExit().catch(() => false);
172
+ throw error;
173
+ }
174
+ }
@@ -0,0 +1,156 @@
1
+ import { homedir } from "node:os";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { CommandDefinitionId } from "@deepseek-ai/dsh-commands/brand";
5
+ import z from "@deepseek-ai/schemastery";
6
+ import { NO_START_CAPABILITIES, } from "@deepseek-ai/dsh-subagent";
7
+ import { DSH_COMPANION_OPERATIONS, runCompanionCommand, startCompanionRun, } from "./companion.js";
8
+ import { parseDurationMs } from "../parsing.js";
9
+ export const name = "kimi-plugin-cc";
10
+ export const inject = ["subagents", "subprocess"];
11
+ const DEFAULT_DISPOSE_GRACE_MS = 6_000;
12
+ const DEFAULT_MAX_OUTPUT_BYTES = 16 * 1024 * 1024;
13
+ const MAX_TIMER_DELAY_MS = 2_147_483_647;
14
+ const COMPANION_PATH = fileURLToPath(new URL("../../dist/companion.js", import.meta.url));
15
+ export const Config = z.object({
16
+ dataRoot: z.string().min(1),
17
+ env: z.dict(z.string()).default({}),
18
+ disposeGraceMs: z.number().default(DEFAULT_DISPOSE_GRACE_MS),
19
+ maxOutputBytes: z.number().default(DEFAULT_MAX_OUTPUT_BYTES),
20
+ model: z.string().min(1),
21
+ thinkingEffort: z.string().min(1),
22
+ budget: z.string().min(1),
23
+ reviewBase: z.string().min(1),
24
+ });
25
+ export function defaultDshDataRoot(env = process.env) {
26
+ const explicit = env.KIMI_PLUGIN_CC_DATA;
27
+ if (explicit !== undefined) {
28
+ if (!path.isAbsolute(explicit)) {
29
+ throw new Error("kimi-plugin-cc: KIMI_PLUGIN_CC_DATA must be absolute");
30
+ }
31
+ return path.normalize(explicit);
32
+ }
33
+ const dshHome = env.DSH_HOME ?? path.join(env.HOME || homedir(), ".dsh");
34
+ if (!path.isAbsolute(dshHome)) {
35
+ throw new Error("kimi-plugin-cc: DSH_HOME must be absolute");
36
+ }
37
+ return path.join(dshHome, "plugin-data", "kimi-plugin-cc");
38
+ }
39
+ function resolveConfig(config) {
40
+ const resolved = {
41
+ dataRoot: config.dataRoot ?? defaultDshDataRoot(),
42
+ env: config.env ?? {},
43
+ disposeGraceMs: config.disposeGraceMs ?? DEFAULT_DISPOSE_GRACE_MS,
44
+ maxOutputBytes: config.maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES,
45
+ model: config.model,
46
+ thinkingEffort: config.thinkingEffort,
47
+ budget: config.budget,
48
+ reviewBase: config.reviewBase,
49
+ };
50
+ if (!path.isAbsolute(resolved.dataRoot)) {
51
+ throw new Error("kimi-plugin-cc: dataRoot must be absolute");
52
+ }
53
+ if (!Number.isFinite(resolved.disposeGraceMs) || resolved.disposeGraceMs <= 0 || resolved.disposeGraceMs > MAX_TIMER_DELAY_MS) {
54
+ throw new Error(`kimi-plugin-cc: disposeGraceMs must be positive, finite, and no greater than ${MAX_TIMER_DELAY_MS}`);
55
+ }
56
+ if (!Number.isSafeInteger(resolved.maxOutputBytes) || resolved.maxOutputBytes <= 0) {
57
+ throw new Error("kimi-plugin-cc: maxOutputBytes must be a positive safe integer");
58
+ }
59
+ for (const [field, value] of [["model", resolved.model], ["thinkingEffort", resolved.thinkingEffort], ["reviewBase", resolved.reviewBase]]) {
60
+ if (value?.startsWith("-"))
61
+ throw new Error(`kimi-plugin-cc: ${field} must not start with '-'`);
62
+ }
63
+ if (resolved.budget !== undefined)
64
+ parseDurationMs(resolved.budget, "--budget", "dsh.config", "safety");
65
+ return resolved;
66
+ }
67
+ class KimiCompanionProvider {
68
+ name;
69
+ operation;
70
+ spec;
71
+ capabilities = NO_START_CAPABILITIES;
72
+ inheritsParentContext = false;
73
+ constructor(name, operation, spec) {
74
+ this.name = name;
75
+ this.operation = operation;
76
+ this.spec = spec;
77
+ }
78
+ start(request) {
79
+ return startCompanionRun(request, this.operation, this.spec);
80
+ }
81
+ }
82
+ function commandArguments(rawInput) {
83
+ const trimmed = rawInput.trim();
84
+ return trimmed.length === 0 ? [] : trimmed.split(/\s+/);
85
+ }
86
+ function commandText(result) {
87
+ return [result.stdout.trimEnd(), result.stderr.trimEnd()]
88
+ .filter((text) => text.length > 0)
89
+ .join("\n");
90
+ }
91
+ export function apply(ctx, config) {
92
+ const resolved = resolveConfig(config);
93
+ const spec = {
94
+ companionPath: COMPANION_PATH,
95
+ dataRoot: resolved.dataRoot,
96
+ env: resolved.env,
97
+ disposeGraceMs: resolved.disposeGraceMs,
98
+ maxOutputBytes: resolved.maxOutputBytes,
99
+ model: resolved.model,
100
+ thinkingEffort: resolved.thinkingEffort,
101
+ budget: resolved.budget,
102
+ reviewBase: resolved.reviewBase,
103
+ spawn: (spawnSpec) => ctx.subprocess.spawn(spawnSpec),
104
+ };
105
+ for (const operation of DSH_COMPANION_OPERATIONS) {
106
+ ctx.subagents.registerProvider(new KimiCompanionProvider(`kimi-${operation}`, operation, spec));
107
+ }
108
+ ctx.inject(["commands"], (commandCtx) => {
109
+ const execute = async (invocation, argv) => {
110
+ const directories = commandCtx.get("workingDirectory");
111
+ if (directories === undefined) {
112
+ return { kind: "error", text: "Kimi commands require the DSH working-directory service." };
113
+ }
114
+ const cwd = await directories.ensure(invocation.agent, invocation.signal);
115
+ const result = await runCompanionCommand(argv, cwd, spec, invocation.signal);
116
+ const text = commandText(result);
117
+ if (result.truncated) {
118
+ return { kind: "error", text: `${text}\nKimi command output exceeded the configured byte limit.`.trim() };
119
+ }
120
+ if (result.exitCode !== 0) {
121
+ return {
122
+ kind: "error",
123
+ text: `${text}\nKimi command failed (exit code: ${result.exitCode ?? "none"}; signal: ${result.signal ?? "none"}).`.trim(),
124
+ };
125
+ }
126
+ return { kind: "success", text: text.length > 0 ? text : "Kimi command completed." };
127
+ };
128
+ commandCtx.commands.register({
129
+ definitionId: CommandDefinitionId("kimi-plugin-cc/dsh/setup"),
130
+ name: "kimi-setup",
131
+ description: "Install, check, or remove the DSH-owned Kimi PreToolUse hook; list configured models",
132
+ input: { hint: "[--check|--uninstall|--models [--json]]" },
133
+ recordInput: false,
134
+ handler: (invocation) => {
135
+ const args = commandArguments(invocation.rawInput);
136
+ const valid = args.length === 0
137
+ || (args.length === 1 && ["--check", "--uninstall", "--models"].includes(args[0]))
138
+ || (args.length === 2 && args[0] === "--models" && args[1] === "--json");
139
+ if (!valid) {
140
+ return { kind: "error", text: "Usage: /kimi-setup [--check|--uninstall|--models [--json]]" };
141
+ }
142
+ return execute(invocation, ["setup", ...args]);
143
+ },
144
+ });
145
+ for (const command of ["status", "result", "cancel"]) {
146
+ commandCtx.commands.register({
147
+ definitionId: CommandDefinitionId(`kimi-plugin-cc/dsh/${command}`),
148
+ name: `kimi-${command}`,
149
+ description: `${command === "cancel" ? "Cancel" : command === "status" ? "Inspect" : "Return"} a companion Kimi job`,
150
+ input: { hint: "[job-id]" },
151
+ recordInput: false,
152
+ handler: (invocation) => execute(invocation, [command, ...commandArguments(invocation.rawInput)]),
153
+ });
154
+ }
155
+ });
156
+ }
@@ -410,7 +410,7 @@ export function hostIdFromHookCommand(command) {
410
410
  }
411
411
  /**
412
412
  * True only for a canonical two-single-quoted-token command whose script is
413
- * `approval-hook.js` under a kimi-plugin-cc/kimi-marketplace install tree.
413
+ * `approval-hook.js` under a kimi-plugin-cc/dsh-kimi-plugin-cc/kimi-marketplace install tree.
414
414
  * This strict ownership test protects hand-rolled and non-canonical user hooks
415
415
  * from orphan pruning.
416
416
  */
@@ -424,5 +424,5 @@ export function isOurApprovalHookCommand(decodedCommand) {
424
424
  const normalized = parsed.hookScript.replace(/\\/g, "/");
425
425
  // Require a real path segment, not an arbitrary substring, so a user hook in
426
426
  // a similarly named wrapper directory is never misclassified and pruned.
427
- return normalized.includes("/kimi-plugin-cc/") || normalized.includes("/kimi-marketplace/");
427
+ return normalized.includes("/kimi-plugin-cc/") || normalized.includes("/dsh-kimi-plugin-cc/") || normalized.includes("/kimi-marketplace/");
428
428
  }
package/dist/version.js CHANGED
@@ -4,4 +4,4 @@
4
4
  // and AGENTS.md on every release. A future improvement would read this from
5
5
  // package.json at build time, but that adds a build-step dependency we
6
6
  // don't want yet.
7
- export const KIMI_PLUGIN_CC_VERSION = "2.4.5";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.5.1";
package/docs/models.md CHANGED
@@ -6,7 +6,7 @@ configured model for one task without changing that default.
6
6
  ## See configured models
7
7
 
8
8
  In Claude Code, run `/kimi:setup --models`. In Codex, ask `$kimi-setup` to list
9
- models. The underlying command is:
9
+ models. In DSH, run `/kimi-setup --models` (or `--models --json`). The underlying command is:
10
10
 
11
11
  ```sh
12
12
  "<plugin-root>/scripts/companion.sh" setup --models
@@ -35,6 +35,8 @@ several, and guide setup when there is none. They do not guess model IDs or
35
35
  silently substitute the default after an error. An explicit `-m` remains a
36
36
  pass-through alias, so upstream can resolve it or report an error.
37
37
 
38
+ DSH activations are one-shot and do not expose per-call model fields. Set `model` in the bundle's `kimi-plugin-cc` profile row to use one exact configured alias for every delegation from that profile; omit it to use the native Kimi default. This does not change the saved default or add fallback selection.
39
+
38
40
  Omitting `-m` uses the default for a **fresh** session. A resumed session keeps
39
41
  its previous model unless you supply `-m`. The optional review gate also uses
40
42
  the default unless `KIMI_PLUGIN_CC_REVIEW_GATE_MODEL` explicitly selects an alias.
@@ -87,6 +89,8 @@ including `kosongConfig/configSection.ts`, `envOverlay.ts`, and
87
89
 
88
90
  Use `--thinking off`, `--thinking high`, or `--thinking=<effort>` before the prompt. Values are lowercased and must match `/^[a-z][a-z0-9-]{0,31}$/` (a plugin-owned syntax bound; a future upstream token outside it is rejected before upstream sees it); upstream per-model `supportEfforts`, not a plugin enum, determines supported values. `--no-thinking` is an error: use `--thinking off`. In CLI 2.2.0 only the three Moonshot `kimi*` provider definitions are trait-driven. BYO providers ignore the request silently; an always-thinking model may remain thinking.
89
91
 
92
+ DSH forwards the profile's `thinkingEffort` value as `--thinking <effort>` on every delegation. Omission preserves the ambient operator value; the same provider and observability limits apply.
93
+
90
94
  Jobs persist nullable `thinking_effort`; status and `result --json` expose `thinking_effort_requested`, not observed effort. Detached ask/rescue workers replay the request. A resume without `--thinking` exports no new override (any ambient operator value remains). No config.toml write occurs.
91
95
 
92
96
  The review gate requests `off` by default. `KIMI_PLUGIN_CC_REVIEW_GATE_THINKING=inherit` exports no override; another non-empty value is lowercased and must match the same regex. Unset or empty means `off`; an invalid value makes the gate skip visibly. The gate remains fail-open on its 8 s timeout: a BYO provider or always-thinking model can ignore the request, and even an honoured request does not guarantee completion within the budget.
@@ -1,16 +1,14 @@
1
1
  # Registry releases
2
2
 
3
3
  The npm package `kimi-plugin-cc` ships the Claude plugin at its root and the
4
- self-contained Codex plugin under `plugins/kimi-codex`. GitHub marketplaces
5
- remain available. The package has no install scripts and no separate CLI.
4
+ self-contained Codex and DSH plugins under `plugins/`. DSH users install that
5
+ same root package with `dsh plugin --profile <name> add kimi-plugin-cc`.
6
+ GitHub marketplaces remain available. The package has no install scripts and
7
+ no separate CLI.
6
8
 
7
9
  ## Publishing status
8
10
 
9
- Plugin **2.4.5** adds exact CLI **2.4.1** certification for all eight operations,
10
- with the existing host-preactivated swarm lifecycle and durable recovery.
11
- See the [certification record](./upstream-2.4.1-certification.md).
12
- Release execution and registry verification are recorded in the release notes;
13
- publication uses the same validated-tarball OIDC workflow below.
11
+ Plugin **2.4.5** certifies exact CLI **2.4.1** for all eight operations with host-preactivated swarm sessions. [Release v2.4.5](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.4.5) is anchored at `de8c195c2986443a088b674717133b164d2e4ef2`; its [CI check](https://github.com/linxule/kimi-plugin-cc/actions/runs/41226096281) and [release-event publishing run](https://github.com/linxule/kimi-plugin-cc/actions/runs/41226438326) passed. The registry tarball has SHA-1 `39f97a6de4b26ad51ac77305054682fcd5cd0164`, contains 233 files, and matches the CI artifact byte-for-byte. Fresh registry installs passed setup/check and unsupported-version refusal for both Claude Code and Codex, and both compiled mirrors are byte-identical to the release checkout. See the [certification record](./upstream-2.4.1-certification.md) and structured verification at `.claude/kimi-code-research/release-2.4.5/registry-verification.json`.
14
12
 
15
13
  Plugin **2.4.2** adds durable interrupted-swarm recovery and Windows spawn diagnostics.
16
14
  Exact CLI certification remains unchanged through **2.3.2**; this is not a new
@@ -90,15 +88,18 @@ bun run build
90
88
  bun run generate:surfaces
91
89
  # Review and stage generated distributions before the drift gate.
92
90
  bun run check
93
- bun run check:package .tmp/npm
91
+ node scripts/check-package.mjs .tmp/npm
92
+ node scripts/check-dsh-package.mjs .tmp/dsh-npm
94
93
  ```
95
94
 
96
- The package check inspects the actual tarball, rejects sync-conflict copies in
95
+ The root package check inspects the actual tarball, rejects sync-conflict copies in
97
96
  any path component, verifies runtime copies and vendored licenses, and
98
- installs/checks the safety hook in isolated homes for both hosts. It also
97
+ installs/checks the safety hook in isolated homes for all three hosts. It also
99
98
  exercises unsupported-version refusal using a fake CLI and modern MCP discovery
100
- plus legacy initialization on both extracted compiled distributions. It does
101
- not invoke a model or read the maintainer's Kimi configuration.
99
+ plus legacy initialization on the extracted compiled distributions. The DSH
100
+ check installs that same root tarball into an isolated DSH home, verifies all
101
+ seven tools, and boots the Web host. Neither check invokes a model or reads the
102
+ maintainer's Kimi configuration.
102
103
 
103
104
  ## First publication (completed bootstrap reference)
104
105
 
@@ -135,8 +136,10 @@ operations; Bun remains the development toolchain.
135
136
 
136
137
  Push the reviewed release commit, wait for CI, tag it, and publish its GitHub
137
138
  release. `.github/workflows/publish.yml` runs on `release.published`; it checks
138
- the tag against `package.json`, runs the full gate and package smoke, then
139
- publishes the validated tarball through OIDC with provenance. The publish job
140
- has no source checkout or build scripts. A manual dispatch with an existing
141
- release tag is available for recovery after a verified publication failure.
142
- Check npm before retrying; released versions are immutable.
139
+ the tag against `package.json`, runs the full gate and both package smokes, then
140
+ publishes the root tarball through OIDC with provenance. The DSH smoke installs
141
+ that same tarball directly into an isolated DSH profile, so no second npm
142
+ package or Trusted Publishing binding is needed. The publish job has no source
143
+ checkout or build scripts. A manual dispatch with an existing release tag is
144
+ available for recovery after a verified publication failure. Check npm before
145
+ retrying; released versions are immutable.