Make @github/copilot-sdk an optional peer dependency of squad-sdk (#2438)

Aperta
#2,472 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
46/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, node.js, typescript

Direzione di ricerca

Start with packages/squad-sdk/package.json and compare how the Claude Agent SDK is declared and loaded. Then trace the four imports under packages/squad-sdk/src and review how @bradygaster/squad-cli supplies Copilot dependencies. Decide how CLI users receive the optional dependency, then run the listed Claude-only and Copilot tests; done means the Claude paths work without the package and Copilot paths still pass with it installed.

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

Descrizione

Part of #2438 (epic Phase 1), split out from #2441, which scoped it out as a separate change. Listed in checklist #2469.

Problem

packages/squad-sdk/package.json has @github/copilot-sdk as a hard dependency (>=1.0.19 <1.0.29-0), so a Claude-only install still pulls it in. The Claude Agent SDK is already an optional peer dependency, loaded lazily.

What needs to be done

  • Move @github/copilot-sdk to peerDependencies, marked optional in peerDependenciesMeta, the same way @anthropic-ai/claude-agent-sdk is.
  • Load it lazily wherever the SDK imports it (4 files under packages/squad-sdk/src today), with a clear error message when a Copilot-only feature runs without it.
  • Keep @bradygaster/squad-cli working for Copilot users unchanged: the CLI either keeps a hard dependency on it, or installs it on first Copilot use. Decide which.
  • Tests: a Claude-only install (no @github/copilot-sdk) runs squad init --client claude, state-mcp and the claude-agent-sdk harness. The Copilot paths still pass with it installed.

🤖 Generated with Claude Code

Lingua principale
TypeScript
Stelle
3.4k
Fork
516
Merge medio
1g 15h
PR unite (30g)
116

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 github/squad

Tutte le issue di github/squad

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.