kimi-plugin-cc 2.6.3 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +19 -2
  4. package/README.md +8 -8
  5. package/agents/kimi-pursue.md +1 -1
  6. package/agents/kimi-swarm-write.md +4 -4
  7. package/agents/kimi-swarm.md +5 -5
  8. package/commands/swarm.md +3 -3
  9. package/dist/cli-client.js +4 -3
  10. package/dist/commands/setup.js +2 -2
  11. package/dist/commands/swarm.js +4 -4
  12. package/dist/hooks/approval-policy.js +1 -1
  13. package/dist/hooks/config-safety.js +5 -3
  14. package/dist/kimi-engine.js +3 -1
  15. package/dist/kimi-timeouts.js +1 -1
  16. package/dist/mcp/operations.js +1 -1
  17. package/dist/swarm-activation.js +72 -16
  18. package/dist/swarm-policy.js +1 -1
  19. package/dist/version.js +1 -1
  20. package/docs/migration.md +4 -4
  21. package/docs/registry-releases.md +5 -1
  22. package/docs/safety.md +16 -16
  23. package/docs/swarm-recovery.md +3 -3
  24. package/docs/upstream-2.6.3-certification.md +15 -3
  25. package/docs/upstream-2.7.2-certification.md +113 -0
  26. package/docs/upstream-2.7.3-certification.md +83 -0
  27. package/package.json +3 -1
  28. package/plugins/kimi-codex/.codex-plugin/plugin.json +1 -1
  29. package/plugins/kimi-codex/dist/cli-client.js +4 -3
  30. package/plugins/kimi-codex/dist/commands/setup.js +2 -2
  31. package/plugins/kimi-codex/dist/commands/swarm.js +4 -4
  32. package/plugins/kimi-codex/dist/hooks/approval-policy.js +1 -1
  33. package/plugins/kimi-codex/dist/hooks/config-safety.js +5 -3
  34. package/plugins/kimi-codex/dist/kimi-engine.js +3 -1
  35. package/plugins/kimi-codex/dist/kimi-timeouts.js +1 -1
  36. package/plugins/kimi-codex/dist/mcp/operations.js +1 -1
  37. package/plugins/kimi-codex/dist/swarm-activation.js +72 -16
  38. package/plugins/kimi-codex/dist/swarm-policy.js +1 -1
  39. package/plugins/kimi-codex/dist/version.js +1 -1
  40. package/plugins/kimi-codex/skills/kimi-swarm/SKILL.md +1 -1
  41. package/plugins/kimi-codex/skills/kimi-swarm-write/SKILL.md +1 -1
  42. package/plugins/kimi-dsh/dist/cli-client.js +4 -3
  43. package/plugins/kimi-dsh/dist/commands/setup.js +2 -2
  44. package/plugins/kimi-dsh/dist/commands/swarm.js +4 -4
  45. package/plugins/kimi-dsh/dist/hooks/approval-policy.js +1 -1
  46. package/plugins/kimi-dsh/dist/hooks/config-safety.js +5 -3
  47. package/plugins/kimi-dsh/dist/kimi-engine.js +3 -1
  48. package/plugins/kimi-dsh/dist/kimi-timeouts.js +1 -1
  49. package/plugins/kimi-dsh/dist/mcp/operations.js +1 -1
  50. package/plugins/kimi-dsh/dist/swarm-activation.js +72 -16
  51. package/plugins/kimi-dsh/dist/swarm-policy.js +1 -1
  52. package/plugins/kimi-dsh/dist/version.js +1 -1
  53. package/plugins/kimi-dsh/package.json +1 -1
