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.
64 lines
1.4 KiB
JSON
64 lines
1.4 KiB
JSON
{
|
|
"name": "@magpie-community/gateway-nowledge-mem",
|
|
"version": "0.1.2",
|
|
"description": "Nowledge Mem recall, Context Bundle and optional conversation capture at the Magpie gateway, for every connected harness",
|
|
"type": "module",
|
|
"files": [
|
|
"service.mjs",
|
|
"probe.mjs",
|
|
"mem.mjs",
|
|
"nowledge-mem.hooks.mjs",
|
|
"conversation.mjs",
|
|
"capture-filter.mjs",
|
|
"CAPTURE_FILTER.md",
|
|
"README.md",
|
|
"page"
|
|
],
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-gateway",
|
|
"nowledge-mem",
|
|
"memory",
|
|
"llm-gateway"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/nowledge-mem"
|
|
},
|
|
"magpie": {
|
|
"hooks": "./nowledge-mem.hooks.mjs",
|
|
"options": {
|
|
"apiKeyEnv": "NMEM_API_KEY",
|
|
"recall": true,
|
|
"contextBundle": true,
|
|
"maxMemories": 5,
|
|
"maxBytes": 6000,
|
|
"requestTimeoutMs": 900,
|
|
"recallBackoffMs": 30000,
|
|
"capture": false,
|
|
"captureTools": true,
|
|
"captureFilter": "off",
|
|
"captureCindy": false,
|
|
"port": 3479
|
|
},
|
|
"page": {
|
|
"title": "Nowledge Mem",
|
|
"file": "page/settings.html",
|
|
"icon": "page/icon.svg",
|
|
"service": {
|
|
"port": 3479,
|
|
"option": "port"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"check": "bun test ./*.test.mjs"
|
|
},
|
|
"engines": {
|
|
"bun": ">=1.4.2"
|
|
},
|
|
"main": "./service.mjs"
|
|
}
|