kimi-plugin-cc 2.4.4 → 2.4.5

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.
@@ -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.4"
8
+ "version": "2.4.5"
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.4",
4
+ "version": "2.4.5",
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,13 @@
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.4.5 — 2026-10-31
6
+
7
+ - 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).
8
+ - Add only the reviewed 2.4.1 activation and hook-schema entries. Preserve no-plan enforcement, workspace confinement, concurrency, bounded cleanup, durable recovery, and the legacy-v1 0.41.x boundary.
9
+ - Strengthen certification smoke to require same-call managed denials and real multi-turn journal evidence, and expand negative version coverage across every operation. Include the current certification record in the npm package.
10
+ - Review Read output/token limiting and goal/plan prompt changes without changing the tool execution, session provenance, or swarm activation contracts. Update the manual smoke default and current compatibility documentation; installed hosts remain unchanged.
11
+
5
12
  ## 2.4.4 — 2026-10-29
6
13
 
7
14
  - Certify exact kimi-code 2.4.0 for all eight native-v2 operations after exact-source review, revised plan and swarm controls, and candidate/production smoke. See [evidence](docs/upstream-2.4.0-certification.md).
package/README.md CHANGED
@@ -40,7 +40,7 @@ You need:
40
40
  - macOS or Linux
41
41
  - Claude Code or Codex with plugin support
42
42
  - Node.js 22.5 or newer
43
- - Kimi Code CLI 2.4.0 (certified; 2.3.3, 2.3.2, 2.3.1 and 2.3.0 are also certified)
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:
46
46
 
@@ -105,10 +105,10 @@ Codex. Published releases are also available as
105
105
  both compiled plugin distributions. No Bun, TypeScript, or install scripts are
106
106
  needed to use the package. Kimi Code CLI and Node are still prerequisites.
107
107
 
108
- For an explicitly versioned local Claude Code plugin, this example pins the 2.4.4 package:
108
+ For an explicitly versioned local Claude Code plugin, this example pins the 2.4.5 package:
109
109
 
110
110
  ```sh
111
- npm install --prefix ~/.local/share/kimi-plugin-cc kimi-plugin-cc@2.4.4
111
+ npm install --prefix ~/.local/share/kimi-plugin-cc kimi-plugin-cc@2.4.5
112
112
  claude --plugin-dir ~/.local/share/kimi-plugin-cc/node_modules/kimi-plugin-cc
113
113
  ```
114
114
 
