kimi-plugin-cc 2.5.5 → 2.5.6

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.5.5"
8
+ "version": "2.5.6"
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.5.5",
4
+ "version": "2.5.6",
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,12 @@
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.6 — 2026-11-07
6
+
7
+ - Certify exact kimi-code 2.5.2 for all eight native-v2 operations, alongside 2.5.0 and 2.5.1. Upstream 2.5.2 changes only MCP pending-tool registration, tool-select reconciliation and tool-contract signature helpers; all seven audit scopes and all 40 pinned files are unchanged from 2.5.1, and pending replacements never resolve for execution. See the [2.5.2 evidence](docs/upstream-2.5.2-certification.md).
8
+ - Extend every exact-version branch to 2.5.2: the production table, swarm preactivation and protocol-v2 agent state, fresh `--environment local`, and the reviewed hook schema. 2.5.3, prerelease and build-suffixed versions stay refused. The manual smoke workflow now defaults to 2.5.2.
9
+ - Pass the exact-tag scan on 2.5.0, 2.5.1 and 2.5.2 (18 tests, 153 assertions each), seven sequential exact-binary controls, candidate and production matrices (24 tests, 167 assertions, no skips each), the full repository gate with 1,429 tests and 18,662 assertions, 331-file package checks across all three distributions, isolated consumer security, and independent Codex review. Publication does not update installed hosts or operator pins.
10
+
5
11
  ## 2.5.5 — 2026-11-07
6
12
 
7
13
  - Keep every host's managed hook block in one contiguous run: setup inserts a new block directly after the last managed END when only blanks/comments follow it and the parser proves the result equals the appended form, otherwise appends. A block previously appended after Magpie's model tables lost its BEGIN marker when Magpie rewrote them (yetone/magpie#5614), leaving an `END-without-BEGIN` orphan.
@@ -786,7 +786,7 @@ function buildArgs(opts) {
786
786
  ? opts.env.KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE
787
787
  : undefined;
788
788
  if (opts.resumeSessionId === undefined &&
789
- ["2.5.0", "2.5.1"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
789
+ ["2.5.0", "2.5.1", "2.5.2"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
790
790
  args.push("--environment", "local");
791
791
  }
792
792
  if (opts.resumeSessionId !== undefined) {
@@ -595,7 +595,8 @@ 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
- // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), and 2.5.1 (1b02030d):
598
+ // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), 2.5.1 (1b02030d), and
599
+ // 2.5.2 (1c142a00):
599
600
  // the additive events and HookDefSchema are unchanged.
600
601
  // Require the full version string AND matching components; no inferred 2.x compatibility.
601
602
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
@@ -611,7 +612,8 @@ function validateVersionSensitiveEvents(events, version) {
611
612
  (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0) ||
612
613
  (version.version === "2.4.1" && version.patch === 1))) ||
613
614
  (version.minor === 5 && ((version.version === "2.5.0" && version.patch === 0) ||
614
- (version.version === "2.5.1" && version.patch === 1))))) {
615
+ (version.version === "2.5.1" && version.patch === 1) ||
616
+ (version.version === "2.5.2" && version.patch === 2))))) {
615
617
  return { valid: true };
616
618
  }
617
619
  if (version.major !== 0) {
@@ -47,6 +47,7 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
47
47
  "2.4.1",
48
48
  "2.5.0",
49
49
  "2.5.1",
50
+ "2.5.2",
50
51
  ]);
51
52
  /** Per-operation native-v2 certification. One green operation never certifies another. */
