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

未关闭 适合新手
#1,162 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
cli

调研方向

阅读cli/src/contexts/translate/application/strategies/flat-build-strategy.ts,先查看resolveSuffixToFlatPath以及将文件夹复制到扁平化输出中的代码。检查命令路径如何重写,以及哪些文件夹会被复制。当引用bin/或scripts/等文件夹的命令指向扁平化输出中存在的文件时,即表示完成;目前没有仓库插件覆盖此情况。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
TypeScript
星标
481
派生
45
平均合并
23 小时 18 分钟
30 天内合并 PR
106

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ai-driven-dev/framework 的其他 Issue

查看 ai-driven-dev/framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。