Migration map

August 20, 2026 ยท View on GitHub

Source baseline: ~/code/fx at fc124be, version 0.0.3. The complete source ownership inventory is in source-inventory.md.

Source ownershipRust destinationState
shared agent/message semanticsfx-coreImplemented
provider ports and catalogsfx-provider + fx-core::GatewayMulti-provider registry implemented
auth and secret storagefx-auth + provider adaptersGeneric store, Codex OAuth, and Vercel device OAuth implemented
Codex Responses providerfx-provider::codexImplemented
Vercel AI Gateway providerfx-provider::vercelImplemented
permission policy and automatic reviewfx-core + fxrs-runtimeImplemented
workspace path authorityfx-workspaceImplemented
layered configurationfx-configImplemented for runtime-owned fields
schema-v3 sessions and recoveryfx-storeImplemented
filesystem observation/mutationfx-toolsImplemented, including semantic search
terminal execution and sessionsfx-process + private terminal hostImplemented
durable terminal monitorsfx-process + private terminal hostImplemented
web search/fetchfx-tools::web + provider capabilityImplemented
skills and installationfx-tools::skillsImplemented
memory and large tool resultsfx-storeImplemented
durable subagentsfx-subagentImplemented
MCPfx-mcpstdio and Streamable HTTP implemented
agent runtimefxrs-runtimeProtocol-neutral composition and execution implemented
ACPfx-cli::acpThin ACP v1 stdio adapter implemented
TUI/input editorfx-tuiFull-screen terminal interface implemented
WASM/N-API/standalone SDKnoneOut of scope

Provider status

Codex and Vercel AI Gateway are concrete providers loaded simultaneously. The shared abstraction supports provider-local model catalogs and defaults, provider-scoped auth methods, locked refresh, independent gateway construction, and per-model capabilities. Direct OpenAI API-key and Anthropic providers are future adapters rather than missing changes to core architecture.

Codex supports:

  • ACP browser authentication with PKCE and a loopback callback;
  • refresh-token rotation while holding the provider credential lock;
  • read-only reuse of a valid Codex CLI ChatGPT session;
  • the Codex Responses SSE endpoint, function tools, reasoning, usage, cancellation at the host boundary, and native web-search citations;
  • seven catalog models with an explicit default.

Device-code login and direct OpenAI API-key billing are not implemented in the Codex provider.

Vercel supports:

  • OIDC discovery and browser device authorization with refresh-token rotation;
  • ambient VERCEL_OIDC_TOKEN and AI_GATEWAY_API_KEY credentials;
  • deterministic team routing with FX_VERCEL_TEAM override;
  • provider routing through FX_VERCEL_PROVIDER_ONLY and FX_VERCEL_PROVIDER_ORDER, independent from model IDs;
  • LanguageModel V3 history/function projection and bounded SSE parsing for text, reasoning, tool calls, provider tool results, finish reasons, usage, and generation identity;
  • a network-free startup catalog matching the reference implementation's curated models, extensible through FX_VERCEL_MODELS.

Preserved invariants

  • Configuration precedence is environment, workspace profile, global profile, project defaults, then built-ins.
  • Project configuration cannot select credentials, model, or permission mode.
  • Configured denies precede session grants.
  • Provider-executed calls cannot be executed locally a second time.
  • Requests are retried only when delivery is known not to have occurred.
  • Session and credential replacement is atomic and bounded.
  • Refresh failure preserves the owned credential and does not silently switch auth sources.
  • File approval reviews exactly what a later one-shot commit will apply.
  • Main and child model selection uses the same provider registry.
  • ACP initialize performs no credential or network access.

Verification

The workspace test suite includes unit, integration, protocol, terminal, and doc tests. The ACP integration suite uses the official client SDK and a loopback server that speaks the Codex Responses event protocol. It covers initialize/auth advertisement, owned logout, model persistence, permissions, automatic review, tools, skills, search, subagents, cancellation, disconnect cleanup, and failure-safe history.

Focused provider tests cover multi-provider registration, nested model routes, credential isolation and permissions, corruption rejection, OAuth refresh form/rotation, callback/device state validation, ambient credential compatibility, both request projections and SSE protocols, function identity, usage, error classification, and search citations.

A release-binary live smoke used the existing read-only Codex CLI session and codex/gpt-5.6-sol to complete ACP initialize, session creation, and one real Codex prompt. It returned end_turn with the requested FX_CODEX_OK text and exited normally.

The implementation deliberately reuses agent-client-protocol, rmcp, ureq/Rustls, stream-rs, atomic-write-file, fs4, portable-pty, vt100, process-wrap, ignore, globset, and other optimized ecosystem crates at their appropriate host boundaries.

The TUI reuses ratatui, crossterm, ratatui-textarea, and tui-markdown. Its tests cover stream coalescing, tool-card updates, permission selection, queued prompts, responsive rendering, cached-scrollback performance, and a real-PTY startup/session/quit exchange with fx-acp.