52
53
  export const NATIVE_V2_CERTIFIED = new Map([
@@ -10,7 +10,7 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
10
10
  import { resolveKimiHome } from "./kimi-home.js";
11
11
  import { assertNativeV2Preflight } from "./native-v2-preflight.js";
12
12
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
13
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1"];
13
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1", "2.5.2"];
14
14
  const READY_TIMEOUT_MS = 10_000;
15
15
  const REST_TIMEOUT_MS = 5_000;
16
16
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
@@ -337,7 +337,7 @@ async function resolveProfileModel(web, options, failureCode) {
337
337
  }
338
338
  async function createSession(web, options, expectedVersion, failureCode) {
339
339
  const request = { metadata: { cwd: options.cwd } };
340
- if (["2.5.0", "2.5.1"].includes(expectedVersion)) {
340
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)) {
341
341
  request.environment_id = "local";
342
342
  request.environment_cwd = options.cwd;
343
343
  }
@@ -348,7 +348,7 @@ async function createSession(web, options, expectedVersion, failureCode) {
348
348
  return { sessionId: data.id, workspaceId: data.workspace_id };
349
349
  }
350
350
  async function verifyLocalEnvironment(web, identity, expectedCwd, expectedVersion, signal, failureCode) {
351
- if (!["2.5.0", "2.5.1"].includes(expectedVersion))
351
+ if (!["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion))
352
352
  return;
353
353
  const data = await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/environment`, undefined, signal, failureCode);
354
354
  if (!isRecord(data)) {
@@ -368,10 +368,10 @@ async function postSwarmProfile(web, identity, active, model, signal, failureCod
368
368
  await restData(web, "POST", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/profile`, { agent_config: agentConfig }, signal, failureCode);
369
369
  }
370
370
  async function verifySwarmStatus(web, identity, active, model, expectedVersion, signal, failureCode) {
371
- const data = ["2.5.0", "2.5.1"].includes(expectedVersion)
371
+ const data = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)
372
372
  ? await readWebSocketAgentState(web, identity.sessionId, signal, failureCode)
373
373
  : await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/status`, undefined, signal, failureCode);
374
- const source = ["2.5.0", "2.5.1"].includes(expectedVersion) ? "agent state" : "/status";
374
+ const source = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? "agent state" : "/status";
375
375
  if (!isRecord(data)) {
376
376
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} returned an invalid payload.`);
377
377
  }
@@ -381,10 +381,10 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
381
381
  if (data.plan_mode !== false) {
382
382
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm plan mode is off.`);
383
383
  }
384
- if (["2.5.0", "2.5.1"].includes(expectedVersion) && data.tower_mode !== false) {
384
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) && data.tower_mode !== false) {
385
385
  throw failure(failureCode, "swarm-activation.status", "Kimi web agent state did not confirm tower mode is off.");
386
386
  }
387
- const permission = ["2.5.0", "2.5.1"].includes(expectedVersion) ? data.permission_mode : data.permission;
387
+ const permission = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? data.permission_mode : data.permission;
388
388
  if (permission !== "auto") {
389
389
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm auto permission mode.`);
390
390
  }
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.5.5";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.5.6";
package/docs/migration.md CHANGED
@@ -12,13 +12,13 @@ Use the [README installation and update steps](../README.md) for Claude Code or
12
12
 
13
13
  Plugin versions advance independently using ordinary SemVer and may deliberately align with a certified CLI release. Plugin 2.5.1 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.
14
14
 
15
- ## CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1 swarm activation
15
+ ## CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2 swarm activation
16
16
 
17
- 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, 2.4.1 and 2.5.0/2.5.1, swarm commands and MCP calls use the same `runSwarm` lifecycle:
17
+ 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, 2.4.1 and 2.5.0/2.5.1/2.5.2, swarm commands and MCP calls use the same `runSwarm` lifecycle:
18
18
 
19
- 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. On exact 2.5.0/2.5.1, creation explicitly selects the local environment and an authenticated `/environment` read proves its cwd before profile mutation; state verification uses protocol-v2 WebSocket main-agent frames because `/status` was removed. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
19
+ 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. On exact 2.5.0/2.5.1/2.5.2, creation explicitly selects the local environment and an authenticated `/environment` read proves its cwd before profile mutation; state verification uses protocol-v2 WebSocket main-agent frames because `/status` was removed. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
20
20
  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.
21
- 3. A second short-lived web lifecycle rechecks the local binding on 2.5.0/2.5.1, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
21
+ 3. A second short-lived web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
22
22
 
23
23
  Activation is inside the job's finite budget. Graceful process close has a bounded 15-second allowance. `runSwarm` solely owns deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary. The ready token stays in memory and out of logs, and success cannot complete if cleanup fails. Post-mutation identity or process/group uncertainty preserves diagnostics and, for write-swarm, the recovery worktree. Process groups are rechecked after teardown; unknown survivors are unverified and unproven groups are not signalled. Older certified versions still launch swarm directly with `kimi -p`. This narrow lifecycle is not a full RPC transport or a model-driven activation workaround; the managed hook and workspace boundaries still govern every tool call.
24
24
 
@@ -8,7 +8,9 @@ no separate CLI.
8
8
 
9
9
  ## Publishing status
10
10
 
