IDE ── hooks ──▶ CLI `hook run`
│
▼
MemoryStore (core)
┌──────────┴──────────┐
▼ ▼
compress (prose) Storage (SQLite + FTS5 + embeddings)
▲
│
IDE ── MCP stdio ──▶ mcp-server ───┘
Browser ── HTTP ──▶ worker (Hono) ─┘
- Hook receives input from IDE.
- CLI invokes
runHook(name, input). redactPrivatestrips<private>content.compresstransforms prose; technical tokens pass through.Storage.insertObservationcommits to SQLite; FTS5 is updated via triggers.- Embedding, when enabled, is computed out-of-band by the worker.
- Model (MCP): compact search →
get_observations(expand: true)returns readable text. - Human (viewer): worker serves expanded text over HTTP on
127.0.0.1:37777. - Keyword search: SQLite FTS5 remains the default and fallback. When
search.rust.enabledorCOLONY_RUST_SEARCH=1is set,MemoryStore.searchasks the Rustcolony-searchsidecar for keyword candidates first, then keeps the existing semantic re-rank path in TypeScript.
- Only
MemoryStoremay write observations. - Only
@colony/storagemay open the database. - Hooks do no I/O beyond the
MemoryStorecall. - Worker binds to loopback only.
- Rust search is read-side only and must not sit on the observation write path.