OipsAnthony on X: "magpie 设置 - 隐私,支持统一关闭所有 Agent 的遥测功能,
这个统一管理的地方优先级最高". v0.1.3562 gave Codex, Claude Code, Gemini
CLI and Qwen Code a Telemetry row each; there was no one switch for all.
Settings › Privacy now has "Turn off telemetry for all agents"
(settings.AgentTelemetryOff, POST /api/settings/agent-telemetry,
agent.SetTelemetryAll in internal/agent/telemetry_all.go):
- On: every agent found here with a telemetry switch is turned off through
its own switch and that switch's rules (only keys the file lacks are
written; a value of the user's own that keeps telemetry on is never
written over: the agent stays on and the reply's "refused" names it
and why). Each agent the switch turned off gets a stash marker,
<id>.telemetry.all. An agent found later is turned off on the next
state the window reads and by a one-minute gateway loop
(KeepTelemetryAllOff, in WhileServing).
- While on, each agent's own Telemetry row shows off, says "Off for all
agents in Settings › Privacy" and its buttons are disabled; the API
refuses it too (ErrTelemetryAllOff).
- Off: only the marked agents are turned back on, which takes out only
magpie's keys. An agent off by its own row or the user's own config
before stays off.
- An unreadable settings.json is unknown: nothing is written.
- The setting is per computer (KeepOwn) and the generic settings POST
can't change it (settingsapi.Merge carries it).
app.js pays for its ~650 bytes with ten Privacy-section comments cut
(core 1,533,550, under its 1,533,802 budget, no raise).
Run (mote, first on 10bef5fe0):
- go test -count=1 ./internal/agent ./internal/gui ./internal/cli
./internal/settings ./internal/settingsapi: ok, except gui's
TestSettingsSaveKeepsWhatItDoesNotSend, red as it should be for a new
field; with AgentTelemetryOff in its fixture it and the budget and
parity tests pass (-run).
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./...: clean. gofmt -l: clean.
- GUI, chromium and webkit: privacy-*.test.cjs (new
privacy-agent-telemetry: 5 languages x 1100/640px plus a refused case
in each engine, no scroll on click, no native select), i18n-*,
agent-telemetry, settings-search, click-scroll: 218 of 218 pass.
- The whole GUI suite (1,367 files) was started under ~/suite.lock and
never got it: lockf gave up after 4h with the lock held by other runs.
- Rebased on 6a81a3c62 (this commit's parent), again: go vet
./internal/... (darwin) and GOOS=windows vet of agent, gui, cli; the
Telemetry, budget, settings-keep, CLI parity and route tests; GUI
privacy-agent-telemetry, agent-telemetry, i18n-keys and
privacy-usage-stats in both engines: 64 of 64.
Broken by hand:
- no stash marker in keepTelemetryOff: TestTelemetryAllOff red, "Gemini
CLI not back on".
- SetTelemetry without the ErrTelemetryAllOff check: TestTelemetryAllOff
red, "Gemini CLI's row turned on under the switch".
Not tried: a real agent's config on this computer (sandbox HOME only);
Windows runs of the new Go tests (they skip there, a #! stand-in isn't a
command on Windows; the switch's code has no OS-specific path).