Skip to content

Rebuild GitHub Copilot provider support on upstream reset#43

Merged
zortos293 merged 11 commits intomainfrom
capy/rebuild-copilot-support
Apr 9, 2026
Merged

Rebuild GitHub Copilot provider support on upstream reset#43
zortos293 merged 11 commits intomainfrom
capy/rebuild-copilot-support

Conversation

@zortos293
Copy link
Copy Markdown
Owner

@zortos293 zortos293 commented Apr 9, 2026

What Changed

This PR rebuilds GitHub Copilot provider support from scratch after resetting the fork to the upstream pingdotgg/t3code@main baseline. The integration follows upstream patterns for providers, using @github/copilot-sdk for runtime operations.

Contracts & Schemas

  • Added copilot to ProviderKind literals in orchestration and provider schemas
  • Added CopilotProviderStartOptions for cliPath and configDir configuration
  • Added Copilot-specific runtime event sources and approval request mappings
  • Extended ServerProviderState and ModelCapabilities to support Copilot models

Server Integration

  • Implemented CopilotAdapter (apps/server/src/provider/Layers/CopilotAdapter.ts) wrapping @github/copilot-sdk for session lifecycle, turn execution, MCP servers, and event streaming
  • Implemented CopilotProvider for health checks, model discovery, and built-in model fallbacks (gpt-5, gpt-5-mini, etc.)
  • Added copilotCliPath and copilotMcpServers helpers for CLI override resolution and MCP mcp-config.json loading
  • Wired adapter into provider registry and server composition layers
  • Added comprehensive unit and integration tests for Copilot adapter components

Web UI & State

  • Added copilot to PROVIDER_OPTIONS in session logic and provider picker
  • Extended modelSelection.ts and composerDraftStore.ts to handle Copilot model selection and reasoningEffort options
  • Updated TraitsPicker to support Copilot-specific traits with provider branching
  • Added Copilot provider card to settings panels with home path configuration
  • Fixed discriminated union construction in state helpers to satisfy strict TypeScript checks

Documentation & Packaging

  • Added @github/copilot-sdk dependency to apps/server/package.json
  • Updated README to reflect the fork's Copilot support and architecture

Git / Routing Layer Fixes

  • Fixed RoutingTextGeneration to use ProviderKind instead of deprecated TextGenerationProvider

Why

The previous fork had drifted significantly from upstream and carried forward legacy patterns. Resetting to upstream first eliminates that drift, allowing Copilot support to be rebuilt using current upstream abstractions (provider registry, snapshot services, runtime ingestion) rather than carrying forward stale code. This results in a cleaner, more maintainable integration that follows the project's current architecture.

Open in Capy TC-17 · 5.4-Fast

@zortos293 zortos293 added the capy Generated by capy.ai label Apr 9, 2026 — with Capy AI
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@capy-ai capy-ai bot left a comment

Choose a reason for hiding this comment

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

Added 1 comment

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: feb9ffea-9335-47d0-80c7-8822efd420ed

📥 Commits

Reviewing files that changed from the base of the PR and between 7852bc5 and eb141e9.

