Skip to content

Show all ACP runtimes with install status and one-click install#724

Open
wpfleger96 wants to merge 2 commits into
mainfrom
wpfleger/runtime-reconciliation-install-ux
Open

Show all ACP runtimes with install status and one-click install#724
wpfleger96 wants to merge 2 commits into
mainfrom
wpfleger/runtime-reconciliation-install-ux

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

@wpfleger96 wpfleger96 commented May 22, 2026

This PR makes all four ACP runtimes visible in the Preferred runtime dropdown and Doctor panel, with one-click install for missing adapters.

discover_local_acp_providers() silently filtered out any runtime whose ACP adapter binary wasn't on disk, hiding Claude Code and Codex even when the user had the claude CLI installed. There was no indication these runtimes existed or how to enable them.

  • Add AcpAvailabilityStatus (Available / AdapterMissing / NotInstalled) and a consolidated discover_acp_providers() that classifies all four known runtimes regardless of install state; AdapterMissing fires when the underlying CLI is present but the ACP adapter isn't
  • Add install_acp_runtime Tauri command that runs provider-defined CLI and adapter install scripts in a login shell with a 5-minute timeout, threaded pipe draining to prevent deadlock, a concurrency guard (AtomicBool), and resolve cache clear on completion
  • Extend KnownAcpProvider with cli_install_commands, adapter_install_commands, install_instructions_url, and install_hint; install commands live server-side only so the frontend can't inject arbitrary shell commands
  • Redesign DoctorSettingsPanel to show all runtimes with three-state status icons, adapter-missing context (shows CLI path), and Install / View instructions buttons with inline success and error feedback
  • PersonaDialog runtime dropdown includes all runtimes with (adapter missing) / (not installed) labels and a warning when an unavailable provider is selected so users can store a preference for later; CreateAgentDialogSections shows a hint when additional runtimes are installable
  • Redefine AcpProvider as a narrowed intersection type of AcpProviderCatalogEntry with availability: "available" and non-null command/binaryPath; add useAvailableAcpProviders() hook that filters + type-narrows, preserving ChannelAgentProvider = Pick<AcpProvider, ...> and all downstream callers unchanged
  • truncate_output uses floor_char_boundary for safe UTF-8 slicing, keeping head (512B) and tail (1024B) with a separator
  • Exact provider ID match via known_acp_provider_exact() for install command routing
  • Extract pure classify_provider() function with 3 unit tests covering Available/AdapterMissing/NotInstalled
  • E2e bridge: consolidated mock handler with configurable acpProvidersCatalog and installAcpRuntimeResult overrides; shared raw types imported from tauri.ts

Replaces #715 (branch rename).

…buttons

The "Preferred runtime" dropdown in Agents > Add Persona and the Doctor
panel only showed runtimes with a resolved ACP adapter binary, silently
hiding Claude Code and Codex when their adapters weren't installed.

Add three-state availability detection (Available / AdapterMissing /
NotInstalled) to distinguish "CLI present but adapter missing" from
"nothing installed." Expose a full provider catalog via
`discover_all_acp_providers` and an `install_acp_runtime` command that
runs server-defined install scripts in a login shell with a 5-minute
timeout.

Doctor panel now shows all four known runtimes with status badges and
Install buttons. PersonaDialog shows all runtimes with status labels so
users can store a preference for later. CreateAgentDialog shows a hint
when additional runtimes are available to install.
@wpfleger96 wpfleger96 requested a review from a team as a code owner May 22, 2026 16:25
…iew findings

The original implementation created a second parallel Tauri command
(discover_all_acp_providers) alongside the existing one to avoid
changing the return type. This produced two commands, two hooks, two
query keys, and two raw type converters. Consolidates into a single
command returning the full catalog, with a useAvailableAcpProviders
hook that type-narrows for callers needing non-null command/binaryPath.

Also fixes: pipe deadlock in install command (#1), UTF-8 truncation
panic (#2/#4), adds install concurrency guard (#11), exact provider ID
match (#15), error display stdout fallback (#5), success banner
suppression when already available (#12), misleading re-run text (#13),
IIFE refactor in PersonaDialog (#14), hidden internal query lift (#7),
configurable e2e mocks (#9), shared raw type exports (#8), and
classify_provider unit tests (#10).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant