Repository navigation
feat(adapters): add @agentproto/adapter-copilot-cli (GitHub Copilot CLI ACP adapter) - #1648
Conversation
…LI ACP adapter) Fixes #1321. New print-free ACP arm driving copilot --acp --stdio (first-party ACP server, preview since 0.0.397; session/load 0.0.410+). Auth: COPILOT_GITHUB_TOKEN > GH_TOKEN > GITHUB_TOKEN (+ GHES vars); github_host option sets GH_HOST for Enterprise. No catalog provider — Copilot bills through the GitHub subscription. Registered the copilot-cli slug in the CLI install catalog.
There was a problem hiding this comment.
Summary
Adds @agentproto/adapter-copilot-cli, a new AIP-45 ACP adapter driving GitHub Copilot CLI's first-party copilot --acp --stdio server, plus docs (COPILOT.md, SECRETS.md, SANDBOX.md, copilot-acp.ACP.md) and a new copilot-cli entry in @agentproto/cli's install catalog.
Changeset
| package | bump | reason |
|---|---|---|
@agentproto/adapter-copilot-cli |
minor | new package / public surface |
@agentproto/cli |
minor | new catalog entry (backward-compatible addition) |
Matches the .changeset/copilot-cli-adapter.md already included in the diff.
Findings
Correctness / AIP alignment
- Follows the established
grok-cli/geminiACP-arm pattern closely:defineAgentCliwithprotocol: "acp",acp:doc ref,continuation.default: "native-resume"backed bysession/load(0.0.410+), and a saneversion_checkfloor gated on that same feature. Good internal consistency betweenindex.tscomments,COPILOT.mdfrontmatter, andcopilot-acp.ACP.md. - The "no
provider, nomodelsblock" decision is well justified (entitlement-gated model menu, GitHub-subscription billing) and is explicitly covered by a test (provider/modelDerivedApiKey/modelsallundefined). - Auth env precedence (
COPILOT_GITHUB_TOKEN > GH_TOKEN > GITHUB_TOKEN, plus GHES vars) is documented consistently acrossindex.ts,SECRETS.md, andCOPILOT.md, and asserted in the test. capabilities.multimodal: falseandsub_agents: falseare conservative, documented choices rather than guesses — appropriate given "not live-verified" caveats are called out explicitly inCOPILOT.md.- Catalog registration in
packages/cli/src/registry/catalog.tsmatches the shape/style of neighboring entries (grok-cli,gemini).
Tests
src/index.test.tscovers the important decisions: ACP transport/bin_args, auth env list, absence ofprovider/models, option shapes (model,effortenum,github_host→GH_HOSTenv mapping), and the runtime factory. Adequate for a new adapter package (mirrors the test depth of sibling adapters).
Nits
package.jsonlistsREADME.mdinfiles, but noREADME.mdis created in this PR (same as the existinggrok-clipackage, so this is a pre-existing convention gap, not a regression — just flagging in case it's meant to be generated at publish time).
Simplify (ponytail pass)
Nothing over-engineered here — single straightforward defineAgentCli call with one caller, no speculative abstraction, no reinvented stdlib. Doc files are proportionate to the adapter's auth/sandbox surface.
net: -0 lines possible.
Verdict
LGTM ✅ — new adapter follows house conventions closely, is well-documented, and has a correct, accurate changeset.
🤖 @agentproto-bot — review · legacy fallback (api-key) · run 36793612822 · sha c6fde0e496ef17043782d30e909c64f1e600cfd2
Fixes #1321.
New AIP-45 adapter for GitHub's official Copilot CLI, driving its first-party ACP server (
copilot --acp --stdio, NDJSON JSON-RPC 2.0 over stdio; ACP added in 0.0.397, public preview;session/loadresume in 0.0.410+).adapters/copilot-cli/:defineAgentClimanifest mirroring the grok-cli ACP posture — persistent/resumable/bidirectional sessions, model + effort applied via ACP session config options,github_hostoption settingGH_HOSTfor GHEC data residency / GHES.COPILOT_GITHUB_TOKEN > GH_TOKEN > GITHUB_TOKEN(+GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN); classicghp_tokens unsupported. No catalogprovider/modelsblock — Copilot bills through the GitHub subscription, so model ids are a free-form option validated by the CLI itself.packages/cli/src/registry/catalog.ts: newcopilot-clislug entry.@agentproto/adapter-copilot-cli(new) and@agentproto/cli.Verified vs assumed (binary not installed locally; assumptions flagged in comments/docs): ACP surface + transports, token precedence, headless
-psurface — verified from official docs (2026-10-01). Exact--versionstdout shape, ACPeffortenum vocabulary, brew cask name — assumed, marked.Gate:
pnpm install/ package build / repo-widecheck-types/ repo-widetest(5 new adapter tests) all exit 0.🤖 @agentproto-bot — PR · session
sess_db945f89(copilot-cli-support-investigation) · opencode / api-key · auth-profileOpenRouter (env key)· modelopenrouter/z-ai/glm-5.3-flash· 807.3k in / 7.6k out · $0.3018 (daemon) · hostmac.home· cwdagentik-studio