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

未关闭
#2,472 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
46/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, node.js, typescript

调研方向

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.

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

描述

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

主要语言
TypeScript
星标
3.4k
派生
516
平均合并
1 天 15 小时
30 天内合并 PR
116

环境准备

从这里开始

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

github/squad 的其他 Issue

查看 github/squad 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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