Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge PR #952 into main
AkitaOnRails5abe10771b86
diff --cc CHANGELOG.mdindex 7796b905,e93e0e69..e2063e75--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -8,48 -8,21 +8,60 @@@ and this project adheres to [Semantic V## [Unreleased]### Added+- `docs/llm-providers.md` now has a dedicated OpenRouter subsection and a+ matching row in the recommended-defaults table. The wiring+ (`openai-compat` + `AI_MEMORY_LLM_BASE_URL=https://openrouter.ai/api/v1`)+ and the `HTTP-Referer` / `X-Title` app-attribution headers were already+ shipped, and `docker/.env.production.example` already ships an OpenRouter+ default, but the provider-facing doc mentioned OpenRouter only inside the+ generic `openai-compat` row. The new subsection covers a full working- env-file, the `openai-compat` embedder path for OpenRouter's hidden-but-- supported embedding models (`baai/bge-m3`,- `intfloat/multilingual-e5-large`), a pointer to++ env-file, the `openai-compat` embedder path (with a note to verify any++ provider's `/v1/embeddings` endpoint before relying on it), a pointer to+ `docs/llm-provider-comparison.md` for model selection, and a security /+ gotchas block (auth-token requirement for non-loopback binds, env-file+ hygiene, cheap-model consolidation drift, `:free`-tier shared-pool+ limits, reasoning-model incompatibility). (#949)+ - `docs/backup.md` documents the remote-git-mirror backup pattern for a+ single-user install: what to include, what to exclude (derived SQLite index,+ models cache, logs, secrets), how to schedule with a `systemd --user` timer,+ how to restore, and the security posture per `SECURITY.md`, including a+ "what ends up in your wiki" section that names the exposure (sanitized+ prompts, tool I/O, page bodies) and lists encrypted-archive alternatives+ (`age`, `restic`, `borg`, `git-crypt`) for cases where a private mirror+ repo is not enough. A worked example ships under `docs/examples/backup/`+ (snapshot script, `.service` and `.timer` unit files, `.gitignore` for+ the mirror repo). Pointers added from `docs/deploy.md#backups`,+ `docs/airgapped-install.md`, and the README docs table. The on-box+ `ai-memory backup --to <tarball>` command+ (`docs/lifecycle-ops.md#backup`) is unchanged. (#950)### Fixed+- `memory_query` now returns `global_scope_hits` (standing `_global` user/team+ preferences) for a single-project query whose project is named explicitly+ with `workspace`+`project`, not only when scope is omitted. The routing+ doctrine tells static MCP clients to pass `workspace`+`project` on every call,+ which set the old gate's "no named scope" condition to false, so those clients+ never received global preferences despite the documented contract. The union+ now keys on single-project resolution (`scopes` empty); only an explicit+ multi-`scopes` set opts out, and `global=true`/`as_of` are unaffected. The+ reserved-scope union is still keyed strictly to `_global` and never leaks+ another project's pages. (#930)+- A page file rewritten under `wiki/<ws>/<project>/` (the OKF import path)+ now gets its new version embedded the same way a brand-new file does.+ The watcher's `reindex_page` upserted the new version and stopped —+ embedding only ever ran on the `write_page` API path — so a rewrite left+ hybrid search silently degraded to FTS-only ranking for that page until+ someone ran `ai-memory embed` by hand. (#958)+- `[capture] ignore_paths` now covers shell commands. Shell tools (`Bash`,+ `shell`, `execute_bash`, `terminal`, …) were classified as non-file and always+ kept, so `cat docs/adr/*.md` stored the ignored file's full text in the+ observation body. The native `ai-memory hook` now splits the command line+ lexically and drops the event when an argument, resolved from the event's+ `cwd`, matches an ignored pattern or is a glob that can reach one. Variables,+ command substitution and commands that name no path are not followed. The+ generated OpenCode, OMP, Pi and OpenClaw integrations are unchanged. The+ marker-file reference also documents excluding large tool results that Claude+ Code saves and re-reads from `~/.claude/projects/**/tool-results/**`. (#946)- Grok Build CLI tool observations are no longer stored with an empty body.Grok posts Claude Code's snake_case tool fields (`tool_name` / `tool_input` /`tool_use_id`), but it was missing from both `closed_tool_agent` and the