T-34: Memory governance and Hindsight exploration surface - #116
Merged
Conversation
Governs OMP's own session-memory subsystem (backend select, auto-recall, auto-retain, scoping) via a curated, credential-free settings whitelist projected from OMP's own settings store — same pattern as delegation governance (T-28). Adds a sessionless Hindsight explorer (the only memory backend with a credential-safe HTTP API outside a live agent session): per-project bank scope resolution, recall traceability, memory/document browsing, document tag edit/delete, and mental model create/refresh/delete. Mnemopi (local SQLite) and the local summary pipeline have no sessionless read/write seam in the SDK — the deck reports them as configured-but-not- explorable rather than fabricating a fake session to reach them. New standalone /memory view and nav entry, distinct from /kb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Governance + exploration for OMP's own session-memory subsystem (Hindsight
remote / Mnemopi local SQLite / local rollout summaries) — distinct from the
deck's KB (
/kb, hand-tended long-term knowledge).GET/PATCH /api/memory/settings,MemorySettingsSection):a curated, credential-free whitelist (backend select, auto-recall,
auto-retain, scoping, Hindsight API URL/bank) projected from OMP's own
settings store — same pattern as delegation governance (T-28). Credential
fields (
hindsight.apiToken,mnemopi.llmApiKey,mnemopi.embeddingApiKey)are excluded outright, never read or written through this surface.
apps/server/src/hindsight-explorer.ts,routes-memory.ts): the only memory backend with a credential-safe HTTP APIthat works without a live agent session. Per-project bank scope is resolved
server-side from
cwd(never client-supplied), gated onmemory.backendactually being
"hindsight"so a switched-off backend can't be browsed ormutated. Covers recall traceability, memory/document browsing, document tag
edit/delete, and mental model create/refresh/delete.
explanatory message — their read/write surface (
MemoryBackend.status/search/save,MnemopiSessionState.editScopedMemory) is wired to a liveAgentSession'sin-memory state in the SDK, with no sessionless seam to fabricate safely.
/memoryview + nav entry, deliberately separate from/kb.Verification
bun test— server 885/885, web 190/190 (24 new inroutes-memory.test.ts).tsc --noEmit— clean on all touched files (server + web), onlypre-existing baseline diagnostics remain elsewhere (
session-monitor.*,engine.test.ts).vite build— clean.Chromium via CDP): Memory nav entry renders distinct from Knowledge,
backend switch persists and live-refreshes the scope card, Hindsight
explorer renders and a real recall call against an unreachable Hindsight
server surfaces a clean 502 (no crash, no leaked internals), Mnemopi
correctly reports non-explorable.
Task: T-34