Files
magpie/internal/settings
yetone 93d5c76c0d router: an agent with many tools is given them on demand
ArvinCharl on X: the MCP router's tools fill the context. An agent that
doesn't search its MCP tools itself (all but Claude Code, Claude
Desktop, Codex and Pi) sends every tool's whole schema on every
request. Given more than 10 router tools, such an agent now lists two in
their place: find_tools (matches by name and description, the first 5
with their inputSchema, 15 more by name) and call_tool (runs one by
<server>__<tool>, its bare name, or arguments sent as a string; an
unknown name is told the close ones). The instructions still name every
server and its tools, and a tool called by its own name still runs. The
request log names the tool call_tool ran. The address for any other app
lists every tool, since which app connects isn't known.

Library → MCP gains a "Tools on demand" toggle (settings
routerAllTools, kept by KeepOwn and the settings API); turned off,
every agent gets every tool whole as before.

Run on mote (after the rebase onto 083821dc9: gateway vet, -run
'Hub|MCP|Settings|Search' and the four GUI files again, ok, 70 of 70):
- gofmt -l: empty. go vet, GOOS=linux go vet -tags nogui, GOOS=windows
  go vet of gateway, settings, settingsapi, gui, library: ok.
- go test -tags nogui -count=1 -timeout 45m ./internal/settings
  ./internal/settingsapi ./internal/gui ./internal/library: ok;
  ./internal/gateway -run 'Hub|MCP|Settings': ok.
- GUI (Chromium + WebKit, every language): library-mcp-router-tools,
  library-mcp-router-note, library-mcp-hub, i18n-keys: 70 of 70.
Broken by hand: hubOnDemand forced false turns TestHubMCPToolsOnDemand
red.
Not tried: a real OpenCode or Gemini CLI session against the router;
the full gateway package and full GUI suite.
2026-11-04 21:00:51 +08:00
..
tray: the menu bar shows several subscriptions' usage side by side (KevinXC on Discord) — Settings → Usage in the menu bar picked one card; its menu now ticks any number (kept open while ticking, saved once when it closes, Off unticks all, a ticked card that has gone stays listed to untick) and the pill says "3 subscriptions". settings.TrayUsages keeps them in order; a file with only the older trayUsage shows that one, and trayUsage is still written as the first for an older magpie. On the Mac the bird and a cell per card are drawn as one image by AppKit on the status item's button: the card's logo (a black glyph tinted in the menu bar's text colour, a coloured one as it is, the name's letter in a ring when there is none) and its two windows stacked, "42%" over "18%", in the bar's colour light or dark and sharp at any scale; the bird's flap goes through it. Arc flags run into numbers (Codex's logo) are spaced out for AppKit's SVG reader. A row longer than 10 characters (a plan's balance read from its page) is cut with an ellipsis in the bar and whole in the tooltip. Windows and Linux show the cards as text, " | " between them. TestTrayUsageCells, TestSVGArcFlags, TestTrayImage (darwin, renders 0-3 cards light and dark at 2x), TestTrayUsagesMigrate and tray-usages.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build (darwin GUI), go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./..., go test ./internal/gui pass; tray-usages, settings-groups, panel-*, click-scroll, old-webkit pass. Not seen in a live menu bar.
2026-09-30 19:45:44 +08:00