Description
A plugin configured with an npm subpath export fails to install. opencode-pty ships a V2 entrypoint as opencode-pty/v2 (via exports: { "./v2": ... }), but the spec is parsed as a GitHub repo instead of an npm subpath.
Reproducing the parse directly:
$ bun add opencode-pty/v2
error: GET https://api.github.com/repos/opencode-pty/v2/tarball/ - 404
error: opencode-pty/v2 failed to resolve
Via the server (opencode plugin add opencode-pty/v2 or "plugins": [{"package": "opencode-pty/v2"}]) the log shows NpmInstallFailedError with An unknown git error occurred.
Cause: Npm.isInstallablePackage (packages/util/src/npm.ts) resolves package specs with npm-package-arg, which parses name/subpath as the GitHub shorthand github:name/subpath. Expected behaviour would be to install the registry root and import the full requested specifier (same gap as the closed #16586; related #47517).
Plugins
opencode-pty@0.4.0 (configured spec opencode-pty/v2)
OpenCode version
2.0.8
Steps to reproduce
opencode plugin add opencode-pty/v2 (or add "plugins": [{"package": "opencode-pty/v2"}] to opencode.json)
- Server logs
NpmInstallFailedError / An unknown git error occurred; the plugin never loads.
- Isolate the parse:
bun add opencode-pty/v2 → GET https://api.github.com/repos/opencode-pty/v2/tarball/ - 404
Operating System
Fedora Linux (x64)
Terminal
not relevant to the bug (server-side install path)
Description
A plugin configured with an npm subpath export fails to install.
opencode-ptyships a V2 entrypoint asopencode-pty/v2(viaexports: { "./v2": ... }), but the spec is parsed as a GitHub repo instead of an npm subpath.Reproducing the parse directly:
Via the server (
opencode plugin add opencode-pty/v2or"plugins": [{"package": "opencode-pty/v2"}]) the log showsNpmInstallFailedErrorwithAn unknown git error occurred.Cause:
Npm.isInstallablePackage(packages/util/src/npm.ts) resolves package specs withnpm-package-arg, which parsesname/subpathas the GitHub shorthandgithub:name/subpath. Expected behaviour would be to install the registry root and import the full requested specifier (same gap as the closed #16586; related #47517).Plugins
opencode-pty@0.4.0(configured specopencode-pty/v2)OpenCode version
2.0.8
Steps to reproduce
opencode plugin add opencode-pty/v2(or add"plugins": [{"package": "opencode-pty/v2"}]toopencode.json)NpmInstallFailedError/An unknown git error occurred; the plugin never loads.bun add opencode-pty/v2→GET https://api.github.com/repos/opencode-pty/v2/tarball/ - 404Operating System
Fedora Linux (x64)
Terminal
not relevant to the bug (server-side install path)