Files
magpie/internal/plugin/testdata/github/raw/someone/provider-with-page/main
yetone 50a38371df plugin: a page with its own service module is a page on the GitHub list (plugins#1226)
xiaopeng66/magpie-model-lab is a page plugin whose page talks to a
local service it ships as its main (magpie.page.service). readTagged
called any package with a main or exports a provider, so the GitHub
list showed it under Providers. Dropping the !runs check alone would
make every provider that ships a settings page (atomcode's
diagnostics page, for one) a page, so the rule is narrower: a package
with magpie.page.file and a module of its own is a page when its
keywords say "magpie-page", as every page with a main in the plugins
repository does (agent-console, amp-usage, chat, fingerprint,
free-tokens, page-model-quota, page-usage-board, page-usage-tree,
window-warmup). No provider or middleware there says it. The file
looked for in the repository is still its main. Kind only decides the
card's chip and filter; what an install loads is unchanged.

The fixture is model-lab's package.json as it is, without its 900KB
icon; a provider with a page and no keyword stays a provider.

Run (mote):
- go test -count=1 ./internal/plugin: ok (157.9s).
- go vet ./internal/plugin: ok. gofmt -l: clean.

Broken by hand: the old !runs rule with the new test: "a page with a
main: kind """, red.

Not tried: installing model-lab from the GitHub list in the real app.
2026-11-16 22:23:54 +08:00
..