The ShyPie plugin page gets a Middleware settings tab, so privacy-gate's
ctx.options can be set from the page instead of the CLI only. Options are
grouped as Protection, Advanced inspection and Diagnostics; the Agents view
is unchanged and both share one Save.
- Lists are validated (shape, count); a malformed allowModels blocks the
save instead of turning into an allow-everything list.
- Numbers are floored and clamped to the middleware's own numOpt ranges,
so a save that only flips an agent keeps the limit that actually runs
(maxDepth 500 stays 200, not the page default 40).
- An unknown binaryPolicy is reported and blocks the save.
- A save re-reads the options and reports a conflict when another surface
changed a managed field; options outside the form are kept.
- logEveryRows has one cap, 100000, in resolvedOptions and onUsage.
- privacy-gate 0.4.1.
Run at 9bb381bf on WSL (Ubuntu 24.04, Bun 1.4.2): bun test in
packages/privacy-gate 77 pass, 0 fail; scripts/check.mjs privacy-gate
clean. Broken by hand: page.test.mjs with 7c119f16's settings.js fails
(maxDepth Expected 200, Received 40). The diff adds no network call.
Not tried: the page in a running magpie.
Co-authored-by: siml1169 <siml1169@users.noreply.github.com>
privacy-gate's settings page and panel gain per-agent switches and an
"other agents" list. disabledAgents entries the UI can't show as one id
(globs such as `claude-*`) are kept verbatim on save and lock the rows
they match. A save reads the options again and refuses when the agent
fields changed since load, and merges into the current object so
unrelated options are kept.
Run at 30956ba616b3 (the reviewed head), on WSL with a temp HOME:
- packages/privacy-gate: bun test, 76 pass / 0 fail.
- bun scripts/check.mjs privacy-gate: ok.
- Broken by hand: with mergeDisabled dropping patterns, "a glob policy
survives an options save and unrelated options are kept" goes red.
Thanks @siml1169.