Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(providers): standardize ACP providers #6461

MergedStiensWout(GitHub profile, opens in a new tab)merged 9 commits intot3code/codex-turn-mapping fromrefs/pull/6461/headmerged by juliusmarminge View on GitHub

Rebased onto v2 2b1139a6fd7d on September 10. Server, web, and mobile typechecks pass; focused tests and changed-file lint pass. Live provider/UI testing was not repeated. Both PRs still target v2 independently; Pi and ACP overlap in mobile model options and the add-provider wizard, so the second merge needs a follow-up rebase.

ACP Registry agents need a consistent path for installation, authentication, replay, MCP, and session management. This makes them first-class providers on orchestrator v2, rebased onto its latest published revision (2b1139a6fd7d).

  • Uses the official Registry, exact-version package distributions, and checksum-aware managed binaries.
  • Negotiates ACP v2 with v1 compatibility. Regenerated schema-v2.0.0-alpha.3 and schema-v1.21.0; both remain the newest official releases checked on September 8.
  • Projects native history, plans, compaction, usage, diffs, terminals, models, and commands through the shared orchestration contracts. Adds URL authentication, logout, native session management, and MCP-over-ACP alongside stdio and HTTP.
  • Preserves current native Grok/Antigravity model selection and legacy elicitation, runtime shutdown/cancellation, explicit provider refresh, live token usage, and the current settings and mobile layouts. Native slash commands remain intact when guidance is injected.
  • Applies atomic provider mutations and secret rollback, client filesystem/terminal policy, and session replacement for checkpoint rollback.

Verification

Focused protocol, native-provider, ACP adapter, orchestration, Registry/MCP, CLI, settings, contracts, and client tests passed. The full ACP adapter suite passed. Server, web, mobile, contracts, client runtime, and effect-acp type checks passed. Changed-file lint and formatting passed; lint retains existing React warnings.

Schema generation completes from both official release assets and preserves shared definitions. Wire tests cover malformed known variants, future variants, v1 model selection, and legacy elicitation responses.

The captures below were made on the earlier PR revision. Browser and live authenticated-agent verification were not repeated for this rebase.

Live proof

Pi through generic ACP

Registry discovery, fresh global installation, provider and model selection, and a completed turn:

Pi through ACP v2

Google Antigravity through generic ACP

Registry discovery, managed binary installation, provider creation, live handshake, and the advertised Google authentication method:

Google Antigravity through ACP v2

Google credentials were deliberately removed from the isolated test host. The Antigravity proof ends at Log in with Google; it does not claim an authenticated model turn.

Full parity matrix, shipped P0/P1/P2 work, and remaining generic gaps

Limits

Mobile shows ACP identity and activity but does not yet expose the full installation/authentication/session-management flow. Provider-owned tools retain their own sandbox behavior, and checkpoint rollback replaces the native session because ACP has no portable conversation truncation operation.

Updated with GPT-6 through Codex in T3 Code. Earlier implementation and captures by GPT-5.6 Sol through Codex in T3 Code, with Claude Fable 5 review.


Note

High Risk Touches provider install, authentication, MCP bridging, session lifecycle, and RPC authorization. Protocol and terminal API breaks can affect existing ACP adapters and secret handling.

Overview Makes ACP Registry agents first-class providers on the generic orchestrator v2 path, instead of incomplete provider-specific ACP behavior.

Registry + install. Adds acpRegistry discovery, checksum-aware binary/cache install (npx/uvx), and WS RPCs for search, prepare, uninstall, auth, session import/delete, and upstream provider config. Discovery is read-scoped; provisioning is operate-scoped.

Protocol. Prefers ACP schema v2 with a v1 compat shim. Session config uses configId; prompts finish via state_update. Projects plans, structured diffs, compaction, terminals, usage, and native session delete. Checkpoint rollback restores the workspace and replaces the native ACP session.

MCP. Injects a fast-path t3 acp-mcp-bridge / acp-mcp-call so agents reach T3 tools over stdio without loading the full CLI, plus MCP-over-ACP and HTTP fallbacks.

