Skip to content
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9546ea7
feat(providers): add GitHub Copilot community provider
popemkt Apr 21, 2026
f412b83
feat(providers/copilot): wire tool restrictions
popemkt Apr 21, 2026
94b7f47
feat(providers/copilot): wire MCP servers
popemkt Apr 21, 2026
a198290
feat(providers/copilot): wire skills
popemkt Apr 21, 2026
d7719bb
feat(providers/copilot): wire best-effort structured output
popemkt Apr 21, 2026
8a3504d
fix(providers/copilot): address PR review findings
popemkt Apr 21, 2026
31d94d4
feat(providers/copilot): wire sub-agents
popemkt Apr 21, 2026
e0b57a8
fix(providers/copilot): make vendor-path binary-resolver test hermetic
Apr 22, 2026
e50e649
Merge upstream/dev into emdash/add-copilot-2er
Apr 22, 2026
efd838e
fix(merge): remove stray <<<<<<< HEAD marker left in package.json
Apr 22, 2026
bf8734b
fix(copilot): address CodeRabbit review on PR #1351
popemkt Apr 27, 2026
06c3f9e
Merge upstream/dev into emdash/add-copilot-2er
popemkt Apr 27, 2026
454dbcb
test(copilot): cover MCP, skills, agents in e2e-copilot-all-features
popemkt Apr 27, 2026
f9bad03
test(copilot): harden skill + agent assertions with unguessable tokens
popemkt Apr 27, 2026
ef16bac
docs(copilot): clarify single-auth-model + drop redundant outer quote…
popemkt Apr 27, 2026
784444a
Merge remote-tracking branch 'upstream/dev' into emdash/add-copilot-2er
popemkt Apr 28, 2026
d3fc706
Merge remote-tracking branch 'upstream/dev' into emdash/add-copilot-2er
popemkt Apr 29, 2026
4f666c7
refactor(providers/copilot): drop isModelCompatible per #1463
popemkt Apr 29, 2026
2c65569
fix(providers/copilot): lazy-load @github/copilot-sdk to protect comp…
popemkt Apr 29, 2026
8ebacbf
fix(providers/copilot): explicit useLoggedInUser config wins over env…
popemkt Apr 29, 2026
34302e0
Merge upstream/dev into emdash/add-copilot-2er
popemkt May 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .archon/workflows/e2e-copilot-smoke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# E2E smoke test — GitHub Copilot community provider
# Verifies: provider registration, SDK session start, simple prompt response.
# Auth: run `copilot login`, or provide COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN.
name: e2e-copilot-smoke
description: 'Smoke test for the GitHub Copilot community provider.'
provider: copilot
model: gpt-5-mini

nodes:
- id: simple
prompt: 'Reply with exactly COPILOT_OK'
idle_timeout: 30000