11
- Plugin **2.5.5** keeps every host's managed hook block contiguous in the shared `~/.kimi-code/config.toml`, so a comment-preserving third-party writer that regroups tables cannot strip a block's BEGIN marker, and scopes orphan-marker verification per host: another host's orphan warns, own and legacy orphans still fail closed, and the remedy is plain setup. Exact CLI certification remains 2.5.0 and 2.5.1; publication does not update installed hosts or operator pins.
11
+ Plugin **2.5.6** certifies exact Kimi Code **2.5.2** for all eight operations, alongside 2.5.0 and 2.5.1; see the [2.5.2 certification record](./upstream-2.5.2-certification.md). Candidate and production matrices each passed 24 tests with 167 assertions and no skips. The full check passed 1,429 tests with 18,662 assertions, package validation passed 331 files across all three distributions, and isolated consumer security passed. Publication does not update installed hosts or operator pins.
12
+
13
+ Plugin **2.5.5** keeps every host's managed hook block contiguous in the shared `~/.kimi-code/config.toml`, so a comment-preserving third-party writer that regroups tables cannot strip a block's BEGIN marker, and scopes orphan-marker verification per host: another host's orphan warns, own and legacy orphans still fail closed, and the remedy is plain setup. Exact CLI certification remains 2.5.0 and 2.5.1; publication does not update installed hosts or operator pins. The [v2.5.5 release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.5) is anchored at `ba0bb8f293839d8658f9486da2feb32908eab4d4`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/42372824792) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/42373304448) passed. The 330-file registry tarball has SHA-1 `b035ab57aa7902538c13bee384b2dead48c2a57c`, matches the validated workflow artifact byte-for-byte, and carries provenance (sigstore log index `3738319436`). A fresh registry npm installation has zero production advisories and all compiled runtime mirrors match. The Discover timestamp records npm publication at `2026-11-07T12:44:10.489Z`.
12
14
 
13
15
  Plugin **2.5.4** restores the original platform-neutral bounded-close settlement for swarm agent-state verification after follow-up CI showed that `wasClean` can both accept an early close and reject a valid one. The immutable 2.5.3 artifact contains that trial condition; 2.5.4 carries its revert with deterministic no-close-event coverage and a protocol-correct mock handshake, without changing exact CLI certification through 2.5.1. Activation validation passed 71 tests with 244 assertions, the full repository check passed 1,412 tests with 18,282 assertions, and 330-file package and consumer-security validation passed. [Release v2.5.4](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.4) is anchored at `836da262ae303f51c9049b2711c9d957d7692ed2`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/42249517714) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/42251575637) passed. The 330-file registry tarball has SHA-1 `b9e23fe6b1ceb54fdc5ee26447da050653526b7f`, matches the validated workflow artifact byte-for-byte, and carries provenance (sigstore log index `3721306580`). A fresh registry npm installation has zero production advisories; isolated Claude Code, Codex, and DSH setup/checks pass, and all compiled runtime mirrors match. The Discover timestamp records npm publication at `2026-11-06T16:29:28.637Z`.
14
16
 
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`, `2.4.0`, `2.4.1`, `2.5.0`, and `2.5.1`, 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`, `2.4.1`, `2.5.0`, `2.5.1`, and `2.5.2`, 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
 
@@ -220,17 +220,17 @@ If another installed host still points to an older hook, that hook may veto thes
220
220
  - **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.
221
221
  - **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`.
222
222
 
223
- ## Swarm activation on CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0 and 2.5.1
223
+ ## Swarm activation on CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1 and 2.5.2
224
224
 
225
225
  For interrupted runs, see [durable recovery and its explicit limits](swarm-recovery.md).
226
226
 
227
227
  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.
228
228
 
229
- For versions requiring activation (currently exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0 and 2.5.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:
229
+ For versions requiring activation (currently exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1 and 2.5.2), 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:
230
230
 
231
- 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; on exact 2.5.0/2.5.1 explicitly binds `environment_id:"local"` and the job cwd, then verifies that binding through authenticated `/environment` before either profile mutation; binds the selected model with `permission_mode:auto` and `swarm_mode:true`; verifies those settings and `plan_mode:false` through `/status` on earlier versions or protocol-v2 authenticated WebSocket main-agent state on 2.5.0/2.5.1, closing that channel before validating the latest frame; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record.
231
+ 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; on exact 2.5.0/2.5.1/2.5.2 explicitly binds `environment_id:"local"` and the job cwd, then verifies that binding through authenticated `/environment` before either profile mutation; binds the selected model with `permission_mode:auto` and `swarm_mode:true`; verifies those settings and `plan_mode:false` through `/status` on earlier versions or protocol-v2 authenticated WebSocket main-agent state on 2.5.0/2.5.1/2.5.2, closing that channel before validating the latest frame; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record.
232
232
  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.
233
- 3. After the print run, a second web lifecycle rechecks the local binding on 2.5.0/2.5.1, sets `swarm_mode:false`, verifies the version-appropriate state proof, shuts down cleanly, and requires `swarm_mode.exit` in the main journal. Activation consumes part of the same finite job budget rather than extending it. `runSwarm` solely owns session deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary, with exit codes and cleanup diagnostics preserved. Cancellation aborts the owned lifecycle and never starts a fresh cleanup server. Every post-mutation failure retains the session identity; process/group uncertainty is marked without inventing an ID; process groups are rechecked after teardown, unknown survivors are unverified, unproven groups are never signalled, and a same-PID/start-token process that changes PGID remains active but is not a validated signal target. Root loss requires a previously observed matching identity; first-missing roots and actual probe errors/timeouts remain unverified. Reparenting and PGID moves preserve the current verified child identity for revalidation rather than treating it as exited. Unverified cleanup prevents success and preserves raw output, structured diagnostics, and the write worktree for recovery.
233
+ 3. After the print run, a second web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2, sets `swarm_mode:false`, verifies the version-appropriate state proof, shuts down cleanly, and requires `swarm_mode.exit` in the main journal. Activation consumes part of the same finite job budget rather than extending it. `runSwarm` solely owns session deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary, with exit codes and cleanup diagnostics preserved. Cancellation aborts the owned lifecycle and never starts a fresh cleanup server. Every post-mutation failure retains the session identity; process/group uncertainty is marked without inventing an ID; process groups are rechecked after teardown, unknown survivors are unverified, unproven groups are never signalled, and a same-PID/start-token process that changes PGID remains active but is not a validated signal target. Root loss requires a previously observed matching identity; first-missing roots and actual probe errors/timeouts remain unverified. Reparenting and PGID moves preserve the current verified child identity for revalidation rather than treating it as exited. Unverified cleanup prevents success and preserves raw output, structured diagnostics, and the write worktree for recovery.
234
234
 
235
235
  Older certified versions keep the direct `kimi -p` path. The web processes are narrow, planned lifecycle helpers, not a second model runner and not a general RPC transport.
236
236
 
@@ -239,7 +239,7 @@ Older certified versions keep the direct `kimi -p` path. The web processes are n
239
239
  `/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**.