Clients. Mobile/web show official Registry icons (CDN-allowlisted), provider identity, multi-file changes, and compaction status. Web/desktop get the Registry wizard and session/provider management; mobile install/auth still incomplete.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7a346408dbaad9870ea37fcda434205e9099a62f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add acpRegistry provider type and upgrade ACP protocol to v2 with v1 compat

  • Introduces a full ACP Registry provider: a AcpRegistryCatalog service (search, prepare, inspect, resolve, uninstall managed binaries with checksum verification), a AcpRegistryRuntimeCoordinator for foreground/background probe coordination and URL auth, a new AcpRegistryDriver, and end-to-end web/mobile UI for adding, configuring, and managing registry agent instances
  • Upgrades effect-acp to ACP protocol v2 while maintaining v1 backward compatibility via a new compat module and CompatAgentRpcs/CompatClientRpcs; renames auth to auth_login/auth_logout, replaces session/load with session/resume, adds MCP-over-ACP and provider management RPCs, and passes AcpRequestContext to all handlers
  • Reworks AcpAdapterV2 to provision a per-session stdio MCP bridge, enforce client-boundary policy for fs/terminal operations, project richer content (plans, compaction, structured file changes, MCP tool calls, user/thought streams), support thread rollback with snapshot, and remove speculative idle-settle logic in favor of explicit finalization
  • Standardizes existing ACP providers (Claude, Codex, Cursor, Grok, OpenCode) by declaring runtimePolicy.enforcement: "native", removing client-side model selection for Grok, and always reporting fallback models for Grok status
  • Adds atomic provider-instance mutations (updateProviderInstance, withSettingsSnapshot) to ServerSettingsService with transactional secret writes and rollback; wires all new ACP Registry RPCs into the websocket layer with auth scopes
  • Risk: AcpTerminal interface in packages/effect-acp/src/terminal.ts is replaced with a passive state model — effectful control methods are removed; any out-of-tree consumers of the old terminal API will break. session/set_model is removed from AcpSessionRuntime.Service and AcpClient. Grok text generation no longer attempts client-side model switching and uses the agent default model. The session/load protocol method is replaced by session/resume across the codebase.
Macroscope summarized 7a34640.

Rebased onto v2 after Pi landed in #7211. The final rebase is content-equivalent to the combined head that passed CI. The audit fixed propagation of saved ACP item-identity versions during eager session activation adapted Pi to the runtime-policy capability contract, and connected MCP-over-ACP fetches to interruption signals. The mobile inspector expectation now includes the file operation label. The combined changed suites passed 1,203 tests, with the one rebase-related test failure corrected and passing in a focused 81-test rerun. Server, web, and mobile typechecks pass; CI passed on the final head. Macroscope could not complete its latest review because of the workspace cost limit; the code audit and all existing review threads were completed.

The maintainer explicitly waived browser verification for this merge. No new browser evidence was collected.