- id: assert
bash: |
# The workflow engine substitutes $simple.output as a literal string
# before bash runs. Wrap in single quotes so command substitution
# (`$(...)`, backticks) inside a model response is treated as data,
# not executed. A literal `'` in the value would cause a syntax
# error, which fails the test loudly rather than running arbitrary
# shell — strict improvement over double-quoted interpolation.
output_raw='$simple.output'
if [ -z "$output_raw" ]; then
echo "FAIL: simple node returned empty output"
exit 1
fi
printf '%s\n' "$output_raw" | grep -F -q -- 'COPILOT_OK' || {
printf 'FAIL: expected COPILOT_OK, got: %s\n' "$output_raw"
exit 1
}
printf 'PASS: simple=%s\n' "$output_raw"
depends_on: [simple]
21 changes: 21 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/core/src/config/config-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const SAFE_ASSISTANT_FIELDS: Record<string, readonly string[]> = {
codex: ['model', 'modelReasoningEffort', 'webSearchMode'],
// community providers — list each field we're confident is safe to
// show in the web UI. Unknown providers fall through with no fields.
copilot: ['model'],
pi: ['model'],
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: AI Assistants
description: Configure Claude Code, Codex, and Pi as AI assistants for Archon.
description: Configure Claude Code, Codex, GitHub Copilot, and Pi as AI assistants for Archon.
category: getting-started
area: clients
audience: [user]
Expand All @@ -9,7 +9,7 @@ sidebar:
order: 4
---

You must configure **at least one** AI assistant. All three can be configured and mixed within workflows.
You must configure **at least one** AI assistant. All four can be configured and mixed within workflows.

## Claude Code

Expand Down Expand Up @@ -227,6 +227,80 @@ If you want Codex to be the default AI assistant for new conversations without c
DEFAULT_AI_ASSISTANT=codex
```

## GitHub Copilot (Community Provider)

**SDK-backed community provider.** Archon's Copilot adapter uses `@github/copilot-sdk`, which drives the Copilot CLI over GitHub's supported JSON-RPC bridge instead of screen-scraping the interactive TUI.

Copilot is registered as `builtIn: false` — like Pi, it is a bundled community provider rather than a core built-in.

### Install

For source installs, `bun install` pulls in the SDK and its bundled CLI dependency automatically.

For compiled Archon binaries, install the Copilot CLI yourself and point Archon at it if needed:

```bash
# Any platform
npm install -g @github/copilot
```

Optional override paths:

```ini
COPILOT_CLI_PATH=/absolute/path/to/copilot
```

```yaml
assistants:
copilot:
copilotCliPath: /absolute/path/to/copilot
```

### Authenticate

Copilot authentication is delegated to the Copilot CLI / SDK.

Use one of:

- `copilot login`
- `COPILOT_GITHUB_TOKEN`
- `GH_TOKEN`
- `GITHUB_TOKEN`

Request-scoped env vars still win, so codebase env overrides work the same way they do for the other providers.

### Configuration Options

```yaml
assistants:
copilot:
model: gpt-5-mini
# Optional: explicit Copilot CLI path
# copilotCliPath: /absolute/path/to/copilot
# Optional: override Copilot config dir
# configDir: /absolute/path/to/copilot-config
# Optional: allow Copilot to auto-discover repo MCP/skills
# enableConfigDiscovery: false
```

> **⚠️ Trust boundary.** `enableConfigDiscovery: true` lets the Copilot CLI/SDK load repo-level config (e.g. `.mcp.json`, `.vscode/mcp.json`, skill directories) directly, bypassing Archon's workflow validation surface. Only enable it for repositories you trust. Archon's default (`false`) keeps MCP/skills under explicit workflow control via `nodeConfig.mcp` and `nodeConfig.skills`.

### Supported Archon Features

| Feature | Support | Notes |
|---|---|---|
| Session resume | ✅ | Returns `sessionId` and reuses it on resume |
| Reasoning control | ✅ | `effort:` / string `thinking:` map to Copilot `reasoningEffort` |
| System prompt override | ✅ | `systemPrompt:` |
| Codebase env vars (`envInjection`) | ✅ | merged into the spawned Copilot CLI environment |
| Tool restrictions | ✅ | `allowed_tools` → `availableTools`, `denied_tools` → `excludedTools` (SDK enforces `availableTools` precedence when both are set) |
| MCP servers | ✅ | `mcp: path/to/servers.json` → `SessionConfig.mcpServers` (env vars `$FOO` expanded; missing vars warned) |
| Skills | ✅ | `skills: [name]` resolved from `.agents/skills/`, `.claude/skills/` (project or home) → `SessionConfig.skillDirectories` |
| Structured output | ✅ | best-effort: schema instruction appended to the prompt, assistant transcript parsed as JSON on completion (models that reliably follow instruction succeed; unparseable output degrades to the dag-executor's missing-output warning) |
| Sub-agents (`agents:`) | ✅ | `name`/`description`/`prompt`/`tools` (allowlist) map 1:1 to `SessionConfig.customAgents`; Claude-specific fields (`model`, `disallowedTools`, `skills`, `maxTurns`) warn per agent and are ignored |
| Fallback model | ❌ | not wired |
| Sandbox | ❌ | Copilot permissions are separate from Archon's sandbox surface |

## Pi (Community Provider)

**One adapter, ~20 LLM backends.** Pi (`@mariozechner/pi-coding-agent`) is a community-maintained coding-agent harness that Archon integrates as the first community provider. It unlocks Anthropic, OpenAI, Google (Gemini + Vertex), Groq, Mistral, Cerebras, xAI, OpenRouter, Hugging Face, and more under a single `provider: pi` entry.
Expand Down
4 changes: 3 additions & 1 deletion packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
"./codex/provider": "./src/codex/provider.ts",
"./codex/config": "./src/codex/config.ts",
"./codex/binary-resolver": "./src/codex/binary-resolver.ts",
"./community/copilot": "./src/community/copilot/index.ts",
"./community/pi": "./src/community/pi/index.ts",
"./errors": "./src/errors.ts",
"./registry": "./src/registry.ts"
},
"scripts": {
"test": "bun test src/claude/provider.test.ts && bun test src/codex/provider.test.ts && bun test src/registry.test.ts && bun test src/codex/binary-guard.test.ts && bun test src/codex/binary-resolver.test.ts && bun test src/codex/binary-resolver-dev.test.ts && bun test src/claude/binary-resolver.test.ts && bun test src/claude/binary-resolver-dev.test.ts && bun test src/community/pi/model-ref.test.ts && bun test src/community/pi/config.test.ts && bun test src/community/pi/event-bridge.test.ts && bun test src/community/pi/options-translator.test.ts && bun test src/community/pi/session-resolver.test.ts && bun test src/community/pi/provider.test.ts && bun test src/community/pi/provider-lazy-load.test.ts",
"test": "bun test src/claude/provider.test.ts && bun test src/codex/provider.test.ts && bun test src/registry.test.ts && bun test src/codex/binary-guard.test.ts && bun test src/codex/binary-resolver.test.ts && bun test src/codex/binary-resolver-dev.test.ts && bun test src/claude/binary-resolver.test.ts && bun test src/claude/binary-resolver-dev.test.ts && bun test src/community/pi/model-ref.test.ts && bun test src/community/pi/config.test.ts && bun test src/community/pi/event-bridge.test.ts && bun test src/community/pi/options-translator.test.ts && bun test src/community/pi/session-resolver.test.ts && bun test src/community/pi/provider.test.ts && bun test src/community/pi/provider-lazy-load.test.ts && bun test src/community/copilot/config.test.ts && bun test src/community/copilot/binary-resolver.test.ts && bun test src/community/copilot/provider.test.ts && bun test src/community/copilot/tool-restrictions.test.ts && bun test src/community/copilot/mcp-translation.test.ts && bun test src/community/copilot/skills-translation.test.ts && bun test src/community/copilot/structured-output.test.ts && bun test src/community/copilot/provider-hardening.test.ts && bun test src/community/copilot/agents-translation.test.ts",
"type-check": "bun x tsc --noEmit"
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.89",
"@archon/paths": "workspace:*",
"@github/copilot-sdk": "^0.2.2",

@coderabbitai coderabbitai Bot Apr 22, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

@github/copilot-sdk changelog breaking changes 0.2.x

💡 Result:

The GitHub Copilot SDK (github/copilot-sdk) 0.2.x series, starting with v0.2.0 (2026-03-20), v0.2.1 (2026-04-03), and v0.2.2 (2026-04-10), includes the following breaking changes documented in the official CHANGELOG.md and release notes: All SDKs: - autoRestart option deprecated and removed from client options (no effect now, remove references) [1,2,3] Node.js-specific (v0.2.1): - onElicitationRequest handler signature changed from (request, invocation) to single ElicitationContext argument. Access via context.sessionId and context.message [1,15] Python-specific (major API overhaul in v0.2.0): - CopilotClient constructor: CopilotClientOptions TypedDict replaced by dataclasses like ExternalServerConfig(url=...) or SubprocessConfig(cli_path=..., log_level=...) [1,2,3,16] - create_session and resume_session: SessionConfig/ResumeSessionConfig TypedDicts removed; use keyword arguments directly (e.g., on_permission_request=..., model=...). on_permission_request now required [1,2,3,16] - send and send_and_wait: MessageOptions TypedDict removed; first positional arg is prompt str, attachments/mode as kwargs [1,2,3,16] - MessageOptions, SessionConfig, ResumeSessionConfig no longer exported publicly [1,2,3] - Internal modules renamed: copilot.jsonrpc -> copilot._jsonrpc, etc. [1,2,3] - copilot.types module removed; import types from copilot, copilot.generated.session_events, copilot.session, copilot.tools, etc. [16,18] - PermissionRequest is now a dataclass (.kind attribute, not dict access) [16] Go-specific (v0.2.0): - Client.Start context cancel no longer kills CLI process; use client.Stop explicitly [1,2,3] - LogOptions.Ephemeral changed from bool to *bool; use copilot.Bool(true) [1,2,3] Other notes: - v0.2.0 described as "big update with broad API refinements" [1,2] - No comprehensive migration guide found; changes detailed in CHANGELOG with before/after code examples for Python [1,13,16]. - Issues mention additional compatibility notes, e.g., ModelCapabilities for BYOK in later previews [9].

Citations:


🏁 Script executed:

# Verify PR context to understand what the "pinned" claim refers to
git log --oneline --all | head -20

Repository: coleam00/Archon

Length of output: 1792


🏁 Script executed:

# Find recent changes to packages/providers/package.json related to copilot-sdk
git log --oneline -n 50 -- packages/providers/package.json

Repository: coleam00/Archon

Length of output: 138


🏁 Script executed:

# Get the PR description and context for the most recent change
git show e0b57a8f --stat

Repository: coleam00/Archon

Length of output: 50371


🏁 Script executed:

# Get the current state of the package.json file
cat -n packages/providers/package.json | grep -A 5 -B 5 "copilot-sdk"

Repository: coleam00/Archon

Length of output: 485


Confirm intent for ^0.2.2 version range on a public-preview SDK.

@github/copilot-sdk is in public preview with documented breaking changes across the 0.2.x series (v0.2.0, v0.2.1, v0.2.2): autoRestart removal, Node.js onElicitationRequest handler signature change, major Python API overhaul, and Go Client.Start behavior change. The caret range allows upgrades within >=0.2.2 <0.3.0, so future 0.2.x patches and their breaking changes will be auto-pulled, while 0.3.0 will remain excluded. If strict pinning was intended, consider ~0.2.2 or exact 0.2.2. Otherwise, this is fine—just confirm the range matches your intent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/providers/package.json` at line 28, The package.json currently uses
a caret range for the preview SDK entry "@github/copilot-sdk": "^0.2.2", which
will allow future 0.2.x changes (some breaking); decide and update that
dependency to the intended immutability level — replace the caret with a tilde
"~0.2.2" to allow only patch fixes within 0.2.x, or pin exactly to "0.2.2" for
full stability, then commit with a note stating the chosen policy for
"@github/copilot-sdk".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Acknowledged but skipping — for 0.x.y, npm semver makes ^0.2.2 and ~0.2.2 resolve to the same range (>=0.2.2 <0.3.0). And since bun.lock is committed, the installed version is exact regardless of the spec. The only meaningful tightening would be exact pin "0.2.2", which I don't think is worth losing patch fixes for. Will pin if 0.3.x lands with a known regression.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Only users with a collaborator, contributor, member, or owner role can interact with CodeRabbit.

"@mariozechner/pi-ai": "^0.67.5",
"@mariozechner/pi-coding-agent": "^0.67.5",
"@openai/codex-sdk": "^0.116.0",
Expand Down
Loading