Files
magpie/internal/plugin/testdata
yetone 2051dfc232 library: the Pi market finds packages by name on npmmirror (eachg0 on X)
eachg0 on X: searching the Pi market for "rename" (or "pi-rename") found
nothing, though npm's pi-rename 1.2.0 carries the pi-package keyword.
cf20df721 (11-18) made the market ask the registry in use first: magpie's
own, the user's .npmrc/bunfig/env, or npmmirror with the 「国内镜像」
switch. npmmirror knows no keywords: qualifier. It answers 200
{"objects":[],"total":0} to "keywords:pi-package rename", so npm's own
search, asked only when the registry fails, never was. Its plain search,
"pi-package rename", finds 52, every one with the keyword.

A search with words that comes back empty is now asked again with the
qualifier as a plain word (plugin.PlainKeywords), and the keyword is
still checked here. The list before a search is unchanged: npmmirror
answers it with nothing, and magpie's snapshot stands, as before.

Sibling: the Plugins page's search (plugin.Search) asks
"keywords:pi-package <q>" too, and with the switch on source.Do sends it
to npmmirror first, so it found no pi provider packages there either.
searchNPM retries the same way. No other search uses a qualifier.

Tests, from npmmirror's own bytes (testdata/npmmirror, 2026-11-19):
TestPiSearchFindsByNameOnNPMMirror ("rename" and "pi-rename" find
pi-rename with npm's own search down), TestSearchFindsPiPackagesOnNPMMirror,
TestPlainKeywords.

Run (mica, at this tree; origin/main 3869aee3b, unchanged at push):
- gofmt -l: clean; go vet ./..., GOOS=linux go vet -tags nogui ./...,
  GOOS=windows go vet ./...: ok; go build, GOOS=linux go build -tags
  nogui, GOOS=windows go build: ok
- go test -tags nogui ./internal/library ./internal/plugin: ok
- go test -tags nogui ./internal/gui: two reds, both filed and both
  passing alone at this tree: TestAppReplacesItsOlderGatewayOnceIdle
  (#6297) and TestGatewayModeListsNoOwnSessions (#7064)
- GUI library-pi-market.test.cjs: Chromium 22/22, WebKit 11/11

Broken by hand: the old pimarket.go and market.go with the new tests:
TestPiSearchFindsByNameOnNPMMirror red ("rename": [] asked
["keywords:pi-package" "keywords:pi-package rename"]),
TestSearchFindsPiPackagesOnNPMMirror red (Search = []).
Real use (sandbox HOME, NPM_CONFIG_REGISTRY=https://registry.npmmirror.com,
live npmmirror): old code "rename" 0 results, "pi-rename" 0; new code
52 and 52 with pi-rename; Plugins search "antigravity" finds the pi
provider packages. npm's own registry: pi-rename found before and after.
Not run: the full go test ./... (mote and mica each had another
session's full suite running), the whole GUI suite (no GUI or API change).
Not tried: the real 「国内镜像」 switch in the app (same registry URL as
the env var path).
2026-11-19 11:50:37 +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