Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge origin/main into auto-scope branch
AkitaOnRails60da2a8142ce
diff --cc CHANGELOG.mdindex 91ea8730,f5dc1c21..04576ebe--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -6,31 -6,14 +6,39 @@@ The format is based on [Keep a Changeloand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).## [Unreleased]+### Added+- New `[auto_scope]` config block (`mode`, `session_ttl_secs`,+ `max_entries`) selects how the hook-published "currently active project"+ pointer is shared across concurrent MCP callers. The default `single` mode+ preserves the historical process-wide slot. Opt-in `per_session` keys the+ pointer by `session_id` to isolate concurrent agent runs of the same+ operator; opt-in `per_actor` keys by `(user, session_id)` to isolate+ across operators as well, pairing with multi-user mode where `user`+ comes from the `users` row that owns the bearer token. `per_actor`+ also keeps a user-only fallback slot so authenticated MCP requests+ from clients that cannot forward a session id do not inherit another+ user's latest project; same-user session isolation still requires a+ client/bridge that sends `X-Memory-Actor-Session-Id` or+ `Mcp-Session-Id` on MCP tool calls. Per-key entries carry an insertion+ timestamp and are TTL-evicted (default 1 hour) and+ capped (default 4096) so adversarial / runaway clients cannot grow the+ map without bound. Both opt-in modes still publish to the single slot+ in parallel, so any caller without actor context falls back gracefully+ to the most recent project rather than an empty pointer. All MCP read+ tools (`memory_query`, `memory_recent`, `memory_read_page`,+ `memory_status`, `memory_briefing`, `memory_explore`, `memory_lint`,+ `memory_forget_sweep`, `memory_handoff_*`) now thread the request's+ `ActorContext` into scope resolution, so opt-in isolation takes effect+ for the full read surface.++ ### Fixed+ - `POST /admin/rename-project` now returns `404 Not Found` when the project row+ has been deleted (typically by a concurrent `purge-project`) between the+ handler's id lookup and the writer's `UPDATE`. The pre-fix path silently+ responded `200 OK` with `pages: 0` for an operation that affected zero rows,+ which contradicted the concurrent purge's also-`200 OK` destruction of the+ same project and gave operators no signal that the rename had been undone.+## [0.10.0] - 2026-06-04### Added- New `POST /admin/delete-page` HTTP endpoint deletes a single page with