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: Pre-extract gains a second lane, "text structure"
- Approach: Extend the existing opt-in pre-extract pass (
runPreExtractin ingest.ts,pre_extractonbrain_ingest_source) with a sibling result shape,PreExtractText, that for.html/.htmreturns extracted text and heading-derived parts (viaHTMLRewriterwith a text handler on the document plus element handlers forh1-h6/title, a hand-written entity decoder for the five XML entities plus numeric refs, and noonEndTag), and for.csv/.tsvreturns a header row, a column count, a row count and a bounded row sample. PDF, Office and image extensions joinLANGUAGE_BY_EXTENSION's neighbour table as a closedUNSUPPORTED_SOURCE_KINDvocabulary so the pass answersextracted: false, reason: <token>by name. The calling agent still writes the summary page; the kernel only returns the structure it read, and the batch planner gains.html .htm .csv .tsvinDEFAULT_INGESTIBLE_EXTENSIONSplus a per-extensionunsupportedbucket besideunclassifiable. - Trade-offs:
- Pro: one read path, one bounded reader, one opt-in flag, no new tool and no description change on
brain_ingest_source(already at 299). - Pro: HTML text never lands in the vault; the page is still agent-authored, so provenance and redaction stay as today.
- Pro: the CSV table never enters the chunker, sidestepping the header-loss and
[[x]]/#tagcell problems entirely. - Con: a CSV's rows are not searchable unless the agent renders them, so the "table without rows" gap is only half closed; the kernel can offer a fenced sample but cannot force it onto the page.
- Con: overloading
pre_extract(named "code-structure") with text structure muddies the result type and the CLI verb name; a rename or alias ripples through serializers and tests. - Con:
HTMLRewriterruns in Bun only; the Node-bundled build needs a conditional fallback (regex strip) or a namedunsupported-on-this-runtimereason.
- Pro: one read path, one bounded reader, one opt-in flag, no new tool and no description change on
- Complexity: medium
- Risk: medium
Variant 2: A "source reading" kernel stage with a rendered table block on the page
- Approach: Introduce a new ingest-side module
source-read.tsthat runs before the page write for every file source (not opt-in), classifies the source into a closedSOURCE_FORMATvocabulary (markdown-like,html,delimited-table,pdf,office,image,unknown), and produces aSourceReadingcarried on the ingest result and, fordelimited-table, written by the kernel into a fenced```tableblock on the summary page (header + rows up to a byte cap, fence so links and tags stay inert, redactor's raw-output pass applied cell-wise). HTML yields heading parts only. Unsupported formats become a typedSkippedPageReason-style result and a batch-planunsupportedmap. - Trade-offs:
- Pro: closes the CSV gap fully. Rows become searchable because they live on the only indexed page, and the fence keeps them out of the graph and out of the GFM chunker's header-splitting path.
- Pro: one closed vocabulary covers both planner counting and ingest reporting; the census test registers it once.
- Con: the kernel now writes source body onto a page it previously never touched. This crosses a line the task draws for HTML ("no source body copied") and changes the agent/kernel contract for a page the agent owns; existing text sources must be proven byte-identical by test.
- Con: a code fence in a table block defeats the chunker's table awareness, and the chunker's line-by-line split of oversize fences still drops the header in later chunks; closing that needs a chunker change (repeat the fence header per chunk) in the same release.
- Con: cell-wise redaction has to run on data the kernel never saw before; a false-negative leaks a secret into an indexed page.
- Con: not opt-in means every ingest pays the read; the 1 MiB allocation fold-in becomes mandatory, not optional.
- Complexity: large
- Risk: high
Variant 3: Planner-only honesty plus a sidecar reader verb
- Approach: Keep ingest untouched for this release. The batch planner learns a closed
SOURCE_FORMATclassification and reportsunsupportedper extension and reason (binary-document,image,archive) besideunclassifiable, and a new CLI-only verbo2b brain source-read <path>(no MCP tool) returns HTML text with heading parts or CSV/TSV header, dimensions and a sample, for the agent to fold into the page it writes. Fold-ins ship as independent commits. - Trade-offs:
- Pro: smallest blast radius. No ingest result shape change, no page content change, byte-identity of text sources is trivially preserved.
- Pro: the Node-bundled build is unaffected because the verb lives in the CLI only.
- Con: MCP callers (the primary surface) cannot reach the reader, so for the agent in an MCP session nothing changes about HTML or CSV. The release title promises ingest of non-Markdown sources and delivers it only to CLI users.
- Con: two format vocabularies drift (planner and verb) unless shared, and the sidecar invites a later MCP tool anyway, which the constraints discourage.
- Con: the CSV rows-in-the-index gap stays open.
- Complexity: small
- Risk: low
Recommended: Variant 1
Rationale: It reaches the MCP caller through the existing pre_extract flag and bounded reader, so no new tool, no description budget and no second read path are needed, and it keeps the kernel out of the page body, which matches both the "no source body copied" rule for HTML and the byte-identity constraint. Variant 2 closes the CSV gap more fully but does so by having the kernel write unredacted-by-design source rows onto an agent-owned page, which couples the release to a chunker change and a redaction guarantee the project does not yet have; Variant 3 is safe but leaves MCP sessions exactly where they are. The CSV residue in Variant 1 is honest: the result names header, dimensions and a fenced sample, and the agent renders the rows it chooses, which is the same contract the project already uses for every other source.