[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
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- bun, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 601
- フォーク
- 66
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
shekohex/opencode-pty のほかの issue
-
[Bug]: exit notification delivery failures are silently swallowed — agent never wakes, no diagnosticオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
shekohex/opencode-pty#54 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
shekohex/opencode-pty#48 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
shekohex/opencode-pty#83 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
shekohex/opencode-pty#82 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
shekohex/opencode-pty#81 ·
メンテナーはふだん 1 日以内に返信
shekohex/opencode-pty の issue をすべて見る
似ている issue
-
area:editor bug issue-form:bug P0 platform:windows review: low
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
1lck/Lithe-IDEA#1388 ·
メンテナーはふだん 1 日以内に返信
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without loggingオープンarea: backend bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
snapotter-hq/SnapOtter#3238 ·
メンテナーはふだん 1 日以内に返信
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/servers#5216 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信