feat(cli): add GitHub Copilot CLI as an MCP install target + project skill#374
Draft
psoulos wants to merge 1 commit into
Draft
feat(cli): add GitHub Copilot CLI as an MCP install target + project skill#374psoulos wants to merge 1 commit into
psoulos wants to merge 1 commit into
Conversation
Register `copilot` (label "Copilot CLI") as a first-class editor target so `ok init` installs the OpenKnowledge MCP server into `~/.copilot/mcp-config.json` (honoring COPILOT_HOME) with all tools pre-approved. Copilot follows the claude-code pattern: it also installs the project skill at `.github/skills/open-knowledge/SKILL.md`, and `ok start` keeps it refreshed via the repair sweeps (CLI repair-skills + Desktop skill-reclaim). It intentionally has no projectConfigPath because Copilot CLI's MCP config is global-only. Updates enumeration tests, integration docs, and the changeset. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Paul Soulos seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Thanks for the contribution! Your PR could not be merged automatically: it overlaps other changes that aren't visible here, so a maintainer needs to reconcile it by hand. No action is needed from you. Your PR is already based on the latest A maintainer will resolve it and land your change; this PR will close automatically once it merges. This comment will be updated as the status changes. |
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.
What & why
OpenKnowledge wired up MCP install targets and project skills for Claude Code, Cursor, and Codex, but not GitHub Copilot CLI, even though Copilot CLI speaks MCP and supports skills. This adds
copilot(label "Copilot CLI") as a first-class editor target so Copilot users get the same out-of-the-box integration:ok initregisters the OpenKnowledge MCP server and installs the in-repo project skill, andok startkeeps the skill refreshed.The change leans on the existing data-driven
EDITOR_TARGETSregistry, so most of it is one new target plus registration in the skill-repair sweeps.localserver entry to the global~/.copilot/mcp-config.json(honoringCOPILOT_HOME) withtools: ["*"]so the agent can call the OpenKnowledgeexectool without a per-tool prompt..github/skills/open-knowledge/SKILL.md(the same skill Claude Code gets at.claude/skills/), registered in both the CLI (repair-skills.ts) and Desktop (skill-reclaim.ts) sweeps sook startreclaims/refreshes it.Follows the claude-code pattern, not claude-desktop. Copilot gets the project skill like claude-code, but intentionally has no
projectConfigPathbecause Copilot CLI's MCP config is authoritatively global-only (there is no repo-local.mcp.jsonequivalent). That is a real Copilot capability difference, not the global-everything claude-desktop model.A couple of non-obvious points worth a reviewer's eye:
.github/skillsbut personal skills from~/.copilotor~/.agents. The user-level discovery skill is already served by the central~/.agents/skills/open-knowledge-discovery/write (Copilot reads.agents), so no dedicated~/.copilotdiscovery skill is written, deliberately avoiding a duplicate skill name..claude/skillsand.github/skills, both of which Copilot reads. Documented as such incopilot.mdx.The outbound "Open with AI" / "Edit with AI" handoff launcher is not part of this PR (still
claude/cursor/codexonly); this is inbound MCP + skill only.How this was verified
bun run check(lint, build, typecheck, tests) run locally. All suites pass except two pre-existing/unrelated desktop failures confirmed onmainas well (an IPC channel-count ratchet marker and a PTY-flood stress test that only times out under full parallel load and passes in isolation).editors.test.ts,write-project-ai-integrations.test.ts(copilot writes the project skill, skips MCP config; only claude-desktop skips both),git-exclude.test.ts(canonical artifact set 9 -> 10), and desktopcreate-new-project.test.ts(skill writes now includecopilot).Checklist
bun run check(lint, typecheck, tests) locallybun run changeset) if this changes behavior