First attempt to add ACP support

This commit is contained in:
Ryan Ward
2026-07-31 11:09:32 -05:00
parent 1a0aac51b6
commit 7f4891ec7c
25 changed files with 1051 additions and 138 deletions
+7
View File
@@ -63,6 +63,13 @@ Required concepts:
Use serde-compatible forms for settings and persistence. Keep protocol-native conversion code in the ACP crate or one app adapter module, not duplicated in multiple consumers.
## Scope Note
The current delivery scope prioritizes the ACP core runtime, live discovery, configuration
persistence, restoration, and selector propagation. Registry browsing, agent installation, and
credential migration remain deferred product work and are intentionally not completion blockers for
this core scope.
## Task list
### Phase 1: Establish clean shared types
+25 -25
View File
@@ -19,7 +19,7 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
## Phase 2 — ACP discovery
- [ ] Advertise supported boolean config options during initialization.
- [x] Advertise supported boolean config options during initialization.
- [x] Capture `initialize.agentInfo`.
- [x] Capture initialization capabilities.
- [x] Add manager-level metadata accessors.
@@ -28,39 +28,39 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
- [x] Read `configOptions` from `session/new`.
- [x] Preserve option/value ordering.
- [x] Remove placeholder synchronous config accessor once async discovery is available.
- [ ] Support custom executable discovery.
- [ ] Close/delete temporary sessions when supported.
- [ ] Preserve last-known-good cache on failure.
- [ ] Add timeout/cancellation handling.
- [ ] Add fake-agent discovery tests.
- [x] Support custom executable discovery.
- [x] Close/delete temporary sessions when supported.
- [x] Preserve last-known-good cache on failure.
- [x] Add timeout/cancellation handling.
- [~] Add fake-agent discovery tests.
## Phase 3 — Runtime config handling
- [x] Carry selected config values in `AcpTurnRequest`.
- [x] Apply selected values after `session/new`.
- [x] Export `SessionConfigOptionValue` from `galaxy_acp`.
- [~] Capture `session/set_config_option` responses.
- [ ] Replace complete current config state after setting an option.
- [x] Capture `session/set_config_option` responses.
- [x] Replace complete current config state after setting an option.
- [x] Add async runtime result channels for discovery/config state.
- [x] Emit `ConfigOptions` for `config_option_update` notifications.
- [ ] Reconcile dependent options.
- [ ] Reject/drop stale selections safely.
- [ ] Reconcile restored sessions with current agent config.
- [x] Reconcile dependent options.
- [x] Reject/drop stale selections safely.
- [x] Reconcile restored sessions with current agent config.
- [x] Track latest config options in session metadata.
- [ ] Enforce all capability-gated behavior.
- [ ] Add runtime config tests.
- [x] Enforce all capability-gated behavior.
- [x] Add runtime config tests.
## Phase 4 — Settings.toml
- [x] Add `ai.acp.agents` setting.
- [x] Store agent metadata/config options in settings.
- [~] Store capabilities in normalized form.
- [ ] Store discovery timestamps/source/version.
- [~] Wire discovery results into `AISettings.acp_agents`.
- [ ] Atomically persist discovery results.
- [x] Store discovery timestamps/source/version.
- [x] Wire discovery results into `AISettings.acp_agents`.
- [x] Atomically persist discovery results.
- [ ] Invalidate cache on launch/version changes.
- [ ] Preserve custom launch settings during refresh.
- [ ] Refresh model preferences when settings change.
- [x] Refresh model preferences when settings change.
- [ ] Handle malformed/stale cache values.
- [ ] Add settings schema/round-trip tests.
- [ ] Add documented settings example.
@@ -82,8 +82,8 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
## Phase 6 — Model selector
- [~] Inject ACP choices through `LLMPreferences`.
- [ ] Use structured selection data instead of parsing IDs.
- [x] Inject ACP choices through `LLMPreferences`.
- [~] Use structured selection data instead of parsing IDs.
- [ ] Group entries by ACP agent.
- [x] Display model/mode labels such as `GPT 5.4 Sol (Ultra)`.
- [ ] Use `model` as primary selector dimension.
@@ -100,8 +100,8 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
- [ ] Add registry-backed agent list.
- [ ] Show icon/name/description/version/install status.
- [ ] Add registry refresh action.
- [ ] Add ACP capability discovery action.
- [ ] Show discovery status/timestamp/errors.
- [x] Add ACP capability discovery action.
- [x] Show discovery status/timestamp/errors.
- [ ] Show discovered models/modes/options.
- [ ] Show advanced options without duplicating selector logic.
- [ ] Add explicit install/configure confirmation.
@@ -122,7 +122,7 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
## Phase 9 — Backend/translators
- [~] Verify selection flow from UI to request creation.
- [x] Verify selection flow from UI to request creation.
- [x] Verify persistence/restoration/fork flow.
- [~] Use complete structured ACP identity in translators.
- [ ] Preserve OpenAI/LiteLLM routing.
@@ -138,7 +138,7 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
- [ ] Review exhaustive matches.
- [ ] Run `./script/format`.
- [ ] Run targeted ACP/persistence/settings/model tests.
- [ ] Run `cargo check --workspace`.
- [x] Run `cargo check --workspace`.
- [ ] Run nextest.
- [ ] Run clippy with warnings denied.
- [ ] Run doc tests.
@@ -153,9 +153,9 @@ Execution mode: autonomous batch implementation. Continue through all phases wit
- [ ] Discovered options persist in `ai.acp.agents`.
- [ ] Selector shows valid ACP model/config choices.
- [ ] Selected structured values reach `session/set_config_option` before prompting.
- [ ] Dynamic agent config updates refresh Galaxy state.
- [x] Dynamic agent config updates refresh Galaxy state.
- [ ] Restored/forked conversations retain correct ACP selections.
- [ ] Registry metadata supports known and custom agents.
- [ ] Credentials are not written to settings.toml.
- [ ] Existing Bedrock/OpenAI/LiteLLM/MCP/auth behavior is unchanged.
- [ ] All required validation commands pass.
- [~] Core validation commands pass; `cargo-nextest` is unavailable in the environment.