Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge PR #610: send OpenCode Go x-opencode-session + User-Agent (#608)
AkitaOnRails3aaa42dcf372
diff --cc CHANGELOG.mdindex 2dd800e4,8049f5c3..135484b6--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -8,49 -8,11 +8,54 @@@ and this project adheres to [Semantic V## [Unreleased]### Fixed+- Local-embedding model download (`fetch_model`) now bounds a stalled+ connection instead of hanging startup forever (#602): a 30s connect+ timeout and a generous 600s overall ceiling (large model files, so+ not the inference clients' flat 120s that would fail a slow download).+- The OKF v0.2 migration no longer crash-loops on startup with a+ libgit2 `invalid object specified … class=Tree` error that left the+ server unable to boot (#594). The wiki commit re-hashed files through+ libgit2's index, whose stat cache could trust a cached blob OID absent+ from the object database (a store carried across libgit2/git versions,+ or an interrupted earlier operation) — `write_tree` then aborted and,+ because the migration commits through that path, every restart failed.+ The commit now clears the index before staging so every file is+ re-hashed from the working tree. (The Docker runtime ships no `git`,+ so the fix is in-library, not a CLI fallback.)+- HTTP headers that carry a credential in an opaque value are now redacted+ before reaching durable storage. Previously such a header matched no+ built-in pattern unless it used the `Bearer` keyword or an+ `UPPER_SNAKE_TOKEN=` shape. The bearer rule requires the literal keyword,+ and the generic env-var rule requires `[A-Z][A-Z0-9_]*_TOKEN`, which never+ matches a kebab-case header name. `X-Amz-Security-Token` (AWS SigV4),+ `X-Api-Key`, `Private-Token` (GitLab), and `Ocp-Apim-Subscription-Key`+ (Azure) all fall in that gap, and tool output echoing a `curl` invocation+ is a common way they reach capture. A `key` or `token` suffix on its own+ does not imply a secret, so it must be qualified by an auth word:+ `Idempotency-Key`, `Continuation-Token` and storage partition keys are+ left intact and stay readable in captured output.+- `install-hooks --agent zcode --apply` no longer reports a hooks block+ ZCode has thrown away as `no-op … (already up to date)` (#600). ZCode+ validates `hooks.events` strictly and rejects the whole block, including+ ai-memory's own entries, over a single key it does not recognize, so+ capture never ran (`hookCount: 0`). Apply only ever merged the six event+ keys it writes, so a key it does not write was neither inspected nor+ reported, the file kept matching byte for byte, and the report claimed+ the install was current. Apply now also withdraws ai-memory's own+ entries from event keys it no longer writes, wherever they sit, and+ reports what it found: a warning naming any key it withdrew from, and a+ note for a key left unable to run anything, both naming the config file.+ **Changed output:** an unchanged ZCode config with such a key now reports+ `no-op … (unchanged; see the notes below)` instead of `already up to+ date`, so a redirected stdout no longer carries the reassurance without+ the cause. Event keys are never deleted and hooks ai-memory did not write+ are never removed, so a key holding someone else's hook is reported, not+ touched.+ - OpenCode Go requests now send `User-Agent: ai-memory/<version>` and a+ per-operation `x-opencode-session` header. Session consolidation and+ auto-improvement reuse the captured ai-memory session ID, while retries and+ structured-output fallback keep the same ID instead of appearing as unrelated+ requests (#608).- `as_of` time-travel queries and the entity retrieval stream now workon real stores. Both read the entity index, which was populated onlyfrom an LLM consolidator's `entities:` frontmatter — absent on the