Local-first π§ memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly π΄ dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
Variant 1: Capability-scoped read primitives (choke point in core)
- Approach: Move enforcement into the note-content-returning primitives themselves (
listVaultPages, the read-page-by-path primitive, and the index query layer), which become deny-by-default: they consult a singlevaultPageVisible(metadata, disclosure)predicate (built on the existingvisibility.tstokens, sibling in shape tovaultPageInStatusScope) before yielding a page. A server-sidedisclosurevalue is minted only by transport constructors βserveStdio,startHttp(loopback vs. non-loopback viaisLoopbackHost), andsrc/cli/main.tsβ and threaded intoServerContextand down through the primitives; no caller-supplied string can produce it.applyVisibilityScopeis subsumed: the pool-filter call site delegates to the same predicate, so one rule has one spelling. - Trade-offs:
- Pro: new surfaces are safe by construction β a tool that imports the primitives cannot forget the filter, so the census's "excluded" category structurally empties.
- Pro: no existence oracle for free β a withheld page is literally never yielded, so counts, aggregates, and
_metacannot mention it. - Con: signature churn β
disclosuremust thread from three transports throughServerContextinto core primitives, touching most of the 17listVaultPagescall sites plus every tool that constructs core calls; the wave lands at the top of the 50β70 file budget. - Con: internal engine lanes (indexer, dedup pool, link-graph repair) legitimately need unfiltered reads; they need a named in-process full-disclosure value, and drawing that line wrong either breaks wikilink integrity or quietly re-opens the hole.
- Con: honest bypass statement is weak-but-defensible: stdio/CLI/loopback prove only "the caller already has filesystem-equivalent access to this vault," not operator intent.
- Complexity: large
- Risk: medium
Variant 2: Per-surface predicate sweep, census-enforced
- Approach: Define the same single predicate once, but leave primitives unfiltered and sweep all 68
excludedsurfaces (includingsrc/openclaw/index.ts:128) to adopt it at their own enumeration/read points, exactly asvaultPageInStatusScopewas adopted. Each adoption flips its registry row fromexcludedtocoveredwith a written reason; the agent-scope matrix gains a seededvisibility:corpus axis (including_metaand a federated caller shape), so an unclassified or wrongly-wired surface fails the suite. - Trade-offs:
- Pro: maximally reviewable β 68 small, independent, idiom-matching diffs; the registry and honesty finding move row by row, making progress and closure legible.
- Pro: no plumbing churn; transports still mint the
disclosureserver-side, but it only has to reach tool handlers, not core signatures. - Con: enforcement stays distributed forever β every future surface is one forgotten predicate away from a leak, and only the census/matrix (not the type system or call graph) stands between it and shipping.
- Con: no-existence-oracle must be re-proven per surface (backlink counts, graph aggregates, thrown messages), which is exactly the class of error a 68-site sweep invites.
- Con: heaviest test burden: the matrix must drive every surface against the visibility corpus in both directions to make the claim real.
- Complexity: large
- Risk: medium-high
Variant 3: Two-root enforcement with a fail-closed index column
- Approach: Observe that every callable surface reaches page content through one of three roots β
listVaultPages, the read-by-path primitive, or the search index β and enforce only there, with the census extended to prove no fourth root exists (mechanical sweep for directfsreads of vault paths undersrc/mcp/,src/cli/,src/openclaw/). The index gains a per-document visibility column written at index time; query-side filtering treats a missing/unreadable value as private (fail closed), which makes the pre-existing-tagged-page population self-healing β stale fastpath-skipped rows have no column, so they are withheld immediately and correctly reclassified on the next content read, with a one-time persisted store marker (notindexRevision, which is only a cache generation) forcing full frontmatter re-examination once. Private pages stay indexed but flagged, so the transport-keyeddisclosurecan lift the filter for local callers without a segregated store; the indexer skip-vs-delete trap (seen.addatindexer.ts:390) never arises because nothing is skipped. - Trade-offs:
- Pro: smallest enforcement surface β three choke points plus a census that proves their sufficiency; the 68 registry rows flip to
coveredby root, each citing which root covers it. - Pro: index handling is the cleanest of the three: fail-closed column solves the mtime-fastpath legacy population without a purge/migration dance, and trusted-local search over private pages keeps working.
- Con: private page bodies remain in
chunks/chunk_ftsat rest β anyone with file access to the store reads them; this must be stated plainly (it is the same trust boundary as the vault files themselves, but it is a fact, not nothing). - Con: the whole guarantee hangs on the root-closure census being right; a surface that shells out or re-implements a walk escapes until the census learns that shape.
- Con: read-by-path root must refuse with the same
not foundan absent page produces, and that message-identity must be asserted in the matrix.
- Pro: smallest enforcement surface β three choke points plus a census that proves their sufficiency; the 68 registry rows flip to
- Complexity: medium
- Risk: medium
Recommended: Variant 3
Rationale: Variant 3 delivers Variant 1's safe-by-construction property at a fraction of the signature churn, fits comfortably inside the 50β70 file wave, and is the only variant whose index-side story respects all four verified indexer facts without a fragile purge path β the fail-closed column turns the pre-existing-private-page obligation from a migration into a default. It subsumes applyVisibilityScope naturally (the search root is one of the three choke points), and its residual risk β trusting the root-closure census β is exactly the mechanism this project has already chosen and shipped for population claims, so extending the census to prove "no fourth root" is idiomatic rather than novel.