Skip to content

Support GitHub Copilot CLI as a connect target #593

Description

@zohuyhieuzo03

Problem

Whiteboard can connect Claude Code, Codex, Cursor, OpenCode, Pi and oh-my-pi, but not GitHub Copilot CLI. Some teams have standardised on Copilot CLI (one commenter in the Show HN thread said their company moved from Claude to Copilot CLI and asked about support), so they can't use Whiteboard today.

What I found

Connecting may need very little new code. Copilot CLI reads Claude-style plugin layouts. Its plugin reference looks for marketplace.json under .claude-plugin/, and for legacy plugins it accepts .claude-plugin/plugin.json and .mcp.json. Using Copilot CLI 1.0.34 on Linux, with an isolated COPILOT_HOME:

copilot plugin marketplace add devdotfast/whiteboard   # Marketplace "devfast" added successfully.
copilot plugin install whiteboard@devfast              # Plugin "whiteboard" installed successfully.

The installed copy contains packages/agent-plugins/claude unchanged. I have not yet confirmed that Copilot starts the whiteboard MCP server from it inside a session: copilot mcp list doesn't show plugin-provided servers outside a session, and I didn't have the whiteboard binary installed.

Trace capture would need a new parser. Copilot CLI writes one JSONL event log per session at ~/.copilot/session-state/<session-id>/events.jsonl (relocated by COPILOT_HOME). In my local sessions:

  • the first record is {"type": "session.start", "data": {"sessionId", "copilotVersion", "producer", "startTime", ...}, "id", "parentId", "timestamp"}
  • the event types include user.message, assistant.turn_start, assistant.message, assistant.turn_end, tool.execution_start, tool.execution_complete, system.message, session.model_change, session.mode_changed, abort and session.shutdown

sniffAgentTraceHarness in packages/trace-core/src/agent-trace-parser.ts doesn't recognise session.start, so it returns "claude-code" and the log is parsed as a Claude transcript.

Proposed approach

I'd split this into two PRs.

1. Connect target (whiteboard connect copilot)

  • Add "copilot" to InstallTarget / ALL_INSTALL_TARGETS in packages/review/src/install.ts.
  • In connect-prompts.ts, add plugin steps for Copilot CLI:
    copilot plugin marketplace add devdotfast/whiteboard
    copilot plugin install whiteboard@devfast
    copilot mcp remove whiteboard # old manual registration, if any
    The verify step would be the same as the default: reload MCP tools and call session_get_instructions.
  • Put Copilot under the desktop connect card's Other menu, following Add oh-my-pi as a connect target with an Other agents menu #589.
  • Add tests in connect-prompts.test.ts and the connect-card browser test.

2. Trace capture

  • Detect session.start in sniffAgentTraceHarness and parseAgentTraceJsonl.
  • Add parseCopilotRecords, which maps user and assistant messages and pairs tool start/complete events into the existing event model.
  • Add tests using a small, scrubbed events.jsonl fixture.

Questions for maintainers

  1. Should Copilot reuse packages/agent-plugins/claude through the existing .claude-plugin/marketplace.json? Or would you prefer a dedicated packages/agent-plugins/copilot, possibly in the Agent Plugins 1.0 layout (plugin.json with $schema plus a root mcp.json)? If it reuses the Claude plugin, its description ("Connect Claude Code to dev.fast Whiteboard") would also show up in Copilot's marketplace listing.
  2. Should the optional fff trace-search step support Copilot too (copilot mcp add fff -- <binary> <root>), or can that wait?
  3. Is trace capture wanted in the first cut, or only the connection?

If this sounds right, I'm happy to take it. I'll start with PR 1 and confirm end to end that the MCP server loads in a real Copilot session before opening it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions