Provider Adapter Contract
Required core
Section titled “Required core”Every provider must implement:
kind: stable provider id (e.g.,codex)displayName: human-readable namecapabilities: feature flags for UI gatingstart(): boot or connect to the agent servicegetVersion(): return provider version string
Capability groups
Section titled “Capability groups”Session history
Section titled “Session history”listSessionThreadsreadSessionThreadreadSessionLogreadSessionRuntimelistRecentUnindexedSessionThreads
Session lifecycle
Section titled “Session lifecycle”createSessionsubmitInputlistLoadedSessionIdsresumeSessionThreadsetSessionNamearchiveSessionunarchiveSessioninterruptTurn
Approvals
Section titled “Approvals”respondToPendingAction
Configuration
Section titled “Configuration”listModelslistProfileslistSkillswriteSkillConfig
Workspace
Section titled “Workspace”readRemoteGitDiff- Filesystem methods under
fs*
Runtime events
Section titled “Runtime events”Providers must emit liveEvent events for streaming UI updates:
turn_startedassistant_deltaassistant_message_completedactivity_updatedactivity_output_deltaactivity_terminal_inputturn_completedaction_openedfs_changedskills_changed
HTTP behavior
Section titled “HTTP behavior”- Unsupported provider-owned routes return
501 - Daemon-owned features (git status, terminals, browser) are exposed through
hostCapabilities /api/nodereturns active provider, version, capabilities, and host capabilities/api/providersreturns supported provider definitions
Adding a provider
Section titled “Adding a provider”- Add config types to
src/types.ts - Add definition to
src/provider-registry.ts - Implement adapter in
src/<name>-provider.ts - Register construction in
src/provider-factory.ts - Set unsupported capabilities to
falsefirst, then enable one by one - Add client UI only after the capability map is accurate