npm 0.4.0: V2 entry never registers pty_* tools — setup omits ctx.tool.transform
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/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ệ
- nodejs, typescript
Hướng nghiên cứu
Bắt đầu bằng cách so sánh tệp đã phát hành dist/src/v2/index.js với src/v2/index.ts trên main, đặc biệt là hàm setup và cách xử lý ctx.tool.transform. Theo dõi cách registerV2Tools và bộ chuyển đổi V2 được kết nối, sau đó kiểm tra ví dụ cấu hình V2 trong README. Công việc hoàn tất khi plugin đã phát hành cung cấp các công cụ PTY và thông số gói được tài liệu hóa có thể được phân giải qua npm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The npm-published [email protected] V2 entry loads and reports itself as active in OpenCode, but none of pty_spawn / pty_write / pty_read / pty_list / pty_kill ever reach the agent's tool catalog.
Cause. package.json has no publishConfig/files exclusion that would catch it, but the tarball's dist/src/v2/index.js ships the pre-#61 setup:
setup: async (ctx) => {
const options = ctx.options;
const adapter = createV2Adapter();
installHostAdapter(adapter);
if (ctx.command && typeof ctx.command.transform === 'function') { ... }
if (options?.autostart) { ... }
}
It calls createV2Adapter() without the notifier and never calls registerV2Tools. ptyTools is exported from dist/src/v2/tools.js and is importable, but nothing wires it into ctx.tool.transform.
Commit 9be5126 (2026-09-19, "fix(v2): register pty tools, slash commands and exit notifications via the V2 plugin SDK") adds exactly this, but it landed one day after the v0.4.0 release commit ce5f61c (2026-09-18). So the fix is on main and simply never shipped — installing from npm gives a plugin that loads cleanly, passes opencode plugin check-adjacent loading, and silently provides no tools.
Repro. npm pack [email protected], inspect dist/src/v2/index.js: no ctx.tool usage. Compare src/v2/index.ts on main, which has registerV2Tools(draft) behind ctx.tool.transform.
Impact. Silent failure — no error at load time. The only signal is that the tools are absent at runtime.
Suggestion. Publish 0.4.1 from main. Note also that the README's V2 config example uses "package": "opencode-pty/v2"; opencode passes that string to npm, which parses pkg/subpath as a GitHub shorthand, so it fails to resolve. A subpath spec that npm can actually install (or documenting the plain package name plus a v2 export condition) would help.
- Ngôn ngữ chính
- TypeScript
- Star
- 606
- Fork
- 67
- 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 1-2 ngày Mức phù hợp với người mới 55/100
shekohex/opencode-pty#85 ·
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
Tất cả issue của shekohex/opencode-pty
Issue tương tự
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
openclaw/openclaw#182077 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aikido high security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand markCó thể đã có người làm @eric8810 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: 建议导入源后,自动切换到新导入的源Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
lyswhut/lx-music-desktop#3026 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
abhigyanpatwari/GitNexus#3704 ·
Maintainer thường phản hồi trong vòng 1 ngày