240
240
 
241
241
  - **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.
242
- - **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, 2.4.1, 2.5.0 and 2.5.1, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
242
+ - **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, 2.4.1, 2.5.0, 2.5.1 and 2.5.2, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
243
243
  - **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.
244
244
  - **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.
245
245
  - **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.
@@ -298,7 +298,7 @@ worktree. A directory the operator trusted interactively in the Kimi TUI still
298
298
  has that property; that persisted-trust route is a documented residual, not
299
299
  something the plugin can close.
300
300
 
301
- Plugin-managed execution must remain local. Unused remote declarations can remain in operator config, but a configured remote default refuses before spawn. Disabling workspace trust through `[workspace] require_trust = false` also refuses, because it would enable project MCP outside the managed hook. Launcher environment selectors are reserved. Fresh exact 2.5.0/2.5.1 print selects `--environment local`; resume instead inspects persisted metadata and every agent journal and refuses nonlocal or wrong-root records against the expected execution root (the isolated worktree for swarm-write); older sessions without environment records do not fail this check merely for lacking them.
301
+ Plugin-managed execution must remain local. Unused remote declarations can remain in operator config, but a configured remote default refuses before spawn. Disabling workspace trust through `[workspace] require_trust = false` also refuses, because it would enable project MCP outside the managed hook. Launcher environment selectors are reserved. Fresh exact 2.5.0/2.5.1/2.5.2 print selects `--environment local`; resume instead inspects persisted metadata and every agent journal and refuses nonlocal or wrong-root records against the expected execution root (the isolated worktree for swarm-write); older sessions without environment records do not fail this check merely for lacking them.
302
302
 
303
303
  ## Running a newer Kimi than the plugin certifies
304
304
 
@@ -310,9 +310,9 @@ at it (the runtime resolves that path instead of `kimi` on `PATH`; every spawn
310
310
  still exports `KIMI_CODE_NO_AUTO_UPDATE=1`, so the pinned copy never drifts).
311
311
 
312
312
  ```sh
313
- PIN=~/.local/share/kimi-plugin-cc/kimi-bin/2.5.1
313
+ PIN=~/.local/share/kimi-plugin-cc/kimi-bin/2.5.2
314
314
  mkdir -p "$PIN" && cd "$PIN" && printf '{"name":"kimi-plugin-cc-pin","private":true}\n' > package.json
315
- npm install @moonshot-ai/kimi-code@2.5.1
315
+ npm install @moonshot-ai/kimi-code@2.5.2
316
316
  export KIMI_PLUGIN_CC_KIMI_BIN="$PIN/node_modules/.bin/kimi" # e.g. in ~/.zshenv
317
317
  ```
318
318
 
@@ -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, 2.4.0, 2.4.1 and 2.5.0/2.5.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.
5
+ For exact CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2 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
 
@@ -17,7 +17,7 @@ Preview does not signal processes, modify sessions, or capture patches. Apply:
17
17
 
18
18
  1. Requires the original companion to be gone and acquires an identity-checked recovery claim. A second recovery cannot race the first; a dead recovery owner can be reclaimed by compare-and-swap.
19
19
  2. Revalidates recorded processes and groups. It stops only verified individual identities, never a guessed PID or unproven group. An unknown surviving group member, changed group, incomplete probe or unrecorded launch refuses recovery.
