Skip to content

v1.0.2 — kimi-code 0.5.0 compat

Choose a tag to compare

@linxule linxule released this 28 May 18:23
· 21 commits to main since this release
173f406

kimi-code 0.5.0 compatibility

A 4-reviewer upstream-compat audit of @moonshot-ai/kimi-code@0.5.0 (released 2026-05-28) returned unanimous COMPAT-PRESERVED. This patch release extends KIMI_TESTED_MINORS to include {0, 5} so 0.5.0 users no longer trip the version-probe "outside tested range" warning at /kimi:setup. No runtime behavior changes — doc/comment tightening, one runtime constant, and a 5-file version bump.

What 0.5.0 changed (and why none of it breaks us)

  • Hook engine relocated packages/agent-core/src/agent/hooks/packages/agent-core/src/session/hooks/ (commit 74e867a). All five hook files are byte-identical to their 0.4.0 ancestors. PreToolUse stdin shape, exit-code/matcher/timeout semantics, and shell: true spawn all preserved. Policy queue order byte-identical — PreToolCallHookPermissionPolicy still at index 0, before AutoModeApprovePermissionPolicy at index 4.
  • New --auto CLI flag is explicitly rejected when combined with -p (OptionConflictError), so it cannot bypass our hook-based read-only enforcement for review/challenge/ask/review_gate.
  • Stream-json wire format unchangedrun-prompt.ts and rpc/events.ts byte-identical 0.4.0→0.5.0. The role:"meta", type:"session.resume_hint" record still emitted once per prompt run at session end.
  • The 1580-line wire-records diff is internal blobref offload + persisted-AgentRecord migration in the session homedir, not the stream-json bytes we consume.

Latent adversarial finding (tracked for v1.1)

AgentOptions.rpc was downgraded to SDKAgentRPC | undefined, and PermissionManager.requestToolApproval now silently auto-approves 'ask' outcomes when agent.rpc === undefined. Every Agent construction site in 0.5.0 production passes a non-undefined rpc proxy, so the branch is dead code today — but type safety has weakened. Tripwire added to ROADMAP-TO-GA.md to re-verify rpc-supplied-at-every-callsite and installHeadlessHandlers wiring in future audits.

Verification

  • bun run check green: 391 pass, 0 fail, 1009 expect() calls, drift gate clean.
  • Audit reports 36–40 in .claude/kimi-code-research/reports/ (gitignored). Marker tag: compat-verified-kimi-code-0.5.0.

Compat range: KIMI_TESTED_MINORS = {0.1, 0.2, 0.3, 0.4, 0.5}.

🤖 Generated with Claude Code