Skip to content

feat(adapters): add @agentproto/adapter-copilot-cli (GitHub Copilot CLI ACP adapter) - #1648

Merged
agentiknet merged 2 commits into
mainfrom
wt/copilot-cli-adapter-i1321-10121ab2
Oct 1, 2026
Merged

agentiknet merged 2 commits into
mainfrom
wt/copilot-cli-adapter-i1321-10121ab2

Conversation

@agentiknet

@agentiknet agentiknet commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

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/load resume in 0.0.410+).

  • adapters/copilot-cli/: defineAgentCli manifest mirroring the grok-cli ACP posture — persistent/resumable/bidirectional sessions, model + effort applied via ACP session config options, github_host option setting GH_HOST for GHEC data residency / GHES.
  • Auth: documented token precedence COPILOT_GITHUB_TOKEN > GH_TOKEN > GITHUB_TOKEN (+ GH_ENTERPRISE_TOKEN/GITHUB_ENTERPRISE_TOKEN); classic ghp_ tokens unsupported. No catalog provider/models block — 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: new copilot-cli slug entry.
  • Changeset: minor bumps for @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 -p surface — verified from official docs (2026-10-01). Exact --version stdout shape, ACP effort enum vocabulary, brew cask name — assumed, marked.

Gate: pnpm install / package build / repo-wide check-types / repo-wide test (5 new adapter tests) all exit 0.


🤖 @agentproto-bot — PR · session sess_db945f89 (copilot-cli-support-investigation) · opencode / api-key · auth-profile OpenRouter (env key) · model openrouter/z-ai/glm-5.3-flash · 807.3k in / 7.6k out · $0.3018 (daemon) · host mac.home · cwd agentik-studio

…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.

@ponytail-coder ponytail-coder Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/gemini ACP-arm pattern closely: defineAgentCli with protocol: "acp", acp: doc ref, continuation.default: "native-resume" backed by session/load (0.0.410+), and a sane version_check floor gated on that same feature. Good internal consistency between index.ts comments, COPILOT.md frontmatter, and copilot-acp.ACP.md.
  • The "no provider, no models block" decision is well justified (entitlement-gated model menu, GitHub-subscription billing) and is explicitly covered by a test (provider/modelDerivedApiKey/models all undefined).
  • Auth env precedence (COPILOT_GITHUB_TOKEN > GH_TOKEN > GITHUB_TOKEN, plus GHES vars) is documented consistently across index.ts, SECRETS.md, and COPILOT.md, and asserted in the test.
  • capabilities.multimodal: false and sub_agents: false are conservative, documented choices rather than guesses — appropriate given "not live-verified" caveats are called out explicitly in COPILOT.md.
  • Catalog registration in packages/cli/src/registry/catalog.ts matches the shape/style of neighboring entries (grok-cli, gemini).

Tests

  • src/index.test.ts covers the important decisions: ACP transport/bin_args, auth env list, absence of provider/models, option shapes (model, effort enum, github_host → GH_HOST env mapping), and the runtime factory. Adequate for a new adapter package (mirrors the test depth of sibling adapters).

Nits

  • package.json lists README.md in files, but no README.md is created in this PR (same as the existing grok-cli package, 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

@agentiknet
agentiknet merged commit b6c356e into main Oct 1, 2026
13 checks passed
@agentiknet
agentiknet deleted the wt/copilot-cli-adapter-i1321-10121ab2 branch October 1, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] add support for copilot cli (github public and github enterprise)

1 participant