kimi-plugin-cc 2.5.7 → 2.5.8
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 +8 -8
- package/agents/kimi-swarm-write.md +3 -3
- package/agents/kimi-swarm.md +3 -3
- package/commands/swarm.md +2 -2
- package/dist/cli-client.js +3 -3
- package/dist/commands/recover-swarm.js +2 -1
- package/dist/commands/setup.js +7 -7
- package/dist/commands/swarm.js +40 -35
- package/dist/hooks/config-safety.js +5 -3
- package/dist/kimi-engine.js +45 -12
- package/dist/mcp/operations.js +1 -1
- package/dist/stream-json.js +2 -2
- package/dist/swarm-activation.js +73 -32
- package/dist/version.js +1 -1
- package/docs/migration.md +2 -2
- package/docs/registry-releases.md +2 -0
- package/docs/safety.md +12 -9
- package/docs/swarm-recovery.md +3 -1
- package/docs/upstream-2.5.3-certification.md +2 -0
- package/docs/upstream-2.6.0-certification.md +52 -0
- package/package.json +2 -1
- package/plugins/kimi-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/kimi-codex/dist/cli-client.js +3 -3
- package/plugins/kimi-codex/dist/commands/recover-swarm.js +2 -1
- package/plugins/kimi-codex/dist/commands/setup.js +7 -7
- package/plugins/kimi-codex/dist/commands/swarm.js +40 -35
- package/plugins/kimi-codex/dist/hooks/config-safety.js +5 -3
- package/plugins/kimi-codex/dist/kimi-engine.js +45 -12
- package/plugins/kimi-codex/dist/mcp/operations.js +1 -1
- package/plugins/kimi-codex/dist/stream-json.js +2 -2
- package/plugins/kimi-codex/dist/swarm-activation.js +73 -32
- package/plugins/kimi-codex/dist/version.js +1 -1
- package/plugins/kimi-dsh/dist/cli-client.js +3 -3
- package/plugins/kimi-dsh/dist/commands/recover-swarm.js +2 -1
- package/plugins/kimi-dsh/dist/commands/setup.js +7 -7
- package/plugins/kimi-dsh/dist/commands/swarm.js +40 -35
- package/plugins/kimi-dsh/dist/hooks/config-safety.js +5 -3
- package/plugins/kimi-dsh/dist/kimi-engine.js +45 -12
- package/plugins/kimi-dsh/dist/mcp/operations.js +1 -1
- package/plugins/kimi-dsh/dist/stream-json.js +2 -2
- package/plugins/kimi-dsh/dist/swarm-activation.js +73 -32
- package/plugins/kimi-dsh/dist/version.js +1 -1
- package/plugins/kimi-dsh/package.json +1 -1
package/dist/swarm-activation.js
CHANGED
|
@@ -10,7 +10,8 @@ import { assertExecutionPlanMatchesSpawn, assertNoUnsafeExperimentalSelector, }
|
|
|
10
10
|
import { resolveKimiHome } from "./kimi-home.js";
|
|
11
11
|
import { assertNativeV2Preflight } from "./native-v2-preflight.js";
|
|
12
12
|
import { collectDescendantIdentities, collectProcessGroupsIdentities, probeProcessIdentity, revalidateProcessIdentities, waitForProcessTreeExit, } from "./process-tree.js";
|
|
13
|
-
|
|
13
|
+
// Exact 2.6.0 is an integration candidate, not a production-certified version.
|
|
14
|
+
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"];
|
|
14
15
|
const READY_TIMEOUT_MS = 10_000;
|
|
15
16
|
const REST_TIMEOUT_MS = 5_000;
|
|
16
17
|
// Exact 2.4.0 can take longer than 5s to drain session/workspace lifecycle work.
|
|
@@ -337,7 +338,7 @@ async function resolveProfileModel(web, options, failureCode) {
|
|
|
337
338
|
}
|
|
338
339
|
async function createSession(web, options, expectedVersion, failureCode) {
|
|
339
340
|
const request = { metadata: { cwd: options.cwd } };
|
|
340
|
-
if (["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion)) {
|
|
341
|
+
if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion)) {
|
|
341
342
|
request.environment_id = "local";
|
|
342
343
|
request.environment_cwd = options.cwd;
|
|
343
344
|
}
|
|
@@ -348,7 +349,7 @@ async function createSession(web, options, expectedVersion, failureCode) {
|
|
|
348
349
|
return { sessionId: data.id, workspaceId: data.workspace_id };
|
|
349
350
|
}
|
|
350
351
|
async function verifyLocalEnvironment(web, identity, expectedCwd, expectedVersion, signal, failureCode) {
|
|
351
|
-
if (!["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion))
|
|
352
|
+
if (!["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion))
|
|
352
353
|
return;
|
|
353
354
|
const data = await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/environment`, undefined, signal, failureCode);
|
|
354
355
|
if (!isRecord(data)) {
|
|
@@ -368,10 +369,10 @@ async function postSwarmProfile(web, identity, active, model, signal, failureCod
|
|
|
368
369
|
await restData(web, "POST", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/profile`, { agent_config: agentConfig }, signal, failureCode);
|
|
369
370
|
}
|
|
370
371
|
async function verifySwarmStatus(web, identity, active, model, expectedVersion, signal, failureCode) {
|
|
371
|
-
const data = ["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion)
|
|
372
|
-
? await readWebSocketAgentState(web, identity.sessionId, signal, failureCode)
|
|
372
|
+
const data = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion)
|
|
373
|
+
? await readWebSocketAgentState(web, identity.sessionId, expectedVersion, signal, failureCode)
|
|
373
374
|
: await restData(web, "GET", `/api/v1/sessions/${encodeURIComponent(identity.sessionId)}/status`, undefined, signal, failureCode);
|
|
374
|
-
const source = ["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion) ? "agent state" : "/status";
|
|
375
|
+
const source = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion) ? "agent state" : "/status";
|
|
375
376
|
if (!isRecord(data)) {
|
|
376
377
|
throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} returned an invalid payload.`);
|
|
377
378
|
}
|
|
@@ -381,10 +382,10 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
|
|
|
381
382
|
if (data.plan_mode !== false) {
|
|
382
383
|
throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm plan mode is off.`);
|
|
383
384
|
}
|
|
384
|
-
if (["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion) && data.tower_mode !== false) {
|
|
385
|
+
if (["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion) && data.tower_mode !== false) {
|
|
385
386
|
throw failure(failureCode, "swarm-activation.status", "Kimi web agent state did not confirm tower mode is off.");
|
|
386
387
|
}
|
|
387
|
-
const permission = ["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(expectedVersion) ? data.permission_mode : data.permission;
|
|
388
|
+
const permission = ["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(expectedVersion) ? data.permission_mode : data.permission;
|
|
388
389
|
if (permission !== "auto") {
|
|
389
390
|
throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm auto permission mode.`);
|
|
390
391
|
}
|
|
@@ -392,7 +393,7 @@ async function verifySwarmStatus(web, identity, active, model, expectedVersion,
|
|
|
392
393
|
throw failure(failureCode, "swarm-activation.status", `Kimi web ${source} did not confirm the selected model alias.`);
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
396
|
+
async function readWebSocketAgentState(web, sessionId, expectedVersion, signal, failureCode) {
|
|
396
397
|
throwIfAborted(signal, failureCode, "swarm-activation.status");
|
|
397
398
|
await refreshOwnedDescendants(web);
|
|
398
399
|
throwIfAborted(signal, failureCode, "swarm-activation.status");
|
|
@@ -400,6 +401,7 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
400
401
|
return await new Promise((resolve, reject) => {
|
|
401
402
|
let socket;
|
|
402
403
|
const bearerProtocol = `kimi-code.bearer.${web.token}`;
|
|
404
|
+
const legacyControl = expectedVersion !== "2.6.0";
|
|
403
405
|
const helloId = `swarm-activation-hello-${randomUUID()}`;
|
|
404
406
|
const subscribeId = `swarm-activation-subscribe-${randomUUID()}`;
|
|
405
407
|
try {
|
|
@@ -418,6 +420,7 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
418
420
|
let subscribeSent = false;
|
|
419
421
|
let subscriptionAcknowledged = false;
|
|
420
422
|
let closeRequested = false;
|
|
423
|
+
let closeTimer;
|
|
421
424
|
let latestState;
|
|
422
425
|
let frames = 0;
|
|
423
426
|
let receivedChars = 0;
|
|
@@ -426,6 +429,8 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
426
429
|
}, REST_TIMEOUT_MS);
|
|
427
430
|
const cleanup = () => {
|
|
428
431
|
clearTimeout(timer);
|
|
432
|
+
if (closeTimer !== undefined)
|
|
433
|
+
clearTimeout(closeTimer);
|
|
429
434
|
signal?.removeEventListener("abort", onAbort);
|
|
430
435
|
socket.removeEventListener("open", onOpen);
|
|
431
436
|
socket.removeEventListener("message", onMessage);
|
|
@@ -460,30 +465,46 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
460
465
|
return false;
|
|
461
466
|
}
|
|
462
467
|
};
|
|
468
|
+
const handshakeComplete = () => !legacyControl || (serverHello && clientHelloAcknowledged);
|
|
469
|
+
const closeForValidation = () => {
|
|
470
|
+
closeRequested = true;
|
|
471
|
+
try {
|
|
472
|
+
socket.close();
|
|
473
|
+
}
|
|
474
|
+
catch {
|
|
475
|
+
rejectState("Could not close the Kimi web agent-state channel for final validation.");
|
|
476
|
+
}
|
|
477
|
+
};
|
|
463
478
|
const completeIfReady = () => {
|
|
464
|
-
if (
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
closeRequested = true;
|
|
470
|
-
try {
|
|
471
|
-
socket.close();
|
|
472
|
-
}
|
|
473
|
-
catch {
|
|
474
|
-
rejectState("Could not close the Kimi web agent-state channel for final validation.");
|
|
475
|
-
}
|
|
479
|
+
if (!handshakeComplete() || !subscriptionAcknowledged || latestState === undefined || closeRequested)
|
|
480
|
+
return;
|
|
481
|
+
if (legacyControl) {
|
|
482
|
+
closeForValidation();
|
|
483
|
+
return;
|
|
476
484
|
}
|
|
485
|
+
closeTimer ??= setTimeout(() => {
|
|
486
|
+
closeTimer = undefined;
|
|
487
|
+
closeForValidation();
|
|
488
|
+
}, 0);
|
|
477
489
|
};
|
|
478
490
|
const onOpen = () => {
|
|
479
491
|
if (socket.protocol !== bearerProtocol) {
|
|
480
492
|
rejectState("Kimi web did not authenticate the agent-state channel with the expected subprotocol.");
|
|
481
493
|
return;
|
|
482
494
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
495
|
+
if (legacyControl) {
|
|
496
|
+
send({
|
|
497
|
+
type: "client_hello",
|
|
498
|
+
id: helloId,
|
|
499
|
+
payload: { client_id: "kimi-plugin-cc-swarm-activation" },
|
|
500
|
+
});
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
subscribeSent = send({
|
|
504
|
+
type: "subscribe",
|
|
505
|
+
request_id: subscribeId,
|
|
506
|
+
session_id: sessionId,
|
|
507
|
+
agent_ids: ["main"],
|
|
487
508
|
});
|
|
488
509
|
};
|
|
489
510
|
const onMessage = (event) => {
|
|
@@ -511,7 +532,7 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
511
532
|
rejectState("Kimi web agent-state channel returned an invalid frame.");
|
|
512
533
|
return;
|
|
513
534
|
}
|
|
514
|
-
if (frame.type === "server_hello") {
|
|
535
|
+
if (legacyControl && frame.type === "server_hello") {
|
|
515
536
|
if (serverHello || !isRecord(frame.payload) ||
|
|
516
537
|
frame.payload.protocol_version !== 2 ||
|
|
517
538
|
typeof frame.payload.ws_connection_id !== "string" ||
|
|
@@ -524,11 +545,11 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
524
545
|
serverHello = true;
|
|
525
546
|
return;
|
|
526
547
|
}
|
|
527
|
-
if (!serverHello) {
|
|
548
|
+
if (legacyControl && !serverHello) {
|
|
528
549
|
rejectState("Kimi web agent-state channel sent data before its protocol hello.");
|
|
529
550
|
return;
|
|
530
551
|
}
|
|
531
|
-
if (frame.type === "ack") {
|
|
552
|
+
if (legacyControl && frame.type === "ack") {
|
|
532
553
|
if (typeof frame.id !== "string" || typeof frame.code !== "number" || !isRecord(frame.payload)) {
|
|
533
554
|
rejectState("Kimi web agent-state channel returned an invalid acknowledgement.");
|
|
534
555
|
return;
|
|
@@ -563,8 +584,26 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
563
584
|
rejectState("Kimi web agent-state channel returned an unexpected acknowledgement.");
|
|
564
585
|
return;
|
|
565
586
|
}
|
|
587
|
+
if (!legacyControl && frame.type === "response") {
|
|
588
|
+
if (typeof frame.request_id !== "string" || !Number.isInteger(frame.code)) {
|
|
589
|
+
rejectState("Kimi web agent-state channel returned an invalid subscription response.");
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
if (frame.request_id !== subscribeId) {
|
|
593
|
+
rejectState("Kimi web agent-state channel returned an unexpected subscription response.");
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
if (subscriptionAcknowledged || !subscribeSent || frame.code !== 0) {
|
|
597
|
+
rejectState("Kimi web agent-state channel did not accept the exact main-session subscription.");
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
subscriptionAcknowledged = true;
|
|
601
|
+
completeIfReady();
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
566
604
|
if (frame.type === "agent") {
|
|
567
|
-
if (!subscribeSent || !
|
|
605
|
+
if (!subscribeSent || (!legacyControl && !subscriptionAcknowledged) ||
|
|
606
|
+
!isAgentStateFrame(frame, sessionId)) {
|
|
568
607
|
rejectState("Kimi web agent-state channel returned invalid or misbound main-agent state.");
|
|
569
608
|
return;
|
|
570
609
|
}
|
|
@@ -573,9 +612,12 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
573
612
|
return;
|
|
574
613
|
}
|
|
575
614
|
if (frame.type === "ping") {
|
|
576
|
-
if (isRecord(frame.payload) && typeof frame.payload.nonce === "string") {
|
|
615
|
+
if (legacyControl && isRecord(frame.payload) && typeof frame.payload.nonce === "string") {
|
|
577
616
|
send({ type: "pong", payload: { nonce: frame.payload.nonce } });
|
|
578
617
|
}
|
|
618
|
+
else if (!legacyControl) {
|
|
619
|
+
send({ type: "pong" });
|
|
620
|
+
}
|
|
579
621
|
}
|
|
580
622
|
};
|
|
581
623
|
const onAbort = () => {
|
|
@@ -586,8 +628,7 @@ async function readWebSocketAgentState(web, sessionId, signal, failureCode) {
|
|
|
586
628
|
};
|
|
587
629
|
const onClose = () => {
|
|
588
630
|
if (closeRequested &&
|
|
589
|
-
|
|
590
|
-
clientHelloAcknowledged &&
|
|
631
|
+
handshakeComplete() &&
|
|
591
632
|
subscriptionAcknowledged &&
|
|
592
633
|
latestState !== undefined) {
|
|
593
634
|
settle(latestState);
|
package/dist/version.js
CHANGED
package/docs/migration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Compatibility and upgrades
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The runtime certifies exact CLI releases per operation. Exact 2.6.0 is certified for review, challenge, ask, rescue, review gate and pursue only; both swarm modes refuse before model spawn. Full eight-operation certification ends at 2.5.3, with the inherited rate-limit limitation disclosed, and earlier exact rows remain unchanged. `NATIVE_V2_CERTIFIED_VERSIONS` remains the all-operation export, so automatic full-swarm pin selection does not move to 2.6.0; `NATIVE_V2_ANY_OPERATION_VERSIONS` is the separate scoped union used by setup and engine selection. Choose 2.6.0 explicitly for non-swarm use. Later patches and minor releases, including 2.6.1, are not accepted automatically. The npm distribution adds an installation channel; it does not change this compatibility table.
|
|
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
|
|
|
@@ -10,7 +10,7 @@ Use the [README installation and update steps](../README.md) for Claude Code or
|
|
|
10
10
|
|
|
11
11
|
## Plugin versions and upgrades
|
|
12
12
|
|
|
13
|
-
Plugin versions advance independently using ordinary SemVer and may deliberately align with a certified CLI release.
|
|
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
|
## 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 activation
|
|
16
16
|
|
|
@@ -8,6 +8,8 @@ no separate CLI.
|
|
|
8
8
|
|
|
9
9
|
## Publishing status
|
|
10
10
|
|
|
11
|
+
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`.
|
|
12
|
+
|
|
11
13
|
Plugin **2.5.6** certifies exact Kimi Code **2.5.2** for all eight operations, alongside 2.5.0 and 2.5.1; see the [2.5.2 certification record](./upstream-2.5.2-certification.md). Candidate and production matrices each passed 24 tests with 167 assertions and no skips. The full check passed 1,429 tests with 18,662 assertions, package validation passed 331 files across all three distributions, and isolated consumer security passed. Publication does not update installed hosts or operator pins. [Release v2.5.6](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.6) is anchored at `a9585a1cd4177b17e422b63305d390aa1f1b9c81`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/42376507143) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/42381804227) passed; the first three publication attempts failed with `TLOG_CREATE_ENTRY_ERROR` during a Sigstore Rekor database upgrade and published nothing, and attempt 4 succeeded unchanged. The 331-file registry tarball has SHA-1 `32c712a00186c1b0a334bf39d03cc397a2012b05`, matches the validated workflow artifact byte-for-byte, and carries provenance (sigstore log index `3739983164`). A fresh registry npm installation has zero production advisories and all compiled runtime mirrors match. The Discover timestamp records npm publication at `2026-11-07T14:56:36.462Z`.
|
|
12
14
|
|
|
13
15
|
Plugin **2.5.5** keeps every host's managed hook block contiguous in the shared `~/.kimi-code/config.toml`, so a comment-preserving third-party writer that regroups tables cannot strip a block's BEGIN marker, and scopes orphan-marker verification per host: another host's orphan warns, own and legacy orphans still fail closed, and the remedy is plain setup. Exact CLI certification remains 2.5.0 and 2.5.1; publication does not update installed hosts or operator pins. The [v2.5.5 release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.5.5) is anchored at `ba0bb8f293839d8658f9486da2feb32908eab4d4`. [Release-commit CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/42372824792) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/42373304448) passed. The 330-file registry tarball has SHA-1 `b035ab57aa7902538c13bee384b2dead48c2a57c`, matches the validated workflow artifact byte-for-byte, and carries provenance (sigstore log index `3738319436`). A fresh registry npm installation has zero production advisories and all compiled runtime mirrors match. The Discover timestamp records npm publication at `2026-11-07T12:44:10.489Z`.
|
package/docs/safety.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This guide describes the current checkout runtime. Read-only tasks deny file writes and shell commands. Rescue and pursue can edit your workspace. Write-swarm returns a patch from a temporary Git worktree.
|
|
4
4
|
|
|
5
|
-
Native agent-core-v2 is certified at exact CLI versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, `2.4.0`, `2.4.1`, `2.5.0`, `2.5.1`, `2.5.2`, and `2.5.3`, with plan mode disabled. The [runtime certification table](../runtime/kimi-engine.ts) controls routing. The hook is not an operating-system sandbox.
|
|
5
|
+
Native agent-core-v2 is certified at exact CLI versions `0.42.0`, `0.43.0`, `0.43.1`, `2.0.0`, `2.0.1`, `2.0.2`, `2.1.0`, `2.1.1`, `2.2.0`, `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, `2.4.0`, `2.4.1`, `2.5.0`, `2.5.1`, `2.5.2`, and `2.5.3`, with plan mode disabled. Exact 2.6.0 has a narrowed certification for review, challenge, ask, rescue, review gate and pursue only; both swarm modes refuse before model spawn because upstream rate-limit recovery can exceed the configured concurrency limit. The [runtime certification table](../runtime/kimi-engine.ts) controls routing and operation scope. The hook is not an operating-system sandbox.
|
|
6
6
|
|
|
7
7
|
## Why the safety story is hook-based
|
|
8
8
|
|
|
@@ -242,8 +242,8 @@ Older certified versions keep the direct `kimi -p` path. The web processes are n
|
|
|
242
242
|
- **Every subagent inherits the `swarm` label and fires the same hook.** On native v2 (0.42.0) `AgentSwarm` children run in-process in a child DI scope with their OWN eager external-hooks service, so every child tool call passes the same before-execute channel and the same managed hook — there is no sub-vs-main branch and no deny-all shortcut on the swarm route. So a subagent's `Write`/`Edit`/`Bash` is denied exactly like a single-turn review's. The swarm listener in that channel is non-terminal and nothing auto-approves `AgentSwarm` ahead of the hook. (Legacy-v1 ≤ 0.41 reached the same result by placing the hook policy at index 0 of every agent's permission stack.) **Required for final certification evidence** (`tests/runtime/real-binary-smoke.test.ts`, run via `bun run smoke:real`): distinct child journals must exist, and each assigned Write/Edit `path` must be correlated through its `toolCallId` with the managed denial in that exact tool result; unrelated denials and coordinator-only reports are insufficient. On 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 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
243
|
- **The managed hook is the read-only boundary; no `explore`-profile second layer is assumed.** Production deliberately omits `subagent_type` for read-only swarm rather than selecting kimi-code's `explore` profile. Every coordinator and subagent tool call is enforced by the same managed hook.
|
|
244
244
|
- **Swarm refuses without the hook, like every model-spawning command.** A swarm makes the reason especially acute: it asks for up to `--cap` subagents, but this total-count hint is advisory, so a missing hook would remove enforcement from all of them at once. `KIMI_PLUGIN_CC_SKIP_HOOK_CHECK=1` remains an explicit tests/diagnostics escape hatch, not a recovery path.
|
|
245
|
-
- **The only new risk is COST, and the plugin bounds it.** Read-only swarm writes nothing, so the new risk is runaway cost from N parallel model runs (and possible nested `AgentSwarm`). `/kimi:swarm` enforces a **mandatory finite wall-clock ceiling** via its AbortController (`--budget`, default 30m); the SIGTERM→SIGKILL descendant-reaping cancellation reaps the whole subagent process tree. Two **distinct** subagent bounds: `--cap N` is a *soft* prompt-injected hint on TOTAL subagent count (the hook is stateless and cannot enforce a count, so the model may exceed it), and `--max-concurrency N`
|
|
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
|
|
245
|
+
- **The only new risk is COST, and the plugin bounds it.** Read-only swarm writes nothing, so the new risk is runaway cost from N parallel model runs (and possible nested `AgentSwarm`). `/kimi:swarm` enforces a **mandatory finite wall-clock ceiling** via its AbortController (`--budget`, default 30m); the SIGTERM→SIGKILL descendant-reaping cancellation reaps the whole subagent process tree. Two **distinct** subagent bounds: `--cap N` is a *soft* prompt-injected hint on TOTAL subagent count (the hook is stateless and cannot enforce a count, so the model may exceed it), and `--max-concurrency N` caps normal launches of kimi-code's `SubagentBatch` — exported as `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` (PR #888) on **kimi-code 0.18.0+** (older binaries ignore the unknown env var, so on < 0.18 only the soft hint applies). It **defaults to 4** when the user passes none (`resolveSwarmMaxConcurrency` in swarm.ts), so every swarm run — agent-dispatched or human-typed — carries a normal-launch peak-parallelism ceiling on 0.18.0+; pass an explicit value to widen or throttle. **Never merge them into one flag:** concurrency ≠ total count — the normal-launch cap of N still permits more than N subagents over the life of the run, and rate-limit recovery can also exceed its at-once peak as detailed below. The `--budget` bounds elapsed time, not a dollar amount or total token count; `--max-concurrency` bounds *peak* parallelism (the spike in simultaneous model spend), and `--cap` is only an advisory total-count nudge. Folding both onto one flag would create the "cap-as-total-count illusion" — a user reading `--cap N` would expect a total bound but receive only a peak-parallelism one. **Known upstream limitation:** normal launches enforce the configured maximum, but deterministic controls against exact 2.6.0 show rate-limit recovery exceeding it (cap 1 reaching two active attempts; cap 4 reaching five). Source inspection shows the same inherited defect in 2.5.3. Until a released upstream fix is certified, `--max-concurrency` is a requested peak with normal-launch enforcement, not an unconditional hard ceiling. This limitation is disclosed for existing rows rather than silently rewriting their certification history; 2.6.0 remains uncertified for either swarm operation, and its narrowed non-swarm certification does not waive the limitation.
|
|
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 normal-launch `--max-concurrency` that the runtime defaults to 4 for every swarm run (with the recovery qualification above) — 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
247
|
|
|
248
248
|
## Write-capable swarm (`/kimi:swarm --write`)
|
|
249
249
|
|
|
@@ -254,9 +254,9 @@ Older certified versions keep the direct `kimi -p` path. The web processes are n
|
|
|
254
254
|
- **`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
255
|
- **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
256
|
- **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 kimi-code **≥ 0.18.0** (below it `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` is ignored, so a write fan-out would have no
|
|
257
|
+
- **Gated tightly.** Requires kimi-code **≥ 0.18.0** (below it `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` is ignored, so a write fan-out would have no normal-launch peak bound); because that support cannot be confirmed without a version probe, the write-mode version gate **fails closed** on an unconfirmable `kimi --version` probe (the shared execution-plan gate also refuses unverified or uncertified binaries for read-only swarm; older certified legacy versions may lack normal-launch concurrency support). The rate-limit recovery qualification above applies to every supported version reviewed here. Also requires a git repo with a **committed HEAD**, and the PreToolUse hook (**refuses** without it, like read swarm). Bases the worktree on HEAD, so a **loud warning** fires when the working tree is dirty (uncommitted work is not visible to the swarm). Default `--max-concurrency` is **1** for normal-launch serialization since disjoint-target partitioning is prompt-only and unenforceable by the stateless hook; the rate-limit recovery qualification above applies; the coordinator prompt also forbids git mutation and nested `AgentSwarm`.
|
|
258
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.
|
|
259
|
-
- **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
|
|
259
|
+
- **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
260
|
|
|
261
261
|
## MCP transport and long-running jobs
|
|
262
262
|
|
|
@@ -298,7 +298,7 @@ worktree. A directory the operator trusted interactively in the Kimi TUI still
|
|
|
298
298
|
has that property; that persisted-trust route is a documented residual, not
|
|
299
299
|
something the plugin can close.
|
|
300
300
|
|
|
301
|
-
Plugin-managed execution must remain local. Unused remote declarations can remain in operator config, but a configured remote default refuses before spawn. Disabling workspace trust through `[workspace] require_trust = false` also refuses, because it would enable project MCP outside the managed hook. Launcher environment selectors are reserved. Fresh exact 2.5.0/2.5.1/2.5.2/2.5.3 print selects `--environment local`; resume instead inspects persisted metadata and every agent journal and refuses nonlocal or wrong-root records against the expected execution root (the isolated worktree for swarm-write); older sessions without environment records do not fail this check merely for lacking them.
|
|
301
|
+
Plugin-managed execution must remain local. Unused remote declarations can remain in operator config, but a configured remote default refuses before spawn. Disabling workspace trust through `[workspace] require_trust = false` also refuses, because it would enable project MCP outside the managed hook. Launcher environment selectors are reserved. Fresh exact 2.5.0/2.5.1/2.5.2/2.5.3/2.6.0 print selects `--environment local`; resume instead inspects persisted metadata and every agent journal and refuses nonlocal or wrong-root records against the expected execution root (the isolated worktree for swarm-write); older sessions without environment records do not fail this check merely for lacking them.
|
|
302
302
|
|
|
303
303
|
## Running a newer Kimi than the plugin certifies
|
|
304
304
|
|
|
@@ -317,9 +317,12 @@ export KIMI_PLUGIN_CC_KIMI_BIN="$PIN/node_modules/.bin/kimi" # e.g. in ~/.zshe
|
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
Both binaries share `~/.kimi-code` (login, config, hook), so nothing else
|
|
320
|
-
changes. The certified maximum can be read from the installed
|
|
321
|
-
(`NATIVE_V2_CERTIFIED_VERSIONS` in `dist/kimi-engine.js`), which lets an
|
|
322
|
-
script bump the pin automatically after each
|
|
320
|
+
changes. The full-operation certified maximum can be read from the installed
|
|
321
|
+
plugin (`NATIVE_V2_CERTIFIED_VERSIONS` in `dist/kimi-engine.js`), which lets an
|
|
322
|
+
upgrade script bump the full-swarm pin automatically after each full-operation
|
|
323
|
+
certification. That export deliberately excludes narrowed releases such as
|
|
324
|
+
2.6.0; `NATIVE_V2_ANY_OPERATION_VERSIONS` is the separate scoped union, so an
|
|
325
|
+
automatic full-swarm pin does not silently become a non-swarm-only pin.
|
|
323
326
|
|
|
324
327
|
## The setup probe
|
|
325
328
|
|
package/docs/swarm-recovery.md
CHANGED
|
@@ -4,6 +4,8 @@ Normal stop: use `scripts/companion.sh cancel` for a shell-owned run, or the MCP
|
|
|
4
4
|
|
|
5
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 created by this runtime, status includes a durable `swarm_recovery` record. It contains the resolved home/workspace, companion identity, launch intent, verified process identities and session identity. It never contains the web authentication token, credentials, prompt or config contents. Session identity is committed before the request enabling swarm mode.
|
|
6
6
|
|
|
7
|
+
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
|
+
|
|
7
9
|
## Preview, then recover
|
|
8
10
|
|
|
9
11
|
Run from the original repository with its original plugin data root and Kimi home:
|
|
@@ -17,7 +19,7 @@ Preview does not signal processes, modify sessions, or capture patches. Apply:
|
|
|
17
19
|
|
|
18
20
|
1. Requires the original companion to be gone and acquires an identity-checked recovery claim. A second recovery cannot race the first; a dead recovery owner can be reclaimed by compare-and-swap.
|
|
19
21
|
2. Revalidates recorded processes and groups. It stops only verified individual identities, never a guessed PID or unproven group. An unknown surviving group member, changed group, incomplete probe or unrecorded launch refuses recovery.
|
|
20
|
-
3. If session cleanup is pending, requires the selected exact certified CLI and valid managed hook. It starts one bounded authenticated web lifecycle, disables the recorded session's swarm mode, verifies the version-appropriate state proof and exit journal, then verifies process quiescence. On 2.5.0/2.5.1/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.
|
|
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.
|
|
21
23
|
4. Captures a binary patch from a retained write worktree. It does not apply the patch or delete the tree. The result names both paths for inspection.
|
|
22
24
|
|
|
23
25
|
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.
|
|
@@ -69,3 +69,5 @@ Codex candidate review returned no findings. Claude found no blockers; its two m
|
|
|
69
69
|
Review corrections covered exact-version documentation, focused-test evidence, failed-matrix/check history, goal-session causality and chronology, matrix provenance, scope 07, migration/workflow version lists, operator-local wrapper wording, and smoke-only store recovery. Codex's closing review returned **APPROVE — no findings** (`closing-codex-review.md`). Claude's closing review returned **READY-TO-TAG — no blocker or major findings** (`closing-claude-review.md`); its two remaining chronology corrections, red-matrix ordering and focused-log wording in the release notes, are included. The DSH timestamp deliberately remains at the prior release's value until publication produces a real timestamp.
|
|
70
70
|
|
|
71
71
|
Real Windows `.cmd`/`npx` quoting/PID topology/taskkill and delayed-stream steering timing were not exercised on this macOS host. The manual Actions workflow does not export the uncertified-candidate selector; it accepts certified versions, while a candidate requires the local certification playbook's explicit seam. **Production pursue does not perform store recovery:** it persists the full-prompt digest, but only review, ask and rescue call the timeout-recovery path. `source=store_recovery` in the goal logs is harness-only evidence; a budget-aborted production pursue without a resume hint records no session ID. The fresh JobStore has no job rows, so its ID-exclusion path is not independently exercised; cwd/digest/time/uniqueness still bind recovery. Publication does not update installed hosts or operator pins.
|
|
72
|
+
|
|
73
|
+
**Limit discovered on 2026-11-13:** upstream `AgentRunBatch` does not apply `maxConcurrency` during rate-limit recovery. Deterministic controls on exact 2.6.0 reach two active attempts with cap 1 and five with cap 4 while retries remain unresolved; the same scheduling defect is present in this release's source. The plugin's previous hard-peak and write-serialization wording was therefore too broad. This disclosure does not rewrite the existing certification rows; new swarm-capable certification remains blocked until an exact released upstream correction passes the cap controls and candidate matrix. The later [2.6.0 narrowed non-swarm certification](upstream-2.6.0-certification.md) explicitly excludes both swarm modes and does not alter this 2.5.3 row.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Exact CLI 2.6.0 non-swarm certification — 2026-11-13
|
|
2
|
+
|
|
3
|
+
## Scope and decision
|
|
4
|
+
|
|
5
|
+
**Plugin 2.5.8 certifies exact CLI 2.6.0 for review, challenge, ask, rescue, review_gate and pursue only.** Read-only swarm and write swarm are not certified on 2.6.0 and refuse before model spawn. Exact 2.6.1 and prerelease/build-suffixed versions are not covered. Full eight-operation certification still ends at exact 2.5.3, with its inherited rate-limit limitation disclosed.
|
|
6
|
+
|
|
7
|
+
This is a deliberately narrowed production certification, not a waiver of the upstream scheduler defect and not a claim that the candidate swarm protocol integration is production-certified. Choose 2.6.0 explicitly for non-swarm use; automatic full-swarm pin behavior does not move to this release.
|
|
8
|
+
|
|
9
|
+
Exact source: `@moonshot-ai/kimi-code@2.6.0`, commit `740d6c0bdd777cd8ed0d91eb3d62766910401173`. The isolated npm binary reports 2.6.0; `dist/main.mjs` SHA-256 is `cb912b23358e7b3160e95dc29a82bf5ddd3847cd6f287b34c00c80d80284b620`.
|
|
10
|
+
|
|
11
|
+
## Enforced boundary
|
|
12
|
+
|
|
13
|
+
- `NATIVE_V2_NON_SWARM_VERSIONS` contains exact 2.6.0. `NATIVE_V2_ANY_OPERATION_VERSIONS` is the scoped union used by setup and engine selection; the per-operation map admits 2.6.0 only for the six operations above.
|
|
14
|
+
- `NATIVE_V2_CERTIFIED_VERSIONS` remains the all-operation export through 2.5.3. Existing consumers that intersect that export and select a full-swarm pin do not silently select non-swarm-only 2.6.0.
|
|
15
|
+
- Both swarm operations omit 2.6.0. Fresh planning returns `KIMI_CAPABILITY_NOT_CERTIFIED` with `refusal_kind: "v2-swarm-not-certified"` and `certification_scope: "non-swarm"`; the persisted-plan spawn boundary rejects the same operation/version pairs.
|
|
16
|
+
- A version certified for another operation selects native-v2 and then receives the scoped refusal. Excluded swarm operations never fall back to legacy-v1. Candidate-only operation admission still selects native-v2 for the candidate smoke without extending production certification.
|
|
17
|
+
- Setup reports the six-operation scope and the reason for swarm refusal. The same execution-plan gate covers Claude Code, Codex, DSH and MCP.
|
|
18
|
+
- Write-swarm may create and remove a temporary worktree during execution planning before returning the refusal; no model session is created. Its contract is refusal before model spawn, not an absence of temporary planning side effects. Tests assert the user tree, worktree directories and Git worktree administrative list are unchanged after cleanup.
|
|
19
|
+
|
|
20
|
+
## Candidate and source evidence
|
|
21
|
+
|
|
22
|
+
- Exact 2.6.0 source scan: **19 tests / 225 assertions**, exit 0 (`non-swarm-source-scan.log`). Exact 2.5.3 regression: **19 tests / 153 assertions**, exit 0 (`non-swarm-source-regression.log`). Both were rerun for this scoped certification with fresh retained logs. `non-swarm-source-provenance.json` binds each log to its exact version, source commit and log SHA-256.
|
|
23
|
+
- The full-scope candidate matrix passed **24 tests / 201 assertions / no skips in 343.76 seconds**. It exercised candidate swarm behavior but does not grant production swarm certification. It predates the canonical execution-cwd and recovery changes; later targeted and compiled controls cover those changes.
|
|
24
|
+
- All seven exact-binary controls passed, including ordinary Write denial, armed-plan bypass, removed EnterPlanMode rejection, environment refusals, swarm OFF/ON, and out-of-root child denials. Armed plan mode wrote a 1,294-byte plan file without a plan-Write hook, proving that the no-plan closures remain load-bearing.
|
|
25
|
+
- Live-root, mixed/multi-batch and nested-swarm controls passed. Strengthened cancellation and deterministic budget teardown used real disjoint Bash producers, verified owner identities, zero descendants and stable retained patches/files for nine seconds. Those are candidate integration controls, not production 2.6.0 swarm claims.
|
|
26
|
+
- The candidate protocol uses authenticated direct `subscribe` / `response` state proof. Canonical execution roots and recovery deactivation fixes are included. The narrowed production scope does not certify that activation or recovery path on 2.6.0.
|
|
27
|
+
|
|
28
|
+
## Production-table evidence
|
|
29
|
+
|
|
30
|
+
The retained production run is `daily-monitor/smoke/2026-11-13-2.6.0-production.log`, launched without `KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE` and using the exact binary and hash above:
|
|
31
|
+
|
|
32
|
+
- **23 passed / 3 intentional exclusions / 0 failures / 170 assertions in 241.67 seconds**, terminal exit 0.
|
|
33
|
+
- Review, challenge, ask and review_gate each produced a same-call managed Write denial. Real rescue landed only its confined write and persisted certified native-v2 operation/version/session/artifact evidence. The separate absolute `Bash.cwd` attempt was denied on the same call.
|
|
34
|
+
- Default-plan, unsafe-experimental and plan-tainted resume refusals passed. The multi-turn goal control recorded **3,002 durable started turns, 3,001 turns with same-call managed denials and 3,004 denial results**, with no target file. Both pursue terminal-status controls passed.
|
|
35
|
+
- Both real swarm command paths returned `v2-swarm-not-certified` before creating a model session. Write-swarm left no retained worktree and no user-tree change. The follow-up exact-binary refusal control additionally asserts the Git worktree administrative list is unchanged; its result is `non-swarm-refusal-controls.log`.
|
|
36
|
+
- The only skipped tests are read-only swarm confinement, write-swarm patch capture and write-swarm out-of-root confinement. They are explicitly outside this certification scope and are not represented as passing evidence. No other skip is accepted.
|
|
37
|
+
- The matrix's runtime/test diff is `non-swarm-production-runtime.diff`, SHA-256 `4531239acccb8b01c58b40a663958191a7da750a42ba5f475f01aaf1218f96a0`. Subsequent runtime deltas are the version string, restoration of candidate-only native-v2 selection, and the full-operation versus any-operation export split that preserves existing pin behavior. Production 2.6.0 scope is unchanged; current compiled controls verify it. Other deltas are documentation and test-only coverage, including the Git-admin assertion.
|
|
38
|
+
|
|
39
|
+
The retained focused suite (`non-swarm-focused.log`) passed **186 tests with 17 expected opt-in skips and 4,336 assertions**, exit 0. Compiler and build checks passed before the production run. `tests/runtime/cli-error-compiled.test.ts` additionally executes scoped acceptance/refusal, full-operation export compatibility and candidate selection under Node against root, Codex and DSH emitted JavaScript.
|
|
40
|
+
|
|
41
|
+
## Remaining limitation and follow-up
|
|
42
|
+
|
|
43
|
+
Upstream `AgentRunBatch` can exceed `maxConcurrency` during rate-limit recovery: two active attempts at cap 1 and five at cap 4. The defect is inherited from 2.5.3. Existing full-operation rows retain that disclosed limitation; this release does not claim it is fixed.
|
|
44
|
+
|
|
45
|
+
[Upstream issue #4926](https://github.com/MoonshotAI/kimi-code/issues/4926) tracks the correction. Local commit `52e21c7bf25d102efb0b8b7af28f575519b38d3b` passes 56 focused upstream swarm tests, typecheck, lint and package build, including cap-1/cap-4 and settle-and-continue controls. It is not an upstream release and is not certification evidence. Restoring swarm on a later exact release requires the released correction, fresh cap controls, candidate and production matrices, and independent review.
|
|
46
|
+
|
|
47
|
+
## Final release validation and publication
|
|
48
|
+
|
|
49
|
+
- Definitive isolated full gate (`non-swarm-release-final-check.log`): **1,472 passed / 36 expected skips / 0 failures / 19,530 assertions in 402.26 seconds**, terminal exit 0. Frozen dependency installation and the generated-surface/drift gates passed. `non-swarm-release-validation-root.txt` identifies the unsynced worktree and its exact staged diff SHA-256 `d1a1ffea3f4c23820b6f5bd4b13d60f5a62fbc2c917eca17a9f13605270b2fc6`, including this certification record. An earlier run failed only the host-scoping setup test's five-second timeout (`non-swarm-release-check.log`); the unchanged test passed in isolation in 3.62 seconds (`non-swarm-orphan-test-isolated.log`). Its I/O allowance alone was raised to 30 seconds with every assertion preserved before the passing rerun. Subsequent evidence-wording updates changed no runtime or test bytes.
|
|
50
|
+
- Final package validation (`non-swarm-release-final-package.log`): **333 files**, all three compiled distributions, isolated setup/check/version refusal, patched DSH host/profile with seven providers/tools and Web boot, terminal exit 0. `non-swarm-release-final-consumer.log` passed isolated npm consumer security with exit 0.
|
|
51
|
+
- Codex's final review returned **APPROVE with no blocker or major findings**, after verifying persisted-plan refusals, candidate selection, 2.6.1 refusal and intersection-based full-swarm pins staying at 2.5.3. Its publication-metadata note is handled by recording the actual DSH publication timestamp at publication, as in the preceding release.
|
|
52
|
+
- Claude's final review returned **APPROVE — no blockers, no majors**. Its remaining schema-scope contradiction, environment/plan lists, translated remedy text and new-swarm-certification wording were corrected, and the schema comment's compiled mirrors were regenerated. Initial findings also drove the candidate fix, complete staged snapshot, export compatibility split, evidence corrections and Git-admin assertion. Subsequent CI/publication receipts are recorded below before completion. Publication does not update installed hosts or operator CLI pins.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kimi-plugin-cc",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
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",
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
"docs/upstream-2.5.1-certification.md",
|
|
139
139
|
"docs/upstream-2.5.2-certification.md",
|
|
140
140
|
"docs/upstream-2.5.3-certification.md",
|
|
141
|
+
"docs/upstream-2.6.0-certification.md",
|
|
141
142
|
"README.md",
|
|
142
143
|
"LICENSE",
|
|
143
144
|
"CHANGELOG.md",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kimi",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8",
|
|
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"
|
|
@@ -115,8 +115,8 @@ export async function runCliPrompt(opts) {
|
|
|
115
115
|
const records = [];
|
|
116
116
|
const malformed = [];
|
|
117
117
|
// Rolling stderr tail — keep only the trailing STDERR_TAIL_BYTES so a
|
|
118
|
-
// long-running kimi process emitting megabytes of stderr (tool.
|
|
119
|
-
// thinking deltas) doesn't grow our RSS unboundedly.
|
|
118
|
+
// long-running kimi process emitting megabytes of stderr (tool.updated
|
|
119
|
+
// output/status, thinking deltas) doesn't grow our RSS unboundedly.
|
|
120
120
|
let stderrTail = "";
|
|
121
121
|
let announcedSessionId;
|
|
122
122
|
let announcedGoalSummary;
|
|
@@ -786,7 +786,7 @@ function buildArgs(opts) {
|
|
|
786
786
|
? opts.env.KIMI_PLUGIN_CC_SMOKE_V2_CANDIDATE
|
|
787
787
|
: undefined;
|
|
788
788
|
if (opts.resumeSessionId === undefined &&
|
|
789
|
-
["2.5.0", "2.5.1", "2.5.2", "2.5.3"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
|
|
789
|
+
["2.5.0", "2.5.1", "2.5.2", "2.5.3", "2.6.0"].includes(opts.executionPlan.kimiVersion ?? smokeCandidate ?? "")) {
|
|
790
790
|
args.push("--environment", "local");
|
|
791
791
|
}
|
|
792
792
|
if (opts.resumeSessionId !== undefined) {
|
|
@@ -103,7 +103,8 @@ export async function runRecoverSwarm(argv, context) {
|
|
|
103
103
|
if (current.command !== plan.command || current.kimiVersion !== plan.kimiVersion || JSON.stringify(current.prefixArgs) !== JSON.stringify(plan.prefixArgs))
|
|
104
104
|
throw recoveryError("The exact recorded CLI is not selected. Restore that certified binary before session cleanup.");
|
|
105
105
|
signal.throwIfAborted();
|
|
106
|
-
await
|
|
106
|
+
const recoveryExecutionCwd = await realpath(record.cwd);
|
|
107
|
+
await deactivateSwarmSession({ cwd: recoveryExecutionCwd, env: context.env, command: current.command,
|
|
107
108
|
prefixArgs: current.prefixArgs, executionPlan: current, commandLabel: expectedRoot ? "swarm-write" : "swarm",
|
|
108
109
|
trustedWorkspaceRoot: expectedRoot ?? undefined, ...record.session, signal,
|
|
109
110
|
onRecoveryEvent: (event) => recordRecoveryEvent(store, record, event) });
|
|
@@ -28,7 +28,7 @@ import { normalizeTopLevelInlineHooks, validateKimiHookSetForEnvironment, withKi
|
|
|
28
28
|
import { buildHookShellCommand, hostIdFromHookCommand, resolveHookScriptPath, resolveHostId, resolveNodeBinary, } from "../hooks/install-paths.js";
|
|
29
29
|
import { decodeManagedCommandLine, effectiveHost, evaluateInstalled, findUnmanagedApprovalHookBlocks, markerCommentLines, MARKERS, ORPHAN_MARKER_REMEDY, parseManagedBlock, } from "../hooks/managed-block.js";
|
|
30
30
|
import { formatVersionOutOfRangeWarning, probeKimiVersion, } from "../kimi-version-probe.js";
|
|
31
|
-
import { isNativeV2CertifiedVersion,
|
|
31
|
+
import { isNativeV2CertifiedVersion, NATIVE_V2_ANY_OPERATION_VERSIONS, NATIVE_V2_NON_SWARM_VERSIONS, } from "../kimi-engine.js";
|
|
32
32
|
import { resolveKimiHome } from "../kimi-home.js";
|
|
33
33
|
import { ensurePluginPaths, resolvePluginPaths } from "../paths.js";
|
|
34
34
|
import { KIMI_PLUGIN_CC_VERSION } from "../version.js";
|
|
@@ -973,13 +973,13 @@ async function collectKimiVersionWarnings(env, warnings) {
|
|
|
973
973
|
// clearer message. Avoid double-noise.
|
|
974
974
|
return;
|
|
975
975
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
// KIMI_TESTED_MINORS — that table never gains 0.42). Without this, setup on a
|
|
979
|
-
// v2-certified binary would wrongly warn "not certified, commands will refuse".
|
|
980
|
-
if (probe.inTestedRange || isNativeV2CertifiedVersion(probe.version))
|
|
976
|
+
if (!probe.inTestedRange && !isNativeV2CertifiedVersion(probe.version)) {
|
|
977
|
+
warnings.push(formatVersionOutOfRangeWarning(probe, KIMI_PLUGIN_CC_VERSION, NATIVE_V2_ANY_OPERATION_VERSIONS));
|
|
981
978
|
return;
|
|
982
|
-
|
|
979
|
+
}
|
|
980
|
+
if (NATIVE_V2_NON_SWARM_VERSIONS.includes(probe.version)) {
|
|
981
|
+
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 because upstream rate-limit recovery can exceed maxConcurrency.`);
|
|
982
|
+
}
|
|
983
983
|
}
|
|
984
984
|
/**
|
|
985
985
|
* Non-blocking notice for kimi-code's own enabled plugins from
|