@@ -228,7 +228,7 @@ All refusal codes and their remedies are listed in the [refusal-code catalog](./
228
228
 
229
229
  The tool rules for ask, review, challenge, and read-only swarm deny file writes and shell commands. Rescue and pursue can write files in your workspace. Swarm with `--write` works in a temporary Git worktree. It starts from your latest commit, so it does not include uncommitted changes. It returns a patch without applying it to your project.
230
230
 
231
- For swarm on CLI 2.3.2, 2.3.3 and 2.4.0, the plugin briefly starts an authenticated loopback `kimi web` process to activate a session and another to deactivate swarm mode afterward; one ordinary `kimi -p -r` process still performs the task. Activation counts against the time limit, the access token stays in memory and out of logs, and cleanup failure prevents success. Older certified versions use `kimi -p` directly.
231
+ For swarm on CLI 2.3.2, 2.3.3, 2.4.0 and 2.4.1, the plugin briefly starts an authenticated loopback `kimi web` process to activate a session and another to deactivate swarm mode afterward; one ordinary `kimi -p -r` process still performs the task. Activation counts against the time limit, the access token stays in memory and out of logs, and cleanup failure prevents success. Older certified versions use `kimi -p` directly.
232
232
 
233
233
  The plugin does not commit changes. Review changes before you keep or apply them.
234
234
 
@@ -264,7 +264,7 @@ Contributors need Bun to run `bun run check`. The detailed engineering documents
264
264
  - macOS 或 Linux
265
265
  - 支持插件的 Claude Code 或 Codex
266
266
  - Node.js 22.5 或更高版本
267
- - Kimi Code CLI 2.4.0(已认证;2.3.3、2.3.2、2.3.1 和 2.3.0 也已认证)
267
+ - Kimi Code CLI 2.4.1(已认证;2.4.0、2.3.3、2.3.2、2.3.1 和 2.3.0 也已认证)
268
268
 
269
269
  目前不支持 Windows。在终端检查版本:
270
270
 
@@ -427,7 +427,7 @@ codex plugin add kimi@kimi-marketplace
427
427
 
428
428
  Ask、review、challenge 和只读 swarm 的工具规则禁止写入文件和执行 shell 命令。Rescue 和 pursue 可以修改工作区内的文件。带 `--write` 的 swarm 在临时 Git 工作树中操作。它从最新提交开始,不包含尚未提交的修改。任务结束后返回补丁,不会自动应用到项目。
429
429
 
430
- 在 CLI 2.3.2、2.3.3 和 2.4.0 上运行 swarm 时,插件会短暂启动需要认证的本地回环 `kimi web` 进程来激活会话,并在结束后再次启动以停用 swarm 模式;任务本身仍由一个普通的 `kimi -p -r` 进程执行。激活计入任务时限,访问令牌只保存在内存且不会写入日志;无法确认清理完成时,任务不会报告成功。较早的已认证版本仍直接通过 `kimi -p` 运行。
430
+ 在 CLI 2.3.2、2.3.3、2.4.0 和 2.4.1 上运行 swarm 时,插件会短暂启动需要认证的本地回环 `kimi web` 进程来激活会话,并在结束后再次启动以停用 swarm 模式;任务本身仍由一个普通的 `kimi -p -r` 进程执行。激活计入任务时限,访问令牌只保存在内存且不会写入日志;无法确认清理完成时,任务不会报告成功。较早的已认证版本仍直接通过 `kimi -p` 运行。
431
431
 
432
432
  插件不会提交修改。保留或应用修改前,请先审查。
433
433
 
@@ -463,7 +463,7 @@ Il vous faut :
463
463
  - macOS ou Linux
464
464
  - une version de Claude Code ou de Codex prenant en charge les plugins
465
465
  - Node.js 22.5 ou une version ultérieure
466
- - Kimi Code CLI 2.4.0 (certifiée ; les versions 2.3.3, 2.3.2, 2.3.1 et 2.3.0 sont également certifiées)
466
+ - 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
467
 
468
468
  Windows n'est pas pris en charge actuellement. Vérifiez les versions dans un terminal :
469
469
 
@@ -626,7 +626,7 @@ Tous les codes de refus et leurs remèdes sont répertoriés dans le [catalogue
626
626
 
627
627
  Les règles des modes ask, review, challenge et swarm en lecture seule interdisent les écritures et les commandes shell. Rescue et pursue peuvent modifier les fichiers de votre espace de travail. Swarm avec `--write` travaille dans un worktree Git temporaire. Il part du dernier commit et n'inclut donc pas les modifications non commitées. Il renvoie un patch sans l'appliquer à votre projet.
628
628
 
629
- Avec le CLI 2.3.2, 2.3.3 et 2.4.0, les tâches swarm lancent brièvement un processus `kimi web` authentifié sur l'interface de boucle locale pour activer la session, puis un second pour désactiver le mode swarm ; un seul processus `kimi -p -r` ordinaire exécute toujours la tâche. L'activation est comptée dans la limite de temps, le jeton reste en mémoire et hors des journaux, et l'échec du nettoyage empêche de déclarer la réussite. Les versions certifiées antérieures utilisent directement `kimi -p`.
629
+ Avec le CLI 2.3.2, 2.3.3, 2.4.0 et 2.4.1, les tâches swarm lancent brièvement un processus `kimi web` authentifié sur l'interface de boucle locale pour activer la session, puis un second pour désactiver le mode swarm ; un seul processus `kimi -p -r` ordinaire exécute toujours la tâche. L'activation est comptée dans la limite de temps, le jeton reste en mémoire et hors des journaux, et l'échec du nettoyage empêche de déclarer la réussite. Les versions certifiées antérieures utilisent directement `kimi -p`.
630
630
 
631
631
  Le plugin ne crée aucun commit. Examinez les modifications avant de les conserver ou de les appliquer.
632
632
 
@@ -662,7 +662,7 @@ Les contributeurs ont besoin de Bun pour exécuter `bun run check`. La documenta
662
662
  - macOS または Linux
663
663
  - プラグインに対応した Claude Code または Codex
664
664
  - Node.js 22.5 以降
665
- - Kimi Code CLI 2.4.0(認証済み。2.3.3、2.3.2、2.3.1 と 2.3.0 も認証済み)
665
+ - Kimi Code CLI 2.4.1(認証済み。2.4.0、2.3.3、2.3.2、2.3.1 と 2.3.0 も認証済み)
666
666
 
667
667
  現在、Windows には対応していません。ターミナルでバージョンを確認します。
668
668
 
@@ -825,7 +825,7 @@ codex plugin add kimi@kimi-marketplace
825
825
 
826
826
  Ask、review、challenge、読み取り専用 swarm のツールルールでは、ファイルへの書き込みとシェルコマンドを禁止しています。Rescue と pursue はワークスペース内のファイルを変更できます。`--write` を指定した swarm は、一時的な Git ワークツリーで作業します。最新のコミットから開始するため、未コミットの変更は含まれません。パッチを返すだけで、プロジェクトには自動適用しません。
827
827
 
828
- CLI 2.3.2 / 2.3.3 / 2.4.0 の swarm では、セッションを有効化するため、そして終了後に swarm モードを無効化するため、認証付きのローカルループバック `kimi web` プロセスをそれぞれ短時間だけ起動します。タスク自体は従来どおり 1 つの `kimi -p -r` プロセスが実行します。有効化も制限時間に含まれ、トークンはメモリー内にのみ保持されてログには出ません。後処理を確認できない場合、タスクは成功と報告されません。以前の認証済みバージョンでは、引き続き `kimi -p` を直接使います。
828
+ CLI 2.3.2 / 2.3.3 / 2.4.0 / 2.4.1 の swarm では、セッションを有効化するため、そして終了後に swarm モードを無効化するため、認証付きのローカルループバック `kimi web` プロセスをそれぞれ短時間だけ起動します。タスク自体は従来どおり 1 つの `kimi -p -r` プロセスが実行します。有効化も制限時間に含まれ、トークンはメモリー内にのみ保持されてログには出ません。後処理を確認できない場合、タスクは成功と報告されません。以前の認証済みバージョンでは、引き続き `kimi -p` を直接使います。
829
829
 
830
830
  プラグインは変更をコミットしません。変更を残す、または適用する前に内容を確認してください。
831
831
 
@@ -28,7 +28,7 @@ import { buildKimiSessionTitle, syncKimiSessionTitle } from "../session-title.js
28
28
  // only the wall-clock hard bound. Read/write modes reuse review/rescue lineage,
29
29
  // and the mandatory PreToolUse hook enforces read-only policy or trusted-worktree
30
30
  // write confinement on the coordinator and every subagent. Write mode requires
31
- // kimi-code 0.18.0+. Exact 2.3.2, 2.3.3 and 2.4.0 additionally activate a same-job
31
+ // kimi-code 0.18.0+. Exact 2.3.2, 2.3.3, 2.4.0 and 2.4.1 additionally activate a same-job
32
32
  // session through a bounded loopback web lifecycle, then resume it through the normal print path.
33
33
  const SWARM_SUMMARY_MAX = 120;
34
34
  const SWARM_AGENT_PROFILE = "<swarm>";
@@ -595,7 +595,7 @@ function validateVersionSensitiveEvents(events, version) {
595
595
  // Exact schemas reviewed at 2.0.0 (1b89e4b0), 2.0.1 (caf7d4e2),
596
596
  // 2.0.2 (9d07f634), 2.1.0 (52437299), 2.1.1 (f67e6398), 2.2.0 (472192c3),
597
597
  // 2.3.0 (b5e28fd6), 2.3.1 (684bae9e), 2.3.2 (b8dd3a13), 2.3.3 (ec495f0c),
598
- // and 2.4.0 (f26e4d91): the additive events and HookDefSchema are unchanged.
598
+ // 2.4.0 (f26e4d91), and 2.4.1 (2c73f3f5): the additive events and HookDefSchema are unchanged.
599
599
  // Require the full version string AND matching components; no inferred 2.x compatibility.
600
600
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
601
601
  (version.version === "2.0.1" && version.patch === 1) ||
@@ -607,7 +607,8 @@ function validateVersionSensitiveEvents(events, version) {
607
607
  (version.version === "2.3.1" && version.patch === 1) ||
608
608
  (version.version === "2.3.2" && version.patch === 2) ||
609
609
  (version.version === "2.3.3" && version.patch === 3))) ||
610
- (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0))))) {
610
+ (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0) ||
611
+ (version.version === "2.4.1" && version.patch === 1))))) {
611
612
  return { valid: true };
612
613
  }
