Files
plugins/scripts
yetone df52820f18 tagged: an agent plugin with a module of its own is an agent, and hooks are read (#1200)
kingchen95272025 (#1200): scripts/tagged.mjs only read magpie.agent
when a package had no main or exports, so an agent plugin that keeps a
host module (cursor-bridge-enhanced 0.2.17, magpie-agent-deva,
magpie-kiki) had no kind in dist/tagged.json and Discover showed it
under Providers, while magpie's own readTagged (internal/plugin/
github.go, since plugins#737) calls it an agent. tagged.mjs also had no
hooks branch.

- scripts/tagged-kind.mjs holds kindOf and entryOf, mirroring
  readTagged: middleware, page and hooks only without a module of their
  own; magpie.agent always. The file checked is the package's module
  when it has one, else the file its kind declares, as readTagged does.
- tagged.json carries read: 2. A file read the old way is read again
  whole on the next run, so entries not pushed to since are corrected
  too, not only new pushes. version stays 1, which the site's worker
  checks.

Run (mote):
- bun test scripts/: 30 pass, 0 fail.
- node scripts/tagged.mjs on a copy of dist's tagged.json, against
  GitHub (no token): 442 plugins, 0 unread, read 2. The three repos
  #1200 names, and 30 more, went from no kind to agent; 8 hooks
  repositories got hooks. No entry changed kind any other way. Which
  repositories the topic search returns differed from dist's file
  (16 gone, 10 new); that comes from the search, not this change.

Broken by hand: kindOf with the old nesting: 2 of 3 tests fail.

Not tried: the tagged workflow itself; it runs on its half-hourly
schedule after this lands.
2026-11-16 12:08:25 +08:00
..