kimi-plugin-cc 2.5.9 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +9 -0
- package/README.md +29 -13
- package/agents/kimi-swarm-write.md +6 -4
- package/agents/kimi-swarm.md +5 -4
- package/commands/swarm.md +5 -3
- package/dist/cli-client.js +223 -30
- package/dist/commands/recover-swarm.js +4 -0
- package/dist/commands/setup.js +5 -1
- package/dist/commands/swarm.js +130 -41
- package/dist/hooks/approval-hook.js +3 -0
- package/dist/hooks/approval-policy.js +34 -12
- package/dist/kimi-engine.js +6 -4
- package/dist/kimi-timeouts.js +4 -4
- package/dist/mcp/operations.js +1 -1
- package/dist/process-tree.js +150 -43
- package/dist/swarm-activation.js +5 -0
- package/dist/swarm-policy.js +72 -0
- package/dist/swarm-recovery.js +41 -10
- package/dist/swarm-tool-policy.js +146 -0
- package/dist/version.js +1 -1
- package/docs/migration.md +13 -5
- package/docs/registry-releases.md +4 -0
- package/docs/safety.md +40 -15
- package/docs/swarm-recovery.md +4 -2
- package/docs/upstream-2.6.2-certification.md +80 -2
- package/package.json +2 -2
- package/plugins/kimi-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/kimi-codex/dist/cli-client.js +223 -30
- package/plugins/kimi-codex/dist/commands/recover-swarm.js +4 -0
- package/plugins/kimi-codex/dist/commands/setup.js +5 -1
- package/plugins/kimi-codex/dist/commands/swarm.js +130 -41
- package/plugins/kimi-codex/dist/hooks/approval-hook.js +3 -0
- package/plugins/kimi-codex/dist/hooks/approval-policy.js +34 -12
- package/plugins/kimi-codex/dist/kimi-engine.js +6 -4
- package/plugins/kimi-codex/dist/kimi-timeouts.js +4 -4
- package/plugins/kimi-codex/dist/mcp/operations.js +1 -1
- package/plugins/kimi-codex/dist/process-tree.js +150 -43
- package/plugins/kimi-codex/dist/swarm-activation.js +5 -0
- package/plugins/kimi-codex/dist/swarm-policy.js +72 -0
- package/plugins/kimi-codex/dist/swarm-recovery.js +41 -10
- package/plugins/kimi-codex/dist/swarm-tool-policy.js +146 -0
- package/plugins/kimi-codex/dist/version.js +1 -1
- package/plugins/kimi-codex/skills/kimi-swarm/SKILL.md +2 -0
- package/plugins/kimi-codex/skills/kimi-swarm-write/SKILL.md +2 -0
- package/plugins/kimi-dsh/dist/cli-client.js +223 -30
- package/plugins/kimi-dsh/dist/commands/recover-swarm.js +4 -0
- package/plugins/kimi-dsh/dist/commands/setup.js +5 -1
- package/plugins/kimi-dsh/dist/commands/swarm.js +130 -41
- package/plugins/kimi-dsh/dist/hooks/approval-hook.js +3 -0
- package/plugins/kimi-dsh/dist/hooks/approval-policy.js +34 -12
- package/plugins/kimi-dsh/dist/kimi-engine.js +6 -4
- package/plugins/kimi-dsh/dist/kimi-timeouts.js +4 -4
- package/plugins/kimi-dsh/dist/mcp/operations.js +1 -1
- package/plugins/kimi-dsh/dist/process-tree.js +150 -43
- package/plugins/kimi-dsh/dist/swarm-activation.js +5 -0
- package/plugins/kimi-dsh/dist/swarm-policy.js +72 -0
- package/plugins/kimi-dsh/dist/swarm-recovery.js +41 -10
- package/plugins/kimi-dsh/dist/swarm-tool-policy.js +146 -0
- package/plugins/kimi-dsh/dist/version.js +1 -1
- package/plugins/kimi-dsh/package.json +1 -1
package/docs/migration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Compatibility and upgrades
|
|
2
2
|
|
|
3
|
-
The runtime certifies exact CLI releases per operation.
|
|
3
|
+
The runtime certifies exact CLI releases per operation. Plugin 2.6.2 adds bounded swarm on exact stock CLI 2.6.2; see the [certification receipt](upstream-2.6.2-certification.md) for validation status. Exact 2.6.0 remains non-swarm-only. Older full-operation rows through 2.5.3 keep their inherited recovery limitation. `NATIVE_V2_CERTIFIED_VERSIONS` is the all-operation export, and `NATIVE_V2_ANY_OPERATION_VERSIONS` is the scoped union. Other versions, including 2.6.1 and 2.6.3, are not accepted automatically. The npm channel does not change the compatibility matrix.
|
|
4
4
|
|
|
5
5
|
Plugin 2.5.1 also adds DeepSeek Harness as a third host with all seven operations and a DSH-specific bundle, data root, and managed hook id. Existing Claude Code and Codex certification, job stores, and host-scoped hooks are unchanged; no migration is required for those hosts. New DSH installations follow the [README DSH section](../README.md#install-in-deepseek-harness), including `/kimi-setup` on that host.
|
|
6
6
|
|
|
@@ -12,13 +12,21 @@ 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. Nearby version numbers do not imply compatibility or operation scope; the exact per-operation matrix is authoritative. 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
|
-
##
|
|
15
|
+
## Plugin 2.6.2 swarm behavior on exact CLI 2.6.2
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Concurrency 1 uses one direct worker without native swarm activation or delegation. The default for write mode remains 1; its edits still produce an unapplied patch from a temporary worktree. Read mode defaults to 4 and uses guarded waves. At concurrency 2 or more, new and resumed entries share the wave limit; a model must divide larger tasks into successive waves. Fresh-only waves require at least two entries, so group odd target counts into disjoint entries or resume an own-session child for remaining work. `--cap` remains an advisory lifetime-total count.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
The plugin overrides native swarm-child timeout, so a stuck child holds its wave until completion or finite whole-job stop. It disables native Bash backgrounding in owned parallel sessions and denies explicit background Bash. Both normal exit and cancellation settle verified owned processes before artifacts or patches are captured. Concurrency counts Kimi child-agent turns, not subprocesses started by allowed repository tests; individual Bash timeout does not prove those descendants stop between waves. No user timeout configuration change or patched CLI installation is needed. Older exact CLI versions keep their prior behavior. Update the active host plugin and run its setup/check so its canonical hook contains the new policy; re-pinning an older runtime does not add that policy.
|
|
20
|
+
|
|
21
|
+
Parallel Bash commands use the native 60-second default foreground timeout, with a 300-second maximum, and are killed on expiry. Use concurrency 1 for longer tests: automatic timeout-to-background remains available there, root-agent turns stay sequential, and result capture still waits for whole-job settlement. The parallel session's native TaskStop policy remains after deactivation; external interactive resume is outside the managed-job guarantee.
|
|
22
|
+
|
|
23
|
+
## Native parallel swarm activation
|
|
24
|
+
|
|
25
|
+
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/2.5.3, plus the exact-2.6.2 parallel path, swarm commands and MCP calls use the same `runSwarm` lifecycle. The 2.6.2 single-worker path skips it:
|
|
26
|
+
|
|
27
|
+
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/2.5.3, 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. Exact 2.6.2 uses authenticated direct-subscription state proof and verifies the same local binding. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
|
|
20
28
|
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/2.5.2/2.5.3, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
|
|
29
|
+
3. A second short-lived web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2/2.5.3/2.6.2, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
|
|
22
30
|
|
|
23
31
|
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
32
|
|
|
@@ -8,6 +8,10 @@ no separate CLI.
|
|
|
8
8
|
|
|
9
9
|
## Publishing status
|
|
10
10
|
|
|
11
|
+
Plugin **2.6.2** certifies unmodified exact Kimi Code **2.6.2** for all eight operations. Parallel swarm uses bounded waves and a native timeout override; concurrency one uses a direct worker. Final runtime commit `b69a416d8588ed12239148ccc9f120e3dbfe0dcb` passed 1,767 repository tests with 23,008 assertions, 30 live production tests with 386 assertions, all 23 stock-runtime swarm controls, and 130 Linux controls with kernel threads visible. The 340-file package, all three compiled distributions, DSH host installation and isolated consumer security passed. Independent Codex and Fable reviews closed all findings. The first CI run exposed a Linux identity mismatch; its correction passed CI, and the final runtime also handles unrelated nonsignalable ancestry and reports uncertain cancellation cleanup. See the [certification record](./upstream-2.6.2-certification.md) for boundaries and evidence. Final release CI, tagging and npm publication are pending; publication receipts will be recorded after those actions complete. Publication does not update installed hosts or operator pins.
|
|
12
|
+
|
|
13
|
+
Plugin **2.5.9** certifies exact Kimi Code **2.6.2** for review, challenge, ask, rescue, review_gate and pursue only; both swarm modes refuse before model spawn, and exact 2.6.1 and 2.6.3 are excluded. The release-commit production matrix passed 23 tests with 171 assertions in 225.87 seconds, the definitive full gate passed 1,503 tests with 20,086 assertions in 433.07 seconds, and package validation passed 334 files with isolated consumer security. Codex and Claude both returned NO FINDINGS / APPROVE. `NATIVE_V2_CERTIFIED_VERSIONS` remains the all-operation export through 2.5.3, so automatic full-swarm pins do not silently select either narrowed 2.6.x release. [Release v2.5.9](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.9) is anchored at `6f9eaa6e145d62e7f35e5ff38d317bd7e3a673c5`. [Final CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/43585425445) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/43585933931) passed. The 334-file registry tarball has SHA-1 `2158551b73d3408af14e2061c29e40dc60622947` and SHA-256 `d5c43b95c708468393f357c353c180488ae83edb56cae93e840d08ee2b3dc520`, matches the validated workflow artifact byte-for-byte, and carries signed SLSA provenance (log index `3876002731`) and publish attestation (log index `3876057720`). A fresh registry npm installation has zero production advisories and no invalid or missing signatures; setup/check passes with the explicit non-swarm warning, and the installed runtime enforces the scoped refusals. The Discover timestamp records npm publication at `2026-11-14T10:43:34.167Z`. Publication does not update installed hosts or operator pins.
|
|
14
|
+
|
|
11
15
|
Plugin **2.5.8** certifies exact Kimi Code **2.6.0** for review, challenge, ask, rescue, review_gate and pursue only; both swarm modes refuse before model spawn, and exact 2.6.1 is excluded. The narrowed production matrix passed 23 tests with 170 assertions, the definitive full gate passed 1,472 tests with 19,530 assertions in 402.26 seconds, and package validation passed 333 files with isolated consumer security. Codex and Claude both approved with no blocker or major findings. `NATIVE_V2_CERTIFIED_VERSIONS` remains the all-operation export through 2.5.3, so automatic full-swarm pins do not silently select non-swarm-only 2.6.0. [Release v2.5.8](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.8) is anchored at `887958d7de39cf388ebc3faaffd31cabe76c5a99`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/43452771909) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/43453807099) passed. The 333-file registry tarball has SHA-1 `65145489591e6873556f85a06506d0d276880441` and SHA-256 `6fc5f44aacafa92671f5aea8e2343e6323116f81d4456dee47181481050af5f4`, matches the validated workflow artifact byte-for-byte, and carries signed SLSA provenance (log index `3857088726`) and publish attestation (log index `3857133123`). A fresh registry npm installation has zero production advisories and no invalid or missing signatures; setup/check passes with the explicit non-swarm warning, and the installed runtime enforces the scoped refusals. The Discover timestamp records npm publication at `2026-11-13T15:41:45.145Z`. Publication does not update installed hosts or operator pins.
|
|
12
16
|
|
|
13
17
|
Plugin **2.5.7** certifies exact Kimi Code **2.5.3** for all eight operations, alongside 2.5.0, 2.5.1 and 2.5.2; see the [2.5.3 certification record](./upstream-2.5.3-certification.md). Candidate and production matrices each passed 24 tests with 201 assertions and no skips. The corrected-tree full check passed 1,437 tests with 18,980 assertions in 396.30 seconds, package validation passed 332 files across all three distributions, and isolated consumer security passed. Codex returned APPROVE with no findings; Claude returned READY-TO-TAG with no blocker or major findings, and its two chronology corrections are included. Publication does not update installed hosts or operator pins. [Release v2.5.7](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.7) is anchored at `b203b6fd0db865935bf47241ee4ea8cf3931b9a5`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/43045729840) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/43046887763) passed. The 332-file registry tarball has SHA-1 `adfee8da730dc14349d26125bc5add44fe204aa5`, matches the validated workflow artifact byte-for-byte, and carries signed provenance (sigstore log index `3812668747`). A fresh registry npm installation has zero production advisories; isolated Claude Code, Codex, and DSH setup/checks and unsupported-version refusal pass, and all compiled runtime mirrors match the release tag. The Discover timestamp records npm publication at `2026-11-11T15:25:33.059Z`.
|
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
|
|
5
|
+
Native agent-core-v2 uses the no-plan construction on exact reviewed versions. The [runtime certification table](../runtime/kimi-engine.ts) controls routing and operation scope. Exact 2.6.0 remains limited to review, challenge, ask, rescue, review gate and pursue. Plugin 2.6.2 adds the bounded swarm construction described below for exact stock CLI 2.6.2; its [certification receipt](upstream-2.6.2-certification.md) records validation status. Older full-operation rows through 2.5.3 retain their known rate-limit-recovery limitation. The hook is not an operating-system sandbox.
|
|
6
6
|
|
|
7
7
|
## Why the safety story is hook-based
|
|
8
8
|
|
|
@@ -148,8 +148,8 @@ Write boundaries are identical to the companion commands: rescue and pursue edit
|
|
|
148
148
|
| `ask` | `Read`, `Grep`, `Glob`, `ReadMediaFile`, `TaskList`, `TaskOutput` | everything else, including `Bash`, `Write`, `Edit` |
|
|
149
149
|
| `review`, `challenge`, `review_gate` | same as `ask` | same as `ask` |
|
|
150
150
|
| `rescue` | governed by [`evaluateRescueHookRequest`](../runtime/rescue-approval.ts) against the plugin-owned `KIMI_PLUGIN_CC_WORKSPACE_ROOT` — workspace-bound shell allowlist, symlink-aware path containment, mutating-flag detection on `git`/`find`/`sed`, etc. | missing-root writes and every shell command, file edit, or write that the allowlist rejects |
|
|
151
|
-
| `swarm` | same read-only set as `ask
|
|
152
|
-
| `swarm-write` | read-only set + `AgentSwarm
|
|
151
|
+
| `swarm` | same read-only set as `ask`; exact `AgentSwarm` subject to the version-specific wave guard | everything else, including singular `Agent`, shell, and writes |
|
|
152
|
+
| `swarm-write` | read-only set + admitted `AgentSwarm` on parallel paths; `Write`/`Edit`/`Bash` only through the rescue evaluator against the trusted ephemeral-worktree root | singular `Agent`, missing-root writes, and everything the rescue evaluator rejects |
|
|
153
153
|
| unknown label | `Read`, `Grep`, `Glob`, `ReadMediaFile`, `TaskList`, `TaskOutput` | everything else (conservative-deny for stale/misconfigured callers) |
|
|
154
154
|
|
|
155
155
|
`EnterPlanMode` and `ExitPlanMode` are explicitly denied before any per-label write evaluator for every managed label. Denied tool calls exit the hook with code 2 and write a reason to stderr. kimi-code surfaces the reason to the model, which can adapt and try a different approach (e.g., use `Read` instead of `Bash cat`).
|
|
@@ -226,24 +226,47 @@ For interrupted runs, see [durable recovery and its explicit limits](swarm-recov
|
|
|
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
|
|
229
|
+
For parallel paths requiring activation (exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2, 2.5.3 and 2.6.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/2.5.2/2.5.3 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/2.5.3, 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/2.5.3 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/2.5.3, closing that channel before validating the latest frame; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record. Exact 2.6.2 instead uses authenticated direct-subscription state proof with exact request/session identity and the same local environment checks.
|
|
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/2.5.2/2.5.3, 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/2.5.3/2.6.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
|
|
|
237
|
+
## Bounded swarm on exact CLI 2.6.2
|
|
238
|
+
|
|
239
|
+
`--max-concurrency` defaults to 4 for read-only work and 1 for write work. On exact native-v2 2.6.2, the runtime chooses one of two paths:
|
|
240
|
+
|
|
241
|
+
- **Two or more:** the canonical hook admits only waves whose fresh items plus resumed entries fit the requested concurrency. Forks, malformed requests and fresh singleton waves are denied. Group odd numbers of targets into at least two disjoint entries per fresh wave, or resume an existing child for the remaining work. The hard bound covers simultaneous Kimi child-agent turns, excluding their coordinator. Fresh children cannot activate another swarm; resumes stay within the new job's own session.
|
|
242
|
+
- **One:** a single worker runs directly in fresh print, without activating native swarm or launching children. Both delegation tools are denied. It keeps the same read-only restrictions or confined worktree writes and patch output.
|
|
243
|
+
|
|
244
|
+
The plugin forces `KIMI_CODE_SWARM_TIMEOUT_MS=2147483647` on bounded spawns, overriding saved or ambient short child timeouts. This value exceeds the plugin's maximum 24-hour job budget. A short native swarm-child timeout is unsafe here: it can return a wave result before a retry stops. A slow or stuck child therefore holds its wave until it completes or the finite whole-job budget or explicit cancellation stops the run. Environment value `0` is ignored upstream and is not used as a timeout override.
|
|
245
|
+
|
|
246
|
+
For the parallel path, the plugin disables `TaskStop` in its fresh owned native session after the activation web process has shut down and before print starts. The managed hook already denies that tool; disabling it in native policy also removes the complete `TaskList`/`TaskOutput`/`TaskStop` set that stock 2.6.2 requires for Bash backgrounding. This closes both explicit backgrounding and automatic detachment after a foreground timeout, whose completion could otherwise wake a finished child. The hook separately denies explicit `Bash.run_in_background:true` on both bounded paths. The escape monitor receives the same trusted wave policy as the hook; a native mode-off rejection on the direct-worker path can still be a harmless mismatch diagnostic, not proof of execution.
|
|
247
|
+
|
|
248
|
+
With parallel backgrounding disabled, native Bash uses a 60-second default foreground timeout and a 300-second maximum; commands that exceed their timeout are killed rather than detached. Use `--max-concurrency 1` for longer tests. That direct-worker path still permits native automatic timeout-to-background behavior, although explicit background requests are denied. Its root-agent turns remain sequential, and whole-job settlement still gates the result; the limit of one is an agent-turn bound, not a promise of one OS process.
|
|
249
|
+
|
|
250
|
+
The native `TaskStop` policy remains in the plugin-owned session after deactivation. The plugin does not restore it or claim the same bounded behavior if a user later resumes that historical session interactively outside the managed job.
|
|
251
|
+
|
|
252
|
+
Normal print exit and terminal cancellation both wait for identity-verified owned-process settlement before artifacts or write patches are captured. A native timeout on an individual Bash call does not prove arbitrary command descendants have stopped before the next wave. An allowed repository test can itself start many OS subprocesses; the concurrency limit counts Kimi child-agent turns, not those processes. The whole-job settlement barrier stops verified owned tails and refuses success when quiescence cannot be established.
|
|
253
|
+
|
|
254
|
+
Process-tree settlement applies on POSIX; Windows retains direct-child-only cleanup. Job-end cleanup also stops observed, identity-verified build/test daemon descendants, so services started by the job are not preserved. Process sampling retains the trusted-repository boundary and does not provide universal OS daemon containment.
|
|
255
|
+
|
|
256
|
+
`--cap` stays a soft lifetime-total hint, separate from concurrency. Sequential waves can process more targets than the concurrency limit. The finite budget bounds duration, not dollars or total tokens. This construction does not change the existing trust boundary for test runners or other allowed commands that execute repository code.
|
|
257
|
+
|
|
258
|
+
The construction is exact-version-specific. Older certified versions retain normal-launch limits and the inherited recovery overrun; exact 2.6.0 remains non-swarm-only. The upstream 2.6.2 binary is unmodified. Validation state and evidence are recorded in the [2.6.2 certification record](upstream-2.6.2-certification.md).
|
|
259
|
+
|
|
237
260
|
## Read-only swarm (`/kimi:swarm`)
|
|
238
261
|
|
|
239
262
|
`/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
263
|
|
|
241
|
-
- **The hook label is `swarm`, and it allows the read-only tool set PLUS `AgentSwarm`.**
|
|
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
|
|
264
|
+
- **The hook label is `swarm`, and it allows the read-only tool set PLUS `AgentSwarm`.** On parallel paths the coordinator may call an admitted `AgentSwarm`, but no write/edit/shell tool is allowed; the exact-2.6.2 direct-worker path denies delegation too. 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.
|
|
265
|
+
- **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 parallel-path 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, 2.5.2 and 2.5.3, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
|
|
243
266
|
- **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
267
|
- **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
|
-
- **
|
|
246
|
-
- **A model-invocable `kimi-swarm` agent (v1.3) wraps this command.** The `/kimi:swarm` slash command is human-only (`disable-model-invocation: true`, the blanket convention for *all* commands), but the `kimi-swarm` subagent lets the main thread *dispatch* a read-only fan-out on its own judgement — the same human-command + model-invocable-agent split that `kimi-review`/`kimi-challenge`/`kimi-ask`/`kimi-rescue` already use. Swarm is a safe candidate for an agent precisely because it is **read-only (zero write surface)**: the only thing auto-dispatch adds is COST exposure, already bounded by the finite `--budget` and the
|
|
268
|
+
- **Concurrency and total count are separate.** Every swarm has a finite `--budget` (default 30m). Exact 2.6.2 follows the bounded-wave/direct-worker construction above; `--max-concurrency` defaults to 4 for read-only work. Older certified binaries use `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` for normal launches on 0.18.0+ and can exceed it during rate-limit recovery. `--cap` is only a soft lifetime-total hint: a stateless per-wave guard does not make it a total-count limit. A time budget is not a dollar or token cap. Keep all three controls distinct.
|
|
269
|
+
- **A model-invocable `kimi-swarm` agent (v1.3) wraps this command.** The `/kimi:swarm` slash command is human-only (`disable-model-invocation: true`, the blanket convention for *all* commands), but the `kimi-swarm` subagent lets the main thread *dispatch* a read-only fan-out on its own judgement — the same human-command + model-invocable-agent split that `kimi-review`/`kimi-challenge`/`kimi-ask`/`kimi-rescue` already use. Swarm is a safe candidate for an agent precisely because it is **read-only (zero write surface)**: the only thing auto-dispatch adds is COST exposure, already bounded by the finite `--budget` and the version-specific `--max-concurrency` bound that defaults to 4 for read-only work — so an auto-dispatched fan-out is bounded by construction, not by ignorable agent prose (the agent additionally restricts backgrounding to explicit user requests). `/kimi:pursue` ALSO gains a model-invocable agent (`kimi-pursue`, v1.3 — see the Autonomous goal mode section above): it is write-capable, but auto-dispatch widens no write surface (the rescue workspace allowlist + the managed PreToolUse hook gate every tool call on every continuation turn, and it cannot mutate git state) and removes no bound (the mandatory `--budget` ceiling holds), so its agent path is exactly as confined as its command path. Because it is the plugin's highest-autonomy surface, its agent description demands an explicit hands-off-autonomy request and steers single bounded tasks to `kimi-rescue`.
|
|
247
270
|
|
|
248
271
|
## Write-capable swarm (`/kimi:swarm --write`)
|
|
249
272
|
|
|
@@ -254,8 +277,9 @@ Older certified versions keep the direct `kimi -p` path. The web processes are n
|
|
|
254
277
|
- **`coder` subagents really can write, and the hook is the sole boundary.** Verified at kimi-code 0.42.0: swarm subagents get their own eager external-hooks service under the standard before-execute channel — there is no deny-all path on the swarm route (the `btw` side-question path is separate). Write-swarm's `coder` subagents DO have edit tools, and the managed PreToolUse hook is the **only** write boundary — which is why the trusted-root confinement above is load-bearing and gated tightly.
|
|
255
278
|
- **The plugin never touches git; the main thread owns the merge.** Subagents cannot run git (allowlist denies mutation). The plugin captures the change set with `git add -N` (intent-to-add, so new files appear in the diff WITHOUT writing loose objects into the shared object DB) + `git diff --binary` (untruncated, applyable), writes it to a `swarm-write-<jobId>.patch` artifact, and prints the path. It does **not** `git apply`, commit, or move any ref — the user/main thread reviews the patch and applies it (`git apply <path>`). The worktree shares the main repo's object DB and refs, but no ref/HEAD is ever moved, so the user's repository state is untouched.
|
|
256
279
|
- **The patch is captured on every terminal path, before cleanup.** Success, cancel, budget-expiry, and failure all capture the (possibly partial) patch BEFORE `git worktree remove --force` discards the tree, so a cancelled run never silently loses the work the subagents already did. If capture itself fails, the job fails instead of completing and the worktree is retained with its path in the error details for recovery. That guarantee covers the plugin's own terminal paths, including `companion.sh cancel`. It does **not** cover a harness interrupt: Esc/TaskStop delivers SIGTERM then SIGKILL after ~1.35s (measured, process-group-wide), which is shorter than the 1500ms child escalation plus quiescence plus patch capture — so a hard interrupt can kill the companion mid-teardown and lose the patch. `companion.sh cancel` signals from a separate process not racing that deadline and is the work-preserving stop. Abandoned worktrees are retained, never age-deleted. Use the preview/apply recovery procedure in [swarm-recovery.md](swarm-recovery.md); uncertain ownership refuses automatic cleanup.
|
|
257
|
-
- **Gated tightly.** Requires
|
|
258
|
-
- **Required for final certification evidence.** `tests/runtime/real-binary-smoke.test.ts` runs the real `runSwarm --write` and requires the POSITIVE end-to-end: distinct child journals contain their assigned edits with `Write`/`Replaced` results on the same `toolCallId`, those child-authored changes land in the worktree and captured patch, the user's real tree is byte-identical + git-clean, and the worktree is cleaned up. A patch without per-call child provenance is not accepted as fan-out evidence. The NEGATIVE lane correlates each absolute out-of-root `path` and `toolCallId` with its managed denial. It is the check that catches `tool_input` field-name drift — `Write`/`Edit` carry `path`, not `file_path`, and reading the wrong key denies every real write silently.
|
|
280
|
+
- **Gated tightly.** Requires an exact certified CLI (write mode additionally requires at least 0.18.0), a Git repository with committed HEAD, and a verified managed hook. A dirty-tree warning explains that the worktree starts from HEAD and does not contain uncommitted edits. Default concurrency 1 uses a direct worker on exact 2.6.2; larger values use bounded waves. Older certified versions retain normal-launch serialization with the disclosed recovery limitation. Disjoint targets remain prompt guidance, and Git mutation stays denied.
|
|
281
|
+
- **Required for final certification evidence on parallel paths.** `tests/runtime/real-binary-smoke.test.ts` runs the real `runSwarm --write` and requires the POSITIVE end-to-end: distinct child journals contain their assigned edits with `Write`/`Replaced` results on the same `toolCallId`, those child-authored changes land in the worktree and captured patch, the user's real tree is byte-identical + git-clean, and the worktree is cleaned up. A patch without per-call child provenance is not accepted as fan-out evidence. The NEGATIVE lane correlates each absolute out-of-root `path` and `toolCallId` with its managed denial. It is the check that catches `tool_input` field-name drift — `Write`/`Edit` carry `path`, not `file_path`, and reading the wrong key denies every real write silently.
|
|
282
|
+
- **The single-worker path needs separate evidence.** At concurrency 1 on exact 2.6.2, require fresh print with no web activation or child journals, managed delegation denials, a confined main-agent write captured in the patch, unchanged user tree, and cancellation/budget settlement. Coordinator-only patches are valid for this explicit path, never substitutes for parallel child evidence.
|
|
259
283
|
- **Model-invocable agent (v1.5), patch-only by construction.** Following the field-proof above, `--write` now has a `kimi-swarm-write` subagent so the main thread can dispatch a write fan-out on its own judgement — the same human-command + model-invocable-agent split the rest of the suite uses. Auto-dispatch is a safe extension here because it widens **no** write surface and retains the documented bounds: the agent path runs the identical `runSwarm --write` code, so edits still land only in the throwaway worktree, the managed hook still gates every `coder` subagent, the patch is still handed back for the user to apply (**the plugin never applies or commits**), and `--budget` + default `--max-concurrency` 1 + the hook requirement still apply, with the rate-limit-recovery qualification above. In fact write-swarm is a *less* dangerous agent than the `kimi-pursue` agent already shipped: pursue writes directly into the workspace, whereas write-swarm's output is a patch the human reviews before anything reaches a real tree. Because it is still a write surface, the agent description demands BOTH signals — many disjoint write targets AND explicit fan-out intent — and steers single edits to `kimi-rescue`, read-only fan-outs to `kimi-swarm`, and autonomous loops to `kimi-pursue`. Default `--max-concurrency` stays **1**; raising it (concurrent writers) remains a deliberate, human-or-explicitly-requested choice.
|
|
260
284
|
|
|
261
285
|
## MCP transport and long-running jobs
|
|
@@ -320,9 +344,10 @@ Both binaries share `~/.kimi-code` (login, config, hook), so nothing else
|
|
|
320
344
|
changes. The full-operation certified maximum can be read from the installed
|
|
321
345
|
plugin (`NATIVE_V2_CERTIFIED_VERSIONS` in `dist/kimi-engine.js`), which lets an
|
|
322
346
|
upgrade script bump the full-swarm pin automatically after each full-operation
|
|
323
|
-
certification. That export
|
|
324
|
-
|
|
325
|
-
automatic full-swarm pin does not silently
|
|
347
|
+
certification. That export excludes narrowed releases such as 2.6.0 and includes exact 2.6.2
|
|
348
|
+
under its certified bounded-swarm construction. `NATIVE_V2_ANY_OPERATION_VERSIONS`
|
|
349
|
+
is the separate scoped union, so an automatic full-swarm pin does not silently
|
|
350
|
+
become a non-swarm-only pin.
|
|
326
351
|
|
|
327
352
|
## The setup probe
|
|
328
353
|
|
package/docs/swarm-recovery.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
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/2.5.2/2.5.3 swarm runs
|
|
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/2.5.3 swarm runs, plus exact-2.6.2 parallel runs, 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 web authentication tokens, credentials, prompts or config contents. Session identity is committed before enabling swarm mode. The exact-2.6.2 concurrency-1 path starts a direct worker without a mutable swarm session, so it does not create an activation-recovery record; normal cancellation and patch capture still apply.
|
|
6
|
+
|
|
7
|
+
Exact-2.6.2 parallel sessions retain their native `TaskStop`-disabled policy after normal deactivation or recovery. Recovery does not remove it. The bounded construction covers the managed job; resuming that historical session interactively through another client is outside its certification.
|
|
6
8
|
|
|
7
9
|
The exact 2.6.0 swarm integration is candidate-only: the narrowed 2.6.0 non-swarm certification excludes both swarm operations and does not certify this recovery path. Recovery canonicalizes `record.cwd` only for session deactivation through symlinked execution parents. Ownership, workspace, and patch checks continue to use the original recorded alias.
|
|
8
10
|
|
|
@@ -19,7 +21,7 @@ Preview does not signal processes, modify sessions, or capture patches. Apply:
|
|
|
19
21
|
|
|
20
22
|
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.
|
|
21
23
|
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.
|
|
22
|
-
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/2.5.3 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. Deactivation uses the realpath of `record.cwd`; the original recorded alias remains the ownership, workspace, and patch-check boundary.
|
|
24
|
+
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/2.5.3 this includes the local environment binding and protocol-v2 WebSocket main-agent state rather than `/status`. On exact 2.6.2 parallel sessions it uses authenticated direct-subscription state proof and the same local binding checks. It does not resume a prompt, generate model output, install hooks or retry failed cleanup automatically. New recovery web launches are themselves journaled. Deactivation uses the realpath of `record.cwd`; the original recorded alias remains the ownership, workspace, and patch-check boundary.
|
|
23
25
|
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.
|
|
24
26
|
|
|
25
27
|
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.
|
|
@@ -1,4 +1,71 @@
|
|
|
1
|
-
# Exact CLI 2.6.2
|
|
1
|
+
# Exact CLI 2.6.2 certification — plugin 2.6.2
|
|
2
|
+
|
|
3
|
+
## Bounded swarm certification — 2026-11-14
|
|
4
|
+
|
|
5
|
+
**Status: certified for all eight operations.** Final source, stock-binary, live-provider, repository, package, Linux-host and independent-review gates passed on runtime `b69a416d8588ed12239148ccc9f120e3dbfe0dcb`. Release CI, tagging and publication remain pending; no installed-host update is implied.
|
|
6
|
+
|
|
7
|
+
The corrected runtime is frozen at `b69a416d8588ed12239148ccc9f120e3dbfe0dcb`. Linux snapshots stay on `/proc`. Proven `PF_KTHREAD` rows with PGID 0 are excluded; valid non-kernel PGID 0/-1 rows remain available for ancestry and cause refusal only when the requested owned subtree depends on them. Genuinely unreadable or malformed rows still make the snapshot incomplete, and targeted nonpositive-group probes remain incomplete. Persisted `ps` identities still validate through their matching reader. On the legacy cancellation path, snapshot failure still stops the owned root, then returns `CLI_CANCELLATION_TEARDOWN_FAILED` with `process_cleanup_unverified` and the original cause; a wrapped budget error carries no partial prose. Test helpers now clean up early failures and bound pipe draining.
|
|
8
|
+
|
|
9
|
+
Codex found no actionable defects, and `FABLE-LINUX-CLOSURE.md` closes all three source findings without new defects. New cancellation controls passed 28 tests / 420 assertions alongside 105 existing tests / 301 assertions; helper pipe-drain controls passed 5 tests / 39 assertions. The final runtime gates below verify the reviewed implementation and emitted artifacts.
|
|
10
|
+
|
|
11
|
+
The published plugin 2.5.9 non-swarm certification remains historical evidence below. Earlier runtime passes and the failed first Linux gate are retained as chronology, not substituted for the final receipts.
|
|
12
|
+
|
|
13
|
+
The exact source and binary remain commit `6a8493df3e1d796a63f7c7ca0de76c1e690cd943` and bundle SHA-256 `f07d4f0d28ba1dd3397cb070aa757f7b7610a51bb15164f1e158fad7809cb36a`. The upstream rate-limit scheduler is unchanged. The plugin enforces the bound through admission and terminal cancellation:
|
|
14
|
+
|
|
15
|
+
- At concurrency at least 2, the canonical managed hook counts fresh items plus resumed entries and denies a wave larger than the requested limit. It rejects forks, malformed input and fresh singleton waves; a singleton remainder needs regrouping or an own-child resume. The policy and width come from the immutable operation/version plan, overwrite ambient values and also reach the escape monitor.
|
|
16
|
+
- `KIMI_CODE_SWARM_TIMEOUT_MS=2147483647` overrides saved or ambient short child timeouts. A native swarm-child timeout therefore cannot return a wave while its retry still runs. A stuck child holds the wave until completion or finite whole-job stop. Environment `0` is ignored by stock 2.6.2.
|
|
17
|
+
- Parallel activation disables native `TaskStop` in the fresh owned session after web shutdown and before print. Stock 2.6.2 requires all three task tools for Bash backgrounding, so this closes automatic detachment and completion-driven child wakeups. The canonical hook also denies explicit background Bash on both bounded paths.
|
|
18
|
+
- Normal exit and terminal cancellation require identity-verified owned-process quiescence before artifact or patch capture. Individual native Bash timeouts do not prove arbitrary descendant quiescence between waves.
|
|
19
|
+
- Concurrency 1 runs one direct worker through fresh print without native swarm activation. Both AgentSwarm and singular Agent are denied. Native automatic Bash timeout-to-background remains possible, with sequential root turns and whole-job settlement; explicit background requests remain denied. Parallel Bash has a 60-second default and 300-second maximum foreground timeout, so longer tests should use concurrency 1. Read-only restrictions, write-worktree confinement, patch capture, operation identity and finite budgets remain unchanged.
|
|
20
|
+
- The concurrency bound counts simultaneous Kimi child-agent turns, excluding the coordinator and OS subprocess counts; allowed repository tests can spawn multiple processes. `--cap` remains a soft lifetime-total hint. The existing repository-code trust boundary remains; no operating-system sandbox or spend cap is claimed.
|
|
21
|
+
- The construction applies only to exact native-v2 2.6.2. Exact 2.6.0 remains non-swarm-only. Older full-operation rows retain their inherited recovery limitation; other versions gain no compatibility by implication.
|
|
22
|
+
|
|
23
|
+
The native TaskStop policy persists after deactivation of the owned parallel session. A later external interactive resume of that historical session is outside the managed-job certification.
|
|
24
|
+
|
|
25
|
+
### Validation receipts
|
|
26
|
+
|
|
27
|
+
Final gates use immutable runtime commit `b69a416d8588ed12239148ccc9f120e3dbfe0dcb`. All 184 covered files match the same Git blobs, with runtime/dist digest `d4c2844484468e7e39ff962e084980978bd25a6d9fdbbd24c23840f33a7dc836`; 174 distribution-mirror files match committed bytes. The final `production-05` manifest SHA-256 is `72b8c3e8d67e7ba4f22ae21e9e4b56b49337960fb662222f687f06eae0d9db15`. Local evidence lives under `.claude/kimi-code-research/cert-2.6.2-bounded/`; ignored logs are evidence locations, not package contents.
|
|
28
|
+
|
|
29
|
+
| Gate | Receipt |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Exact-source audit and tag scan | PASS: 31 tests / 393 assertions, 115 source pins; exact 2.5.3 regression 19 pass / 12 version-specific skips / 153 assertions |
|
|
32
|
+
| Canonical policy, emitted-runtime and repository regressions | PASS in the final full gate: all three compiled distributions, canonical-hook policy, escape-monitor propagation and unsafe-settlement patch refusal |
|
|
33
|
+
| Scripted stock-binary waves, resume counting, nesting, recovery and timeout-tail controls | PASS: `production-05.log`, 23 tests / 138 assertions in 274.56s; no failures, including both 200-second recovery controls |
|
|
34
|
+
| Native background-policy closure, explicit background denial, normal-exit descendant quiescence before capture | PASS: parallel auto-background and explicit-background controls in that same stock-binary suite |
|
|
35
|
+
| Single-worker read/write, delegation denial, patch and cancellation controls | PASS: explicit/default concurrency-one, automatic-background, cancellation and budget controls in that same suite |
|
|
36
|
+
| Real-provider production operation matrix | PASS: `live-certified-commit.log`, 30 pass / 2 inapplicable narrowed-refusal skips / 386 assertions in 410.88s; exit 0 at 2026-11-14T15:30:22Z. Both swarm execution paths run; the two skipped tests assert refusals that do not apply to the full 2.6.2 scope |
|
|
37
|
+
| No-plan and local-execution controls | PASS: same-day exact-source and exact-binary controls retained in the historical receipt below; unchanged source/binary and safety closures are rechecked by the final tag scan and operation matrix |
|
|
38
|
+
| Frozen dependency install and full repository gate | PASS: `certified-full-check.log`, 1,767 pass / 76 expected opt-in or platform skips / 0 failures / 23,008 assertions; 1,843 tests across 96 files in 591.60s |
|
|
39
|
+
| Kernel-visible Linux host | PASS: `linux-host-focused-final.log`, 130 pass / 1 macOS-specific skip / 0 failures / 832 assertions in 104.70s; Linux 7.0.14-linuxkit arm64, with 206 PF_KTHREAD PGID-0 rows and 8 non-kernel PGID≤0 rows |
|
|
40
|
+
| Package and isolated consumer security | PASS: `certified-package.log` verifies 340 files, all three distributions, isolated setup/check, version refusal and MCP checks; audited DSH host/profile, seven providers/tools and Web boot. `certified-consumer-security.log` passes isolated npm consumer security |
|
|
41
|
+
| Independent reviews | PASS: Codex reports no actionable findings. Fable's final `FABLE-LINUX-CLOSURE.md` closes all three source findings with no new defect; runtime tests and emitted-artifact verification are established separately by the final gates above |
|
|
42
|
+
| Release CI, tagging and publication | PENDING. No tag, publication or installed-host result is claimed |
|
|
43
|
+
|
|
44
|
+
The 23 stock-binary controls use the untouched 2.6.2 executable with a scripted test provider. They exercise new/resumed waves, odd target grouping, both nested profiles, invalid resumes, read/write cancellation, active HTTP/tool budget expiry, and 429/context recovery beyond the native 180-second interval. Their deterministic responses prove enforcement and settlement; the separate passing real-provider matrix proves useful model behavior through the production operation paths.
|
|
45
|
+
|
|
46
|
+
The uncoached live five-target control at width four grouped the targets into two children in one wave, with peak two, no coordinator-authored targets and an 899-byte patch. This is valid grouping, not proof that each target needs a separate child. The directed control completed two bounded waves and rejected a three-entry wave at width two. Same-day source and no-plan/local controls are explicitly reused against the unchanged exact CLI; earlier prototype or pre-fix runtime passes do not replace the final receipts above.
|
|
47
|
+
|
|
48
|
+
| Completed evidence file | SHA-256 |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `source-scan-2.6.2.log` | `ea21898d94dba98fa68792565c6d2bb409af04307fc72446af2da58598f2e507` |
|
|
51
|
+
| `source-scan-2.5.3.log` | `f04df6af7b6c2252526bba52a2df357a1f152618c4f6fc12ca6354400232723c` |
|
|
52
|
+
| `production-05.log` | `bd89f7a480f93ccfc554dc70c1fb431ab6b29cda213b9608c81bcc5e908329e0` |
|
|
53
|
+
| `certified-full-check.log` | `b24c2078902272389729ad0b0e2828f3282335dd43867279bcd9086c93d34d71` |
|
|
54
|
+
| `live-certified-commit.log` | `b17ccb73da31c2e127eab175b7fa4289ec986942158b1daa5e9a07ba6af24ffc` |
|
|
55
|
+
| `certified-package.log` | `aa125bef88a327cb9de596f0eb0862cc581d6b49544eb932b272e706ca006b57` |
|
|
56
|
+
| `certified-consumer-security.log` | `3dea92a3793941ba29017dec7b3e7a7a254eb45473130349fa4502b70a817221` |
|
|
57
|
+
| `linux-host-focused-final.log` | `f309adc00fdebdbf5878e34871dca4e3846822b1a4f92293c52c7e09164302ed` |
|
|
58
|
+
| `FABLE-LINUX-CLOSURE.md` | `2dd16b010bd44581891a3f367c7b19b7ee08a1157dd885e1bb085e8f8a4ae81e` |
|
|
59
|
+
|
|
60
|
+
### Counterexamples that determined the construction
|
|
61
|
+
|
|
62
|
+
Earlier macOS gates passed at `e8f7059`; helper-only zombie checks followed at `9db8e97`. The first release CI run `43604995805` then exposed mismatched `ps`/`proc` identity tokens after a Linux kernel PGID-0 row, recording 64 failures before cancellation after 20 minutes. This was a timeout cascade, not a deadlock, and no tag or publication occurred. CI run `43608218030` subsequently passed both check and Windows-spawn jobs at `a2001e9`. Further review required valid unrelated nonpositive-group ancestry and explicit legacy snapshot-failure reporting; the final `b69a416` source and all runtime gates above include those corrections. The earlier CI pass is not represented as final release CI.
|
|
63
|
+
|
|
64
|
+
The earlier prototype supplied 11 admission/recovery binary controls, 18 direct hook probes and 10 lifecycle controls. It established a real guard-only failure (three active children at width two after a short native timeout) and a protected counterpart, including process checks before provider cleanup. Those ignored research artefacts motivated the production construction; they do not replace the canonical implementation or release gates above.
|
|
65
|
+
|
|
66
|
+
Review then exposed a second route: native Bash background completion could wake a child after its wave had returned. The owned-session TaskStop policy closes both explicit and automatic detachment in parallel mode; the hook separately rejects explicit background requests. A later parallel control found a timed-out Bun descendant surviving successful print exit. That failure required identity tracking and a normal-exit settlement barrier before artifact or patch capture, plus refusal to capture a patch when settlement remains uncertain. The passing production controls include these closures. Concurrency-one automatic backgrounding remains supported because its root-agent turns are sequential and whole-job settlement still gates the result. None of these controls claims a bound on arbitrary OS subprocess counts or settlement of every command descendant between individual waves.
|
|
67
|
+
|
|
68
|
+
## Historical plugin 2.5.9 non-swarm certification — 2026-11-14
|
|
2
69
|
|
|
3
70
|
## Scope and decision
|
|
4
71
|
|
|
@@ -51,4 +118,15 @@ The focused candidate suite passed **353 tests / 4,850 assertions**. The expande
|
|
|
51
118
|
- Final package validation (`final-package.log`): **334 files**, all three compiled distributions, isolated setup/check/version refusal, patched DSH host/profile with seven providers/tools and Web boot, terminal exit 0. Isolated npm consumer security (`final-consumer.log`) passed with exit 0.
|
|
52
119
|
- Codex's final incremental verification returned **NO FINDINGS / APPROVE**, exit 0. Claude's returned **NO FINDINGS / APPROVE**, exit 0. Their findings drove the README and guidance updates, direct 2.6.2 assertions, explicit base-commit provenance and correction of the erroneous byte-identity claim. Both confirmed that full-swarm certification remains at 2.5.3 and 2.6.1/2.6.3 are excluded.
|
|
53
120
|
- The required release-commit rerun passed **23 tests / 171 assertions in 225.87 seconds**, with exactly the three intentional swarm-lane exclusions and terminal exit 0. It ran on immutable release commit `1625858bf8851a26eee5f19ae6eb5bfe7666e97b`, whose runtime/test bytes are identical to the passing final gate. Both real swarm command paths again refused before model spawn. The retained log is `daily-monitor/smoke/2026-11-14-2.6.2-production.log`, SHA-256 `9d224c8063e80ea7fe02eeb672b4e44963790329e40243a2f52ffdceafce86fc`; its header records that release commit. The pre-release log is retained separately as `production-pre-release.log`.
|
|
54
|
-
|
|
121
|
+
## Publication receipt
|
|
122
|
+
|
|
123
|
+
Release commit `1625858bf8851a26eee5f19ae6eb5bfe7666e97b` contains the certified runtime; the immutable [v2.5.9 tag and GitHub release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.9) is anchored at evidence commit `6f9eaa6e145d62e7f35e5ff38d317bd7e3a673c5`. [Final CI run 43585425445](https://github.com/linxule/kimi-plugin-cc/actions/runs/43585425445) passed the full check/package pipeline and Windows spawn controls. [OIDC publication run 43585933931](https://github.com/linxule/kimi-plugin-cc/actions/runs/43585933931) passed build and publication.
|
|
124
|
+
|
|
125
|
+
npm published `kimi-plugin-cc@2.5.9` at **2026-11-14T10:43:34.167Z**, and npm `latest` is 2.5.9. The 334-file registry tarball is byte-identical to the validated CI artifact:
|
|
126
|
+
|
|
127
|
+
- SHA-1: `2158551b73d3408af14e2061c29e40dc60622947`
|
|
128
|
+
- SHA-256: `d5c43b95c708468393f357c353c180488ae83edb56cae93e840d08ee2b3dc520`
|
|
129
|
+
- Signed SLSA provenance: sigstore log index `3876002731`
|
|
130
|
+
- Publish attestation: sigstore log index `3876057720`
|
|
131
|
+
|
|
132
|
+
A fresh registry installation has zero production advisories and no invalid or missing signatures. Isolated setup and `setup --check` pass with the explicit non-swarm warning; the installed runtime preserves full-swarm pins through 2.5.3 and enforces the six non-swarm admissions and both swarm refusals on exact 2.6.2. The new certification record is present in the package. `DSH_PUBLISH_TIMESTAMP` is `1794653014`, recording the actual npm publication time. No installed host or operator CLI pin was changed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kimi-plugin-cc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.2",
|
|
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"check": "bun run build && bun run check:contracts && bun run check:surfaces && bunx tsc --noEmit && bun test && git diff --exit-code -- dist plugins/kimi-codex plugins/kimi-dsh && UNTRACKED=\"$(git ls-files --others --exclude-standard -- dist plugins/kimi-codex plugins/kimi-dsh)\" && { [ -z \"$UNTRACKED\" ] || { echo \"drift gate: untracked dist/codex/dsh files (stage them and re-run check):\"; echo \"$UNTRACKED\"; exit 1; }; }",
|
|
17
|
+
"check": "bun run build && bun run check:contracts && bun run check:surfaces && bunx tsc --noEmit && bun test --bail && git diff --exit-code -- dist plugins/kimi-codex plugins/kimi-dsh && UNTRACKED=\"$(git ls-files --others --exclude-standard -- dist plugins/kimi-codex plugins/kimi-dsh)\" && { [ -z \"$UNTRACKED\" ] || { echo \"drift gate: untracked dist/codex/dsh files (stage them and re-run check):\"; echo \"$UNTRACKED\"; exit 1; }; }",
|
|
18
18
|
"check:surfaces": "bun run scripts/generate-surfaces.ts --check",
|
|
19
19
|
"generate:surfaces": "bun run scripts/generate-surfaces.ts",
|
|
20
20
|
"build": "rm -rf dist && bunx tsc -p tsconfig.build.json && mkdir -p dist/vendor/shell-quote dist/vendor/smol-toml && cp runtime/vendor/shell-quote/LICENSE dist/vendor/shell-quote/LICENSE && cp runtime/vendor/smol-toml/*.js runtime/vendor/smol-toml/LICENSE dist/vendor/smol-toml/ && echo '{\"type\":\"module\"}' > dist/package.json",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kimi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.2",
|
|
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"
|