[Bug]: v2 still unloadable via npm spec on OpenCode 2.0.32 — ./v2 subpath not usable as a plugin spec; ship v2 as root default export
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- bun, typescript
Línea de trabajo
Start by reading package.json and the v2 entry point at dist/src/v2/index.js; compare their exports with the plugin loader error quoted in the issue. Check how the package root and v2 export are configured, then verify that the published root entry provides the v2 definition OpenCode expects while retaining the named v1 export if needed. Done means the issue's root plugin spec, "opencode-pty", loads on OpenCode 2 without a shim.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
On OpenCode 2.0.32 (macOS arm64), [email protected] still fails to load as an npm plugin. This adds two things #67 and #83 don't cover yet:
- The
./v2subpath can't be used as a plugin spec. The README's V2 example is"plugins": ["opencode-pty/v2"], and OpenCode 2 parses that string as a package name rather than a subpath export. The only way left is a local shim file. I couldn't get one stable here: with a partial dependency tree, the plugin activation step hung (Location plugins did not finish activating) and blocked every command. I can't say whether that's the shim's fault or the adapter's. - What would fix it: publish with the v2 definition as the package's root
defaultexport, i.e.export default define({ id, setup })fromdist/index.js. You could keep the namedPTYPluginexport for v1 hosts, or gate on the host version. With that,"plugins": ["opencode-pty"]loads on v2 with no shim.
Evidence
package.jsonmain: dist/index.jsexports only the namedPTYPlugin.exports["./v2"]points todist/src/v2/index.js, which does containdefine({ id, setup }).- Load error (from
~/.local/share/opencode/log/opencode.log):Plugin must export a default definition with an id and an effect or setup function. - npm
latestis still 0.4.0, published 2026-09-18.
Related
- #67, #83: same load failure. This issue adds the subpath-spec detail and a concrete export fix.
- #80: once v2 loads, the adapter should also wire the permission authorizer, so that
permission.bashdeny/ask covers the pty tools.
- Lenguaje dominante
- TypeScript
- Estrellas
- 601
- Forks
- 66
- Merge medio
- 4 d 9 h
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de shekohex/opencode-pty
-
[Bug]: exit notification delivery failures are silently swallowed — agent never wakes, no diagnosticAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shekohex/opencode-pty#54 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
shekohex/opencode-pty#48 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
shekohex/opencode-pty#83 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
shekohex/opencode-pty#82 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
shekohex/opencode-pty#81 ·
Los mantenedores suelen responder en 1 día
Todos los issues de shekohex/opencode-pty
Issues similares
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256Abiertoarea: backend documentation priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
snapotter-hq/SnapOtter#2919 ·
Los mantenedores suelen responder en 1 día
-
BUG: Uncaught MEMORY USAGE error on Redis < 4.0 causes keys table data load to fail entirelyAbiertoaccepted :+1: bug db/redis
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
beekeeper-studio/beekeeper-studio#4882 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
ready-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
konflux-ci/konflux-ui#1630 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ahmedkhaleel2004/gitdiagram#233 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
simkimsia/netlify-axi#19 ·
Los mantenedores suelen responder en 1 día