Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge branch 'main' into release/2.3 (F5 install-hooks bearer fallback)
AkitaOnRailsb7fc16ee028b
diff --cc CHANGELOG.mdindex 3da0dfeb,a52cf4b2..23bcce56--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -7,54 -7,19 +7,67 @@@ and this project adheres to [Semantic V## [Unreleased]+### Added+- New task-oriented `docs/cookbook.md` cheat sheet ("I want to do X" → how:+ recall, durable rules, importing a knowledge base and reading a specific+ document, two agents working together), linked from the README docs table, to+ make it clearer what ai-memory does and how to use it (#726).+- Codex assistant-final-turn capture: `install-hooks --agent codex --capture-assistant`+ now captures the assistant's final message on `Stop`, the same double opt-in+ (client flag + server `capture_assistant = true`) and sanitize/bound pipeline+ as Claude Code. Codex's `Stop` payload carries `last_assistant_message`+ (verified on codex-cli 0.154.0); the installer previously refused the flag for+ Codex and now bakes it on a native hook platform. Only `(Codex, Stop)` is added+ — Codex has no `SubagentStop` (#743).+- Cross-project agent messaging: a directed, claim-once inbox/queue so an agent+ in one project can hand a self-contained request to an agent in another+ project without pulling that project's context into its own session. Four new+ MCP tools (`memory_message_send` / `memory_message_list` / `memory_message_pop`+ / `memory_message_cancel`, bringing the surface to 23) plus `ai-memory message+ send|list|pop|cancel` CLI subcommands and `/admin/messages*` routes, backed by+ the new `agent_messages` table (migration V64). Messages are addressed to a+ project (any session there can pop; claim-once); the sender can retract a+ pending message; an unknown recipient fails closed; each inbox is depth-capped.+ A popped message is treated as untrusted cross-project input — secret-scrubbed+ and size-capped on send, fenced with a security notice and sender provenance on+ pop, and never auto-injected into context. See `docs/agent-messaging.md`.+- The session-start "hot context" block now appends a non-consuming inbox notice+ (a static count only — never message text) when a project has pending+ cross-project mail, and `memory_briefing` reports `pending_message_count`.+- Added an independent `codex` LLM provider that follows the Codex CLI account+ selected by `CODEX_HOME`, reloads its read-only `auth.json` credentials before+ each operation, and delegates expired-token recovery to+ `codex app-server --stdio` (#716).+- `install-mcp --flavor <moonshot|bedrock|gemini>` pins the tool-schema dialect+ in the URL written into a client's config. The installer already picks one for+ the clients whose upstream is fixed — Kimi Code is always Moonshot, Kiro always+ Bedrock — but a client that fronts several models cannot be pinned by its name+ alone, and there was no installer path to `?flavor=gemini` for any of them. A+ Command Code or OpenCode install routed to Vertex needed the marker added by+ hand or every model call 400'd at `tools/list`; the same client on a non-Google+ model does not, which is why this is an explicit choice rather than another+ per-client default. `vertex` is accepted as an alias. `uninstall` now matches+ every marker on every client, so an entry pinned this way is still removed+ (#735).+- `AI_MEMORY_EMBEDDING_PROVIDER=copilot` adds GitHub Copilot as an embedding+ provider, reusing the `copilot` LLM provider's OAuth login and GitHub-token+ exchange (no separate API key). Defaults to `text-embedding-3-small`,+ 1536-dim; calls Copilot's `/embeddings` endpoint following the+ OpenAI-compatible contract Copilot documents for chat (#739).++ ### Fixed+ - `install-hooks --apply` no longer aborts the entire install when the hook+ bearer token cannot be persisted under the data dir. This bit the docker+ wrapper, where `data_dir` is `/data` — a container volume the host hooks+ never read from and that the container user frequently cannot write — so the+ persist step failed with `Permission denied` and left the operator with *no*+ hooks and no capture at all. The installer now falls back to embedding the+ credential inline in the rendered hook config (the pre-#552 behavior), warns+ that the token is then readable in that file and how to restore the secure+ on-disk path (a writable host data dir, e.g.+ `AI_MEMORY_DATA_DIR=$HOME/.local/share/ai-memory` for the docker wrapper, or+ a native binary), and completes the install so capture keeps working.+## [2.2.2] - 2026-09-15### Security