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

Offen
#2,472 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
46/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github, node.js, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
3.4k
Forks
516
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
116

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus github/squad

Alle Issues in github/squad

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.