Plugin fails to load on OpenCode v2.0.27 - incompatible plugin API
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
- 3-5 ngày
- Mức phù hợp với người mới
- 25/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ệ
- node.js, typescript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Start at the plugin's entry module, where the named export PTYPlugin is declared, and compare it with the default-export shape OpenCode 2.x expects (an id plus an effect or setup function). The error text is in the issue, and the linked oh-my-openagent and opencode-pty#67 threads describe the same loader. Done means the plugin loads on OpenCode v2.0.27 without the error. The issue does not choose between adapting the API and adding a shim, so ask the maintainer first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
[email protected] fails to load as a plugin on OpenCode v2.0.27 with the following error:
Plugin must export a default definition with an id and an effect or setup function.
Environment
- OpenCode version: v2.0.27
- opencode-pty version: 0.4.0 (latest on npm)
- Platform: Windows 11
- Node: v22.18.0
Steps to Reproduce
- Install opencode-pty:
opencode plugin add opencode-pty@latest - Start OpenCode v2.0.27
- Plugin fails to load with the error above
Root Cause
OpenCode 2.0 introduced a new Effect-based plugin API that requires plugins to export a default definition with id and effect or setup function keys. opencode-pty currently uses the old export format (named exports like export { PTYPlugin }).
Expected Behavior
opencode-pty should either:
- Adapt to the new Effect-based plugin API, OR
- Provide a compatibility shim for OpenCode 2.x
Additional Context
- Similar issues reported for oh-my-openagent: https://github.com/code-yeongyu/oh-my-openagent/issues/10089
- Related v2 plugin installation bug: https://github.com/shekohex/opencode-pty/issues/67
- Ngôn ngữ chính
- TypeScript
- Star
- 597
- Fork
- 65
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 3
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
-
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
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
shekohex/opencode-pty#80 ·
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ự
-
afk-ok area:data-quality importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
enorm-labs/event-junkie#3301 ·
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 62/100
one-zero-eight/apply-bot#39 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area: app type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ExpidetGames/code-reviewer#308 ·
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
Maintainer thường phản hồi trong vòng 1 ngày