7b42e404f5f656d7bfb4aa5c7ddbcd1031264a86
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dda4afdc36 |
nowledge-mem 0.1.6: requestTimeoutMs and the hook budget go up to 30s (#926)
A deep Mem search can take longer than 5s, and the page refused any requestTimeoutMs over 5000 or gatewayTimeoutMs over 10000. Both now go up to 30000; the defaults (1500 and magpie's 1000) are unchanged. magpie v0.1.3538 (yetone/magpie#5890) runs a hook up to its own 30s budget; the README says an older magpie cuts anything over 10s. - validate.js, settings page and labels (en, zh, zh-TW, ja, de): 50-30000 and 100-30000. - nowledge-mem-agent checked: its 10000 ms values are fixed internal timeouts, not user options with a cap; unchanged. - slow-recall.test.mjs: a fixture server answers /memories/search after 6100 ms; requestTimeoutMs 15000 recalls it, 30001 is invalid, and a caller abort stops the fetch at once (the server sees the abort) and keeps the request as it came. Run (wsl-run, magpie-desktop): bun test packages/nowledge-mem packages/nowledge-mem-agent: 161 pass, 2 skip (live Mem and the Playwright layout check, skipped as on main), 0 fail; bun scripts/check.mjs: rc 0. The README's magpie version was filled in after that run. Not tried: a real Nowledge Mem server with a slow deep search. Reported-by: aboat0625-cpu |
||
|
|
5b370f3e62 |
nowledge-mem 0.1.5: one Settings dialog for every option on released hosts (#588, SadWood)
The Nowledge Mem page's dialog now sets every option the hook reads, on Magpie's released bridge (options.get/set only), by SadWood. - One Settings dialog: connection, key (an empty field keeps the saved key; Remove saved key / Undo), API key variable, recall and remote recall, Context Bundle, apps without memory, capture and remote capture, the human-dialogue filter (a switch, Cindy only with it on, tool results only with it off) and the advanced numbers. Remote HTTP needs the Advanced exception. - A × beside a field that holds an explicit value returns it to the default. Saving re-reads the options, writes only edited fields, and refuses (keeping the draft) when one of them, or a gate's remote grant or the endpoint behind a newly allowed HTTP exception, changed elsewhere. - page/validate.js is shared by the page and resolveOptions, so both refuse the same values. - The footer wraps at narrow widths (German Save was cut off at 380px). - No native select. Every language has every key; the English fallback loop is gone. Reviewed at 75a09d19e, run merged onto main |
||
|
|
debc0f7b53 |
nowledge-mem 0.1.4: a tailnet HTTP server from the page, and recallRemote/captureRemote opt-ins (#608)
pluoki (on X) runs Mem on a Mac Studio reached over Tailscale. Two limits:
- page/settings.js validUrl() refused any http: URL to a non-loopback host
whatever allowInsecureHttp said, while mem.mjs honoured it, so
http://mac-studio.tailnet.ts.net:14242 could only be set by hand in
Options JSON and the page's Save and Test refused it. The dialog now has
an "Allow HTTP to another machine" switch (Mem service section, same
switch-field component as the others; help text: only on a network you
trust, e.g. Tailscale) that reads and writes allowInsecureHttp, and
validUrl follows it exactly as mem.mjs does; Test checks the saved
option. Turning it off removes the option. All five languages (en, zh,
zh-TW, ja, de) get the new strings; urlHelp and invalidUrl name the
switch.
- The hook took only origin local / magpie-key. recallRemote and
captureRemote (default false, typed booleans, in package.json's options
and the README) let remote and gateway-key requests in, each on its own,
as powercontext's do: captureRemote saves the conversation but recalls
nothing, and neither turns capture on. Unlike powercontext's, a missing
or unknown origin stays out even with both on. powercontext's page has
no switches for these, so this page doesn't either; its "What is sent"
text names the options. Sticky blocks were already keyed by origin.
Run (mote, at this tree on origin/main
|
||
|
|
df98bf6fb2 |
nowledge-mem 0.1.3: skipAgents leaves the apps you name without memory (#597)
QingZ11 relayed a user whose Doubao translator, behind magpie, had Mem
recall added to every translation. The plugin had one global recall
switch, so the only way out was turning memory off for every agent.
skipAgents (option, and "Apps without memory" on the plugin page) lists
apps by the agent name magpie gives a request (ctx.agent, the Agent
column on magpie's Usage page). A listed app's request is treated like
another machine's: no search, no Context Bundle, no capture, nothing
sent to Mem, request unchanged, reported "skipped". Names compare
without case, spaces or punctuation, so "Claude Code" matches
claude-code. A list or a comma-separated string (ASCII or full-width
comma). Default empty: nothing changes for anyone who doesn't set it.
Run (mote, at this tree on origin/main
|
||
|
|
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
|
||
|
|
c38a364e6a |
nowledge-mem 0.1.1: return from the connection test page, by IceCodeNew (#537)
The connection test page no longer depends on window.name, which the app's frame navigation drops. The language travels as `/test?lang=xx` and the page always shows Back to settings, which calls history.back() in the frame. The page takes no return address. Host (loopback:<port>), the per-process token and Origin null/self are unchanged in handle(). 0.1.1: package.json and mem.mjs's User-Agent version were bumped together. Reviewed at 390130262eaaff2bf4bfd16b3483626c0c730d7c (every changed line in packages/nowledge-mem). Run at that head: - mote: `HOME=$(mktemp -d) bun test packages/nowledge-mem`: 53 pass, 1 skip (live), 0 fail. `bun scripts/check.mjs`: exit 0. - Broken by hand: dropping `history.back()` from the test page turned "the running service answers 403 ..." red. Dropping the `lang` query from settings.js turned "configuration page saves the Mem connection ..." red. Both passed again once restored. - Browser harness: a window frames the real page/settings.html under magpie's plugin-page CSP in an `<iframe sandbox="allow-scripts">` and runs the package's real service. Chromium ran on mote and WebKit on the Linux VM, because WebKit launches time out on mote right now. In both engines: Test connection opened /test?lang=zh, Back read 返回设置, and Back returned the frame to settings.html while the top window stayed at its own URL (it had a pushState entry before). The settings page was usable again afterwards. `lang` set to `"><img onerror>`, `__proto__` and `constructor` injected nothing. `lang` is only used as a key into a fixed table, and the label is set through textContent. Not tried: the real magpie app (its bridge.js was stubbed) and a real Nowledge Mem server. Nit, not blocking: `?lang=__proto__` or `?lang=constructor` gives empty button labels, because the lookup isn't Object.hasOwn. Only a hand-typed URL can do this. npm: @magpie-community/gateway-nowledge-mem has never been on npm. Its first version needs an owner (trusted publishing can't create a package), so magpie installs it from dist. |
||
|
|
c5dc2e691c |
nowledge-mem 0.1.0: recall and opt-in capture from your Nowledge Mem, by IceCodeNew (#526)
Adds @magpie-community/gateway-nowledge-mem, an asynchronous gateway hook by IceCodeNew (#526): before each request it recalls from the user's Nowledge Mem (and the Context Bundle / Working Memory on a session's first turn), and, only when `capture` is turned on, imports completed conversations as Mem Threads. It applies to direct local requests and the `magpie-key` sharing key this computer writes into the user's own agents; other gateway keys, remote and unknown origins are never included. A page sets the connection and runs a real connection test through a loopback service guarded by Host, Origin and a per-start token. The package writes nothing into magpie's Library. registry.json gains one compact entry. Reviewed head 3f4ba91 (f9eb686 plus a maintainer commit adding a test that starts the service and expects 403 for a foreign Host, Origin and token). Run at 3f4ba91's tree on mote (macOS, Bun 1.4.2, HOME=$(mktemp -d)): repo `bun test` 3861 pass, 9 skip, 0 fail; `bun scripts/check.mjs` exit 0; packages/nowledge-mem 53 pass, 1 skip. Broken by hand: each of the service's four guards in handle() turns the new test red; earlier rounds broke the origin gate, the block escaping, the secret check and the cleartext-HTTP guard, each red. Not tried: a real Mem server, a real magpie with the plugin installed, Windows. Co-authored-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> |