Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Plugin fails to load on OpenCode v2.0.27 - incompatible plugin API

Đang mở
#83 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

  1. Install opencode-pty: opencode plugin add opencode-pty@latest
  2. Start OpenCode v2.0.27
  3. 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

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của shekohex/opencode-pty

Tất cả issue của shekohex/opencode-pty

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.