📒 Files selected for processing (300)
  • .coderabbit.yaml
  • .devcontainer/devcontainer.json
  • .gitattributes
  • .github/VOUCHED.td
  • .github/workflows/ci.yml
  • .github/workflows/pr-size.yml
  • .github/workflows/release.yml
  • .github/workflows/sync-upstream.yml
  • .gitignore
  • .oxfmtrc.json
  • .plans/effect-atom.md
  • CLAUDE.md
  • README.md
  • REMOTE.md
  • apps/desktop/package.json
  • apps/desktop/scripts/dev-electron.mjs
  • apps/desktop/scripts/wait-for-resources.mjs
  • apps/desktop/src/backendRestartPolicy.test.ts
  • apps/desktop/src/backendRestartPolicy.ts
  • apps/desktop/src/confirmDialog.ts
  • apps/desktop/src/macCodeSigning.test.ts
  • apps/desktop/src/macCodeSigning.ts
  • apps/desktop/src/macUpdateInstaller.test.ts
  • apps/desktop/src/macUpdateInstaller.ts
  • apps/desktop/src/main.ts
  • apps/desktop/src/preload.ts
  • apps/desktop/src/syncShellEnvironment.test.ts
  • apps/desktop/src/syncShellEnvironment.ts
  • apps/marketing/package.json
  • apps/marketing/src/lib/releases.ts
  • apps/marketing/src/pages/download.astro
  • apps/server/integration/OrchestrationEngineHarness.integration.ts
  • apps/server/integration/orchestrationEngine.integration.test.ts
  • apps/server/integration/providerService.integration.test.ts
  • apps/server/package.json
  • apps/server/src/attachmentPaths.test.ts
  • apps/server/src/attachmentPaths.ts
  • apps/server/src/bin.ts
  • apps/server/src/bootstrap.test.ts
  • apps/server/src/bootstrap.ts
  • apps/server/src/checkpointing/Errors.ts
  • apps/server/src/checkpointing/Layers/CheckpointDiffQuery.test.ts
  • apps/server/src/checkpointing/Layers/CheckpointDiffQuery.ts
  • apps/server/src/checkpointing/Layers/CheckpointStore.test.ts
  • apps/server/src/checkpointing/Layers/CheckpointStore.ts
  • apps/server/src/cli-config.test.ts
  • apps/server/src/cli.test.ts
  • apps/server/src/cli.ts
  • apps/server/src/codexAppServerManager.test.ts
  • apps/server/src/codexAppServerManager.ts
  • apps/server/src/config.ts
  • apps/server/src/git/Errors.ts
  • apps/server/src/git/Layers/ClaudeTextGeneration.test.ts
  • apps/server/src/git/Layers/ClaudeTextGeneration.ts
  • apps/server/src/git/Layers/CodexTextGeneration.test.ts
  • apps/server/src/git/Layers/CodexTextGeneration.ts
  • apps/server/src/git/Layers/GitCore.test.ts
  • apps/server/src/git/Layers/GitCore.ts
  • apps/server/src/git/Layers/GitHubCli.ts
  • apps/server/src/git/Layers/GitManager.test.ts
  • apps/server/src/git/Layers/GitManager.ts
  • apps/server/src/git/Layers/GitService.test.ts
  • apps/server/src/git/Layers/GitService.ts
  • apps/server/src/git/Layers/GitStatusBroadcaster.test.ts
  • apps/server/src/git/Layers/GitStatusBroadcaster.ts
  • apps/server/src/git/Layers/RoutingTextGeneration.ts
  • apps/server/src/git/Prompts.test.ts
  • apps/server/src/git/Prompts.ts
  • apps/server/src/git/Services/GitCore.ts
  • apps/server/src/git/Services/GitHubCli.ts
  • apps/server/src/git/Services/GitManager.ts
  • apps/server/src/git/Services/GitService.ts
  • apps/server/src/git/Services/GitStatusBroadcaster.ts
  • apps/server/src/git/Services/TextGeneration.ts
  • apps/server/src/git/Utils.ts
  • apps/server/src/git/isRepo.ts
  • apps/server/src/git/remoteRefs.ts
  • apps/server/src/http.ts
  • apps/server/src/index.ts
  • apps/server/src/keybindings.test.ts
  • apps/server/src/keybindings.ts
  • apps/server/src/logger.ts
  • apps/server/src/main.test.ts
  • apps/server/src/main.ts
  • apps/server/src/mcp/McpManager.ts
  • apps/server/src/observability/Attributes.test.ts
  • apps/server/src/observability/Attributes.ts
  • apps/server/src/observability/Layers/Observability.ts
  • apps/server/src/observability/LocalFileTracer.test.ts
  • apps/server/src/observability/LocalFileTracer.ts
  • apps/server/src/observability/Metrics.test.ts
  • apps/server/src/observability/Metrics.ts
  • apps/server/src/observability/RpcInstrumentation.test.ts
  • apps/server/src/observability/RpcInstrumentation.ts
  • apps/server/src/observability/Services/BrowserTraceCollector.ts
  • apps/server/src/observability/TraceRecord.ts
  • apps/server/src/observability/TraceSink.test.ts
  • apps/server/src/observability/TraceSink.ts
  • apps/server/src/open.test.ts
  • apps/server/src/open.ts
  • apps/server/src/orchestration/Layers/CheckpointReactor.test.ts
  • apps/server/src/orchestration/Layers/CheckpointReactor.ts
  • apps/server/src/orchestration/Layers/OrchestrationEngine.test.ts
  • apps/server/src/orchestration/Layers/OrchestrationEngine.ts
  • apps/server/src/orchestration/Layers/OrchestrationReactor.test.ts
  • apps/server/src/orchestration/Layers/OrchestrationReactor.ts
  • apps/server/src/orchestration/Layers/ProjectionPipeline.test.ts
  • apps/server/src/orchestration/Layers/ProjectionPipeline.ts
  • apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.test.ts
  • apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
  • apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts
  • apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
  • apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.test.ts
  • apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts
  • apps/server/src/orchestration/Layers/RuntimeReceiptBus.ts
  • apps/server/src/orchestration/Normalizer.ts
  • apps/server/src/orchestration/Schemas.ts
  • apps/server/src/orchestration/Services/CheckpointReactor.ts
  • apps/server/src/orchestration/Services/OrchestrationReactor.ts
  • apps/server/src/orchestration/Services/ProjectionSnapshotQuery.ts
  • apps/server/src/orchestration/Services/ProviderCommandReactor.ts
  • apps/server/src/orchestration/Services/ProviderRuntimeIngestion.ts
  • apps/server/src/orchestration/Services/RuntimeReceiptBus.ts
  • apps/server/src/orchestration/commandInvariants.test.ts
  • apps/server/src/orchestration/commandInvariants.ts
  • apps/server/src/orchestration/decider.projectScripts.test.ts
  • apps/server/src/orchestration/decider.ts
  • apps/server/src/orchestration/projector.test.ts
  • apps/server/src/orchestration/projector.ts
  • apps/server/src/os-jank.test.ts
  • apps/server/src/os-jank.ts
  • apps/server/src/persistence/Layers/OrchestrationEventStore.test.ts
  • apps/server/src/persistence/Layers/ProjectionProjects.ts
  • apps/server/src/persistence/Layers/ProjectionRepositories.test.ts
  • apps/server/src/persistence/Layers/ProjectionThreadMessages.test.ts
  • apps/server/src/persistence/Layers/ProjectionThreadMessages.ts
  • apps/server/src/persistence/Layers/ProjectionThreads.ts
  • apps/server/src/persistence/Layers/Sqlite.ts
  • apps/server/src/persistence/Migrations.ts
  • apps/server/src/persistence/Migrations/016_CanonicalizeModelSelections.test.ts
  • apps/server/src/persistence/Migrations/016_CanonicalizeModelSelections.ts
  • apps/server/src/persistence/Migrations/017_ProjectionThreadsArchivedAt.ts
  • apps/server/src/persistence/Migrations/018_ProjectionThreadsArchivedAtIndex.ts
  • apps/server/src/persistence/Migrations/019_ProjectionSnapshotLookupIndexes.test.ts
  • apps/server/src/persistence/Migrations/019_ProjectionSnapshotLookupIndexes.ts
  • apps/server/src/persistence/NodeSqliteClient.ts
  • apps/server/src/persistence/Services/ProjectionProjects.ts
  • apps/server/src/persistence/Services/ProjectionThreadMessages.ts
  • apps/server/src/persistence/Services/ProjectionThreads.ts
  • apps/server/src/processRunner.ts
  • apps/server/src/project/Layers/ProjectFaviconResolver.test.ts
  • apps/server/src/project/Layers/ProjectFaviconResolver.ts
  • apps/server/src/project/Layers/ProjectSetupScriptRunner.test.ts
  • apps/server/src/project/Layers/ProjectSetupScriptRunner.ts
  • apps/server/src/project/Services/ProjectFaviconResolver.ts
  • apps/server/src/project/Services/ProjectSetupScriptRunner.ts
  • apps/server/src/projectFaviconRoute.test.ts
  • apps/server/src/projectFaviconRoute.ts
  • apps/server/src/provider/Layers/ClaudeAdapter.test.ts
  • apps/server/src/provider/Layers/ClaudeAdapter.ts
  • apps/server/src/provider/Layers/ClaudeProvider.ts
  • apps/server/src/provider/Layers/ClaudeSdkFastMode.probe.test.ts
  • apps/server/src/provider/Layers/CodexAdapter.test.ts
  • apps/server/src/provider/Layers/CodexAdapter.ts
  • apps/server/src/provider/Layers/CodexProvider.ts
  • apps/server/src/provider/Layers/CopilotAdapter.test.ts
  • apps/server/src/provider/Layers/CopilotAdapter.ts
  • apps/server/src/provider/Layers/CopilotProvider.ts
  • apps/server/src/provider/Layers/EventNdjsonLogger.test.ts
  • apps/server/src/provider/Layers/EventNdjsonLogger.ts
  • apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts
  • apps/server/src/provider/Layers/ProviderAdapterRegistry.ts
  • apps/server/src/provider/Layers/ProviderHealth.test.ts
  • apps/server/src/provider/Layers/ProviderHealth.ts
  • apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • apps/server/src/provider/Layers/ProviderRegistry.ts
  • apps/server/src/provider/Layers/ProviderService.test.ts
  • apps/server/src/provider/Layers/ProviderService.ts
  • apps/server/src/provider/Layers/ProviderSessionDirectory.test.ts
  • apps/server/src/provider/Services/ClaudeProvider.ts
  • apps/server/src/provider/Services/CodexProvider.ts
  • apps/server/src/provider/Services/CopilotProvider.ts
  • apps/server/src/provider/Services/ProviderHealth.ts
  • apps/server/src/provider/Services/ProviderRegistry.ts
  • apps/server/src/provider/Services/ServerProvider.ts
  • apps/server/src/provider/codexAccount.ts
  • apps/server/src/provider/codexAppServer.ts
  • apps/server/src/provider/makeManagedServerProvider.ts
  • apps/server/src/provider/providerSnapshot.ts
  • apps/server/src/server.test.ts
  • apps/server/src/server.ts
  • apps/server/src/serverLayers.ts
  • apps/server/src/serverLifecycleEvents.test.ts
  • apps/server/src/serverLifecycleEvents.ts
  • apps/server/src/serverLogger.ts
  • apps/server/src/serverRuntimeStartup.test.ts
  • apps/server/src/serverRuntimeStartup.ts
  • apps/server/src/serverSettings.test.ts
  • apps/server/src/serverSettings.ts
  • apps/server/src/skills/SkillsManager.ts
  • apps/server/src/telemetry/Layers/AnalyticsService.ts
  • apps/server/src/terminal/Layers/BunPTY.ts
  • apps/server/src/terminal/Layers/Manager.test.ts
  • apps/server/src/terminal/Layers/Manager.ts
  • apps/server/src/terminal/Layers/NodePTY.ts
  • apps/server/src/terminal/Services/Manager.ts
  • apps/server/src/workspace/Layers/WorkspaceEntries.test.ts
  • apps/server/src/workspace/Layers/WorkspaceEntries.ts
  • apps/server/src/workspace/Layers/WorkspaceFileSystem.test.ts
  • apps/server/src/workspace/Layers/WorkspaceFileSystem.ts
  • apps/server/src/workspace/Layers/WorkspacePaths.test.ts
  • apps/server/src/workspace/Layers/WorkspacePaths.ts
  • apps/server/src/workspace/Services/WorkspaceEntries.ts
  • apps/server/src/workspace/Services/WorkspaceFileSystem.ts
  • apps/server/src/workspace/Services/WorkspacePaths.ts
  • apps/server/src/workspaceEntries.chunking.test.ts
  • apps/server/src/workspaceEntries.test.ts
  • apps/server/src/workspaceEntries.ts
  • apps/server/src/ws.ts
  • apps/server/src/wsServer.test.ts
  • apps/server/src/wsServer.ts
  • apps/server/src/wsServer/pushBus.test.ts
  • apps/server/src/wsServer/pushBus.ts
  • apps/server/src/wsServer/readiness.ts
  • apps/server/tsdown.config.ts
  • apps/server/vitest.config.ts
  • apps/web/package.json
  • apps/web/src/appSettings.test.ts
  • apps/web/src/appSettings.ts
  • apps/web/src/components/AppSidebarLayout.tsx
  • apps/web/src/components/BranchToolbar.logic.test.ts
  • apps/web/src/components/BranchToolbar.logic.ts
  • apps/web/src/components/BranchToolbarBranchSelector.tsx
  • apps/web/src/components/ChatMarkdown.tsx
  • apps/web/src/components/ChatView.browser.tsx
  • apps/web/src/components/ChatView.logic.test.ts
  • apps/web/src/components/ChatView.logic.ts
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/ComposerPromptEditor.tsx
  • apps/web/src/components/DiffPanel.tsx
  • apps/web/src/components/GitActionsControl.browser.tsx
  • apps/web/src/components/GitActionsControl.logic.test.ts
  • apps/web/src/components/GitActionsControl.logic.ts
  • apps/web/src/components/GitActionsControl.tsx
  • apps/web/src/components/Icons.tsx
  • apps/web/src/components/KeybindingsToast.browser.tsx
  • apps/web/src/components/PlanSidebar.tsx
  • apps/web/src/components/ProjectFavicon.tsx
  • apps/web/src/components/ProjectScriptsControl.tsx
  • apps/web/src/components/PullRequestThreadDialog.tsx
  • apps/web/src/components/Sidebar.logic.test.ts
  • apps/web/src/components/Sidebar.logic.ts
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/ThreadTerminalDrawer.test.ts
  • apps/web/src/components/ThreadTerminalDrawer.tsx
  • apps/web/src/components/WebSocketConnectionSurface.logic.test.ts
  • apps/web/src/components/WebSocketConnectionSurface.tsx
  • apps/web/src/components/chat/ChangedFilesTree.test.tsx
  • apps/web/src/components/chat/ChangedFilesTree.tsx
  • apps/web/src/components/chat/ChatHeader.tsx
  • apps/web/src/components/chat/ClaudeTraitsPicker.browser.tsx
  • apps/web/src/components/chat/ClaudeTraitsPicker.tsx
  • apps/web/src/components/chat/CodexTraitsPicker.browser.tsx
  • apps/web/src/components/chat/CodexTraitsPicker.tsx
  • apps/web/src/components/chat/CompactComposerControlsMenu.browser.tsx
  • apps/web/src/components/chat/ComposerCommandMenu.tsx
  • apps/web/src/components/chat/ComposerPendingUserInputPanel.tsx
  • apps/web/src/components/chat/ComposerPrimaryActions.test.ts
  • apps/web/src/components/chat/ComposerPrimaryActions.tsx
  • apps/web/src/components/chat/ContextWindowMeter.tsx
  • apps/web/src/components/chat/MessagesTimeline.logic.test.ts
  • apps/web/src/components/chat/MessagesTimeline.logic.ts
  • apps/web/src/components/chat/MessagesTimeline.test.tsx
  • apps/web/src/components/chat/MessagesTimeline.tsx
  • apps/web/src/components/chat/MessagesTimeline.virtualization.browser.tsx
  • apps/web/src/components/chat/OpenInPicker.tsx
  • apps/web/src/components/chat/ProposedPlanCard.tsx
  • apps/web/src/components/chat/ProviderModelPicker.browser.tsx
  • apps/web/src/components/chat/ProviderModelPicker.tsx
  • apps/web/src/components/chat/ProviderStatusBanner.tsx
  • apps/web/src/components/chat/TraitsPicker.browser.tsx
  • apps/web/src/components/chat/TraitsPicker.tsx
  • apps/web/src/components/chat/composerProviderRegistry.test.tsx
  • apps/web/src/components/chat/composerProviderRegistry.tsx
  • apps/web/src/components/chat/copilotQuota.test.ts
  • apps/web/src/components/chat/copilotQuota.ts
  • apps/web/src/components/composerFooterLayout.test.ts
  • apps/web/src/components/composerFooterLayout.ts
  • apps/web/src/components/desktopUpdate.logic.test.ts
  • apps/web/src/components/desktopUpdate.logic.ts
  • apps/web/src/components/settings/SettingsPanels.browser.tsx
  • apps/web/src/components/settings/SettingsPanels.tsx
  • apps/web/src/components/settings/SettingsSidebarNav.tsx
  • apps/web/src/components/sidebar/SidebarUpdatePill.tsx
  • apps/web/src/components/timelineHeight.test.ts
  • apps/web/src/components/timelineHeight.ts
  • apps/web/src/components/ui/autocomplete.tsx
  • apps/web/src/components/ui/combobox.tsx
  • apps/web/src/components/ui/menu.tsx
  • apps/web/src/components/ui/select.tsx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

zortos293 and others added 9 commits April 9, 2026 08:24
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@zortos293 zortos293 merged commit 092ff4b into main Apr 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai size:XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant