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>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"bin":{"magpie-x-search":"launcher.cjs"},"bugs":{"url":"https://github.com/cyberElar/magpie-x-search/issues"},"dist":{"shasum":"6304721a2a326fc52df32e7bcd29d74d36fa8869","tarball":"https://registry.npmjs.org/magpie-x-search/-/magpie-x-search-1.2.0.tgz","fileCount":7,"integrity":"sha512-bJkXHCYn7548cLwbIrNtAAhF2BBSlOZo8HqVHzRN7lmtu/e/CBcUxSGtE0ech60s1L2uX8nJvzUJLq8euyxXBg==","signatures":[{"sig":"MEUCIGpmfGrxr1Wzf8+Xy4+ZVOvsv89noq2oQKWQk3uRRbRaAiEAzOHm8Z8hWQBT2TAagk9A70BTenB4n8OoyeV63/gZXCw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50260},"name":"magpie-x-search","author":{"name":"cyberElar"},"engines":{"node":">=22"},"gitHead":"d653c413cd7317e6f0562b29484d394501a80818","license":"MIT","scripts":{"test":"node --test test_launcher.cjs test_package.cjs && node test_python.cjs","start":"node launcher.cjs","prepack":"node check_package.cjs","prepublishOnly":"npm test"},"_npmUser":{"name":"elarrr","email":"elaratlas@gmail.com","approver":{"name":"elarrr","email":"elaratlas@gmail.com"}},"homepage":"https://github.com/cyberElar/magpie-x-search#readme","keywords":["mcp","x-search","twitter","grok","magpie","oauth","stdio"],"repository":{"url":"git+https://github.com/cyberElar/magpie-x-search.git","type":"git"},"_npmVersion":"12.2.0","description":"MCP server for native Grok X search through local magpie OAuth, callable by any model.","directories":{},"maintainers":[{"name":"elarrr","email":"elaratlas@gmail.com"}],"_nodeVersion":"26.10.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/magpie-x-search_1.2.0_1791310171064_0.80994226516181","host":"s3://npm-registry-packages-npm-production"},"_id":"magpie-x-search@1.2.0","version":"1.2.0"}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"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/"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user