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
@@ -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) {
package/dist/version.js CHANGED
@@ -4,4 +4,4 @@
4
4
  // and AGENTS.md on every release. A future improvement would read this from
5
5
  // package.json at build time, but that adds a build-step dependency we
6
6
  // don't want yet.
7
- export const KIMI_PLUGIN_CC_VERSION = "2.6.3";
7
+ export const KIMI_PLUGIN_CC_VERSION = "2.7.3";
package/docs/migration.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Compatibility and upgrades
2
2
 
3
- The runtime certifies exact CLI releases per operation. Plugin 2.6.2 adds bounded swarm on exact stock CLI 2.6.2; see the [certification receipt](upstream-2.6.2-certification.md) for validation status. Plugin 2.6.3 additionally certifies exact CLI 2.6.3 with a separate [release-candidate receipt](upstream-2.6.3-certification.md); release CI and publication remain pending. Exact 2.6.0 remains non-swarm-only. Older full-operation rows through 2.5.3 keep their inherited recovery limitation. `NATIVE_V2_CERTIFIED_VERSIONS` is the all-operation export, and `NATIVE_V2_ANY_OPERATION_VERSIONS` is the scoped union. Other versions, including 2.6.1 and 2.6.4, are not accepted automatically. The npm channel does not change the compatibility matrix.
3
+ The runtime certifies exact CLI releases per operation. Plugin 2.6.2 adds bounded swarm on exact stock CLI 2.6.2; see the [certification receipt](upstream-2.6.2-certification.md) for validation status. Plugin 2.6.3 additionally certifies exact CLI 2.6.3 with a separate [release receipt](upstream-2.6.3-certification.md); the immutable GitHub/npm release and fresh registry verification are complete. Plugin 2.7.2 certifies exact CLI 2.7.2 with separate [certification evidence](upstream-2.7.2-certification.md). Plugin 2.7.3 adds exact CLI 2.7.3 under the same construction with a separate [certification record](upstream-2.7.3-certification.md); publication does not change the compatibility matrix. Exact 2.6.0 remains non-swarm-only. Older full-operation rows through 2.5.3 keep their inherited recovery limitation. `NATIVE_V2_CERTIFIED_VERSIONS` is the all-operation export, and `NATIVE_V2_ANY_OPERATION_VERSIONS` is the scoped union. Other versions, including 2.6.1, 2.6.4, 2.7.0, 2.7.1 and 2.7.4, are not accepted automatically. The npm channel does not change the compatibility matrix.
4
4
 
5
5
  Plugin 2.5.1 also adds DeepSeek Harness as a third host with all seven operations and a DSH-specific bundle, data root, and managed hook id. Existing Claude Code and Codex certification, job stores, and host-scoped hooks are unchanged; no migration is required for those hosts. New DSH installations follow the [README DSH section](../README.md#install-in-deepseek-harness), including `/kimi-setup` on that host.
6
6
 
@@ -22,11 +22,11 @@ Parallel Bash commands use the native 60-second default foreground timeout, with
22
22
 
23
23
  ## Native parallel swarm activation
24
24
 
25
- Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. On exact 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2/2.5.3, plus the exact-2.6.2 parallel path, swarm commands and MCP calls use the same `runSwarm` lifecycle. The 2.6.2 single-worker path skips it:
25
+ Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. On exact 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2/2.5.3, plus the exact-2.6.2/2.6.3/2.7.2/2.7.3 parallel paths, swarm commands and MCP calls use the same `runSwarm` lifecycle. The direct single-worker path skips it:
26
26
 
27
- 1. A short-lived `web --no-open --host 127.0.0.1 --port 0 --log-level error` process uses authenticated loopback routes to verify the exact v2 server, choose the explicit or configured default model, create a session, bind the model and auto permission, enable and verify `swarm_mode`, and shut down. On exact 2.5.0/2.5.1/2.5.2/2.5.3, creation explicitly selects the local environment and an authenticated `/environment` read proves its cwd before profile mutation; state verification uses protocol-v2 WebSocket main-agent frames because `/status` was removed. Exact 2.6.2 uses authenticated direct-subscription state proof and verifies the same local binding. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
27
+ 1. A short-lived `web --no-open --host 127.0.0.1 --port 0 --log-level error` process uses authenticated loopback routes to verify the exact v2 server, choose the explicit or configured default model, create a session, bind the model and auto permission, enable and verify `swarm_mode`, and shut down. Exact 2.7.2/2.7.3 instead uses `web --json` with an in-memory ephemeral token, a validated loopback origin and `/api/v1/ws`, and KAP 1.0.0/WebSocket meta proof without a legacy backend field. On exact 2.5.0/2.5.1/2.5.2/2.5.3 and the bounded 2.6.2/2.6.3/2.7.2/2.7.3 paths, creation explicitly selects the local environment and an authenticated `/environment` read proves its cwd before profile mutation; state verification uses protocol-v2 or direct-subscription WebSocket main-agent frames because `/status` was removed. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0` to disable ambient idle-session reclamation.
28
28
  2. One ordinary `kimi -p -r` prompt runner resumes that session. Its recorded session-id source is `preactivated`, and the returned print session must match it.
29
- 3. A second short-lived web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2/2.5.3/2.6.2, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
29
+ 3. A second short-lived web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2/2.5.3/2.6.2/2.6.3/2.7.2/2.7.3, disables swarm mode, verifies the version-appropriate state proof and the `swarm_mode.exit` journal record, and shuts down.
30
30
 
31
31
  Activation is inside the job's finite budget. Graceful process close has a bounded 15-second allowance. `runSwarm` solely owns deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary. The ready token stays in memory and out of logs, and success cannot complete if cleanup fails. Post-mutation identity or process/group uncertainty preserves diagnostics and, for write-swarm, the recovery worktree. Process groups are rechecked after teardown; unknown survivors are unverified and unproven groups are not signalled. Older certified versions still launch swarm directly with `kimi -p`. This narrow lifecycle is not a full RPC transport or a model-driven activation workaround; the managed hook and workspace boundaries still govern every tool call.
32
32
 
@@ -8,7 +8,11 @@ no separate CLI.
8
8
 
9
9
  ## Publishing status
10
10
 
11
- Plugin **2.6.3** certifies exact Kimi Code **2.6.3** for all eight operations under the no-plan and bounded-swarm/direct-worker construction. Exact source and binary controls, 23 deterministic stock-binary tests / 138 assertions, candidate and production live matrices each with 30 passes / 390 assertions, the 1,797-test full repository gate / 23,469 assertions, 341-file package/DSH checks and isolated consumer security pass. Runtime review returned NO FINDINGS and all five documentation findings were corrected and re-reviewed. See the [2.6.3 certification record](./upstream-2.6.3-certification.md). Release CI, immutable tagging, GitHub release, npm OIDC publication and registry verification are pending; no installed-host update is implied.
11
+ Plugin **2.7.3** has complete operation evidence for exact Kimi Code **2.7.3** with separate [certification evidence](upstream-2.7.3-certification.md). Source, exact-binary, deterministic, candidate and production operation gates pass, as do the **343-file** package/DSH and isolated consumer-security checks. The local full repository gate passes with 1,878 tests passed and 83 skipped. Release-commit CI, GitHub publication, npm OIDC and registry verification have not run. Certification and publication do not update installed hosts or operator pins.
12
+
13
+ Plugin **2.7.2** certifies exact Kimi Code **2.7.2** for all eight operations with separate [certification evidence](upstream-2.7.2-certification.md). Release commit `e2bba0e2d4e1745e4155eb5c6ddf3f4dabaffb66` passed the frozen-install full gate (**1,848 passes / 24,260 assertions**), **342-file** package/DSH and consumer-security gates, plus [release CI 44799772434](https://github.com/linxule/kimi-plugin-cc/actions/runs/44799772434). The immutable [v2.7.2 release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.7.2) is published. Initial OIDC run `44801159950` passed build but npm rejected publication with `TLOG_CREATE_ENTRY_ERROR`; it published nothing. The documented manual-dispatch recovery [run 44803040496](https://github.com/linxule/kimi-plugin-cc/actions/runs/44803040496) validated the same tag and published npm `latest` 2.7.2 at `2026-11-20T19:44:23.172Z`. The 342-file registry tarball matches the successful Actions artifact and every release-tag file, with SHA-1 `c78a89fa5ea199c6605c7453ca50b2c23ee3cb3f`, SHA-256 `0a0bcba76513adac3448776d4f8df9ec73b60987edac0ca5e6535db428b91f33` and SHA-512 `2e7dfe8043c2c05447a28dbfc17c6124c6b08444efb864c5b5f5f3f586f338ff4b77d35e3b769168b570a32c08bec48e8f78aa6e11b958e9f22257cda29616f1`. 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 manual dispatch, while the package bytes independently match the immutable tag. A fresh registry installation has zero production advisories and no invalid or missing signatures; isolated Claude Code, Codex and DSH setup/checks and all three capability maps pass. The post-publication Discover timestamp is `1795203863`, recording actual npm publication. Publication does not update installed hosts or operator pins.
14
+
15
+ Plugin **2.6.3** certifies exact Kimi Code **2.6.3** for all eight operations under the no-plan and bounded-swarm/direct-worker construction. Release commit `597210fe888e045c15577dbfc112188075bf1ac5` passed the exact-commit full gate (1,797 passes / 23,469 assertions), 30-test production matrix, 341-file package/DSH and consumer-security gates. [Release CI 44406363750](https://github.com/linxule/kimi-plugin-cc/actions/runs/44406363750) passed, and the immutable [v2.6.3 release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.6.3) is published. [OIDC run 44407749059](https://github.com/linxule/kimi-plugin-cc/actions/runs/44407749059) published npm `latest` 2.6.3 at `2026-11-18T22:14:06.914Z`. The 341-file registry tarball matches the Actions artifact and every release-tag file, with SHA-1 `63047ceab5c0b84da362788609e6f644b56a3414`, SHA-256 `a64386f3cebf0f77d40f8d767f5533652f2fa91ba647b816876d8935bb2b1721` and SHA-512 `37f68e1e0f53fe658a9801418d748067eb84849be76e53988231e2b81efdac18cc4a9eea0496677e9f6af584a1e5709ca6aeba7a1198135d1b12910245017e90`. SLSA provenance log index `3979478928` and publish attestation log index `3979539697` match the package subject, tag, commit, run and tarball. A fresh registry installation has zero production advisories and no invalid or missing signatures; isolated Claude Code, Codex and DSH setup/checks and all three capability maps pass. The Discover timestamp is `1795040046`, recording actual npm publication. See the [2.6.3 certification record](./upstream-2.6.3-certification.md). Publication does not update installed hosts or operator pins.
12
16
 
13
17
  Plugin **2.6.2** certifies unmodified exact Kimi Code **2.6.2** for all eight operations. Parallel swarm uses bounded waves and a native timeout override; concurrency one uses a direct worker. Final runtime commit `b69a416d8588ed12239148ccc9f120e3dbfe0dcb` passed 1,767 repository tests with 23,008 assertions, 30 live production tests with 386 assertions, all 23 stock-runtime swarm controls, and 130 Linux controls with kernel threads visible. The 340-file package, all three compiled distributions, DSH host installation and isolated consumer security passed. Independent Codex and Fable reviews closed all findings. The first CI run exposed a Linux identity mismatch; its correction passed CI, and the final runtime also handles unrelated nonsignalable ancestry and reports uncertain cancellation cleanup. See the [certification record](./upstream-2.6.2-certification.md) for boundaries and evidence. [Release v2.6.2](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.6.2) is anchored at `0f78ade6840dc7eab27da0790c5163082b103e6d`. [Final CI](https://github.com/linxule/kimi-plugin-cc/actions/runs/43610889478) and [OIDC publication](https://github.com/linxule/kimi-plugin-cc/actions/runs/43611675167) passed. The 340-file registry tarball has SHA-1 `6eecaf4803b8ebbed5f114c3b17e7f2b4f017fca` and SHA-256 `be9362451456278812c9678c208fde56357c47e147a39103ee11a610e9655f3d`, matches the validated workflow artifact byte-for-byte, and carries signed SLSA provenance (log index `3881457879`) and publish attestation (log index `3881517151`). A fresh registry npm installation matches all 340 release-tag files, has zero production advisories and no invalid or missing signatures, and passes isolated Claude Code, Codex and DSH setup/checks with the stock binary. All three installed distributions enforce exact 2.6.2 full-operation and 2.6.0 non-swarm-only certification. The Discover timestamp records npm publication at `2026-11-14T15:54:45.985Z`. Publication does not update installed hosts or operator pins.
14
18
 
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 uses the no-plan construction on exact reviewed versions. The [runtime certification table](../runtime/kimi-engine.ts) controls routing and operation scope. Exact 2.6.0 remains limited to review, challenge, ask, rescue, review gate and pursue. Plugin 2.6.2 adds the bounded swarm construction described below for exact stock CLI 2.6.2; its [certification receipt](upstream-2.6.2-certification.md) records validation status. Plugin 2.6.3 certifies exact CLI 2.6.3 under the same construction with a separate [release-candidate receipt](upstream-2.6.3-certification.md); release CI and publication remain pending. Older full-operation rows through 2.5.3 retain their known rate-limit-recovery limitation. The hook is not an operating-system sandbox.
5
+ Native agent-core-v2 uses the no-plan construction on exact reviewed versions. The [runtime certification table](../runtime/kimi-engine.ts) controls routing and operation scope. Exact 2.6.0 remains limited to review, challenge, ask, rescue, review gate and pursue. Plugin 2.6.2 adds the bounded swarm construction described below for exact stock CLI 2.6.2; its [certification receipt](upstream-2.6.2-certification.md) records validation status. Plugin 2.6.3 certifies exact CLI 2.6.3 under the same construction with a separate [release receipt](upstream-2.6.3-certification.md); the immutable GitHub/npm release and fresh registry verification are complete. Plugin 2.7.2 certifies exact CLI 2.7.2 with separate [certification evidence](upstream-2.7.2-certification.md). Plugin 2.7.3 adds exact CLI 2.7.3 under the same construction with a separate [certification record](upstream-2.7.3-certification.md); publication does not update installed hosts or operator pins. Older full-operation rows through 2.5.3 retain their known rate-limit-recovery limitation. The hook is not an operating-system sandbox.
6
6
 
7
7
  ## Why the safety story is hook-based
8
8
 
@@ -220,30 +220,30 @@ If another installed host still points to an older hook, that hook may veto thes
220
220
  - **Resume is intentionally not exposed yet.** In goal mode `goal.summary` emits a *goalId* distinct from the resume-hint *sessionId*; `kimi -r <sessionId>` re-enters the session but not necessarily the goal continuation. The plugin captures and surfaces the goalId but does not offer `--resume` for pursue until that split is reconciled upstream — exposing it now would be a silent-failure trap. **Re-verified against kimi-code 0.26.0 (2026-07-16):** the headless CLI still has no argv, prompt syntax, or session-resume path that calls `resumeGoal()`. `parseHeadlessGoalCreate` (`apps/kimi-code/src/cli/goal-prompt.ts`) accepts only the `/goal <objective>` *create* shape on both the v1 and experimental-v2 drivers, and upstream's own docs (`docs/en/guides/goals.md`, § "Use goal mode carefully") state that in non-interactive prompt mode *only goal creation is supported* — goal management is a TUI/kimi-web control. PR #552 makes a plain `-r <sessionId>` correctly *restore* the paused goal snapshot, but nothing in the headless path *acts* on it; the real `resumeGoal()` is wired only to the TUI (`/goal resume`) and kimi-web RPC (PR #1693, web-only). Implementing `--resume` would therefore require either prompt-injected model compliance (rejected — the plugin bounds autonomy with hard limits, not model goodwill) or abandoning the subprocess model for kimi-web's RPC. Re-check if upstream ever ships a headless `goal resume` verb.
221
221
  - **A model-invocable `kimi-pursue` agent (v1.3) wraps this command.** The main thread can dispatch autonomous goal mode, not just the human-typed `/kimi:pursue` — the same command↔agent mirror as rescue/review/swarm. Auto-dispatch does NOT widen the blast radius: pursue runs under `commandLabel: "rescue"`, so the managed PreToolUse hook + workspace allowlist gate every tool call on every continuation turn (no git mutation), and the mandatory `--budget` wall-clock ceiling bounds the autonomy regardless of who launched it. Because it is write-capable AND autonomous — the plugin's highest blast radius — the agent's description requires an explicit user request for hands-off multi-turn pursuit, steers single bounded tasks to `kimi-rescue`, and never auto-promotes a fix or a question into a goal loop. Like the command, it refuses without the hook and offers no `--resume`.
222
222
 
223
- ## Swarm activation on CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.2 and 2.6.3
223
+ ## Swarm activation on CLI 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 and 2.7.3
224
224
 
225
225
  For interrupted runs, see [durable recovery and its explicit limits](swarm-recovery.md).
226
226
 
227
227
  Upstream 2.3.2 removes model self-activation of `AgentSwarm` in fresh print sessions. A rejected call can therefore coexist with zero child journals and a successful exit; a tool-call record, aggregate denial, or coordinator-produced patch does not prove fan-out. The plugin does not use prompt workarounds or replace its print transport with general RPC.
228
228
 
229
- For parallel paths requiring activation (exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2, 2.5.3 and 2.6.2/2.6.3), both slash-command and MCP swarm operations use the same `runSwarm` implementation and one ordinary `kimi -p -r` prompt runner per job, bracketed by short-lived host-managed web lifecycles:
229
+ For parallel paths requiring activation (exact 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2, 2.5.3 and 2.6.2/2.6.3/2.7.2/2.7.3), both slash-command and MCP swarm operations use the same `runSwarm` implementation and one ordinary `kimi -p -r` prompt runner per job, bracketed by short-lived host-managed web lifecycles:
230
230
 
231
- 1. The exact planned CLI starts `web --no-open --host 127.0.0.1 --port 0 --log-level error`. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0`, so ambient idle-session reclamation cannot disrupt the plugin-owned lifecycle. The plugin accepts only the expected loopback ready URL, uses a supplied token for authenticated REST requests, and keeps that token in memory, never writing it to logs. `/api/v1/meta` must confirm backend v2, the exact planned version, and no dangerous authentication bypass. The plugin uses the explicit model or environment-model alias, otherwise reading the default alias from `/api/v1/config`; creates a session in the job cwd; on exact 2.5.0/2.5.1/2.5.2/2.5.3 explicitly binds `environment_id:"local"` and the job cwd, then verifies that binding through authenticated `/environment` before either profile mutation; binds the selected model with `permission_mode:auto` and `swarm_mode:true`; verifies those settings and `plan_mode:false` through `/status` on earlier versions or protocol-v2 authenticated WebSocket main-agent state on 2.5.0/2.5.1/2.5.2/2.5.3, closing that channel before validating the latest frame; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record. Exact 2.6.2/2.6.3 instead uses authenticated direct-subscription state proof with exact request/session identity and the same local environment checks.
231
+ 1. Earlier paths start `web --no-open --host 127.0.0.1 --port 0 --log-level error` and require the expected loopback ready URL with backend v2, exact planned version, and no auth bypass in `/api/v1/meta`. Exact 2.7.2/2.7.3 instead starts `web --json` with an in-memory ephemeral token, validates the loopback origin and `/api/v1/ws`, and requires KAP 1.0.0 plus WebSocket capability without a legacy backend field. The child environment sets `KIMI_CODE_SESSION_IDLE_RECLAIM_MS=0`, so ambient idle-session reclamation cannot disrupt the plugin-owned lifecycle. Tokens stay in memory and out of logs. The plugin uses the explicit model or environment-model alias, otherwise reading the default alias from `/api/v1/config`; creates a session in the job cwd; on exact 2.5.0/2.5.1/2.5.2/2.5.3 and the bounded 2.6.2/2.6.3/2.7.2/2.7.3 paths explicitly binds `environment_id:"local"` and the job cwd, then verifies that binding through authenticated `/environment` before either profile mutation; binds the selected model with `permission_mode:auto` and `swarm_mode:true`; verifies those settings and `plan_mode:false` through `/status` on earlier versions, protocol-v2 authenticated WebSocket state on 2.5.0/2.5.1/2.5.2/2.5.3, or direct-subscription state on 2.6.2/2.6.3/2.7.2/2.7.3; closes that channel before validating the latest frame; verifies clean shutdown; and requires the main journal's manual `swarm_mode.enter` record.
232
232
  2. The ordinary stream-json print runner resumes that session with `kimi -p -r`. The job records `kimi_session_id_source:"preactivated"`, and the session returned by print must exactly match the preactivated id. Every coordinator and child tool call remains governed by the same managed PreToolUse hook and operation allowlist.
233
- 3. After the print run, a second web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2/2.5.3/2.6.0/2.6.2/2.6.3, sets `swarm_mode:false`, verifies the version-appropriate state proof, shuts down cleanly, and requires `swarm_mode.exit` in the main journal. Activation consumes part of the same finite job budget rather than extending it. `runSwarm` solely owns session deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary, with exit codes and cleanup diagnostics preserved. Cancellation aborts the owned lifecycle and never starts a fresh cleanup server. Every post-mutation failure retains the session identity; process/group uncertainty is marked without inventing an ID; process groups are rechecked after teardown, unknown survivors are unverified, unproven groups are never signalled, and a same-PID/start-token process that changes PGID remains active but is not a validated signal target. Root loss requires a previously observed matching identity; first-missing roots and actual probe errors/timeouts remain unverified. Reparenting and PGID moves preserve the current verified child identity for revalidation rather than treating it as exited. Unverified cleanup prevents success and preserves raw output, structured diagnostics, and the write worktree for recovery.
233
+ 3. After the print run, a second web lifecycle rechecks the local binding on 2.5.0/2.5.1/2.5.2/2.5.3/2.6.0/2.6.2/2.6.3/2.7.2/2.7.3, sets `swarm_mode:false`, verifies the version-appropriate state proof, shuts down cleanly, and requires `swarm_mode.exit` in the main journal. Activation consumes part of the same finite job budget rather than extending it. `runSwarm` solely owns session deactivation: normal cleanup uses the remaining budget, while failure recovery has a separate two-second cancellation-aware bound and is never retried. Print/session failures stay primary, with exit codes and cleanup diagnostics preserved. Cancellation aborts the owned lifecycle and never starts a fresh cleanup server. Every post-mutation failure retains the session identity; process/group uncertainty is marked without inventing an ID; process groups are rechecked after teardown, unknown survivors are unverified, unproven groups are never signalled, and a same-PID/start-token process that changes PGID remains active but is not a validated signal target. Root loss requires a previously observed matching identity; first-missing roots and actual probe errors/timeouts remain unverified. Reparenting and PGID moves preserve the current verified child identity for revalidation rather than treating it as exited. Unverified cleanup prevents success and preserves raw output, structured diagnostics, and the write worktree for recovery.
234
234
 
235
235
  Older certified versions keep the direct `kimi -p` path. The web processes are narrow, planned lifecycle helpers, not a second model runner and not a general RPC transport.
236
236
 
237
- ## Bounded swarm on exact CLI 2.6.2/2.6.3
237
+ ## Bounded swarm on exact CLI 2.6.2/2.6.3/2.7.2/2.7.3
238
238
 
239
- `--max-concurrency` defaults to 4 for read-only work and 1 for write work. On exact native-v2 2.6.2/2.6.3, the runtime chooses one of two paths:
239
+ `--max-concurrency` defaults to 4 for read-only work and 1 for write work. On exact native-v2 2.6.2/2.6.3/2.7.2/2.7.3, the runtime chooses one of two paths:
240
240
 
241
241
  - **Two or more:** the canonical hook admits only waves whose fresh items plus resumed entries fit the requested concurrency. Forks, malformed requests and fresh singleton waves are denied. Group odd numbers of targets into at least two disjoint entries per fresh wave, or resume an existing child for the remaining work. The hard bound covers simultaneous Kimi child-agent turns, excluding their coordinator. Fresh children cannot activate another swarm; resumes stay within the new job's own session.
242
242
  - **One:** a single worker runs directly in fresh print, without activating native swarm or launching children. Both delegation tools are denied. It keeps the same read-only restrictions or confined worktree writes and patch output.
243
243
 
244
244
  The plugin forces `KIMI_CODE_SWARM_TIMEOUT_MS=2147483647` on bounded spawns, overriding saved or ambient short child timeouts. This value exceeds the plugin's maximum 24-hour job budget. A short native swarm-child timeout is unsafe here: it can return a wave result before a retry stops. A slow or stuck child therefore holds its wave until it completes or the finite whole-job budget or explicit cancellation stops the run. Environment value `0` is ignored upstream and is not used as a timeout override.
245
245
 
246
- For the parallel path, the plugin disables `TaskStop` in its fresh owned native session after the activation web process has shut down and before print starts. The managed hook already denies that tool; disabling it in native policy also removes the complete `TaskList`/`TaskOutput`/`TaskStop` set that stock 2.6.2/2.6.3 requires for Bash backgrounding. This closes both explicit backgrounding and automatic detachment after a foreground timeout, whose completion could otherwise wake a finished child. The hook separately denies explicit `Bash.run_in_background:true` on both bounded paths. The escape monitor receives the same trusted wave policy as the hook; a native mode-off rejection on the direct-worker path can still be a harmless mismatch diagnostic, not proof of execution.
246
+ For the parallel path, the plugin disables `TaskStop` in its fresh owned native session after the activation web process has shut down and before print starts. The managed hook already denies that tool; disabling it in native policy also removes the complete `TaskList`/`TaskOutput`/`TaskStop` set that stock 2.6.2/2.6.3/2.7.2/2.7.3 requires for Bash backgrounding. This closes both explicit backgrounding and automatic detachment after a foreground timeout, whose completion could otherwise wake a finished child. The hook separately denies explicit `Bash.run_in_background:true` on both bounded paths. The escape monitor receives the same trusted wave policy as the hook; a native mode-off rejection on the direct-worker path can still be a harmless mismatch diagnostic, not proof of execution.
247
247
 
248
248
  With parallel backgrounding disabled, native Bash uses a 60-second default foreground timeout and a 300-second maximum; commands that exceed their timeout are killed rather than detached. Use `--max-concurrency 1` for longer tests. That direct-worker path still permits native automatic timeout-to-background behavior, although explicit background requests are denied. Its root-agent turns remain sequential, and whole-job settlement still gates the result; the limit of one is an agent-turn bound, not a promise of one OS process.
249
249
 
@@ -255,17 +255,17 @@ Process-tree settlement applies on POSIX; Windows retains direct-child-only clea
255
255
 
256
256
  `--cap` stays a soft lifetime-total hint, separate from concurrency. Sequential waves can process more targets than the concurrency limit. The finite budget bounds duration, not dollars or total tokens. This construction does not change the existing trust boundary for test runners or other allowed commands that execute repository code.
257
257
 
258
- The construction is exact-version-specific. Older certified versions retain normal-launch limits and the inherited recovery overrun; exact 2.6.0 remains non-swarm-only. The upstream 2.6.2 and 2.6.3 binaries are unmodified. Validation state and evidence are recorded in the [2.6.2 certification record](upstream-2.6.2-certification.md) and [2.6.3 checkout record](upstream-2.6.3-certification.md).
258
+ The construction is exact-version-specific. Older certified versions retain normal-launch limits and the inherited recovery overrun; exact 2.6.0 remains non-swarm-only. The upstream 2.6.2, 2.6.3, 2.7.2 and 2.7.3 binaries are unmodified. Validation state and evidence are recorded in the [2.6.2 certification record](upstream-2.6.2-certification.md), [2.6.3 checkout record](upstream-2.6.3-certification.md), [2.7.2 checkout record](upstream-2.7.2-certification.md) and [2.7.3 checkout record](upstream-2.7.3-certification.md).
259
259
 
260
260
  ## Read-only swarm (`/kimi:swarm`)
261
261
 
262
262
  `/kimi:swarm` (v1.2) fans a **read-only** review out across subagents using kimi-code's `AgentSwarm` tool (kimi-code 0.12.0+). The coordinator launches one subagent per target (file/module/question); each inspects the workspace with read tools and reports findings, which the coordinator consolidates into one markdown report. It opens **zero new write surface**.
263
263
 
264
- - **The hook label is `swarm`, and it allows the read-only tool set PLUS `AgentSwarm`.** On parallel paths the coordinator may call an admitted `AgentSwarm`, but no write/edit/shell tool is allowed; the exact-2.6.2/2.6.3 direct-worker path denies delegation too. The exact allowed tool name is `AgentSwarm` (verified at 0.42.0 against `packages/agent-core-v2/src/features/swarm/tools/agent-swarm/agentSwarmTool.ts`: `'AgentSwarm'`, strict schema). The singular `Agent` tool is deliberately *not* allowed — swarm is the fan-out surface, not arbitrary delegation.
264
+ - **The hook label is `swarm`, and it allows the read-only tool set PLUS `AgentSwarm`.** On parallel paths the coordinator may call an admitted `AgentSwarm`, but no write/edit/shell tool is allowed; the exact-2.6.2/2.6.3/2.7.2/2.7.3 direct-worker path denies delegation too. The exact allowed tool name is `AgentSwarm` (verified at 0.42.0 against `packages/agent-core-v2/src/features/swarm/tools/agent-swarm/agentSwarmTool.ts`: `'AgentSwarm'`, strict schema). The singular `Agent` tool is deliberately *not* allowed — swarm is the fan-out surface, not arbitrary delegation.
265
265
  - **Every subagent inherits the `swarm` label and fires the same hook.** On native v2 (0.42.0) `AgentSwarm` children run in-process in a child DI scope with their OWN eager external-hooks service, so every child tool call passes the same before-execute channel and the same managed hook — there is no sub-vs-main branch and no deny-all shortcut on the swarm route. So a subagent's `Write`/`Edit`/`Bash` is denied exactly like a single-turn review's. The swarm listener in that channel is non-terminal and nothing auto-approves `AgentSwarm` ahead of the hook. (Legacy-v1 ≤ 0.41 reached the same result by placing the hook policy at index 0 of every agent's permission stack.) **Required for parallel-path certification evidence** (`tests/runtime/real-binary-smoke.test.ts`, run via `bun run smoke:real`): distinct child journals must exist, and each assigned Write/Edit `path` must be correlated through its `toolCallId` with the managed denial in that exact tool result; unrelated denials and coordinator-only reports are insufficient. On 2.3.2, 2.3.3, 2.4.0, 2.4.1, 2.5.0, 2.5.1, 2.5.2 and 2.5.3, targeted controls also prove that direct OFF produces no children while the preactivated ON path produces the real child journals and denials.
266
266
  - **The managed hook is the read-only boundary; no `explore`-profile second layer is assumed.** Production deliberately omits `subagent_type` for read-only swarm rather than selecting kimi-code's `explore` profile. Every coordinator and subagent tool call is enforced by the same managed hook.
267
267
  - **Swarm refuses without the hook, like every model-spawning command.** A swarm makes the reason especially acute: it asks for up to `--cap` subagents, but this total-count hint is advisory, so a missing hook would remove enforcement from all of them at once. `KIMI_PLUGIN_CC_SKIP_HOOK_CHECK=1` remains an explicit tests/diagnostics escape hatch, not a recovery path.
268
- - **Concurrency and total count are separate.** Every swarm has a finite `--budget` (default 30m). Exact 2.6.2/2.6.3 follows the bounded-wave/direct-worker construction above; `--max-concurrency` defaults to 4 for read-only work. Older certified binaries use `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` for normal launches on 0.18.0+ and can exceed it during rate-limit recovery. `--cap` is only a soft lifetime-total hint: a stateless per-wave guard does not make it a total-count limit. A time budget is not a dollar or token cap. Keep all three controls distinct.
268
+ - **Concurrency and total count are separate.** Every swarm has a finite `--budget` (default 30m). Exact 2.6.2/2.6.3/2.7.2/2.7.3 follows the bounded-wave/direct-worker construction above; `--max-concurrency` defaults to 4 for read-only work. Older certified binaries use `KIMI_CODE_AGENT_SWARM_MAX_CONCURRENCY` for normal launches on 0.18.0+ and can exceed it during rate-limit recovery. `--cap` is only a soft lifetime-total hint: a stateless per-wave guard does not make it a total-count limit. A time budget is not a dollar or token cap. Keep all three controls distinct.
269
269
  - **A model-invocable `kimi-swarm` agent (v1.3) wraps this command.** The `/kimi:swarm` slash command is human-only (`disable-model-invocation: true`, the blanket convention for *all* commands), but the `kimi-swarm` subagent lets the main thread *dispatch* a read-only fan-out on its own judgement — the same human-command + model-invocable-agent split that `kimi-review`/`kimi-challenge`/`kimi-ask`/`kimi-rescue` already use. Swarm is a safe candidate for an agent precisely because it is **read-only (zero write surface)**: the only thing auto-dispatch adds is COST exposure, already bounded by the finite `--budget` and the version-specific `--max-concurrency` bound that defaults to 4 for read-only work — so an auto-dispatched fan-out is bounded by construction, not by ignorable agent prose (the agent additionally restricts backgrounding to explicit user requests). `/kimi:pursue` ALSO gains a model-invocable agent (`kimi-pursue`, v1.3 — see the Autonomous goal mode section above): it is write-capable, but auto-dispatch widens no write surface (the rescue workspace allowlist + the managed PreToolUse hook gate every tool call on every continuation turn, and it cannot mutate git state) and removes no bound (the mandatory `--budget` ceiling holds), so its agent path is exactly as confined as its command path. Because it is the plugin's highest-autonomy surface, its agent description demands an explicit hands-off-autonomy request and steers single bounded tasks to `kimi-rescue`.
270
270
 
271
271
  ## Write-capable swarm (`/kimi:swarm --write`)
@@ -277,9 +277,9 @@ The construction is exact-version-specific. Older certified versions retain norm
277
277
  - **`coder` subagents really can write, and the hook is the sole boundary.** Verified at kimi-code 0.42.0: swarm subagents get their own eager external-hooks service under the standard before-execute channel — there is no deny-all path on the swarm route (the `btw` side-question path is separate). Write-swarm's `coder` subagents DO have edit tools, and the managed PreToolUse hook is the **only** write boundary — which is why the trusted-root confinement above is load-bearing and gated tightly.
278
278
  - **The plugin never touches git; the main thread owns the merge.** Subagents cannot run git (allowlist denies mutation). The plugin captures the change set with `git add -N` (intent-to-add, so new files appear in the diff WITHOUT writing loose objects into the shared object DB) + `git diff --binary` (untruncated, applyable), writes it to a `swarm-write-<jobId>.patch` artifact, and prints the path. It does **not** `git apply`, commit, or move any ref — the user/main thread reviews the patch and applies it (`git apply <path>`). The worktree shares the main repo's object DB and refs, but no ref/HEAD is ever moved, so the user's repository state is untouched.
279
279
  - **The patch is captured on every terminal path, before cleanup.** Success, cancel, budget-expiry, and failure all capture the (possibly partial) patch BEFORE `git worktree remove --force` discards the tree, so a cancelled run never silently loses the work the subagents already did. If capture itself fails, the job fails instead of completing and the worktree is retained with its path in the error details for recovery. That guarantee covers the plugin's own terminal paths, including `companion.sh cancel`. It does **not** cover a harness interrupt: Esc/TaskStop delivers SIGTERM then SIGKILL after ~1.35s (measured, process-group-wide), which is shorter than the 1500ms child escalation plus quiescence plus patch capture — so a hard interrupt can kill the companion mid-teardown and lose the patch. `companion.sh cancel` signals from a separate process not racing that deadline and is the work-preserving stop. Abandoned worktrees are retained, never age-deleted. Use the preview/apply recovery procedure in [swarm-recovery.md](swarm-recovery.md); uncertain ownership refuses automatic cleanup.
280
- - **Gated tightly.** Requires an exact certified CLI (write mode additionally requires at least 0.18.0), a Git repository with committed HEAD, and a verified managed hook. A dirty-tree warning explains that the worktree starts from HEAD and does not contain uncommitted edits. Default concurrency 1 uses a direct worker on exact 2.6.2/2.6.3; larger values use bounded waves. Older certified versions retain normal-launch serialization with the disclosed recovery limitation. Disjoint targets remain prompt guidance, and Git mutation stays denied.
280
+ - **Gated tightly.** Requires an exact certified CLI (write mode additionally requires at least 0.18.0), a Git repository with committed HEAD, and a verified managed hook. A dirty-tree warning explains that the worktree starts from HEAD and does not contain uncommitted edits. Default concurrency 1 uses a direct worker on exact 2.6.2/2.6.3/2.7.2/2.7.3; larger values use bounded waves. Older certified versions retain normal-launch serialization with the disclosed recovery limitation. Disjoint targets remain prompt guidance, and Git mutation stays denied.
281
281
  - **Required for final certification evidence on parallel paths.** `tests/runtime/real-binary-smoke.test.ts` runs the real `runSwarm --write` and requires the POSITIVE end-to-end: distinct child journals contain their assigned edits with `Write`/`Replaced` results on the same `toolCallId`, those child-authored changes land in the worktree and captured patch, the user's real tree is byte-identical + git-clean, and the worktree is cleaned up. A patch without per-call child provenance is not accepted as fan-out evidence. The NEGATIVE lane correlates each absolute out-of-root `path` and `toolCallId` with its managed denial. It is the check that catches `tool_input` field-name drift — `Write`/`Edit` carry `path`, not `file_path`, and reading the wrong key denies every real write silently.
282
- - **The single-worker path needs separate evidence.** At concurrency 1 on exact 2.6.2/2.6.3, require fresh print with no web activation or child journals, managed delegation denials, a confined main-agent write captured in the patch, unchanged user tree, and cancellation/budget settlement. Coordinator-only patches are valid for this explicit path, never substitutes for parallel child evidence.
282
+ - **The single-worker path needs separate evidence.** At concurrency 1 on exact 2.6.2/2.6.3/2.7.2/2.7.3, require fresh print with no web activation or child journals, managed delegation denials, a confined main-agent write captured in the patch, unchanged user tree, and cancellation/budget settlement. Coordinator-only patches are valid for this explicit path, never substitutes for parallel child evidence.
283
283
  - **Model-invocable agent (v1.5), patch-only by construction.** Following the field-proof above, `--write` now has a `kimi-swarm-write` subagent so the main thread can dispatch a write fan-out on its own judgement — the same human-command + model-invocable-agent split the rest of the suite uses. Auto-dispatch is a safe extension here because it widens **no** write surface and retains the documented bounds: the agent path runs the identical `runSwarm --write` code, so edits still land only in the throwaway worktree, the managed hook still gates every `coder` subagent, the patch is still handed back for the user to apply (**the plugin never applies or commits**), and `--budget` + default `--max-concurrency` 1 + the hook requirement still apply, with the rate-limit-recovery qualification above. In fact write-swarm is a *less* dangerous agent than the `kimi-pursue` agent already shipped: pursue writes directly into the workspace, whereas write-swarm's output is a patch the human reviews before anything reaches a real tree. Because it is still a write surface, the agent description demands BOTH signals — many disjoint write targets AND explicit fan-out intent — and steers single edits to `kimi-rescue`, read-only fan-outs to `kimi-swarm`, and autonomous loops to `kimi-pursue`. Default `--max-concurrency` stays **1**; raising it (concurrent writers) remains a deliberate, human-or-explicitly-requested choice.
284
284
 
285
285
  ## MCP transport and long-running jobs
@@ -322,7 +322,7 @@ worktree. A directory the operator trusted interactively in the Kimi TUI still
322
322
  has that property; that persisted-trust route is a documented residual, not
323
323
  something the plugin can close.
324
324
 
325
- 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/2.6.2/2.6.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.
325
+ 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/2.6.2/2.6.3/2.7.2/2.7.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.
326
326
 
327
327
  ## Running a newer Kimi than the plugin certifies
328
328
 
@@ -331,7 +331,7 @@ who tracks `@latest` loses every `/kimi:*` command until the next certification.
331
331
  The clean way to have both is to give the plugin its own binary: install the
332
332
  highest certified version somewhere stable and point `KIMI_PLUGIN_CC_KIMI_BIN`
333
333
  at it (the runtime resolves that path instead of `kimi` on `PATH`; every spawn
334
- still exports `KIMI_CODE_NO_AUTO_UPDATE=1`, so the pinned copy never drifts).
334
+ still exports `KIMI_CODE_NO_AUTO_UPDATE=1`, suppressing passive updates; a manually staged replacement is detected by the exact probe and first-line version marker, not prevented or rolled back).
335
335
 
336
336
  ```sh
337
337
  PIN=~/.local/share/kimi-plugin-cc/kimi-bin/2.5.3
@@ -344,7 +344,7 @@ Both binaries share `~/.kimi-code` (login, config, hook), so nothing else
344
344
  changes. The full-operation certified maximum can be read from the installed
345
345
  plugin (`NATIVE_V2_CERTIFIED_VERSIONS` in `dist/kimi-engine.js`), which lets an
346
346
  upgrade script bump the full-swarm pin automatically after each full-operation
347
- certification. That export excludes narrowed releases such as 2.6.0 and includes exact 2.6.2/2.6.3
347
+ certification. That export excludes narrowed releases such as 2.6.0 and includes exact 2.6.2/2.6.3/2.7.2/2.7.3
348
348
  under its certified bounded-swarm construction. `NATIVE_V2_ANY_OPERATION_VERSIONS`
349
349
  is the separate scoped union, so an automatic full-swarm pin does not silently
350
350
  become a non-swarm-only pin.
@@ -2,9 +2,9 @@
2
2
 
3
3
  Normal stop: use `scripts/companion.sh cancel` for a shell-owned run, or the MCP job cancel tool for an MCP-owned run. A hard kill cannot execute cleanup. Cancellation still starts no fresh cleanup server.
4
4
 
5
- For exact CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2/2.5.3 swarm runs, plus exact-2.6.2/2.6.3 parallel runs, status includes a durable `swarm_recovery` record. It contains the resolved home/workspace, companion identity, launch intent, verified process identities and session identity. It never contains web authentication tokens, credentials, prompts or config contents. Session identity is committed before enabling swarm mode. The exact-2.6.2/2.6.3 concurrency-1 path starts a direct worker without a mutable swarm session, so it does not create an activation-recovery record; normal cancellation and patch capture still apply.
5
+ For exact CLI 2.3.2, 2.3.3, 2.4.0, 2.4.1 and 2.5.0/2.5.1/2.5.2/2.5.3 swarm runs, plus exact-2.6.2/2.6.3/2.7.2/2.7.3 parallel runs, status includes a durable `swarm_recovery` record. It contains the resolved home/workspace, companion identity, launch intent, verified process identities and session identity. It never contains web authentication tokens, credentials, prompts or config contents. Session identity is committed before enabling swarm mode. The exact-2.6.2/2.6.3/2.7.2/2.7.3 concurrency-1 path starts a direct worker without a mutable swarm session, so it does not create an activation-recovery record; normal cancellation and patch capture still apply.
6
6
 
7
- Exact-2.6.2/2.6.3 parallel sessions retain their native `TaskStop`-disabled policy after normal deactivation or recovery. Recovery does not remove it. The bounded construction covers the managed job; resuming that historical session interactively through another client is outside its certification.
7
+ Exact-2.6.2/2.6.3/2.7.2/2.7.3 parallel sessions retain their native `TaskStop`-disabled policy after normal deactivation or recovery. Recovery does not remove it. The bounded construction covers the managed job; resuming that historical session interactively through another client is outside its certification.
8
8
 
9
9
  The exact 2.6.0 swarm integration is candidate-only: the narrowed 2.6.0 non-swarm certification excludes both swarm operations and does not certify this recovery path. Recovery canonicalizes `record.cwd` only for session deactivation through symlinked execution parents. Ownership, workspace, and patch checks continue to use the original recorded alias.
10
10
 
@@ -21,7 +21,7 @@ Preview does not signal processes, modify sessions, or capture patches. Apply:
21
21
 
22
22
  1. Requires the original companion to be gone and acquires an identity-checked recovery claim. A second recovery cannot race the first; a dead recovery owner can be reclaimed by compare-and-swap.
23
23
  2. Revalidates recorded processes and groups. It stops only verified individual identities, never a guessed PID or unproven group. An unknown surviving group member, changed group, incomplete probe or unrecorded launch refuses recovery.
24
- 3. If session cleanup is pending, requires the selected exact certified CLI and valid managed hook. It starts one bounded authenticated web lifecycle, disables the recorded session's swarm mode, verifies the version-appropriate state proof and exit journal, then verifies process quiescence. On 2.5.0/2.5.1/2.5.2/2.5.3 this includes the local environment binding and protocol-v2 WebSocket main-agent state rather than `/status`. On exact 2.6.2/2.6.3 parallel sessions it uses authenticated direct-subscription state proof and the same local binding checks. It does not resume a prompt, generate model output, install hooks or retry failed cleanup automatically. New recovery web launches are themselves journaled. Deactivation uses the realpath of `record.cwd`; the original recorded alias remains the ownership, workspace, and patch-check boundary.
24
+ 3. If session cleanup is pending, requires the selected exact certified CLI and valid managed hook. It starts one bounded authenticated web lifecycle, disables the recorded session's swarm mode, verifies the version-appropriate state proof and exit journal, then verifies process quiescence. On 2.5.0/2.5.1/2.5.2/2.5.3 this includes the local environment binding and protocol-v2 WebSocket main-agent state rather than `/status`. On exact 2.6.2/2.6.3/2.7.2/2.7.3 parallel sessions it uses authenticated direct-subscription state proof and the same local binding checks. It does not resume a prompt, generate model output, install hooks or retry failed cleanup automatically. New recovery web launches are themselves journaled. Deactivation uses the realpath of `record.cwd`; the original recorded alias remains the ownership, workspace, and patch-check boundary.
25
25
  4. Captures a binary patch from a retained write worktree. It does not apply the patch or delete the tree. The result names both paths for inspection.
26
26
 
27
27
  The recovery attempt has a 30-second cancellation signal, with bounded identity probes and normal teardown. Interrupting recovery retains its journal. An already-recovered record is an idempotent no-op. Failed/cancelled/completed job outcomes are immutable; a previously running abandoned job becomes failed, never completed. Recovery status is separate from task success.
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Scope and decision
4
4
 
5
- **Status: certified for all eight operations; plugin 2.6.3 release candidate.** Exact `@moonshot-ai/kimi-code@2.6.3` passed the source, exact-binary, real-provider candidate, deterministic stock-binary, production-table operation, full repository, package, consumer-security and post-edit review gates on the final implementation. The production operation table contains 2.6.3 for review, challenge, ask, rescue, review_gate, pursue, swarm and swarm-write. Release CI, tagging and npm publication remain pending.
5
+ **Status: certified and published for all eight operations.** Exact `@moonshot-ai/kimi-code@2.6.3` passed the source, exact-binary, real-provider candidate, deterministic stock-binary, production-table operation, full repository, package, consumer-security and post-edit review gates. Plugin 2.6.3 release commit `597210fe888e045c15577dbfc112188075bf1ac5` passed exact-commit validation and release CI `44406363750`; immutable tag `v2.6.3` and the GitHub release are published. npm OIDC run `44407749059` published plugin 2.6.3, and fresh registry/archive/signature/attestation verification passed.
6
6
 
7
- This release candidate does not change an installed host cache or move an operator CLI pin. Plugin 2.6.2 remains the latest published plugin release until plugin 2.6.3 publication completes.
7
+ Plugin 2.6.3 is a published plugin release. Certification and publication do not change an installed host cache or move an operator CLI pin.
8
8
 
9
9
  Exact source: `@moonshot-ai/kimi-code@2.6.3`, commit `b0de2fbd2de04d87689225aafd3912e5d193b62d` (annotated tag object `a9df46689649824abfdfff1528d7708a23fd3cf3`). The isolated npm binary reports 2.6.3; `dist/main.mjs` SHA-256 is `a360023b6814ffdf05bc87e40925df5e0442ae3076ad9e7b6ea6f771e2a1857c`.
10
10
 
@@ -81,7 +81,19 @@ Final validation receipts:
81
81
  - **Consumer security:** PASS. `bun run check:consumer-security` verified an isolated npm consumer installation without host credentials or model calls.
82
82
  - **Post-edit review:** PASS. The independent runtime/test reviewer returned NO FINDINGS. The documentation reviewer returned two major and three minor findings; all were verified and corrected, and narrow re-review found all five resolved with no new must-fix. Final source/docs diff review preserved the pre-existing user edit in the 2.6.2 historical record.
83
83
 
84
- The release commit must pass CI and the exact-release-commit production matrix before tagging. No installed-host setup or operator pin change is implied by certification or publication.
84
+ ## Release and registry receipt
85
+
86
+ The exact release commit `597210fe888e045c15577dbfc112188075bf1ac5` passed the isolated full gate with **1,797 passes / 76 expected skips / 0 failures / 23,469 assertions in 580.54 seconds**, the 341-file package/DSH and consumer-security gates, and the production real-provider matrix with **30 passes / 390 assertions in 481.45 seconds**. Release CI run `44406363750` passed both Linux and Windows jobs.
87
+
88
+ The immutable [v2.6.3 GitHub release](https://github.com/linxule/kimi-plugin-cc/releases/tag/v2.6.3) is published at that commit. OIDC run `44407749059` passed build and publication; npm `latest` is 2.6.3, published at `2026-11-18T22:14:06.914Z`. The 341-file registry tarball is byte-identical to the Actions artifact, and every published file matches the release tag:
89
+
90
+ - SHA-1: `63047ceab5c0b84da362788609e6f644b56a3414`
91
+ - SHA-256: `a64386f3cebf0f77d40f8d767f5533652f2fa91ba647b816876d8935bb2b1721`
92
+ - SHA-512: `37f68e1e0f53fe658a9801418d748067eb84849be76e53988231e2b81efdac18cc4a9eea0496677e9f6af584a1e5709ca6aeba7a1198135d1b12910245017e90`
93
+
94
+ SLSA provenance log index `3979478928` and publish attestation log index `3979539697` match the package subject, SHA-512, `refs/tags/v2.6.3`, release commit and publish workflow run. Fresh registry installation has zero production advisories and no invalid or missing signatures. Isolated Claude Code, Codex and DSH setup/check pass against stock CLI 2.6.3, and all three installed runtime maps enforce full 2.6.3 certification with 2.6.0 non-swarm-only scope. Verification made no model calls and changed no installed host or operator pin.
95
+
96
+ The DSH Discover timestamp is `1795040046`, recording the actual npm publication time. No installed-host setup or operator pin change is implied by certification or publication.
85
97
 
86
98
  ## Residual boundaries
87
99