Files
yetoneandClaude cdf325f178 plugins: a package that is only a command (an MCP server like magpie-x-search) isn't listed under Unreviewed, isn't added as a plugin, and one added before says what it is instead of a host stack (#1327, congee949)
A repository tagged magpie-plugin whose npm copy (from that repository)
names no file to load (no main, no exports) was listed and installed from
npm without the entry check the GitHub route has; it then failed every
host start with "has no entry" and a stack. Now:

- the Unreviewed list checks npm's copy the same way: one that names no
  file needs the index.js the repository's own route needs (askTagged);
- `magpie plugin add` / the Plugins page refuse a package that names no
  file, has no index file and is neither pi's nor a middleware, take the
  package just installed for it out again, and say it isn't an OpenCode
  or magpie plugin, and, for one with a bin, to add an MCP server under
  Library → MCP servers (notPlugin);
- the host says the same, without a stack, for one already on the list.

Run: TestCommandOnlyPackageIsNoPlugin (magpie-x-search 1.2.0's real
package.json) fails without the change (Add = <nil>; with only host.js
reverted, the stack message), TestTaggedRepos with the real GitHub
package.json and npm latest of cyberElar/magpie-x-search fails without it
(listed), both pass with it; TestNotPluginKeepsPlugins (index.mjs, main,
exports, middleware, pi, a file stay plugins). go test -tags nogui
./internal/plugin under a temp HOME ok; go vet -tags nogui for darwin,
linux, windows. The built binary in a sandbox HOME: `magpie plugin add
magpie-x-search@latest` from real npm prints the new error, and
plugins/package.json no longer lists it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 23:09:25 +08:00

34 lines
1.0 KiB
JSON

{
"name": "magpie-x-search",
"version": "1.2.0",
"description": "MCP server for native Grok X search through local magpie OAuth, callable by any model.",
"license": "MIT",
"author": "cyberElar",
"homepage": "https://github.com/cyberElar/magpie-x-search#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/cyberElar/magpie-x-search.git"
},
"bugs": {
"url": "https://github.com/cyberElar/magpie-x-search/issues"
},
"keywords": ["mcp", "x-search", "twitter", "grok", "magpie", "oauth", "stdio"],
"engines": {
"node": ">=22"
},
"bin": {
"magpie-x-search": "launcher.cjs"
},
"files": ["launcher.cjs", "x_search_mcp.py", "search_backend.py", "search_cache.py"],
"scripts": {
"start": "node launcher.cjs",
"test": "node --test test_launcher.cjs test_package.cjs && node test_python.cjs",
"prepack": "node check_package.cjs",
"prepublishOnly": "npm test"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}