@@ -0,0 +1,113 @@
1
+ # Exact CLI 2.7.2 certification — plugin 2.7.2
2
+
3
+ ## Scope and decision
4
+
5
+ **Status: certified and published for all eight operations.** Exact `@moonshot-ai/kimi-code@2.7.2` passed the source, exact-binary, deterministic stock-binary, real-provider candidate and production-table operation gates. Certification was completed before release authorization. Plugin 2.7.2 release commit `e2bba0e2d4e1745e4155eb5c6ddf3f4dabaffb66` passed release CI `44799772434`; the immutable GitHub release, recovery npm OIDC run `44803040496`, and fresh registry/attestation verification are complete. Neither certification nor publication updates installed hosts or operator pins.
6
+
7
+ Exact source commit: `56145f849caa305d42acd09b67fb65d11146f887` (annotated tag object `1781dbd74bc7fabf23ac4721a570397f278817f1`). The isolated npm binary reports 2.7.2; `dist/main.mjs` SHA-256 is `dafef22f56c4c1fff755eb3af5e42a76d32d09a9dc858ebdc055a6d1a6008e67`. npm `latest` was rechecked as 2.7.2 during the production gate.
8
+
9
+ ## Monitor verification and corrections
10
+
11
+ The 2026-11-20 Codex monitor correctly held certification at 2.6.3, but stable upstream subsequently advanced to 2.7.2. Its exact 2.7.0 tag commit `a5e355e2718a2ebf70d8229fa5a05fe35d5f98a1` was independently verified, and its source scan reproduced **14 pass / 12 skip / 5 fail / 72 assertions**. The candidate log reproduced **23 pass / 6 skip / 3 fail / 205 assertions**.
12
+
13
+ The three failed 2.7.0 swarm lanes were candidate-harness failures, not evidence of an upstream scheduler regression. Candidate-only certification admitted execution, but bounded-policy and preactivation selectors rejected 2.7.0, leaving fresh swarm-off sessions. No real children or child-authored patch could result. The old ready URL remains available upstream; choosing the reviewed ephemeral JSON mode was not a required repair for that format.
14
+
15
+ The other four failures beyond the missing hash row were stale exact-version audit branches, not four new upstream safety regressions. Removed EnterPlanMode, `legacyHooks`, modern subscriber registration, and restore normalization already existed in the 2.6.x audit construction. The genuinely new structural issue was the move of the generic executor and loop into `packages/core`, outside the original seven scoped diffs. The adversarial reviewer separately identified the real `/api/v1/meta` break: 2.7.x removes `backend: "v2"`, which current activation required.
16
+
17
+ ## Source audit
18
+
19
+ The pristine exact 2.7.2 tree was reviewed with nine scopes: the original CLI/executor/hooks/plan/bootstrap/tools/KAP scopes plus shared core execution and OS/remote/DI/host boundaries. The expanded core scope includes the moved tool executor, loop actor, tool/LLM retry and settlement code, structured error conversion, Klient facade, and ACP plan entry.
20
+
21
+ Final exact 2.7.2 scan: **38 pass / 0 fail / 0 skip / 527 assertions**. Exact 2.6.3 regression: **38 pass / 0 fail / 0 skip / 404 assertions**. The final row has **153 pins**: 62 unchanged inherited files, 53 modified inherited files, one moved loop actor, and additional reviewed core/KAP/CLI/Klient/ACP files.
22
+
23
+ The scan and human review establish:
24
+
25
+ - the active-plan guard remains the only production final `allow()` across agent-core, shared core, CLI, KAP, SDK, Klient, and ACP;
26
+ - every generic executor is constructed inside the managed agent composition, with starting, optional permitting, before-execute, then real execution in that order;
27
+ - no new model-reachable plan entry exists; host-only KAP/Klient/ACP entry remains explicit, while fresh print cancels the configured default and raw resume scans remain mandatory;
28
+ - restore still derives both views from each agent's `wire.jsonl`, with normalization unable to hide or synthesize plan records;
29
+ - external hooks remain eager in every child scope and first-block-wins aggregation and the strict hook schema remain unchanged;
30
+ - real moved implementations and compatibility re-exports are both pinned, including retry, settlement, recovery, rate-limit classification, and host-only task detachment;
31
+ - native normal-launch and rate-limit capacity remain distinct, so no upstream scheduler fix is claimed.
32
+
33
+ Four independent source reviews completed: hook contract, stream-json, and CLI surface returned COMPAT-PRESERVED; the adversarial review returned COMPAT-BROKEN on the KAP/meta and audit-coverage blockers later repaired here. Two initial investigators independently traced the harness and KAP causes. A later runtime-review lane exceeded its 15-minute budget and was stopped; its partial findings about omitted Klient/ACP and rate-limit evidence were verified and incorporated. Its partial output identified no runtime blocker, but it issued no final verdict.
34
+
35
+ ## Exact-binary controls
36
+
37
+ All controls ran sequentially against the isolated exact binary. Real-model controls used the dedicated Agent Keys environment-model route and fresh absolute-path homes; personal config and credential stores were neither read nor linked.
38
+
39
+ - **Plan OFF:** ordinary Write reached the deny hook, returned `cert-control: denied` on the same call, created no file, recorded no plan state, and emitted exact first-line `system.version` 2.7.2.
40
+ - **Deliberately armed plan ON:** authenticated JSON/KAP activation armed an isolated session. Glob was denied; Write created a **1,310-byte plan file without a plan-Write hook**. No workspace file was created. This proves the no-plan closures remain load-bearing.
41
+ - **Forced EnterPlanMode:** the tool was absent from offered tools. The scripted call returned `Tool "EnterPlanMode" not found` on `call_enter_forced` before any hook, was returned to the provider, and created no plan journal or file.
42
+ - **Environment:** real JSON activation/deactivation passed. A configured remote default refused before its launcher ran, disabled workspace trust refused, and a resumed nonlocal binding refused.
43
+
44
+ One early OFF attempt was invalid: a relative artifact root caused upstream to resolve `KIMI_CODE_HOME` away from the deny-hook config, and the target was created only inside the ignored control workspace. It is retained as a harness diagnostic, not classified as an upstream bypass or valid evidence. All control scripts now resolve roots to absolute paths before spawning; the corrected fresh-home OFF control passed.
45
+
46
+ Receipts are `write-off-absolute/summary.json`, `plan-on/summary.json`, `enter-off-forced/summary.json`, and `environment-controls/summary.json` under `.claude/kimi-code-research/cert-2.7.2-live/`.
47
+
48
+ ## Deterministic and real-provider operation evidence
49
+
50
+ The deterministic untouched-binary suite passed **23 tests / 138 assertions in 627.51 seconds**. It covers real new/resumed/odd waves, child-authored writes and patches, background denial, direct read/write workers, nested-profile refusal, timeout and cancellation tails, and both long recovery controls. `recovery-429` took 201.73 seconds; `recovery-context` took 199.72 seconds and reached peak four at width four with no remaining active turns. Implementation fingerprints were unchanged at launch and settlement.
51
+
52
+ The real-provider candidate matrix passed **30 tests / 406 assertions in 519.71 seconds**, with only the two inapplicable narrowed-refusal skips. The production-table matrix independently passed **30 tests / 406 assertions in 482.91 seconds**, with the same two intentional skips. Both used no personal home or credential store, and production used no candidate override.
53
+
54
+ Evidence includes:
55
+
56
+ - same-call managed Write denials for review, challenge, ask, and review_gate;
57
+ - confined rescue writing and a separate absolute out-of-root `Bash.cwd` denial;
58
+ - unsafe experimental, default-plan, and plan-tainted resume refusals;
59
+ - real multi-turn goal denials and both pursue terminal controls;
60
+ - real read-only child denials and write-swarm child edits with a **278-byte patch**, clean user tree, and cleaned worktree;
61
+ - real out-of-worktree child Write denials;
62
+ - direct single-worker read/write with no children or web activation, including a **292-byte candidate patch** and a **348-byte production patch**;
63
+ - directed recovery from an oversized wave, then two bounded waves with four children and candidate/production patches of **596/708 bytes**;
64
+ - uncoached five-target production work at width four: two accepted waves, five candidate children and four production children, peak three/two, zero coordinator-authored targets, and patches of **759/871 bytes**. Grouping multiple targets into one child is valid; one child per target is not required.
65
+
66
+ Candidate retained evidence is under `candidate-live-evidence/`; production retained evidence is under `production-live-evidence/`.
67
+
68
+ ## Focused implementation and emitted-runtime checks
69
+
70
+ - Activation and policy: **260 pass / 944 assertions**, plus typecheck.
71
+ - Promoted engine/setup/CLI suites: **261 pass / 5,833 assertions**.
72
+ - Setup alone before promotion: **134 pass / 4,811 assertions**, including exact schema acceptance and neighboring-version refusal.
73
+ - Emitted-JS policy and durable recovery: **19 pass / 186 assertions**, including exact 2.7.2 hard-kill recovery.
74
+ - Compiled distributions' operation scope: **2 pass / 5 assertions**.
75
+ - Generated-surface check: PASS.
76
+
77
+ Exact 2.7.2 uses `web --json` with an in-memory ephemeral token, strict loopback origin and matching `/api/v1/ws`, KAP 1.0.0 and WebSocket capability, exact server version, and no auth bypass or legacy backend field. Older ready/meta formats are unchanged. Fresh print explicitly selects `--environment local`; resume never receives that flag. Bounded policy, preactivation, direct-worker selection, additive schema acceptance, and durable recovery all use exact versions with no 2.7.x range inheritance. Exact 2.7.0, 2.7.1, and 2.7.3 remain excluded.
78
+
79
+ ## Certification validation and review
80
+
81
+ Full repository, package, consumer-security, and final independent code/documentation review results are recorded below. They are not inferred from the operation matrices.
82
+
83
+ - **Frozen install and full repository gate:** PASS. `bun install --frozen-lockfile` completed with no changes. The definitive `bun run check` passed **1,848 tests / 83 expected opt-in or platform skips / 0 failures / 24,260 assertions in 615.90 seconds**, covering 1,931 tests across 96 files, including emitted-JavaScript and generated-drift gates.
84
+ - **Package and DSH:** PASS, exit 0. `bun run check:package` verified the **341-file** `kimi-plugin-cc@2.6.3` archive, all three compiled distributions, isolated hook setup/check and version refusal, the patched DSH host/profile, seven live providers/tools, and Web boot. Receipt: `.claude/kimi-code-research/cert-2.7.2-live/package-check.log`.
85
+ - **Consumer security:** PASS, exit 0. `bun run check:consumer-security` verified the isolated npm consumer security of `kimi-plugin-cc@2.6.3`. Receipt: `.claude/kimi-code-research/cert-2.7.2-live/consumer-security.log`.
86
+ - **Final independent code and documentation review:** PASS. Both reviewers returned documentation findings only; no blocker or major runtime/code defect. Activation, checklist, publication-boundary and update-suppression wording was corrected, and narrow re-review of both lanes returned NO FINDINGS.
87
+
88
+ ## Plugin 2.7.2 release validation
89
+
90
+ - **Frozen install and full repository gate:** PASS. `bun install --frozen-lockfile` completed with no changes. The release `bun run check` passed **1,848 tests / 83 expected opt-in or platform skips / 0 failures / 24,260 assertions in 611.46 seconds**, covering 1,931 tests across 96 files, including emitted-JavaScript and generated-drift gates. Receipt: `.claude/kimi-code-research/release-2.7.2/full-check.log`.
91
+ - **Package and DSH:** PASS, exit 0. `bun run check:package` verified the **342-file** `kimi-plugin-cc@2.7.2` archive, all three compiled distributions, isolated hook setup/check and version refusal, the patched DSH host/profile, seven live providers/tools, and Web boot. Receipt: `.claude/kimi-code-research/release-2.7.2/package-check.log`.
92
+ - **Consumer security:** PASS, exit 0. `bun run check:consumer-security` verified the isolated npm consumer security of `kimi-plugin-cc@2.7.2`. Receipt: `.claude/kimi-code-research/release-2.7.2/consumer-security.log`.
93
+ - **Independent release-diff review:** PASS after correction. The reviewer found the stale 2.6.3 version headline in `docs/invariants.md`; it was corrected to 2.7.2. No other release-blocking finding was returned.
94
+
95
+ ## Release and registry receipt
96
+
97
+ Release commit `e2bba0e2d4e1745e4155eb5c6ddf3f4dabaffb66` passed release CI run `44799772434`, including both Linux/full-package and Windows jobs. The immutable [v2.7.2 GitHub release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.7.2) is anchored at that commit with annotated tag object `cdbd0d179a8fafd41019230a655887e035453670`.
98
+
99
+ Initial OIDC run `44801159950` passed the full tag build, package/DSH checks, consumer audit and artifact upload, but npm rejected publication with `TLOG_CREATE_ENTRY_ERROR`; registry inspection confirmed it published nothing. The documented manual-dispatch recovery [run 44803040496](https://github.com/linxule/kimi-plugin-cc/actions/runs/44803040496) validated the same immutable tag and published npm `latest` 2.7.2 at `2026-11-20T19:44:23.172Z`.
100
+
101
+ The **342-file** registry tarball is byte-identical to the successful Actions artifact, and every published file matches the release tag:
102
+
103
+ - SHA-1: `c78a89fa5ea199c6605c7453ca50b2c23ee3cb3f`
104
+ - SHA-256: `0a0bcba76513adac3448776d4f8df9ec73b60987edac0ca5e6535db428b91f33`
105
+ - SHA-512: `2e7dfe8043c2c05447a28dbfc17c6124c6b08444efb864c5b5f5f3f586f338ff4b77d35e3b769168b570a32c08bec48e8f78aa6e11b958e9f22257cda29616f1`
106
+
107
+ SLSA provenance log index `4028226284` and publish attestation log index `4028244850` match the package subject, SHA-512, recovery run and release commit. Their workflow ref is `refs/heads/main` because recovery used `workflow_dispatch`; the artifact and all published bytes independently match `refs/tags/v2.7.2`. Fresh registry installation has zero production advisories and no invalid or missing signatures. Isolated Claude Code, Codex and DSH setup/check pass against exact stock CLI 2.7.2, and all three installed runtime maps enforce full 2.7.2 certification with 2.6.0 non-swarm-only scope. Verification made no model calls and changed no installed host or operator pin. Receipts are under `.claude/kimi-code-research/release-2.7.2/registry/`.
108
+
109
+ The post-publication DSH Discover timestamp is `1795203863`, recording the actual npm publication time.
110
+
111
+ ## Residual boundaries
112
+
113
+ The concurrency bound covers simultaneous Kimi child-agent turns, excluding the coordinator and OS subprocess counts. `--cap` remains a soft lifetime-total hint, and a finite time budget is not a spend cap. Upstream rate-limit recovery can still exceed its native setting; the plugin-owned bound is required. Parallel sessions retain the native TaskStop restriction after deactivation, and later external interactive resume is outside this certification. Stream-json still lacks a general execution-outcome field, so hook-escape findings remain detection evidence rather than a failure signal. `KIMI_CODE_NO_AUTO_UPDATE=1` suppresses passive updates but does not prevent every manually staged native replacement; exact probe and first-line marker checks remain the mismatch backstop, not rollback. Trusted operator config/journals, upstream hook-runner fail-open behavior, host-only plan routes, and repository Git helpers retain their existing boundaries.
@@ -0,0 +1,83 @@
1
+ # Exact CLI 2.7.3 certification — plugin 2.7.3
2
+
3
+ ## Scope and decision
4
+
5
+ **All eight operation gates and the full local repository check pass for plugin 2.7.3.** Exact `@moonshot-ai/kimi-code@2.7.3` passed the source, exact-binary, deterministic stock-binary, real-provider candidate and production-table operation gates. Certification is separate from release authorization. CI, GitHub and npm publication receipts are recorded only after those steps complete; neither certification nor publication updates installed hosts or operator pins.
6
+
7
+ Exact source commit: `a8f643ad2e7f197d6ec4409b7cdad8a544afad86` (annotated tag object `f27c2321c7eabafc00ad8581b12a4d60138bc6ac`). A fresh isolated npm binary reports 2.7.3; `dist/main.mjs` SHA-256 is `747dbb1fd3ad0789194e0181cfaf036a795c8c6d6b3a9204c152aee8db10de16`. npm `latest` was rechecked as 2.7.3 during certification.
8
+
9
+ ## Monitor verification and correction
10
+
11
+ The 2026-11-24 Codex monitor correctly held the production pin at 2.7.2 after its authorized 2.7.3 candidate smoke exited 1 with **23 pass / 6 skip / 3 fail / 217 assertions**. It observed no hook bypass or user-worktree write. The three failures were missing real-child or child-patch evidence, not a demonstrated upstream scheduler regression.
12
+
13
+ The cause was candidate-harness coverage: candidate-only operation admission included 2.7.3, but preactivation and bounded-policy selectors did not. Fresh sessions therefore remained swarm-off, and the four bounded single-worker/wave cases skipped. The separate certification pass reviewed the changed KAP behavior, corrected those selectors, and reran the complete matrix. The monitor smoke itself was not retried.
14
+
15
+ ## Source audit
16
+
17
+ The pristine exact 2.7.3 source was archived from the verified tag and compared with exact 2.7.2 through all nine playbook scopes plus related auth/attribution and upstream-test diffs. CLI print, before-execute/permissions, external hooks, plan/restore, session bootstrap/config, tools/fan-out/SDK, and OS/remote/DI scopes are byte-empty. Only KAP/web activation and loop attribution changed.
18
+
19
+ The review establishes:
20
+
21
+ - the active-plan guard remains the only production final `allow()` across agent-core, shared core, CLI, KAP, SDK, Klient and ACP;
22
+ - executor construction/order, eager per-child hooks, first-block-wins aggregation, tool input fields and local/trust boundaries are unchanged;
23
+ - no new model-reachable plan entry exists; host-only plan entry and raw resume journal closures remain mandatory;
24
+ - optional `replyModel` and `modelSteps` extend the existing `TurnEnded` journal payload without changing print-mode stream-json;
25
+ - authenticated feedback routes and the optional `/meta` feedback capability are host-only additions on the short-lived activation server, which shuts down before print;
26
+ - missing configured main-agent models are reported as unset, with a `model.not_configured` notice after history; activation's existing expected-model check therefore fails closed, while other config errors and subagent errors still throw;
27
+ - native scheduler/recovery behavior is unchanged, so no upstream concurrency fix is claimed.
28
+
29
+ The unmodified scan reproduced **18 pass / 15 skip / 5 fail / 72 assertions**: one missing pin row, four stale exact-version branches, and the omitted bounded suite. The final row has **159 pins**, updating all eight changed inherited files and adding six reviewed attribution/model/conversation helpers. Final exact 2.7.3 scan: **38 pass / 0 fail / 0 skip / 533 assertions**. Exact 2.7.2 regression: **38 pass / 0 fail / 0 skip / 527 assertions**.
30
+
31
+ ## Exact-binary controls
32
+
33
+ All controls ran sequentially against the fresh isolated binary. Real-model controls used the dedicated Agent Keys environment-model route and fresh absolute-path homes; personal config and credential stores were neither read nor linked.
34
+
35
+ - **Plan OFF:** ordinary Write reached the deny hook, returned `cert-control: denied` on the same call, created no file, recorded no plan state, and emitted exact first-line `system.version` 2.7.3.
36
+ - **Deliberately armed plan ON:** authenticated JSON/KAP activation armed an isolated session. Glob was denied; Write created a **1,762-byte plan file without a plan-Write hook**. No workspace file was created, proving the no-plan closures remain load-bearing.
37
+ - **Forced EnterPlanMode:** the tool was absent from offered tools. Scripted `call_enter_forced` returned `Tool "EnterPlanMode" not found` before any hook, was returned to the provider, and created no plan journal or file.
38
+ - **Environment:** real JSON activation/deactivation passed. A configured remote default refused before its launcher ran, disabled workspace trust refused, and a resumed nonlocal binding refused.
39
+
40
+ Receipts are `write-off-absolute/summary.json`, `plan-on/summary.json`, `enter-off-forced/summary.json`, and `environment-controls/summary.json` under `.claude/kimi-code-research/cert-2.7.3-live/`.
41
+
42
+ ## Deterministic and real-provider operation evidence
43
+
44
+ The deterministic untouched-binary suite passed **23 tests / 138 assertions in 615.18 seconds**. It covers real new/resumed/odd waves, child-authored writes and patches, explicit/automatic background controls, direct workers, nested-profile refusal, timeout and cancellation tails, and both long recovery controls. `recovery-429` took 201.66 seconds; `recovery-context` took 201.01 seconds. Both recovery controls produced four children, peaked at three active child turns and settled all turns. Implementation fingerprints were unchanged at launch and settlement.
45
+
46
+ The real-provider candidate matrix passed **30 tests / 402 assertions in 407.70 seconds**, with only the two inapplicable narrowed-refusal skips. The production-table matrix independently passed **30 tests / 402 assertions in 411.76 seconds**, with the same skips and no candidate override. Both used dedicated environment-model authentication and empty temporary seed homes.
47
+
48
+ Evidence includes:
49
+
50
+ - same-call managed Write denials for review, challenge, ask and review_gate;
51
+ - confined rescue writing and separate absolute out-of-root `Bash.cwd` denial;
52
+ - unsafe experimental, default-plan and plan-tainted resume refusals;
53
+ - real multi-turn goal denials and both pursue terminal controls;
54
+ - real read-only child denials and write-swarm child edits with a **278-byte patch**, clean user tree and cleaned worktree;
55
+ - real out-of-worktree child Write denials;
56
+ - direct single-worker read/write with no children or web activation, including **348-byte** candidate and production direct-write patches;
57
+ - directed recovery from an oversized wave, then two bounded waves with four children and candidate/production patches of **708/680 bytes**;
58
+ - uncoached five-target work at width four: one accepted wave, three children, peak three, zero coordinator-authored targets, and candidate/production patches of **899/843 bytes**. Grouping multiple targets into one child is valid; one child per target is not required.
59
+
60
+ All retained bounded jobs contain exact 2.7.3 version/marker evidence, terminal completion, no hook-escape findings and verified cleanup. Candidate evidence is under `candidate-live-evidence/`; production evidence is under `production-live-evidence/`.
61
+
62
+ ## Focused implementation and emitted-runtime checks
63
+
64
+ - Candidate source/type checks: **403 focused runtime tests / 1,449 assertions**, plus typecheck; the 21 skips are ordinary opt-in real-binary lanes outside that unit run.
65
+ - Promoted engine/setup/compiled policy/recovery suites: **180 pass / 6,094 assertions**, including exact 2.7.3 schema acceptance, neighboring-version refusal, all three emitted runtime maps and durable hard-kill recovery.
66
+ - Contract-size and generated-surface checks: PASS.
67
+
68
+ Exact 2.7.2 and 2.7.3 use `web --json` with an in-memory ephemeral token, strict loopback origin and matching `/api/v1/ws`, KAP 1.0.0 and WebSocket capability, exact server version, and no auth bypass or legacy backend field. Older ready/meta formats are unchanged. Fresh print explicitly selects `--environment local`; resume never receives that flag. Bounded policy, preactivation, direct-worker selection, additive schema acceptance and durable recovery use exact versions with no 2.7.x range inheritance. Exact 2.7.0, 2.7.1 and 2.7.4 remain excluded.
69
+
70
+ ## Certification validation
71
+
72
+ - **Frozen install:** PASS. `bun install --frozen-lockfile` completed with no changes.
73
+ - **Full repository gate.** `bun run check` exited 0, including the generated-file drift check. The suite reported **1,878 passed, 83 skipped, 0 failed and 24,758 assertions** across 96 files in 997.07 seconds. See `full-check-04.log` under `.claude/kimi-code-research/cert-2.7.3-live/`.
74
+ - **Earlier failures.** Three full runs stopped in the 2.3.2 swarm cleanup test. The one-second whole-job deadline could expire before the mock server received the deactivation request. The same assertion failed on unmodified HEAD. The corrected cleanup test allows time for process startup and uses print and status delays whose sum exceeds the job budget. The print-timeout test also allows time for activation. The error-precedence test now forces a cleanup REST failure after print exits with code 7. All three passed together and in the full suite. The original failures are in `full-check-01.log` through `full-check-03.log`, with the focused verification in `cleanup-three-focused.log`.
75
+ - **Package and DSH:** PASS. `bun run check:package` verified the **343-file** `kimi-plugin-cc@2.7.3` archive, all three compiled distributions, isolated hook setup/check and version refusal, the patched DSH host/profile, seven live providers/tools, and Web boot. Receipt: `package-check.log`.
76
+ - **Consumer security:** PASS. `bun run check:consumer-security` verified the isolated npm consumer security of `kimi-plugin-cc@2.7.3`. Receipt: `consumer-security.log`.
77
+ - **Final diff review:** no runtime defect, stale current exclusion, duplicate version list or generated-surface drift was found.
78
+
79
+ Release-commit CI, tagging, GitHub and npm publication, and registry attestation verification remain pending.
80
+
81
+ ## Residual boundaries
82
+
83
+ The concurrency bound covers simultaneous Kimi child-agent turns, excluding the coordinator and OS subprocess counts. `--cap` remains a soft lifetime-total hint, and a finite time budget is not a spend cap. Upstream rate-limit recovery can still exceed its native setting; the plugin-owned bound is required. Parallel sessions retain the native TaskStop restriction after deactivation, and later external interactive resume is outside this certification. Stream-json still lacks a general execution-outcome field, so hook-escape findings remain detection evidence rather than a failure signal. `KIMI_CODE_NO_AUTO_UPDATE=1` suppresses passive updates but does not prevent every manually staged native replacement; exact probe and first-line marker checks remain the mismatch backstop, not rollback. Trusted operator config/journals, upstream hook-runner fail-open behavior, host-only plan routes and repository Git helpers retain their existing boundaries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi-plugin-cc",
3
- "version": "2.6.3",
3
+ "version": "2.7.3",
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",
@@ -141,6 +141,8 @@
141
141
  "docs/upstream-2.6.0-certification.md",
142
142
  "docs/upstream-2.6.2-certification.md",
143
143
  "docs/upstream-2.6.3-certification.md",
144
+ "docs/upstream-2.7.2-certification.md",
145
+ "docs/upstream-2.7.3-certification.md",
144
146
  "README.md",
145
147
  "LICENSE",
146
148
  "CHANGELOG.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kimi",
3
- "version": "2.6.3",
3
+ "version": "2.7.3",
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"
@@ -966,7 +966,7 @@ function buildArgs(opts) {
966
966
  ? opts.env.KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE
967
967
  : undefined;
968
968
  if (opts.resumeSessionId === undefined &&
969
- ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
969
+ ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
970
970
  args.push("--environment", "local");
971
971
  }
972
972
  if (opts.resumeSessionId !== undefined) {
@@ -1012,8 +1012,9 @@ export function buildKimiCliEnvironment(opts) {
1012
1012
  if (opts.executionPlan.intendedEngine === "legacy-v1") {
1013
1013
  env[KIMI_LEGACY_ENV] = KIMI_LEGACY_FORCED_VALUE;
1014
1014
  }
1015
- // The update preflight runs on the `-p` path too; a plugin spawn must never
1016
- // swap the certified binary underneath the execution plan.
1015
+ // Suppress passive update checks on the `-p` path. Manually staged native
1016
+ // swaps remain an upstream exception, so the exact probe and first-line
1017
+ // version marker must still prove the spawned artifact's identity.
1017
1018
  env.KIMI_CODE_NO_AUTO_UPDATE = "1";
1018
1019
  // Plugin-owned web lifecycles must not inherit ambient idle-session reclamation.
1019
1020
  env.KIMI_CODE_SESSION_IDLE_RECLAIM_MS = "0";
@@ -977,12 +977,12 @@ async function collectKimiVersionWarnings(env, warnings) {
977
977
  warnings.push(formatVersionOutOfRangeWarning(probe, KIMI_PLUGIN_CC_VERSION, NATIVE_V2_ANY_OPERATION_VERSIONS));
978
978
  return;
979
979
  }
980
- if (probe.version === "2.6.2" || probe.version === "2.6.3") {
980
+ if (probe.version === "2.6.2" || probe.version === "2.6.3" || probe.version === "2.7.2" || probe.version === "2.7.3") {
981
981
  warnings.push(`NOTE: kimi-code ${probe.version} is certified for all operations. Swarm uses bounded waves with concurrency 2 or more, and one direct worker at concurrency 1. The finite job budget stops the whole run.`);
982
982
  return;
983
983
  }
984
984
  if (NATIVE_V2_NON_SWARM_VERSIONS.includes(probe.version)) {
985
- warnings.push(`NOTE: kimi-code ${probe.version} is certified for review, challenge, ask, rescue, review gate, and pursue only. Read-only swarm and write swarm refuse before model spawn on this exact release. Select exact kimi-code 2.6.2 or 2.6.3 for this plugin's certified bounded waves and single-worker path.`);
985
+ warnings.push(`NOTE: kimi-code ${probe.version} is certified for review, challenge, ask, rescue, review gate, and pursue only. Read-only swarm and write swarm refuse before model spawn on this exact release. Select exact kimi-code 2.6.2, 2.6.3, 2.7.2 or 2.7.3 for this plugin's certified bounded waves and single-worker path.`);
986
986
  }
987
987
  }
988
988
  /**
@@ -24,7 +24,7 @@ import { buildKimiSessionTitle, syncKimiSessionTitle } from "../session-title.js
24
24
  import { usesBoundedSwarmPolicy } from "../swarm-policy.js";
25
25
  // /kimi:swarm — parallel fan-out, read-only by default and runtime-foreground-only.
26
26
  // A finite wall-clock budget bounds the whole run. --cap is a SOFT total-count
27
- // prompt hint. Exact native-v2 2.6.2/2.6.3 bounds admitted waves and prevents native
27
+ // prompt hint. Exact native-v2 2.6.2/2.6.3/2.7.2/2.7.3 bounds admitted waves and prevents native
28
28
  // child timeouts from returning a continuing coordinator before children stop.
29
29
  // Concurrency 1 uses a direct worker without native fan-out. Older versions keep
30
30
  // their normal-launch setting and inherited recovery limitation. Read/write
@@ -34,14 +34,14 @@ import { usesBoundedSwarmPolicy } from "../swarm-policy.js";
34
34
  // kimi-code 0.18.0+. Exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2,
35
35
  // and certified 2.5.3 activate a same-job session through a bounded loopback
36
36
  // web lifecycle, then resume it through the normal print path. 2.6.2/2.6.3 parallel
37
- // waves and candidate-only 2.6.0 use that lifecycle too. The per-operation certification
37
+ // waves, 2.7.2/2.7.3 JSON-authenticated waves, and candidate-only 2.6.0 use that lifecycle too. The per-operation certification
38
38
  // table controls whether each exact version is reachable in production.
39
39
  const SWARM_SUMMARY_MAX = 120;
40
40
  const SWARM_AGENT_PROFILE = "<swarm>";
41
41
  const SWARM_WRITE_AGENT_PROFILE = "<swarm-write>";
42
42
  /**
43
43
  * Default concurrency setting when the user passes no `--max-concurrency`.
44
- * Exact native-v2 2.6.2/2.6.3 also enforces this as the admitted wave size. The plugin exports
44
+ * Exact native-v2 2.6.2/2.6.3/2.7.2/2.7.3 also enforces this as the admitted wave size. The plugin exports
45
45
  * KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY; older read-only swarms ignore it and
46
46
  * retain only the wall-clock hard bound. Rate-limit recovery can exceed it on
47
47
  * older reviewed sources; their setting is not an unconditional peak guarantee.
@@ -57,7 +57,7 @@ export function resolveSwarmMaxConcurrency(requested) {
57
57
  return requested ?? SWARM_DEFAULT_MAX_CONCURRENCY;
58
58
  }
59
59
  /**
60
- * Default concurrency for WRITE mode — 1 vs read's 4. Exact native-v2 2.6.2/2.6.3
60
+ * Default concurrency for WRITE mode — 1 vs read's 4. Exact native-v2 2.6.2/2.6.3/2.7.2/2.7.3
61
61
  * runs one direct worker; older versions serialize normal child launches but
62
62
  * retain the rate-limit recovery overrun. Disjoint-target partitioning remains
63
63
  * prompt-only when parallel workers are explicitly requested.
@@ -146,7 +146,7 @@ export function decideHookOutcomePure(input, ctx) {
146
146
  // AgentSwarm are allowed and the singular Agent stays denied. This adds
147
147
  // no direct tool-write permission within the repository/Git trust
148
148
  // boundary: read-only Git context commands still trust repository Git
149
- // configuration and can execute configured helpers. Exact 2.6.2/2.6.3 waves
149
+ // configuration and can execute configured helpers. Exact 2.6.2/2.6.3/2.7.2/2.7.3 waves
150
150
  // pass the admission guard above; fresh children cannot activate swarm
151
151
  // mode. Older paths retain their inherited scheduler limitations.
152
152
  if (READ_ONLY_TOOLS.has(toolName) || toolName === AGENT_SWARM_TOOL) {
@@ -597,8 +597,8 @@ function validateVersionSensitiveEvents(events, version) {
597
597
  // 2.3.0 (b5e28fd6), 2.3.1 (684bae9e), 2.3.2 (b8dd3a13), 2.3.3 (ec495f0c),
598
598
  // 2.4.0 (f26e4d91), 2.4.1 (2c73f3f5), 2.5.0 (41c34143), 2.5.1 (1b02030d),
599
599
  // 2.5.2 (1c142a00), 2.5.3 (5af9942e), 2.6.0 (740d6c0b), 2.6.2
600
- // (6a8493df), and 2.6.3 (b0de2fbd): the additive events and HookDefSchema are
601
- // unchanged. Exact 2.6.x schema acceptance does not certify swarm operations.
600
+ // (6a8493df), 2.6.3 (b0de2fbd), 2.7.2 (56145f84), and 2.7.3 (a8f643ad):
601
+ // the additive events and HookDefSchema are unchanged. Schema acceptance does not certify operations.
602
602
  // Require the full version string AND matching components; no inferred 2.x compatibility.
603
603
  if (version.major === 2 && ((version.minor === 0 && ((version.version === "2.0.0" && version.patch === 0) ||
604
604
  (version.version === "2.0.1" && version.patch === 1) ||
@@ -618,7 +618,9 @@ function validateVersionSensitiveEvents(events, version) {
618
618
  (version.version === "2.5.3" && version.patch === 3))) ||
619
619
  (version.minor === 6 && ((version.version === "2.6.0" && version.patch === 0) ||
620
620
  (version.version === "2.6.2" && version.patch === 2) ||
621
- (version.version === "2.6.3" && version.patch === 3))))) {
621
+ (version.version === "2.6.3" && version.patch === 3))) ||
622
+ (version.minor === 7 && ((version.version === "2.7.2" && version.patch === 2) ||
623
+ (version.version === "2.7.3" && version.patch === 3))))) {
622
624
  return { valid: true };
623
625
  }
624
626
  if (version.major !== 0) {
@@ -51,6 +51,8 @@ export const NATIVE_V2_CERTIFIED_VERSIONS = Object.freeze([
51
51
  "2.5.3",
52
52
  "2.6.2",
53
53
  "2.6.3",
54
+ "2.7.2",
55
+ "2.7.3",
54
56
  ]);
55
57
  /**
56
58
  * Exact releases certified only for review, challenge, ask, rescue, review_gate
@@ -570,7 +572,7 @@ function nativeV2NotCertified(operationKind, version) {
570
572
  if (normalized !== undefined &&
571
573
  NATIVE_V2_NON_SWARM_VERSIONS.includes(normalized) &&
572
574
  (operationKind === "swarm" || operationKind === "swarm-write")) {
573
- return new RuntimeError("KIMI_CAPABILITY_NOT_CERTIFIED", `Refusing ${operationKind}: kimi-code ${normalized} is certified only for non-swarm operations (review, challenge, ask, rescue, review_gate, pursue). Its native rate-limit recovery can exceed AgentSwarm's configured maximum, so this exact release refuses swarm before model spawn. Select exact kimi-code 2.6.2 or 2.6.3 for this plugin's certified bounded waves and single-worker path, or use a non-swarm operation on ${normalized}.`, "kimi-engine.capability", {
575
+ return new RuntimeError("KIMI_CAPABILITY_NOT_CERTIFIED", `Refusing ${operationKind}: kimi-code ${normalized} is certified only for non-swarm operations (review, challenge, ask, rescue, review_gate, pursue). Its native rate-limit recovery can exceed AgentSwarm's configured maximum, so this exact release refuses swarm before model spawn. Select exact kimi-code 2.6.2, 2.6.3, 2.7.2 or 2.7.3 for this plugin's certified bounded waves and single-worker path, or use a non-swarm operation on ${normalized}.`, "kimi-engine.capability", {
574
576
  details: {
575
577
  refusal_kind: "v2-swarm-not-certified",
576
578
  certification_scope: "non-swarm",
@@ -23,7 +23,7 @@ export const KIMI_PURSUE_DEFAULT_BUDGET_MS = 2_700_000; // 45 minutes
23
23
  * Swarm (read-only parallel fan-out) DEFAULT wall-clock ceiling when the user
24
24
  * passes no `--budget`. Read-only swarm opens no write surface, so the only new
25
25
  * risk is cost/runaway from repeated model work. This AbortController bounds
26
- * the whole job; `--cap` remains a soft lifetime-count hint. Exact 2.6.2/2.6.3 also
26
+ * the whole job; `--cap` remains a soft lifetime-count hint. Exact 2.6.2/2.6.3/2.7.2/2.7.3 also
27
27
  * bounds wave cardinality and prevents child timeouts from overlapping waves;
28
28
  * a requested concurrency of one runs a direct worker. Sized like the single-turn
29
29
  * review budget — a swarm fans review work out in parallel within one process,
@@ -65,7 +65,7 @@ const CAP_PROPERTY = {
65
65
  const MAX_CONCURRENCY_PROPERTY = {
66
66
  type: "integer",
67
67
  minimum: 1,
68
- description: "Concurrent worker limit on exact Kimi Code 2.6.2/2.6.3: one runs directly; larger values bound each native swarm wave. Older certified versions limit normal launches only and recovery can exceed it. Distinct from the soft total cap.",
68
+ description: "Concurrent worker limit on exact Kimi Code 2.6.2/2.6.3/2.7.2/2.7.3: one runs directly; larger values bound each native swarm wave. Older certified versions limit normal launches only and recovery can exceed it. Distinct from the soft total cap.",
69
69
  };
70
70
  const START_RESULT_GUIDANCE = "Task-capable clients receive an MCP task. Other clients receive a job ID immediately after launch; use kimi_job_status and kimi_job_result until terminal, and kimi_job_cancel to stop. Do not present a launch handle as the finished answer.";
71
71
  function schema(properties, required = []) {
@@ -12,8 +12,10 @@ import { assertNativeV2Preflight } from "./native-v2-preflight.js";
12
12
  import { usesBoundedSwarmPolicy } from "./swarm-policy.js";
13
13
  import { installBoundedSwarmToolPolicy } from "./swarm-tool-policy.js";
14
14
  import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
15
- // These exact 2.6.x activation entries support candidate integration; production scope is per operation.
16
- const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"];
15
+ // These exact activation entries support candidate integration; production scope is per operation.
16
+ const PREACTIVATION_VERSIONS = ["2.3.2", "2.3.3", "2.4.0", "2.4.1", "2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"];
17
+ const JSON_READY_VERSIONS = ["2.7.2", "2.7.3"];
18
+ const KIMI_AGENT_PROTOCOL_VERSION = "1.0.0";
17
19
  const READY_TIMEOUT_MS = 10_000;
18
20
  const REST_TIMEOUT_MS = 5_000;
19
21
  // Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
@@ -42,7 +44,7 @@ export async function preactivateSwarmSession(options) {
42
44
  try {
43
45
  const prepared = await prepareWebSpawn(options, failureCode);
44
46
  throwIfAborted(options.signal, failureCode, "swarm-activation.pre-spawn");
45
- web = await startWebChild(options, prepared.env, failureCode);
47
+ web = await startWebChild(options, prepared.env, prepared.expectedVersion, failureCode);
46
48
  await verifyMeta(web, prepared.expectedVersion, options.signal, failureCode);
47
49
  const model = await resolveProfileModel(web, options, failureCode);
48
50
  identity = await createSession(web, options, prepared.expectedVersion, failureCode);
@@ -94,7 +96,7 @@ export async function deactivateSwarmSession(options) {
94
96
  // the print spawn owns resume plan-taint refusal.
95
97
  const prepared = await prepareWebSpawn(options, failureCode);
96
98
  throwIfAborted(options.signal, failureCode, "swarm-deactivation.pre-spawn");
97
- web = await startWebChild(options, prepared.env, failureCode);
99
+ web = await startWebChild(options, prepared.env, prepared.expectedVersion, failureCode);
98
100
  await verifyMeta(web, prepared.expectedVersion, options.signal, failureCode);
99
101
  await verifyLocalEnvironment(web, options, options.cwd, prepared.expectedVersion, options.signal, failureCode);
100
102
  await postSwarmProfile(web, options, false, undefined, options.signal, failureCode);
@@ -146,11 +148,11 @@ async function prepareWebSpawn(options, failureCode) {
146
148
  kimiHome,
147
149
  };
148
150
  }
149
- async function startWebChild(options, env, failureCode) {
151
+ async function startWebChild(options, env, expectedVersion, failureCode) {
150
152
  const args = [
151
153
  ...(options.prefixArgs ?? []),
152
154
  "web",
153
- "--no-open",
155
+ JSON_READY_VERSIONS.includes(expectedVersion) ? "--json" : "--no-open",
154
156
  "--host",
155
157
  "127.0.0.1",
156
158
  "--port",
@@ -214,7 +216,7 @@ async function startWebChild(options, env, failureCode) {
214
216
  };
215
217
  startDescendantTracking(owned);
216
218
  try {
217
- const ready = await waitForReadyLine(owned, options.signal, failureCode);
219
+ const ready = await waitForReadyLine(owned, expectedVersion, options.signal, failureCode);
218
220
  await refreshOwnedDescendants(owned);
219
221
  if (owned.recoveryFailed)
220
222
  throw failure(failureCode, "swarm-activation.recovery", "Cannot persist web ownership; refusing session mutation.");
@@ -228,7 +230,7 @@ async function startWebChild(options, env, failureCode) {
228
230
  throw primary;
229
231
  }
230
232
  }
231
- async function waitForReadyLine(owned, signal, failureCode) {
233
+ async function waitForReadyLine(owned, expectedVersion, signal, failureCode) {
232
234
  throwIfAborted(signal, failureCode, "swarm-activation.ready");
233
235
  return await new Promise((resolve, reject) => {
234
236
  let buffered = "";
@@ -272,6 +274,17 @@ async function waitForReadyLine(owned, signal, failureCode) {
272
274
  const newline = buffered.indexOf("\n");
273
275
  const line = buffered.slice(0, newline).replace(/\r$/, "");
274
276
  buffered = buffered.slice(newline + 1);
277
+ if (JSON_READY_VERSIONS.includes(expectedVersion)) {
278
+ if (line.trim().length === 0)
279
+ continue;
280
+ try {
281
+ settle(parseJsonReadyLine(line));
282
+ }
283
+ catch {
284
+ settle(failure(failureCode, "swarm-activation.ready", "The Kimi web JSON ready line did not confirm the authenticated KAP loopback contract."));
285
+ }
286
+ return;
287
+ }
275
288
  if (!line.startsWith("Kimi server: "))
276
289
  continue;
277
290
  try {
@@ -311,12 +324,55 @@ function parseReadyLine(line) {
311
324
  token: parsed.hash.slice("#token=".length),
312
325
  };
313
326
  }
327
+ function parseJsonReadyLine(line) {
328
+ const data = JSON.parse(line);
329
+ if (!isRecord(data) ||
330
+ typeof data.origin !== "string" ||
331
+ typeof data.ws_url !== "string" ||
332
+ typeof data.token !== "string" ||
333
+ data.token.trim().length === 0 ||
334
+ data.kimi_agent_protocol_version !== KIMI_AGENT_PROTOCOL_VERSION) {
335
+ throw new Error("invalid JSON ready payload");
336
+ }
337
+ const origin = new URL(data.origin);
338
+ if (origin.protocol !== "http:" ||
339
+ origin.hostname !== "127.0.0.1" ||
340
+ origin.port.length === 0 ||
341
+ origin.pathname !== "/" ||
342
+ origin.search.length > 0 ||
343
+ origin.hash.length > 0 ||
344
+ origin.username.length > 0 ||
345
+ origin.password.length > 0 ||
346
+ (data.origin !== origin.origin && data.origin !== `${origin.origin}/`)) {
347
+ throw new Error("invalid JSON ready origin");
348
+ }
349
+ const websocket = new URL(data.ws_url);
350
+ if (websocket.protocol !== "ws:" ||
351
+ websocket.host !== origin.host ||
352
+ websocket.pathname !== "/api/v1/ws" ||
353
+ websocket.search.length > 0 ||
354
+ websocket.hash.length > 0 ||
355
+ websocket.username.length > 0 ||
356
+ websocket.password.length > 0 ||
357
+ data.ws_url !== websocket.href) {
358
+ throw new Error("invalid JSON ready WebSocket URL");
359
+ }
360
+ return { origin: origin.origin, token: data.token };
361
+ }
314
362
  async function verifyMeta(web, expectedVersion, signal, failureCode) {
315
363
  const data = await restData(web, "GET", "/api/v1/meta", undefined, signal, failureCode);
316
364
  if (!isRecord(data)) {
317
365
  throw failure(failureCode, "swarm-activation.meta", "Kimi web /meta returned an invalid payload.");
318
366
  }
319
- if (data.backend !== "v2") {
367
+ if (JSON_READY_VERSIONS.includes(expectedVersion)) {
368
+ if (data.kimi_agent_protocol_version !== KIMI_AGENT_PROTOCOL_VERSION ||
369
+ !isRecord(data.capabilities) ||
370
+ data.capabilities.websocket !== true ||
371
+ "backend" in data) {
372
+ throw failure(failureCode, "swarm-activation.meta", "Kimi web /meta did not confirm the KAP 1.0.0 WebSocket contract without a legacy backend.");
373
+ }
374
+ }
375
+ else if (data.backend !== "v2") {
320
376
  throw failure(failureCode, "swarm-activation.meta", "Kimi web /meta did not confirm the v2 backend.");
321
377
  }
322
378
  if (data.dangerous_bypass_auth !== false) {
@@ -343,7 +399,7 @@ async function resolveProfileModel(web, options, failureCode) {
343
399
  }
344
400
  async function createSession(web, options, expectedVersion, failureCode) {
345
401
  const request = { metadata: { cwd: options.cwd } };
346
- if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion)) {
402
+ if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion)) {
347
403
  request.environment_id = "local";
348
404
  request.environment_cwd = options.cwd;
349
405
  }
@@ -354,7 +410,7 @@ async function createSession(web, options, expectedVersion, failureCode) {
354
410
  return { sessionId: data.id, workspaceId: data.workspace_id };
355
411
  }
356
412
  async function verifyLocalEnvironment(web, identity, expectedCwd, expectedVersion, signal, failureCode) {
357
- if (!["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion))
413
+ if (!["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion))
358
414
  return;
359
415
  const data = await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/environment`, undefined, signal, failureCode);
360
416
  if (!isRecord(data)) {
@@ -374,10 +430,10 @@ async function postSwarmProfile(web, identity, active, model, signal, failureCod
374
430
  await restData(web, "POST", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/profile`, { agent_config: agentConfig }, signal, failureCode);
375
431
  }
376
432
  async function verifySwarmStatus(web, identity, active, model, expectedVersion, signal, failureCode) {
377
- const data = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion)
433
+ const data = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion)
378
434
  ? await readWebSocketAgentState(web, identity.sessionId, expectedVersion, signal, failureCode)
379
435
  : await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/status`, undefined, signal, failureCode);
380
- const source = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion) ? "agent state" : "/status";
436
+ const source = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion) ? "agent state" : "/status";
381
437
  if (!isRecord(data)) {
382
438
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} returned an invalid payload.`);
383
439
  }
@@ -387,10 +443,10 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
387
443
  if (data.plan_mode !== false) {
388
444
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm plan mode is off.`);
389
445
  }
390
- if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion) && data.tower_mode !== false) {
446
+ if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion) && data.tower_mode !== false) {
391
447
  throw failure(failureCode, "swarm-activation.status", "Kimi web agent state did not confirm tower mode is off.");
392
448
  }
393
- const permission = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion) ? data.permission_mode : data.permission;
449
+ const permission = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion) ? data.permission_mode : data.permission;
394
450
  if (permission !== "auto") {
395
451
  throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm auto permission mode.`);
396
452
  }
@@ -406,7 +462,7 @@ async function readWebSocketAgentState(web, sessionId, expectedVersion, signal,
406
462
  return await new Promise((resolve, reject) => {
407
463
  let socket;
408
464
  const bearerProtocol = `kimi-code.bearer.${web.token}`;
409
- const legacyControl = !["2.6.0", "2.6.2", "2.6.3"].includes(expectedVersion);
465
+ const legacyControl = !["2.6.0", "2.6.2", "2.6.3", "2.7.2", "2.7.3"].includes(expectedVersion);
410
466
  const helloId = `swarm-activation-hello-${randomUUID()}`;
411
467
  const subscribeId = `swarm-activation-subscribe-${randomUUID()}`;
412
468
  try {
@@ -7,7 +7,7 @@ export const BOUNDED_SWARM_POLICY = "bounded-waves/1";
7
7
  export const SWARM_CHILD_TIMEOUT_MS = 2_147_483_647;
8
8
  export function usesBoundedSwarmPolicy(plan) {
9
9
  return plan.intendedEngine === "native-v2" &&
10
- (plan.kimiVersion === "2.6.2" || plan.kimiVersion === "2.6.3") &&
10
+ (plan.kimiVersion === "2.6.2" || plan.kimiVersion === "2.6.3" || plan.kimiVersion === "2.7.2" || plan.kimiVersion === "2.7.3") &&
11
11
  (plan.operationKind === "swarm" || plan.operationKind === "swarm-write");
12
12
  }
13
13
  function plainObject(value) {
@@ -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.6.3";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.7.3";
@@ -29,7 +29,7 @@ Pass through: `[--budget <30m|1h>] [--cap <N>] [--max-concurrency <N>] [-m <mode
29
29
  - For subscription auth, guide native Kimi `/login`; for API keys or other providers, guide native `/provider` and have the user enter secrets there. Only an explicit saved-default request calls for native `/model`. Re-list after setup; use `setup --check` for hook readiness. Swarm `-m` selects the coordinator; `[secondary_model]` can select different child models.
30
30
  - Require many independent review targets plus explicit fan-out intent.
31
31
  - Pass finite budget and concurrency bounds; default to foreground unless the user explicitly asks to detach.
32
- - On exact Kimi Code 2.6.2/2.6.3, concurrency 1 runs one direct worker; larger values use bounded sequential waves. Older certified versions retain their normal-launch limit and recovery limitation.
32
+ - On exact Kimi Code 2.6.2/2.6.3/2.7.2, concurrency 1 runs one direct worker; larger values use bounded sequential waves. Older certified versions retain their normal-launch limit and recovery limitation.
33
33
  - The bound counts simultaneous Kimi child-agent turns, not OS subprocesses. Fresh-only waves need at least two entries; group odd target counts into disjoint worker assignments.
34
34
  - If the companion reports SWARM_HOOK_NOT_INSTALLED, tell the user to run Claude Code /kimi:setup or Codex $kimi-setup, then retry.
35
35
  - Return the consolidated companion report verbatim.