20
- 3. If session cleanup is pending, requires the selected exact certified CLI and valid managed hook. It starts one bounded authenticated web lifecycle, disables the recorded session's swarm mode, verifies the version-appropriate state proof and exit journal, then verifies process quiescence. On 2.5.0/2.5.1 this includes the local environment binding and protocol-v2 WebSocket main-agent state rather than `/status`. It does not resume a prompt, generate model output, install hooks or retry failed cleanup automatically. New recovery web launches are themselves journaled.
20
+ 3. If session cleanup is pending, requires the selected exact certified CLI and valid managed hook. It starts one bounded authenticated web lifecycle, disables the recorded session's swarm mode, verifies the version-appropriate state proof and exit journal, then verifies process quiescence. On 2.5.0/2.5.1/2.5.2 this includes the local environment binding and protocol-v2 WebSocket main-agent state rather than `/status`. It does not resume a prompt, generate model output, install hooks or retry failed cleanup automatically. New recovery web launches are themselves journaled.
21
21
  4. Captures a binary patch from a retained write worktree. It does not apply the patch or delete the tree. The result names both paths for inspection.
22
22
 
23
23
  The recovery attempt has a 30-second cancellation signal, with bounded identity probes and normal teardown. Interrupting recovery retains its journal. An already-recovered record is an idempotent no-op. Failed/cancelled/completed job outcomes are immutable; a previously running abandoned job becomes failed, never completed. Recovery status is separate from task success.