Follow-up preparation: GPT-6 via Codex.

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 57784106-3b5c-4cf4-bd27-f360284722ad

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Reviewed the new/changed Effect services in this PR (AcpRegistryCatalog, AcpRegistryRuntimeCoordinator, the ACP Registry driver/probe, and their call sites). Four convention issues, all in ACP Registry code introduced here.

      Posted via Macroscope — Effect Service Conventions
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      src/ws.ts:1289

      detail here just copies cause.message, so the wrapper adds no structural context while reason: "install_failed" mislabels a settings-read failure. Since input.agentId is available at the wrapping site, encoding it in detail (and keeping cause) keeps the message derived from stable attributes.

                              detail: `Could not read provider settings while checking references for ACP Registry agent ${input.agentId}.`,

      No longer relevant as of 44704f581cdab73f4a95fe590c7a36ed63a7a150

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      acp/AcpRegistryRuntimeCoordinator.ts:12

      This new service keeps its interface in a standalone AcpRegistryRuntimeCoordinatorShape. Convention is to declare the interface inline in the Context.Service declaration and refer to the inferred shape as AcpRegistryRuntimeCoordinator["Service"] — including the internal const withForegroundStartup: AcpRegistryRuntimeCoordinatorShape["withForegroundStartup"] annotations, AcpRegistryAdapterV2Options.runtimeCoordinator, and the test doubles that reference the shape type.

      No longer relevant as of 44704f581cdab73f4a95fe590c7a36ed63a7a150

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      acp/AcpRegistrySupport.ts:266

      Same here: AcpRegistryCatalogShape is a standalone shape for a service created in this PR. Consider inlining the members in the Context.Service<AcpRegistryCatalog, { ... }>() declaration and using AcpRegistryCatalog["Service"] at the const search: ...Shape["search"] annotations and in AcpRegistryDriver.test.ts.

      No longer relevant as of 379101bf17880314f56ea71ad4554db521095b56

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      acp/AcpRegistrySupport.ts:1256

      This is a compatibility alias for the renamed constructor, and its only remaining consumers are AcpRegistrySupport.test.ts and AcpRegistryAdapterV2.test.ts. Prefer updating those call sites to makeAcpRegistryCatalog (or AcpRegistryCatalog.layer) and deleting the alias so there is one canonical construction entry point.

      No longer relevant as of 44704f581cdab73f4a95fe590c7a36ed63a7a150

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium settings/AcpRegistryIcon.tsx:113

      Every mounted AcpRegistryAgentIcon starts a direct <img src={iconUrl}> request before loadCachedAcpRegistryIcon completes, so the persistent CacheStorage entry does not prevent CDN requests and this path bypasses checkedIconBlob's content-type and 512 KiB checks. The fallback at source is what renders that raw URL; keep source null until the validated object URL is available.

      No longer relevant as of 23c725829b50c8044e31a040b23c65931c686411

    5. Two Effect service convention issues in the new ACP service code. Everything else (inline Context.Service interfaces, AcpRegistryCatalog["Service"] / AcpRegistryRuntimeCoordinator["Service"] references, removal of the makeAcpRegistryResolver alias, environment-acquired catalog/coordinator in the driver) matches the conventions.

      Posted via Macroscope — Effect Service Conventions
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      acp/AcpRegistryRuntimeCoordinator.ts:43

      This module owns the coordinator's construction, but the whole Effect.gen body lives inline in static layer, so there is no make to reuse or test directly. Consider extracting export const make = Effect.gen(function* () { ... }) (declared before the layer, per the canonical imports → tag → make → layer order) and reducing this to Layer.effect(AcpRegistryRuntimeCoordinator, make), matching AcpRegistrySupport's makeAcpRegistryCatalog + AcpRegistryCatalog.layer.

      No longer relevant as of 379101bf17880314f56ea71ad4554db521095b56

    6. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium acp/AcpSessionConfig.ts:130

      A config option whose ID is _t3/session-mode is emitted with the same ID as the synthetic mode descriptor, so selecting that option is classified by AcpAdapterV2 as a mode and routed to session/set_mode instead of session/set_config_option. This makes the legitimate config option unconfigurable and can send an invalid mode when the agent advertises distinct session modes; skip the synthetic descriptor when seen already contains ACP_SESSION_MODE_OPTION_ID.

      No longer relevant as of 379101bf17880314f56ea71ad4554db521095b56

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High src/protocol.ts:391

      handleExtRequest exposes the same AcpRequestContext.requestId ("1") for concurrent JSON-RPC requests with IDs 1 and "1", so handlers can correlate approvals or delayed responses to the wrong request. String(message.id) erases the ID type; preserve it or encode the type in the context ID.

      No longer relevant as of 379101bf17880314f56ea71ad4554db521095b56

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟠 High Adapters/AcpAdapterV2.ts:1350

      Client-mediated terminal commands do not receive the per-thread MCP credentials, so fallback commands such as t3 acp-mcp-call cannot reach the authenticated MCP bridge. processEnvironment is currently applied only in makeRuntimeInput; merge acpMcpContext(input.threadId).processEnvironment into the environment passed to makeAcpClientTerminals as well.

      No longer relevant as of 23c725829b50c8044e31a040b23c65931c686411

    7. Effect service conventions: two findings in the new ACP code. The earlier review round's items (standalone *Shape interfaces, the makeAcpRegistryResolver compatibility alias, and the detail-copies-cause.message wrapper in ws.ts) are resolved on this head.

      Posted via Macroscope — Effect Service Conventions
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Drivers/AcpRegistryDriver.ts:537

      This new wrapper's detail is built from cause.message while cause is already preserved, so the caller-visible message is derived from the underlying error rather than the error's own stable attributes. AetherDriver/OpenCode2Driver use the stable phrase form for the same mapping.

                    detail: "Failed to build the ACP Registry provider snapshot.",

      No longer relevant as of 379101bf17880314f56ea71ad4554db521095b56

    8. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR introduces a full ACP Registry integration and ACP v2 compatibility layer with new installation, authentication, session, MCP, terminal, filesystem, RPC, and rollback behavior, while also changing existing ACP defaults. Auth-sensitive files and new static-analysis suppressions are included, so the breadth and risk require human review.

      Not approved because:

      • Per-review cost limit exceeded (workspace setting). Approvability relies on correctness review in order to determine eligibility
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing), or comment `@macroscope-app review this PR` to bypass the limit and review now. You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    9. StiensWout(GitHub profile, opens in a new tab)commented

      [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed on the current head. The settings-read wrapper now derives a stable detail from input.agentId and retains the original cause, so it no longer copies cause.message without context.

    10. StiensWout(GitHub profile, opens in a new tab)commented

      [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed on the current head. AcpRegistryCatalog now declares its service interface inline and construction annotations use AcpRegistryCatalog["Service"].

    11. [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed on the current head. AcpRegistryRuntimeCoordinator now declares its service interface inline and all annotations use AcpRegistryRuntimeCoordinator["Service"].

    12. StiensWout(GitHub profile, opens in a new tab)commented

      [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed on the current head. The rendered source is now only currentImage?.source; the raw CDN URL is never assigned to <img>, and focused tests cover validated blob rendering and fallback behavior.

    13. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    14. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    15. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    16. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    17. [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed in 379101bf1. The coordinator construction now lives in exported make, and layer is the canonical Layer.effect(AcpRegistryRuntimeCoordinator, make) wrapper.

    18. Reviewed the ACP service/error changes against the Effect service conventions.

      One new finding this round (duplicated private schema predicate in ws.ts). Two previously flagged violations are still present and unchanged, so I have not re-commented on them:

      • apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.ts:4667-4676 — single known tagged failure recovered with Effect.catch + manual _tag check and Effect.fail(error) re-raise; convention is Effect.catchTags({ AcpRequestError: ... }).
      • apps/server/src/provider/Drivers/AcpRegistryDriver.ts:537 — wrapper detail is built from cause.message while cause is already preserved; use the stable phrase form used by the sibling drivers.
      Posted via Macroscope — Effect Service Conventions
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      src/ws.ts:159

      AcpRegistrySupport.ts already owns a Schema.is(AcpRegistryError) predicate (private, line 151), so this adds a second private copy in a consumer module. Convention is one exported direct predicate next to the error type: change that declaration to export const isAcpRegistryError = Schema.is(AcpRegistryError); and import it here alongside AcpRegistryError / toAcpRegistryOperationError, dropping this line and the now-unused effect/Schema import.

      No longer relevant as of 4320d53f1944d0cbed19c037e585f03b21fafad2

    19. [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed in 379101bf1. A native _t3/session-mode config option takes precedence over the synthetic descriptor and is routed through session/set_config_option, so no duplicate ID or wrong session/set_mode call is possible.

    20. [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed in 379101bf1. Numeric and string JSON-RPC IDs have distinct canonical identities across protocol, client, agent, and extension pending maps. Tests prove 1 and "1" cannot resolve or correlate each other.

    21. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    22. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

      Sorry, I'm unable to act on this request because you do not have permissions within this repository.

      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Sorry, I'm unable to act on this request because you do not have permissions within this repository.

      macroscopeapp[bot](GitHub profile, opens in a new tab)replied on apps/server/src/mcp/AcpMcpStdioBridge.ts line 73

      Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    23. [gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:


      Fixed in 379101bf1. The wrapper now uses the stable detail Failed to build the ACP Registry provider snapshot. while retaining the original cause.

Sign in to join this conversation.