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

Aperta Adatta ai principianti
#1,162 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Leggi cli/src/contexts/translate/application/strategies/flat-build-strategy.ts, iniziando da resolveSuffixToFlatPath e dal codice che copia le cartelle nell’output piatto. Controlla come vengono riscritti i percorsi dei comandi e quali cartelle vengono copiate. Il lavoro è completo quando i comandi che fanno riferimento a cartelle come bin/ o scripts/ puntano a file presenti nell’output piatto; al momento nessun plugin di repository verifica questo caso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
481
Fork
45
Merge medio
23h 18m
PR unite (30g)
106

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ai-driven-dev/framework

Tutte le issue di ai-driven-dev/framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.