@@ -0,0 +1,40 @@
1
+ # Kimi Code 2.5.2 certification evidence — 2026-11-07
2
+
3
+ ## Status and exact source
4
+
5
+ **Exact CLI 2.5.2 is certified for all eight operations by plugin 2.5.6.** The exact-source audit, non-vacuous plan/environment/swarm controls, candidate matrix, production-table matrix, frozen install, full repository check, package validation and isolated consumer-security audit passed. An independent read-only Codex review raised no safety or bypass finding. It caught a too-strong sentence about pending tools, stale activation lists in `docs/ci.md` and `docs/safety.md`, and regenerated distributions still pending at review time; all are corrected here.
6
+
7
+ Candidate: `@moonshot-ai/kimi-code@2.5.2`, release commit `1c142a007c10e881602690def96057c23a2baa12`, compared with certified 2.5.1 (`1b02030d8c2c6b00131b23ebb67a231614877827`). npm publication: 2026-11-06T07:54:31.132Z. An isolated npm installation and its executable both report 2.5.2; its `dist/main.mjs` SHA-256 is `b158343c177414e2a615116a96e193b333ca183bb0ee9569e51b0f4569e3a23e`. The seven scoped 2.5.1→2.5.2 diffs and the out-of-scope diffs are retained under `.claude/kimi-code-research/daily-monitor/2026-11-07-2.5.2-diffs/`.
8
+
9
+ ## Source and integration review
10
+
11
+ - All seven playbook scopes are empty: print/CLI, before-execute and permission gates, external hooks, plan/restore, session bootstrap/config/workspace, tools/fan-out/SDK, and swarm/web activation.
12
+ - Outside those scopes, 2.5.2 changes six agent-core-v2 files: MCP tool registration (`agent/mcp/mcpService.ts`), the tool registry's new active/pending split (`agent/toolRegistry/*`), tool-select reconciliation with a `tool_update_pending` reminder (`agent/toolSelect/*`), and signature helpers moved into `tool/toolContract.ts`. Web assets and the package version also change.
13
+ - A new name registers as active immediately. A registration becomes pending only when an active tool with the same name exists and its definition signature differs; a same-signature replacement swaps in place. The pending replacement is held outside the active map, and `ToolRegistryService.resolve()` reads only active tools, so a call by that name runs the existing active implementation until reconciliation promotes the replacement. Every active tool runs through the unchanged executor and its single `fireBeforeExecute` emitter, so the PreToolUse payload still carries the original call name. Tool names, and the field names the approval policy reads, are unchanged.
14
+ - All 40 pinned files are byte-identical to 2.5.1. The exact-tag scan passed **18 tests and 153 assertions** on 2.5.2, with the print, environment/workspace-trust and WebSocket checks executing. The 2.5.1 and 2.5.0 source scans pass again with the same counts.
15
+ - The exact-version branches now include 2.5.2: the production table, swarm preactivation and protocol-v2 agent state, fresh `--environment local`, and the reviewed hook schema. 2.5.3, prerelease and build-suffixed versions stay refused. Focused engine, activation, CLI, setup and version-probe tests passed **331 tests with 0 failures**.
16
+
17
+ ## Exact-binary controls
18
+
19
+ Controls used the read-only Agent Keys API key, resolved only into each process, and empty isolated homes with absolute paths. The forced removed-tool control instead used a loopback scripted provider. No personal config or OAuth store was read, copied or symlinked. Controls ran sequentially, and a scan of the evidence tree found no key material. Raw evidence is under `.claude/kimi-code-research/cert-2.5.2-live/`.
20
+
21
+ - **Plan OFF Write:** the exact 2.5.2 marker came first. Write reached the custom deny-all hook and was denied; no target file or plan state was created.
22
+ - **Plan ON:** an armed plan journal let Glob reach the deny hook, and a **1,656-byte** plan file was written without a plan-Write hook invocation. This shows the bypass the no-plan closures exist to prevent. The workspace stayed empty.
23
+ - **Removed EnterPlanMode:** EnterPlanMode was absent from the offered tools. A forced call was rejected on the same call ID before any hook ran, and the rejection was returned to the provider. No plan state or files appeared.
24
+ - **Environment:** real activation and deactivation passed with the explicit local binding. A remote default, disabled workspace trust and a resumed remote binding each refused before spawn.
25
+ - **Swarm OFF:** a real AgentSwarm call returned the inactive-mode result with zero child journals and no probe files.
26
+ - **Swarm ON:** preactivation produced `agent-0` and `agent-1`. Each child's assigned Write was matched to a managed-denial result on the same toolCallId, no probes landed, and deactivation was verified with ambient idle reclamation set to 1 ms.
27
+ - **Out-of-root control:** child Writes outside the root were denied on their own call IDs, created no files, and deactivation was verified.
28
+
29
+ ## Candidate and production matrices
30
+
31
+ Both matrices ran through the new pre-authorized monitor route, `~/.local/bin/kimi-plugin-cc-monitor-smoke`. It installs the exact binary once under `~/.cache/kimi-plugin-cc-monitor/` (same `dist/main.mjs` SHA-256 as above), uses the read-only Agent Keys API key, seeds from an empty temp home and redacts the log.
32
+
33
+ - **Candidate** (`candidate-smoke.log`, `KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE=2.5.2`): **24 tests with 167 assertions and no skips in 391.42 seconds**. Review, challenge, ask and review_gate each received a same-call managed Write denial. Real rescue confinement, the Bash.cwd denial, resume and plan-taint refusal, and both pursue outcomes passed. Six goal turns each had a managed Write denial, and the goal workspace was empty at settlement. Write-swarm captured a **278-byte** child-authored patch with a clean user tree and removed worktree, and denied the out-of-root write.
34
+ - **Production table** (`production-smoke.log`, candidate override unset): **24 tests with 167 assertions and no skips in 399.68 seconds**. It independently repeated the same evidence. Six of seven goal turns carried managed denials; the seventh was cut by the budget abort, and the workspace was empty at settlement. Write-swarm again captured a 278-byte patch.
35
+
36
+ A scan of both logs found no key material.
37
+
38
+ ## Repository and package gates
39
+
40
+ Frozen dependency installation made no changes. The full `bun run check` passed **1,429 tests with 33 expected opt-in skips, 0 failures and 18,662 assertions across 82 files in 356.03 seconds**, including the generated-distribution drift gate. Package validation passed **331 files**, all three compiled distributions, isolated hook setup/check and version refusal, and a patched DSH host/profile with seven live providers/tools and Web boot. The isolated npm consumer-security audit passed. Logs: `check-standard.log`, `package-standard.log`, `consumer-security.log`, `tag-scan*.log` and `binary-sha256.txt` under `.claude/kimi-code-research/cert-2.5.2-live/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi-plugin-cc",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Kimi for Claude Code, Codex, and DeepSeek Harness: 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
  "main": "dist/dsh/index.js",
@@ -136,6 +136,7 @@
136
136
  "docs/upstream-2.4.1-certification.md",
137
137
  "docs/upstream-2.5.0-certification.md",
138
138
  "docs/upstream-2.5.1-certification.md",
139
+ "docs/upstream-2.5.2-certification.md",
139
140
  "README.md",
140
141
  "LICENSE",
141
142
  "CHANGELOG.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
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"
@@ -786,7 +786,7 @@ function buildArgs(opts) {
786
786
  ? opts.env.KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE
787
787
  : undefined;
788
788
  if (opts.resumeSessionId === undefined &&
789
- ["2.5.0", "2.5.1"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
789
+ ["2.5.0", "2.5.1", "2.5.2"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
790
790
  args.push("--environment", "local");
791
791
  }
792
792
  if (opts.resumeSessionId !== undefined) {
@@ -595,7 +595,8 @@ 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
- // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), and 2.5.1 (1b02030d):
598
+ // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), 2.5.1 (1b02030d), and
599
+ // 2.5.2 (1c142a00):
599
600
  // the additive events and HookDefSchema are unchanged.
600
601
  // Require the full version string AND matching components; no inferred 2.x compatibility.
601
602
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
@@ -611,7 +612,8 @@ function validateVersionSensitiveEvents(events, version) {
611
612
  (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0) ||
612
613
  (version.version === "2.4.1" && version.patch === 1))) ||
613
614
  (version.minor === 5 && ((version.version === "2.5.0" && version.patch === 0) ||
614
- (version.version === "2.5.1" && version.patch === 1))))) {
615
+ (version.version === "2.5.1" && version.patch === 1) ||
616
+ (version.version === "2.5.2" && version.patch === 2))))) {
615
617
  return { valid: true };
616
618
  }
617
619
  if (version.major !== 0) {
@@ -47,6 +47,7 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
47
47
  "2.4.1",
48
48
  "2.5.0",
49
49
  "2.5.1",
50
+ "2.5.2",
50
51
  ]);
51
52
  /** Per-operation native-v2 certification. One green operation never certifies another. */
52
53
  export const NATIVE_V2_CERTIFIED = new Map([
@@ -10,7 +10,7 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
10
10
  import { resolveKimiHome } from "./kimi-home.js";
11
11
  import { assertNativeV2Preflight } from "./native-v2-preflight.js";
12
12
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
13
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1"];
13
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1", "2.5.2"];
14
14
  const READY_TIMEOUT_MS = 10_000;
15
15
  const REST_TIMEOUT_MS = 5_000;
16
16
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
@@ -337,7 +337,7 @@ async function resolveProfileModel(web, options, failureCode) {
337
337
  }
338
338
  async function createSession(web, options, expectedVersion, failureCode) {
339
339
  const request = { metadata: { cwd: options.cwd } };
340
- if (["2.5.0", "2.5.1"].includes(expectedVersion)) {
340
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)) {
341
341
  request.environment_id = "local";
342
342
  request.environment_cwd = options.cwd;
343
343
  }
@@ -348,7 +348,7 @@ async function createSession(web, options, expectedVersion, failureCode) {
348
348
  return { sessionId: data.id, workspaceId: data.workspace_id };
349
349
  }
350
350
  async function verifyLocalEnvironment(web, identity, expectedCwd, expectedVersion, signal, failureCode) {
351
- if (!["2.5.0", "2.5.1"].includes(expectedVersion))
351
+ if (!["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion))
352
352
  return;
353
353
  const data = await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/environment`, undefined, signal, failureCode);
