Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs: clarify kimi handoff linking and record adapter limitations
Lucas Oliveira96441fa6af09
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 41b640d9..25165fd4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -26,7 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0`packages/agent-core/src/session/index.ts`), so the previous hook consumedpending handoffs — legacy and managed — without ever showing them to themodel. `UserPromptSubmit` stdout is injected as a user message before the- turn. Re-run `ai-memory install-hooks --agent kimi-code --apply` after+ turn. The native `ai-memory hook` path now also accepts the+ `user-prompt-submit` event token alongside `user-prompt` for kimi handoff+ delivery. Re-run `ai-memory install-hooks --agent kimi-code --apply` afterupgrading.## [1.17.3] - 2026-07-22diff --git a/docs/managed-workstreams.md b/docs/managed-workstreams.mdindex 41c9b53c..ab519ae5 100644--- a/docs/managed-workstreams.md+++ b/docs/managed-workstreams.md@@ -87,10 +87,13 @@ consume the later adoption opportunity.actual native session and injects only the portable events that session hasnot seen. Crush, which has no SessionStart hook, receives the same boundedpacket through a temporary `options.global_context_paths` entry. Kimi Code- fires SessionStart but discards its stdout, so the kimi adapter links there- and delivers the packet through the UserPromptSubmit hook instead, whose- stdout Kimi Code injects as a user message before the turn. Direct- launches continue to use the existing single-use handoff path.+ fires SessionStart but discards its stdout, so the kimi adapter's+ SessionStart hook only captures the event — it neither fetches nor links.+ The UserPromptSubmit hook issues the `/handoff` GET with the native+ `session_id` in the query; the server links the session and renders the+ packet atomically, and Kimi Code injects the hook's stdout as a user+ message before the turn. Direct launches continue to use the existing+ single-use handoff path.4. When the child exits, ai-memory reads the native transcript store withoutmodifying it. Visible user/assistant messages, completed tool calls/results,compaction summaries, and a non-mutating Git checkpoint enter an append-only@@ -181,7 +184,13 @@ Known Kimi Code adapter limitations: subagent transcripts(`agents/<id>/wire.jsonl` other than `main`) are not imported in v1 and arerecorded as an extraction-loss annotation; the session bucket directory nameis a one-way hash of the working directory, so discovery always reads-`state.json`'s `workDir` and never parses the bucket name. The native+`state.json`'s `workDir` and never parses the bucket name. Event ids derive+from the SHA-256 of the raw wire.jsonl line, so two byte-identical lines —+only possible with identical content in the same millisecond, because Kimi+Code stamps each record with `time` — collapse into a single ledger event.+Legacy sessions that keep `wire.jsonl` directly in the session directory+(the pre-`agents/` layout the kimi session-store still reads through its+stat fallback) are neither discovered nor imported in v1. The nativecontract was verified against Kimi Code v0.28.1.Crush needs no ai-memory hook installation for managed mode. The launcher reads