mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-07 07:49:02 +00:00
* feat(agent-core-v2): persist the terminal turn.ended wire record - add a persisted turn.ended op (turnId, reason, error, durationMs) dispatched from the loop's runTurn finally block, alongside the event - fold the record back in the transcript cold rebuild: terminal state (blocked folded into failed, mirroring the live wire edge), durationMs, error message and endedAt; journals without the record keep the grouping default - restrict the test harness's snapshot waiters to emit entries so the same-named wire record no longer shadows the turn.ended event * chore(agent-core-v2): stabilize unique-symbol keys in the state manifest The checker names a unique symbol key __@name@NNNN, where NNNN is a compilation-global counter that shifts with unrelated type additions and churns the generated manifest. Render the stable __@name form instead. * fix(transcript): map turn.ended around hidden turns in the cold fold RetryStepRequest opens a real engine turn with origin 'retry' but contributes no context messages, and a queued-then-cancelled reservation consumes an engine id without starting. Both make engine turn ids drift from the grouping ordinals, so matching turn.ended by ordinal could stamp a later visible turn with the wrong terminal state. Replay the loop's turn-clock records (turn.prompt / turn.cancel) and map engine ids to ordinals past the hidden ids; the hidden turns' own end records map nowhere and are dropped. |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| CHANGELOG.md | ||
| package.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||