354
354
  if (!isRecord(data)) {
@@ -368,10 +368,10 @@ async function postSwarmProfile(web, identity, active, model, signal, failureCod
368
368
  await restData(web, "POST", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/profile`, { agent_config: agentConfig }, signal, failureCode);
369
369
  }
370
370
  async function verifySwarmStatus(web, identity, active, model, expectedVersion, signal, failureCode) {
371
- const data = ["2.5.0", "2.5.1"].includes(expectedVersion)
371
+ const data = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)
372
372
  ? await readWebSocketAgentState(web, identity.sessionId, signal, failureCode)
373
373
  : await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/status`, undefined, signal, failureCode);
374
- const source = ["2.5.0", "2.5.1"].includes(expectedVersion) ? "agent state" : "/status";
374
+ const source = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? "agent state" : "/status";
375
375
  if (!isRecord(data)) {
376
376
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} returned an invalid payload.`);
377
377
  }
@@ -381,10 +381,10 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
381
381
  if (data.plan_mode !== false) {
382
382
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm plan mode is off.`);
383
383
  }
384
- if (["2.5.0", "2.5.1"].includes(expectedVersion) && data.tower_mode !== false) {
384
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) && data.tower_mode !== false) {
385
385
  throw failure(failureCode, "swarm-activation.status", "Kimi web agent state did not confirm tower mode is off.");
386
386
  }
