Files
plugins/packages/nowledge-mem/fixtures
SadWood 5b1ae40256 nowledge-mem 0.1.2: opt-in capture filtering, by SadWood (#567)
nowledge-mem 0.1.2 (SadWood): opt-in capture filtering. `captureFilter: "off"|"human"`
(default "off") and `captureCindy` (default false). Human mode imports only user/assistant
text (tool results dropped, commentary on tool calls kept); with captureCindy and
ctx.agent === "cindy" it removes complete, recognized leading Cindy host notes and keeps
anything unknown, incomplete, fenced, quoted or carrying a scheduled-run/handoff marker
verbatim. Only the copy sent to POST /threads/import changes; external IDs still hash the
original text and occurrence index, so off-mode IDs are unchanged. No new network route.

Reviewed head fed33102005d118507ab14cdc2765a2761254329, merged locally onto origin/main
8b01396 (0fb659a), all on mote:
- node --test packages/nowledge-mem/capture-filter.test.mjs: 52/52.
- bun test packages/nowledge-mem: 105 pass, 1 skip (live).
- Differential test of 0.1.1 vs 0.1.2 hooks (9 requests over chat/responses/anthropic/
  gemini, Cindy notes, tools, images, repeats; 6 off-mode option sets incl. recall and
  captureTools false): import payloads, returned request and reports byte-identical
  (tool_version aside). Human+Cindy mode returns the same request to the model as 0.1.1.
- Full bun test, HOME=$(mktemp -d): 4419 pass, 9 skip, 0 fail. bun scripts/check.mjs: ok.
- Broken by hand, each red: request mutated in capture (34 red); unclosed directory tag
  stripped, truncated UI-language note matched, unterminated context note stripped,
  fences ignored (quoted/fenced/incomplete test red each); default "human" (defaults +
  off-diff red); filtered index in IDs; no trim in off mode; mixed-source guard removed;
  Cindy cleanup for any agent or without opt-in.
Not tried: a real Mem server or a real Cindy session.
2026-10-31 22:39:34 +08:00
..