Show all ACP runtimes with install status and one-click install#724
Open
wpfleger96 wants to merge 2 commits into
Open
Show all ACP runtimes with install status and one-click install#724wpfleger96 wants to merge 2 commits into
wpfleger96 wants to merge 2 commits into
Conversation
…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.
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theclaudeCLI installed. There was no indication these runtimes existed or how to enable them.AcpAvailabilityStatus(Available / AdapterMissing / NotInstalled) and a consolidateddiscover_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'tinstall_acp_runtimeTauri 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 completionKnownAcpProviderwithcli_install_commands,adapter_install_commands,install_instructions_url, andinstall_hint; install commands live server-side only so the frontend can't inject arbitrary shell commandsDoctorSettingsPanelto show all runtimes with three-state status icons, adapter-missing context (shows CLI path), and Install / View instructions buttons with inline success and error feedbackPersonaDialogruntime 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;CreateAgentDialogSectionsshows a hint when additional runtimes are installableAcpProvideras a narrowed intersection type ofAcpProviderCatalogEntrywithavailability: "available"and non-nullcommand/binaryPath; adduseAvailableAcpProviders()hook that filters + type-narrows, preservingChannelAgentProvider = Pick<AcpProvider, ...>and all downstream callers unchangedtruncate_outputusesfloor_char_boundaryfor safe UTF-8 slicing, keeping head (512B) and tail (1024B) with a separatorknown_acp_provider_exact()for install command routingclassify_provider()function with 3 unit tests covering Available/AdapterMissing/NotInstalledacpProvidersCatalogandinstallAcpRuntimeResultoverrides; shared raw types imported fromtauri.tsReplaces #715 (branch rename).