feat(providers): add GitHub Copilot CLI agent provider#1
Merged
Conversation
Add copilot as a new supported agent provider, following the same pattern as existing providers (claude, codex, opencode). Copilot CLI manages its own API communication so no inference routing changes are needed. - New CopilotProvider with COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN credential discovery - Normalization aliases: copilot, gh-copilot, github-copilot - Two-token command detection for `gh copilot` wrapper invocation - Network policy with GitHub and Copilot API endpoints - Updated docs and README with Copilot agent references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
copilotas a new supported agent provider following the existing provider pattern (claude, codex, opencode)*.githubcopilot.com, so no inference routing changes are neededCOPILOT_GITHUB_TOKEN,GH_TOKEN, andGITHUB_TOKENenv varsRelated Issue
N/A — new agent support request.
Changes
crates/openshell-providers/src/providers/copilot.rs—CopilotProviderstruct with credential discovery and unit testCopilotProviderinProviderRegistry::new()copilot,gh-copilot,github-copilotaliasesgh copilotwrapper detection before existing single-token logic;ghalone still resolves togithubcopilotblock insandbox-policy.yamlwith GitHub/Copilot API endpoints and binary paths (npm, brew, user-local, node, gh)supported-agents.md,README.md(quickstart, tools table, providers section, supported agents table)Testing
discovers_copilot_env_credentialscopilot,gh-copilot,github-copilotcopilot,/usr/local/bin/copilot,gh copilotwrapper,ghalone still maps togithubChecklist
codex.rs)