[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
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bun, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 601
- Fork
- 66
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của shekohex/opencode-pty
-
[Bug]: exit notification delivery failures are silently swallowed — agent never wakes, no diagnosticĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
shekohex/opencode-pty#54 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
shekohex/opencode-pty#48 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
shekohex/opencode-pty#83 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
shekohex/opencode-pty#82 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
shekohex/opencode-pty#81 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của shekohex/opencode-pty
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
getsentry/sentry-conventions#732 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status:in-linear status:team-assigned team:nodes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
n8n-io/n8n#41548 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
motiondivision/motion#3955 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DQ assisgnment closing at CRĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
equinor/prisma-decision-web#919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
自荐 / Suggestion: Prisma ComputeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100