387
- const permission = ["2.5.0", "2.5.1"].includes(expectedVersion) ? data.permission_mode : data.permission;
387
+ const permission = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? data.permission_mode : data.permission;
388
388
  if (permission !== "auto") {
389
389
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm auto permission mode.`);
390
390
  }
@@ -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.5.5";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.5.6";
@@ -786,7 +786,7 @@ function buildArgs(opts) {
786
786
  ? opts.env.KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE
787
787
  : undefined;
788
788
  if (opts.resumeSessionId === undefined &&
789
- ["2.5.0", "2.5.1"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
789
+ ["2.5.0", "2.5.1", "2.5.2"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
790
790
  args.push("--environment", "local");
791
791
  }
792
792
  if (opts.resumeSessionId !== undefined) {
@@ -595,7 +595,8 @@ 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
- // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), and 2.5.1 (1b02030d):
598
+ // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), 2.5.1 (1b02030d), and
599
+ // 2.5.2 (1c142a00):
599
600
  // the additive events and HookDefSchema are unchanged.
600
601
  // Require the full version string AND matching components; no inferred 2.x compatibility.
601
602
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
@@ -611,7 +612,8 @@ function validateVersionSensitiveEvents(events, version) {
611
612
  (version.minor === 4 && ((version.version === "2.4.0" && version.patch === 0) ||
612
613
  (version.version === "2.4.1" && version.patch === 1))) ||
613
614
  (version.minor === 5 && ((version.version === "2.5.0" && version.patch === 0) ||
614
- (version.version === "2.5.1" && version.patch === 1))))) {
615
+ (version.version === "2.5.1" && version.patch === 1) ||
616
+ (version.version === "2.5.2" && version.patch === 2))))) {
615
617
  return { valid: true };
616
618
  }
617
619
  if (version.major !== 0) {
@@ -47,6 +47,7 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
47
47
  "2.4.1",
48
48
  "2.5.0",
49
49
  "2.5.1",
50
+ "2.5.2",
50
51
  ]);
51
52
  /** Per-operation native-v2 certification. One green operation never certifies another. */
52
53
  export const NATIVE_V2_CERTIFIED = new Map([
@@ -10,7 +10,7 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
10
10
  import { resolveKimiHome } from "./kimi-home.js";
11
11
  import { assertNativeV2Preflight } from "./native-v2-preflight.js";
12
12
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
13
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1"];
13
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1", "2.5.2"];
14
14
  const READY_TIMEOUT_MS = 10_000;
15
15
  const REST_TIMEOUT_MS = 5_000;
16
16
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
@@ -337,7 +337,7 @@ async function resolveProfileModel(web, options, failureCode) {
337
337
  }
338
338
  async function createSession(web, options, expectedVersion, failureCode) {
339
339
  const request = { metadata: { cwd: options.cwd } };
340
- if (["2.5.0", "2.5.1"].includes(expectedVersion)) {
340
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)) {
341
341
  request.environment_id = "local";
342
342
  request.environment_cwd = options.cwd;
343
343
  }
@@ -348,7 +348,7 @@ async function createSession(web, options, expectedVersion, failureCode) {
348
348
  return { sessionId: data.id, workspaceId: data.workspace_id };
349
349
  }
350
350
  async function verifyLocalEnvironment(web, identity, expectedCwd, expectedVersion, signal, failureCode) {
351
- if (!["2.5.0", "2.5.1"].includes(expectedVersion))
351
+ if (!["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion))
352
352
  return;
353
353
  const data = await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/environment`, undefined, signal, failureCode);
354
354
  if (!isRecord(data)) {
@@ -368,10 +368,10 @@ async function postSwarmProfile(web, identity, active, model, signal, failureCod
368
368
  await restData(web, "POST", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/profile`, { agent_config: agentConfig }, signal, failureCode);
369
369
  }
370
370
  async function verifySwarmStatus(web, identity, active, model, expectedVersion, signal, failureCode) {
371
- const data = ["2.5.0", "2.5.1"].includes(expectedVersion)
371
+ const data = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion)
372
372
  ? await readWebSocketAgentState(web, identity.sessionId, signal, failureCode)
373
373
  : await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/status`, undefined, signal, failureCode);
374
- const source = ["2.5.0", "2.5.1"].includes(expectedVersion) ? "agent state" : "/status";
374
+ const source = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? "agent state" : "/status";
375
375
  if (!isRecord(data)) {
376
376
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} returned an invalid payload.`);
377
377
  }
@@ -381,10 +381,10 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
381
381
  if (data.plan_mode !== false) {
382
382
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm plan mode is off.`);
383
383
  }
384
- if (["2.5.0", "2.5.1"].includes(expectedVersion) && data.tower_mode !== false) {
384
+ if (["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) && data.tower_mode !== false) {
385
385
  throw failure(failureCode, "swarm-activation.status", "Kimi web agent state did not confirm tower mode is off.");
386
386
  }
387
- const permission = ["2.5.0", "2.5.1"].includes(expectedVersion) ? data.permission_mode : data.permission;
387
+ const permission = ["2.5.0", "2.5.1", "2.5.2"].includes(expectedVersion) ? data.permission_mode : data.permission;
388
388
  if (permission !== "auto") {
389
389
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm auto permission mode.`);
390
390
  }
@@ -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.5.5";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.5.6";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi-plugin-cc",
3
- "version": "2.5.5",
3
+ "version": "2.5.6",
4
4
  "description": "Kimi Code subagents for DeepSeek Harness: all seven ask, review, challenge, rescue, pursue, swarm, and swarm-write operations through the kimi-plugin-cc companion runtime.",
5
5
  "type": "module",
6
6
  "main": "dist/dsh/index.js",