Repository navigation
Closed
Description
Overview
Implement the agent registry that discovers available external ACP agents on the user system and maintains their availability status. This enables the frontend to show which coding agents are available and the ACP session manager to verify agent availability before spawning.
Acceptance Criteria
-
AgentRegistrytrait from Shared types, traits, and interface contracts for agent subsystems #998 fully implemented - Correctly detects installed binaries via PATH search
- Health check runs version probe for each detected agent
- Auth validation: flags agents with missing env vars as unavailable
- Cached results with 5-minute TTL (no re-probe on every call)
- Background refresh updates availability status periodically
- Handles edge cases: binary exists but not executable, binary is a different tool with same name
- Unit tests with mock filesystem/PATH
- Code passes
bun run quality:fix
Technical Specifications
New Modules
packages/desktop-app/src-tauri/src/acp/registry.rspackages/desktop-app/src-tauri/src/acp/health.rs
Agent Catalog (Hardcoded v1)
| Agent | Binary | Args | Auth | Health Check |
|---|---|---|---|---|
| Claude Code | claude |
["--acp"] |
AgentManaged (OAuth) | which claude |
| Gemini CLI | gemini |
["--acp"] |
AgentManaged (OAuth) | which gemini |
| Mistral Vibe | vibe-acp |
[] |
EnvApiKey(MISTRAL_API_KEY) |
which vibe-acp |
Binary Detection
- Use
whichcrate orstd::process::Commandwithwhichto check PATH - Cache results with TTL (5 minutes default)
- Re-probe on explicit refresh or background timer
Health Checking
- For each detected binary, run lightweight version probe (e.g.,
claude --version) - Validate response indicates expected tool
- Mark as unavailable if probe fails or times out (5s timeout per probe)
Auth Validation
- For
EnvApiKeyagents: check env var existence (std::env::var()) - Do not validate key contents, just check existence
- Missing env var -> agent shown as "Not configured" (not "Not installed")
Background Monitoring
- Periodic check every 5 minutes via tokio interval
- Emit availability change events when status changes
- Lazy start: first check triggers on first
discover_agents()call
Reference Files
packages/desktop-app/src-tauri/src/app_services.rs— service lifecycle patterns
Exports
SystemAgentRegistrystruct implementingAgentRegistry
Dependencies
Related Issues
- ACP Integration and Local LLM Capability #997 (parent epic)
Activity
malibio commentedon Apr 3, 2026
Baseline: frontend tests have pre-existing vitest startup error (TypeError: Attempted to assign to readonly property in vitest internals). This is unrelated to Rust backend work for this issue.
feat: ACP agent registry with binary detection and health checking (c…
feat: ACP agent registry with binary detection and health checking (c…
feat: ACP agent registry with binary detection and health checking (c…
feat: ACP agent registry with binary detection and health checking (c…