613
614
  if (version.major !== 0) {
@@ -44,6 +44,7 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
44
44
  "2.3.2",
45
45
  "2.3.3",
46
46
  "2.4.0",
47
+ "2.4.1",
47
48
  ]);
48
49
  /** Per-operation native-v2 certification. One green operation never certifies another. */
49
50
  export const NATIVE_V2_CERTIFIED = new Map([
@@ -9,7 +9,7 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
9
9
  import { resolveKimiHome } from "./kimi-home.js";
10
10
  import { assertNativeV2Preflight } from "./native-v2-preflight.js";
11
11
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
12
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0"];
12
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1"];
13
13
  const READY_TIMEOUT_MS = 10_000;
14
14
  const REST_TIMEOUT_MS = 5_000;
15
15
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
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.4";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.4.5";
package/docs/migration.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Compatibility and upgrades
2
2
 
3
- Plugin 2.4.4 certifies Kimi Code CLI 2.4.0 for all eight operations, alongside exact native-v2 versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, and `2.3.3`. Later patches and minor releases are not accepted automatically. The npm distribution adds an installation channel; it does not change this compatibility table.
3
+ Plugin 2.4.5 certifies Kimi Code CLI 2.4.1 for all eight operations, alongside exact native-v2 versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, and `2.4.0`. Later patches and minor releases are not accepted automatically. The npm distribution adds an installation channel; it does not change this compatibility table.
4
4
 
5
5
  Explicitly pinned legacy-v1 binaries remain supported within `KIMI_TESTED_MINORS`, through 0.41.x, subject to each operation's minimum version. The [runtime table](../runtime/kimi-engine.ts) is the authority.
6
6
 
@@ -8,11 +8,11 @@ Use the [README installation and update steps](../README.md) for Claude Code or
8
8
 
9
9
  ## Plugin versions and upgrades
10
10
 
11
- Plugin versions advance independently using ordinary SemVer and may deliberately align with a certified CLI release. Plugin 2.4.4 certifies exact CLI 2.4.0; the nearby numbers do not imply version alignment. Published versions and tags are never reused. Every upstream patch requires its own certification. The native-v2 no-plan profile, plugin/marketplace IDs and existing job store are preserved.
11
+ Plugin versions advance independently using ordinary SemVer and may deliberately align with a certified CLI release. Plugin 2.4.5 certifies exact CLI 2.4.1; the nearby numbers do not imply version alignment. Published versions and tags are never reused. Every upstream patch requires its own certification. The native-v2 no-plan profile, plugin/marketplace IDs and existing job store are preserved.
12
12
 
13
- ## CLI 2.3.2, 2.3.3 and 2.4.0 swarm activation
13
+ ## CLI 2.3.2, 2.3.3, 2.4.0 and 2.4.1 swarm activation
14
14
 
15
- Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. On exact 2.3.2, 2.3.3 and 2.4.0, swarm commands and MCP calls use the same `runSwarm` lifecycle:
15
+ Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. On exact 2.3.2, 2.3.3, 2.4.0 and 2.4.1, swarm commands and MCP calls use the same `runSwarm` lifecycle:
16
16
 
17
17
  1. A short-lived `web --no-open --host 127.0.0.1 --port 0 --log-level error` process uses authenticated loopback routes to verify the exact v2 server, choose the explicit or configured default model, create a session, bind the model and auto permission, enable and verify `swarm_mode`, and shut down. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
18
18
  2. One ordinary `kimi -p -r` prompt runner resumes that session. Its recorded session-id source is `preactivated`, and the returned print session must match it.
@@ -6,9 +6,9 @@ remain available. The package has no install scripts and no separate CLI.
6
6
 
7
7
  ## Publishing status
8
8
 
9
- Plugin **2.4.4** adds exact CLI **2.4.0** certification for all eight operations,
9
+ Plugin **2.4.5** adds exact CLI **2.4.1** certification for all eight operations,
10
10
  with the existing host-preactivated swarm lifecycle and durable recovery.
11
- See the [certification record](./upstream-2.4.0-certification.md).
11
+ See the [certification record](./upstream-2.4.1-certification.md).
12
12
  Release execution and registry verification are recorded in the release notes;
13
13
  publication uses the same validated-tarball OIDC workflow below.
14
14
 
package/docs/safety.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This guide describes the current checkout runtime. Read-only tasks deny file writes and shell commands. Rescue and pursue can edit your workspace. Write-swarm returns a patch from a temporary Git worktree.
4
4
 
5
- Native agent-core-v2 is certified at exact CLI versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, and `2.4.0`, with plan mode disabled. The [runtime certification table](../runtime/kimi-engine.ts) controls routing. The hook is not an operating-system sandbox.
5
+ Native agent-core-v2 is certified at exact CLI versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, `2.4.0`, and `2.4.1`, with plan mode disabled. The [runtime certification table](../runtime/kimi-engine.ts) controls routing. The hook is not an operating-system sandbox.
6
6
 
7
7
  ## Why the safety story is hook-based
8
8
 
@@ -205,13 +205,13 @@ If another installed host still points to an older hook, that hook may veto thes
205
205
  - **Resume is intentionally not exposed yet.** In goal mode `goal.summary` emits a *goalId* distinct from the resume-hint *sessionId*; `kimi -r <sessionId>` re-enters the session but not necessarily the goal continuation. The plugin captures and surfaces the goalId but does not offer `--resume` for pursue until that split is reconciled upstream — exposing it now would be a silent-failure trap. **Re-verified against kimi-code 0.26.0 (2026-07-16):** the headless CLI still has no argv, prompt syntax, or session-resume path that calls `resumeGoal()`. `parseHeadlessGoalCreate` (`apps/kimi-code/src/cli/goal-prompt.ts`) accepts only the `/goal <objective>` *create* shape on both the v1 and experimental-v2 drivers, and upstream's own docs (`docs/en/guides/goals.md`, § "Use goal mode carefully") state that in non-interactive prompt mode *only goal creation is supported* — goal management is a TUI/kimi-web control. PR #552 makes a plain `-r <sessionId>` correctly *restore* the paused goal snapshot, but nothing in the headless path *acts* on it; the real `resumeGoal()` is wired only to the TUI (`/goal resume`) and kimi-web RPC (PR #1693, web-only). Implementing `--resume` would therefore require either prompt-injected model compliance (rejected — the plugin bounds autonomy with hard limits, not model goodwill) or abandoning the subprocess model for kimi-web's RPC. Re-check if upstream ever ships a headless `goal resume` verb.
206
206
  - **A model-invocable `kimi-pursue` agent (v1.3) wraps this command.** The main thread can dispatch autonomous goal mode, not just the human-typed `/kimi:pursue` — the same command↔agent mirror as rescue/review/swarm. Auto-dispatch does NOT widen the blast radius: pursue runs under `commandLabel: "rescue"`, so the managed PreToolUse hook + workspace allowlist gate every tool call on every continuation turn (no git mutation), and the mandatory `--budget` wall-clock ceiling bounds the autonomy regardless of who launched it. Because it is write-capable AND autonomous — the plugin's highest blast radius — the agent's description requires an explicit user request for hands-off multi-turn pursuit, steers single bounded tasks to `kimi-rescue`, and never auto-promotes a fix or a question into a goal loop. Like the command, it refuses without the hook and offers no `--resume`.
207
207
 
208
- ## Swarm activation on CLI 2.3.2, 2.3.3 and 2.4.0
208
+ ## Swarm activation on CLI 2.3.2, 2.3.3, 2.4.0 and 2.4.1
209
209
 
210
210
  For interrupted runs, see [durable recovery and its explicit limits](swarm-recovery.md).
211
211
 
212
212
  Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. A rejected call can therefore coexist with zero child journals and a successful exit; a tool-call record, aggregate denial, or coordinator-produced patch does not prove fan-out. The plugin does not use prompt workarounds or replace its print transport with general RPC.
213
213
 
214
- For versions requiring activation (currently exact 2.3.2, 2.3.3 and 2.4.0), both slash-command and MCP swarm operations use the same `runSwarm` implementation and one ordinary `kimi -p -r` prompt runner per job, bracketed by short-lived host-managed web lifecycles:
214
+ For versions requiring activation (currently exact 2.3.2, 2.3.3, 2.4.0 and 2.4.1), both slash-command and MCP swarm operations use the same `runSwarm` implementation and one ordinary `kimi -p -r` prompt runner per job, bracketed by short-lived host-managed web lifecycles:
215
215
 
216
216
  1. The exact planned CLI starts `web --no-open --host 127.0.0.1 --port 0 --log-level error`. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0`, so ambient idle-session reclamation cannot disrupt the plugin-owned lifecycle. The plugin accepts only the expected loopback ready URL, uses a supplied token for authenticated REST requests, and keeps that token in memory, never writing it to logs. `/api/v1/meta` must confirm backend v2, the exact planned version, and no dangerous authentication bypass. The plugin uses the explicit model or environment-model alias, otherwise reading the default alias from `/api/v1/config`; creates a session in the job cwd; binds that model with `permission_mode:auto` and `swarm_mode:true`; verifies those settings and `plan_mode:false` through `/status`; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record.
217
217
  2. The ordinary stream-json print runner resumes that session with `kimi -p -r`. The job records `kimi_session_id_source:"preactivated"`, and the session returned by print must exactly match the preactivated id. Every coordinator and child tool call remains governed by the same managed PreToolUse hook and operation allowlist.
@@ -224,7 +224,7 @@ Older certified versions keep the direct `kimi -p` path. The web processes are n
224
224
  `/kimi:swarm` (v1.2) fans a **read-only** review out across subagents using kimi-code's `AgentSwarm` tool (kimi-code 0.12.0+). The coordinator launches one subagent per target (file/module/question); each inspects the workspace with read tools and reports findings, which the coordinator consolidates into one markdown report. It opens **zero new write surface**.
225
225
 
226
226
  - **The hook label is `swarm`, and it allows the read-only tool set PLUS `AgentSwarm`.** The coordinator must be allowed to call `AgentSwarm` (else the swarm never launches), but no write/edit/shell tool is allowed. The exact allowed tool name is `AgentSwarm` (verified at 0.42.0 against `packages/agent-core-v2/src/features/swarm/tools/agent-swarm/agentSwarmTool.ts`: `'AgentSwarm'`, strict schema). The singular `Agent` tool is deliberately *not* allowed — swarm is the fan-out surface, not arbitrary delegation.
227
- - **Every subagent inherits the `swarm` label and fires the same hook.** On native v2 (0.42.0) `AgentSwarm` children run in-process in a child DI scope with their OWN eager external-hooks service, so every child tool call passes the same before-execute channel and the same managed hook — there is no sub-vs-main branch and no deny-all shortcut on the swarm route. So a subagent's `Write`/`Edit`/`Bash` is denied exactly like a single-turn review's. The swarm listener in that channel is non-terminal and nothing auto-approves `AgentSwarm` ahead of the hook. (Legacy-v1 ≤ 0.41 reached the same result by placing the hook policy at index 0 of every agent's permission stack.) **Required for final certification evidence** (`tests/runtime/real-binary-smoke.test.ts`, run via `bun run smoke:real`): distinct child journals must exist, and each assigned Write/Edit `path` must be correlated through its `toolCallId` with the managed denial in that exact tool result; unrelated denials and coordinator-only reports are insufficient. On 2.3.2, 2.3.3 and 2.4.0, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
227
+ - **Every subagent inherits the `swarm` label and fires the same hook.** On native v2 (0.42.0) `AgentSwarm` children run in-process in a child DI scope with their OWN eager external-hooks service, so every child tool call passes the same before-execute channel and the same managed hook — there is no sub-vs-main branch and no deny-all shortcut on the swarm route. So a subagent's `Write`/`Edit`/`Bash` is denied exactly like a single-turn review's. The swarm listener in that channel is non-terminal and nothing auto-approves `AgentSwarm` ahead of the hook. (Legacy-v1 ≤ 0.41 reached the same result by placing the hook policy at index 0 of every agent's permission stack.) **Required for final certification evidence** (`tests/runtime/real-binary-smoke.test.ts`, run via `bun run smoke:real`): distinct child journals must exist, and each assigned Write/Edit `path` must be correlated through its `toolCallId` with the managed denial in that exact tool result; unrelated denials and coordinator-only reports are insufficient. On 2.3.2, 2.3.3, 2.4.0 and 2.4.1, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
228
228
  - **The managed hook is the read-only boundary; no `explore`-profile second layer is assumed.** Production deliberately omits `subagent_type` for read-only swarm rather than selecting kimi-code's `explore` profile. Every coordinator and subagent tool call is enforced by the same managed hook.
229
229
  - **Swarm refuses without the hook, like every model-spawning command.** A swarm makes the reason especially acute: it asks for up to `--cap` subagents, but this total-count hint is advisory, so a missing hook would remove enforcement from all of them at once. `KIMI_PLUGIN_CC_SKIP_HOOK_CHECK=1` remains an explicit tests/diagnostics escape hatch, not a recovery path.
230
230
  - **The only new risk is COST, and the plugin bounds it.** Read-only swarm writes nothing, so the new risk is runaway cost from N parallel model runs (and possible nested `AgentSwarm`). `/kimi:swarm` enforces a **mandatory finite wall-clock ceiling** via its AbortController (`--budget`, default 30m); the SIGTERM→SIGKILL descendant-reaping cancellation reaps the whole subagent process tree. Two **distinct** subagent bounds: `--cap N` is a *soft* prompt-injected hint on TOTAL subagent count (the hook is stateless and cannot enforce a count, so the model may exceed it), and `--max-concurrency N` is a *hard* ceiling on how many subagents kimi-code's `SubagentBatch` runs concurrently — exported as `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` (PR #888) on **kimi-code 0.18.0+** (older binaries ignore the unknown env var, so on < 0.18 only the soft hint applies). It **defaults to 4** when the user passes none (`resolveSwarmMaxConcurrency` in swarm.ts), so every swarm run — agent-dispatched or human-typed — carries an enforced peak-parallelism ceiling on 0.18.0+ rather than falling back to kimi-code's internal ramp; pass an explicit value to widen or throttle. **Never merge them into one flag:** concurrency ≠ total count — a hard concurrency cap of N still permits more than N subagents over the life of the run, just never more than N at once. The `--budget` bounds elapsed time, not a dollar amount or total token count; `--max-concurrency` bounds *peak* parallelism (the spike in simultaneous model spend), and `--cap` is only an advisory total-count nudge. Folding both onto one flag would create the "cap-as-total-count illusion" — a user reading `--cap N` would expect a total bound but receive only a peak-parallelism one.
@@ -293,9 +293,9 @@ at it (the runtime resolves that path instead of `kimi` on `PATH`; every spawn
293
293
  still exports `KIMI_CODE_NO_AUTO_UPDATE=1`, so the pinned copy never drifts).
294
294
 
295
295
  ```sh
296
- PIN=~/.local/share/kimi-plugin-cc/kimi-bin/2.4.0
296
+ PIN=~/.local/share/kimi-plugin-cc/kimi-bin/2.4.1
297
297
  mkdir -p "$PIN" && cd "$PIN" && printf '{"name":"kimi-plugin-cc-pin","private":true}\n' > package.json
298
- npm install @moonshot-ai/kimi-code@2.4.0
298
+ npm install @moonshot-ai/kimi-code@2.4.1
299
299
  export KIMI_PLUGIN_CC_KIMI_BIN="$PIN/node_modules/.bin/kimi" # e.g. in ~/.zshenv
300
300
  ```
301
301
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Normal stop: use `scripts/companion.sh cancel` for a shell-owned run, or the MCP job cancel tool for an MCP-owned run. A hard kill cannot execute cleanup. Cancellation still starts no fresh cleanup server.
4
4
 
5
- For exact CLI 2.3.2, 2.3.3 and 2.4.0 swarm runs created by this runtime, status includes a durable `swarm_recovery` record. It contains the resolved home/workspace, companion identity, launch intent, verified process identities and session identity. It never contains the web authentication token, credentials, prompt or config contents. Session identity is committed before the request enabling swarm mode.
5
+ For exact CLI 2.3.2, 2.3.3, 2.4.0 and 2.4.1 swarm runs created by this runtime, status includes a durable `swarm_recovery` record. It contains the resolved home/workspace, companion identity, launch intent, verified process identities and session identity. It never contains the web authentication token, credentials, prompt or config contents. Session identity is committed before the request enabling swarm mode.
6
6
 
7
7
  ## Preview, then recover
8
8
 
@@ -0,0 +1,48 @@
1
+ # Kimi Code 2.4.1 certification evidence — 2026-10-31
2
+
3
+ ## Status and exact source
4
+
5
+ **Exact CLI 2.4.1 is certified for all eight operations by plugin 2.4.5.** The exact-source gate, non-vacuous plan and swarm controls, expanded candidate and production matrices, literal standard `bun run check`, final edited-byte package, and independent Codex/Kimi reviews all passed. CI, commit, push, tag, publication, installed-host rollout, and operator CLI pin changes are not performed in this certification slice.
6
+
7
+ Candidate: `@moonshot-ai/kimi-code@2.4.1`, release commit `2c73f3f50af4fa7f2540ca0d2e33b07a1408e3a7`, compared with certified 2.4.0 (`f26e4d91ef8d5d233f6c20b42a150f96924d4f5e`). npm published the candidate at 2026-10-30T09:55:26.630Z; its npm tarball SHA-1 is `660debae9ff145564c670fcc32444aed5cc7ab79`. A temporary isolated npm installation and its executable both report 2.4.1. The clean exact source checkout is `.claude/kimi-code-research/kimi-code-2.4.1-audit`.
8
+
9
+ ## Source review
10
+
11
+ Codex's 2026-10-31 monitor supplied seven scoped diffs as leads. The main-thread certification review also covered every changed production TypeScript file, the complete release delta, Read's token helpers, profile composition, goal injection, DI and OS backends, wire reload/migrations, KAP activation dependencies, alternate final-allow spellings, and indirect plan entry. The synthesis is retained at `.claude/kimi-code-research/reports/2026-10-31-2.4.1-source-synthesis.md`.
12
+
13
+ - The exact-tag scan passed **15 tests and 96 assertions**. All 15 load-bearing files are byte-identical to 2.4.0. The plan-file guard remains the sole production final allow; executor/subscriber order, hook schema/aggregation, eager child hooks, Write/Edit `path`, Bash `command`/`cwd`, stream shapes, CLI argv, and AgentSwarm behavior remain compatible.
14
+ - Plan changes are reminder/profile prompts only. `EnterPlanMode` remains removed, fresh print still cancels configured default plan, and resumed plan sessions remain possible. The plugin retains its config preflight, Enter/ExitPlanMode deny policy, and every-agent journal-taint refusal.
15
+ - Goal injection adds full/sparse reminder selection using context history, not another goal tool, executor route, terminal exit, or budget mechanism. Read lowers the default maximum to 100,000 characters and adds estimated-token-aware pagination. Write/Edit success notes and Bash rendered guidance do not change their input schemas or execution gates.
16
+ - DI scope creation, OS backends, wire reload/migrations, KAP source, and the CLI/web activation surfaces are unchanged. No early session announcement or tool execution outcome was added; existing recovery and detection ambiguity remain.
17
+
18
+ ## Exact-binary controls
19
+
20
+ Controls used a task-authorized dedicated Agent Key in process memory/environment and empty isolated homes, except the forced removed-tool control, which used a loopback scripted provider and a dummy key. No personal config or OAuth store was read, copied, or symlinked. All live controls ran sequentially. The plan and removed-tool controls install a custom deny-all control hook; the plugin's managed hook is separately installed and proved by the operation smoke. Raw evidence is under `.claude/kimi-code-research/cert-2.4.1-live/`.
21
+
22
+ - **Plan OFF Write:** the exact 2.4.1 marker was first; Write reached the custom deny-all control hook and was denied on the same call ID. No target file or plan state was created.
23
+ - **Plan ON:** an authenticated loopback session was explicitly placed in plan mode, shut down cleanly in 5.638 seconds, and resumed with a deny-all hook. The exact marker and `plan_mode.enter` were present. Glob and ExitPlanMode reached the deny hook; a **1,831-byte** plan file was written without a plan-Write hook invocation. The workspace remained empty.
24
+ - **Removed EnterPlanMode:** the offered tools included Write but not EnterPlanMode. A scripted provider forced `call_enter_forced`; the exact binary returned `Tool "EnterPlanMode" not found` on that ID before any hook call and returned the rejection to the provider. No plan state or files appeared.
25
+ - **Swarm OFF:** a real AgentSwarm call returned the inactive-mode result with zero child journals and no probe files.
26
+ - **Swarm ON:** after adding the reviewed exact 2.4.1 activation selector and rebuilding, compiled activation produced `agent-0` and `agent-1`; each child attempted its assigned Write with a matching managed-denial result under the same toolCallId. The coordinator did not substitute writes, no probes landed, and deactivation verified `swarm_mode.exit`. Parent `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=1` confirmed the child environment's `0` override remains effective.
27
+ - Focused activation passed **36 tests and 130 assertions**. The focused setup/engine/activation set after the production row passed **142 tests and 2,282 assertions**.
28
+
29
+ ### Invalid setup attempts, not accepted as evidence
30
+
31
+ - The first forced removed-tool run passed every safety assertion but failed `noWorkspaceFiles` because a relative artifact root made the child create its relative Kimi home beneath the workspace. A fresh run with an absolute artifact root passed all checks; the fixture failure is not counted.
32
+ - The first combined swarm control passed OFF, then ON refused before any model call because `PREACTIVATION_VERSIONS` did not yet include 2.4.1. The unchanged KAP source justified adding only that exact activation selector. The focused activation suite and fresh ON control then passed. The refused attempt is not ON evidence.
33
+
34
+ ## Candidate and final gates
35
+
36
+ - Expanded candidate matrix (`candidate-smoke.log`): **21 pass, 0 fail, 154 assertions, no skips**, 410.84 seconds. Real `runRescue` landed the confined sentinel and persisted operation/version/engine/session/artifact evidence. The absolute out-of-root Bash.cwd call received its exact same-call denial and created no file. Eight goal turns produced none of the three named goal files. Write-swarm produced a 278-byte child-authored patch, left the user tree clean, removed its worktree, and denied the out-of-root write.
37
+ - Frozen dependency installation made no changes; `bun audit` found no vulnerabilities. Typecheck, contract-size, and generated-surface checks passed before the production matrix.
38
+ - Compiled acceptance/refusal controls passed under Node and Bun against both root and Codex distributions: every operation accepts exact 2.4.1 and normalized `v2.4.1`; 2.4.2, prereleases, build metadata, and mismatched hook-schema components refuse.
39
+ - Expanded production-table matrix (`production-smoke.log`) with the candidate override explicitly unset: **21 pass, 0 fail, 154 assertions, no skips**, 453.88 seconds. Real rescue and deterministic Bash.cwd passed the same confinement and provenance assertions. Twelve goal turns produced none of the three named goal files. Write-swarm captured a 278-byte child-authored patch, left the user tree clean, and removed its worktree.
40
+ - Initial full repository check passed **1,315 tests with 30 expected opt-in skips, 0 failures and 17,073 assertions across 79 files** in 320.46 seconds. Initial package validation passed **232 files**. Subsequent iCloud-style `* 2` duplicates in root `dist/vendor` were verified byte-identical to canonical generated files and quarantined; the runtime mirrors match again.
41
+ - Earlier review iterations (`production-review-smoke.log` and `goal-final-smoke.log`) passed **23 tests and 163 assertions** and a goal-only test respectively, but their Bash-inclusive goal evidence is **not accepted for certification**. The final edge-hardened matrix below supersedes those goal claims. Other operation evidence from those runs remains useful.
42
+ - Clean full repository check (`check-review-final.log`) after review fixes: **1,317 pass, 30 expected opt-in skips, 0 fail, 17,314 assertions across 79 files**, 321.00 seconds. Clean package validation (`package-review-final.log`) passed **233 files**, both compiled distributions, isolated hook setup/check, version refusal, and modern/legacy MCP controls. `docs/upstream-2.4.1-certification.md` is confirmed in the archive.
43
+ - Codex's targeted re-review requested genuine error results, legacy-compatible turn starts, and a whole-workspace settlement assertion. A subsequent review added marker-prefix, call-derived turn-ID, and directory-entry requirements. The final production matrix (`production-prefix-smoke.log`) passed **24 tests and 167 assertions with no skips in 440.66 seconds**. All seven call-derived turn IDs had same-call Write denials with `isError: true` and the managed-message prefix, and the entire workspace was empty at settlement.
44
+ - Literal standard `bun run check` (`check-standard-final.log`): **1,318 pass, 30 expected opt-in skips, 0 fail, 17,319 assertions across 79 files**, 358.83 seconds. Earlier parallel attempts hit timing-sensitive lifecycle failures; the focused suites and a complete serial run passed before the literal standard gate also passed. Codex's final targeted re-review returned **APPROVE**, closing all original and subsequent findings. Final edited-byte package validation (`package-standard-final.log`) passed **233 files** and includes this record.
45
+
46
+ ## Preserved boundaries
47
+
48
+ Certification remains exact and per-operation. Legacy-v1 ends at 0.41.x. Plan mode and unsafe experimental selectors remain refused. Hook verification, trusted-root confinement, concurrency/defaults, one print runner, memory-only web tokens, finite budgets, process/session identity checks, deactivation, and recovery ownership are unchanged. Existing Git trust and hook-process failure residuals remain documented; this release does not make the hook an OS sandbox. Publication does not install or re-pin either host.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi-plugin-cc",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Kimi for Claude Code and Codex: code questions, independent reviews, bounded fixes, autonomous goals, parallel tasks, and MCP tools through the local Kimi Code CLI.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,6 +66,7 @@
66
66
  "docs/migration.md",
67
67
  "docs/models.md",
68
68
  "docs/session-visibility.md",
69
+ "docs/upstream-2.4.1-certification.md",
69
70
  "README.md",
70
71
  "LICENSE",
71
72
  "CHANGELOG.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Kimi for Codex: code questions, independent reviews, bounded fixes, autonomous goals, parallel tasks, and MCP job controls through the local Kimi Code CLI.",
5
5
  "author": {
6
6
  "name": "linxule"
@@ -28,7 +28,7 @@ import { buildKimiSessionTitle, syncKimiSessionTitle } from "../session-title.js
28
28
  // only the wall-clock hard bound. Read/write modes reuse review/rescue lineage,
29
29
  // and the mandatory PreToolUse hook enforces read-only policy or trusted-worktree
30
30
  // write confinement on the coordinator and every subagent. Write mode requires
31
- // kimi-code 0.18.0+. Exact 2.3.2, 2.3.3 and 2.4.0 additionally activate a same-job
31
+ // kimi-code 0.18.0+. Exact 2.3.2, 2.3.3, 2.4.0 and 2.4.1 additionally activate a same-job
32
32
  // session through a bounded loopback web lifecycle, then resume it through the normal print path.
33
33
  const SWARM_SUMMARY_MAX = 120;
34
34
  const SWARM_AGENT_PROFILE = "<swarm>";
@@ -595,7 +595,7 @@ function validateVersionSensitiveEvents(events, version) {
595
595
  // Exact schemas reviewed at 2.0.0 (1b89e4b0), 2.0.1 (caf7d4e2),
596
596
  // 2.0.2 (9d07f634), 2.1.0 (52437299), 2.1.1 (f67e6398), 2.2.0 (472192c3),
597
597
  // 2.3.0 (b5e28fd6), 2.3.1 (684bae9e), 2.3.2 (b8dd3a13), 2.3.3 (ec495f0c),
598
- // and 2.4.0 (f26e4d91): the additive events and HookDefSchema are unchanged.
598
+ // 2.4.0 (f26e4d91), and 2.4.1 (2c73f3f5): the additive events and HookDefSchema are unchanged.
599
599
  // Require the full version string AND matching components; no inferred 2.x compatibility.
600
600
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
601
601
  (version.version === "2.0.1" && version.patch === 1) ||
@@ -607,7 +607,8 @@ function validateVersionSensitiveEvents(events, version) {
607
607
  (version.version === "2.3.1" && version.patch === 1) ||
608
608
  (version.version === "2.3.2" && version.patch === 2) ||
609
609
  (version.version === "2.3.3" && version.patch === 3))) ||
610
- (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0))))) {
610
+ (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0) ||
611
+ (version.version === "2.4.1" && version.patch === 1))))) {
611
612
  return { valid: true };
612
613
  }
613
614
  if (version.major !== 0) {
@@ -44,6 +44,7 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
44
44
  "2.3.2",
45
45
  "2.3.3",
46
46
  "2.4.0",
47
+ "2.4.1",
47
48
  ]);
48
49
  /** Per-operation native-v2 certification. One green operation never certifies another. */
49
50
  export const NATIVE_V2_CERTIFIED = new Map([
@@ -9,7 +9,7 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
9
9
  import { resolveKimiHome } from "./kimi-home.js";
10
10
  import { assertNativeV2Preflight } from "./native-v2-preflight.js";
11
11
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
12
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0"];
12
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1"];
13
13
  const READY_TIMEOUT_MS = 10_000;
14
14
  const REST_TIMEOUT_MS = 5_000;
15
15
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
@@ -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.4";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.4.5";