cli: plugin list shows - for ID of TUI-only plugins configured in cli.json
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Theo dõi cách opencode plugin list tạo cột ID và đọc dữ liệu plugin, bắt đầu từ lệnh CLI và các bài kiểm thử của lệnh đó. So sánh dữ liệu registry phía máy chủ với tên gói đã hiển thị trong SOURCE, sau đó thêm phương án dự phòng hữu ích cho các plugin chỉ được cấu hình trong TUI. Hoàn thành khi cột ID hiển thị giá trị có ý nghĩa cho plugin chỉ được cấu hình trong cli.json và các bài kiểm thử liên quan đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
opencode plugin list shows - in the ID column for TUI-only plugins (packages exporting only ./tui, configured in cli.json), even though the plugin loads and works correctly. The ID column should fall back to something useful — ideally the package name — when the plugin has no server-side registry entry.
Environment
- opencode version: 2.3.0
- OS: reproduced on Windows 11, but this is platform-independent CLI output
- Active plugins: a TUI-only package (exports only
./tui) configured incli.json, alongside server+TUI packages configured inopencode.json
Reproduction
-
Publish (or link) a plugin package that exports only a TUI part and declares a TUI id:
"exports": { "./tui": "./dist/tui.js" }export default Plugin.define({ id: "usage.quota", setup(ctx) { /* ... */ } }) -
Configure it in
~/.config/opencode/cli.json(the documented location for TUI-only packages):{ "plugins": ["your-tui-only-plugin"] } -
Run
opencode plugin list, with at least one server+TUI plugin configured inopencode.jsonfor comparison.
Expected Behavior
The ID column should display something useful for TUI-only plugins. Two reasonable fallbacks, in order of preference:
- The package name — it is already available and displayed in the SOURCE column, so the data needs no new plumbing.
- The TUI part's declared id (e.g.
usage.quota) when there is no server-side entry.
Actual Behavior
The ID column shows - for the TUI-only plugin, while server+TUI plugins configured in opencode.json show their IDs:
ID VERSION SOURCE
- 0.2.2 opencode-coding-quota
<server-plugin-a> 1.0.0 <server-plugin-a>
<server-plugin-b> 1.0.0 <server-plugin-b>
Additional Context
- The plugin itself works fine (loads in the TUI, renders its UI). This is purely a display issue in
plugin list, but it is confusing for plugin authors: it looks like the package is broken or not detected. - Verified against the running service via
GET /api/plugin: the TUI-only plugin is absent from the server-side registry because it is loaded directly by the TUI fromcli.json— by design, per the docs, so it remains active against remote servers. Theplugin listID column appears to read only that server-side registry, hence the-. - Reproduced consistently on every invocation.
- Real-world npm package that triggers this:
opencode-coding-quota. - No workaround short of adding an empty server part to the package and moving it to
opencode.json— which sacrifices the documented remote-server benefit ofcli.jsonfor TUI-only packages.
- Ngôn ngữ chính
- TypeScript
- Star
- 227k
- Fork
- 30.7k
- Merge trung bình
- 4 giờ 35 phút
- Pull request đã merge (30 ngày)
- 498
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 anomalyco/opencode
-
area/cli platform/windows type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#64631 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop platform/windows type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode#64566 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Opening mini-tabsĐang mởarea/desktop platform/windows status/repro-plausible type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
anomalyco/opencode#64522 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
opencode-native panics on session ID after a multibyte characterCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea/tui platform/macos status/repro-plausible type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
anomalyco/opencode#64389 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop platform/windows type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#64077 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude Cosmetic
Độ 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
-
Domain / chatbot New
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Inist-CNRS/lodex#3861 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:agent-sdk area:docs documentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
anthropics/claude-code#110914 ·
-
Report: Voyo Sport 1 HDĐang mởapproved check:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày