fix(cli): flat builds point commands at plugin folders they do not ship

Đang mở Phù hợp với người mới
#1,162 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/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

Đọc cli/src/contexts/translate/application/strategies/flat-build-strategy.ts, bắt đầu với resolveSuffixToFlatPath và đoạn mã sao chép các thư mục vào đầu ra phẳng. Kiểm tra cách các đường dẫn lệnh được viết lại và những thư mục nào được sao chép. Công việc hoàn tất khi các lệnh tham chiếu đến những thư mục như bin/ hoặc scripts/ trỏ đến các tệp có trong đầu ra phẳng; hiện không có plugin kho lưu trữ nào kiểm thử trường hợp này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

A flat build (aidd translate --to <tool>) rewrites ${CLAUDE_PLUGIN_ROOT}/<path> in a plugin's MCP and hook commands to <out>/<path>, but it copies only agents/, skills/ and hooks/. A command that names any other folder, for example an MCP server under bin/ or a script under scripts/, points at a file the build never wrote.

Affected file(s)

cli/src/contexts/translate/application/strategies/flat-build-strategy.ts (resolveSuffixToFlatPath, which returns the suffix unchanged for any other folder)

Expected behaviour

Every path a shipped command names exists in the flat output: the referenced folder is copied next to the others.

Observed behaviour

The path is rewritten, the folder is not copied, and the command fails at runtime on the target tool. The rest of the plugin still works, so nothing reports it.

AI tool

Other: every flat host (Codex, Kilo, OpenCode, and the others built through the flat strategy).

OS

macOS, Linux, Windows.

Additional context
  • Failing the build on such a reference was considered and rejected: it would break a third-party plugin whose other surfaces work today.
  • No plugin in this repository references such a folder today.
  • Found while reviewing the hook path work in #1158.
Ngôn ngữ chính
TypeScript
Star
481
Fork
45
Merge trung bình
23 giờ 18 phút
Pull request đã merge (30 ngày)
106

Chuẩn bị môi trường

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 ai-driven-dev/framework

Tất cả issue của ai-driven-dev/framework

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.