Files
magpie/internal/plugin/testdata
yetone f92c0a2bdd plugins: a plugin is told the effort asked, and its usage windows keep their pool and family
What a ported Antigravity needs from the host, kept generic:

- The gateway puts the request's reasoning effort on a plugin's fetch as
  X-Magpie-Effort (provider.EffortHeader), so a plugin that serves one
  model at several levels can pick the level. host.js strips it with the
  other magpie-only headers, so the vendor never sees it.
- A plugin's usage window may name a Pool and a Family; quotaOfPlugin
  passes them through, so PooledWindows names a shared pool
  ("Gemini · 7 days") as it does for the built-in.

Run (WSL magpie-desktop; mote unreachable, kex reset):
- TestPluginToldTheEffort: xhigh, low and none reach the plugin; the
  vendor gets no X-Magpie-Effort. Red with the MAGPIE_ONLY entry removed
  by hand (the vendor saw the header).
- TestPluginWindowsKeepPoolAndFamily, TestPluginToldTheSession: pass.
- Full suite: in the next commit's body (run at the head of both).
2026-11-10 20:16:44 +08:00
..
providers, sign-in, tray, plugins: four of StringKe's reports on Discord — (1) Removing a provider left its editor open and listed, and a second Remove said there was no such provider: the removal had been made, but moving the agents off its models failed on one agent whose config couldn't be written, and Reseat returned that as the change's error; now such an agent is a move with its error ("still on X, not moved: …", a warning in the panel, a line in the CLI and TUI), the others are moved, and the panel, told a delete failed, re-reads the list and closes the editor when the provider is gone. (2) The sign-in waiting sheet shows the sign-in link itself, selected whole on a click, with a copy button, for a browser other than the one that opens. (3) A subscription with several accounts offers "Account in use" among the menu bar's usages, following the account the gateway goes to first. (4) The Antigravity plugin's sign-in never started: magpie called every plugin's authorize with an inputs object, the way OpenCode's CLI does, and opencode-antigravity-auth then asked its Project ID on the terminal — magpie's stdin — until the minute ran out; inputs now go only to a method with prompts, as OpenCode's TUI passes them (checked against the real package under Bun in a sandbox: the Google sign-in URL comes back at once). TestReseatUnmovable, TestTrayInUse, TestInUseOf, TestAuthorizeNoPrompts, provider-remove.test.cjs, signin-link.test.cjs and tray-inuse.test.cjs fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit, tray-usages, plugin-signin, signin-callback, factory-sub pass.
2026-09-30 20:45:23 +08:00