Skip to content

Commit 17ea2ff

Browse files
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dTyler Longwell
andcommitted
Merge origin/main into eva/replica-heartbeat-fence
* origin/main: fix(buzz-acp): accept id-keyed config options when resolving model switch (#2795) fix(desktop): probe legacy Goose install dir on Windows (#3248) refactor(desktop): extract install command execution into install_exec (#3251) Polish composer activity layout and transitions (#3151) Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Tyler Longwell <[email protected]> Signed-off-by: Tyler Longwell <[email protected]>
2 parents ca801bd + 925a9a7 commit 17ea2ff

32 files changed

Lines changed: 1472 additions & 716 deletions

‎crates/buzz-acp/src/acp.rs‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,8 @@ pub enum ModelSwitchMethod {
18541854

18551855
/// Extract `configOptions` entries with `category == "model"` from a `session/new` result.
18561856
///
1857-
/// Returns the raw JSON array entries. Each entry has `configId`, `displayName`,
1857+
/// Returns the raw JSON array entries. Each entry has `configId` (spelled `id`
1858+
/// by some adapters, e.g. claude-agent-acp), `displayName`,
18581859
/// `options: [{ value, displayName }]`, etc.
18591860
pub fn extract_model_config_options(result: &serde_json::Value) -> Vec<serde_json::Value> {
18601861
result["configOptions"]
@@ -1888,7 +1889,14 @@ pub fn resolve_model_switch_method(
18881889
// 1. Search stable configOptions for a "model"-category entry whose
18891890
// options contain a value matching desired_model.
18901891
for config_opt in extract_model_config_options(session_new_result) {
1891-
let config_id = match config_opt.get("configId").and_then(|v| v.as_str()) {
1892+
// Adapters disagree on the key: the ACP spec says `configId`, but
1893+
// claude-agent-acp emits `id`. Accept both; the set request always
1894+
// uses `configId` on the wire.
1895+
let config_id = match config_opt
1896+
.get("configId")
1897+
.or_else(|| config_opt.get("id"))
1898+
.and_then(|v| v.as_str())
1899+
{
18921900
Some(id) => id,
18931901
None => continue,
18941902
};
@@ -2464,6 +2472,36 @@ mod tests {
24642472
);
24652473
}
24662474

2475+
#[test]
2476+
fn resolve_accepts_id_keyed_config_options() {
2477+
// claude-agent-acp (observed on v0.61.0) keys config options with
2478+
// `id` instead of the spec's `configId`. Payload mirrors its real
2479+
// `session/new` response.
2480+
let result = serde_json::json!({
2481+
"configOptions": [{
2482+
"id": "model",
2483+
"name": "Model",
2484+
"category": "model",
2485+
"type": "select",
2486+
"currentValue": "default",
2487+
"options": [
2488+
{ "value": "default", "name": "Default" },
2489+
{ "value": "opus[1m]", "name": "Opus" },
2490+
{ "value": "sonnet", "name": "Sonnet" }
2491+
]
2492+
}],
2493+
"models": null
2494+
});
2495+
let method = super::resolve_model_switch_method(&result, "opus[1m]");
2496+
assert_eq!(
2497+
method,
2498+
Some(super::ModelSwitchMethod::ConfigOption {
2499+
config_id: "model".to_string(),
2500+
option_value: "opus[1m]".to_string(),
2501+
})
2502+
);
2503+
}
2504+
24672505
#[test]
24682506
fn resolve_falls_back_to_unstable() {
24692507
let result = serde_json::json!({

‎desktop/scripts/check-file-sizes.mjs‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ const overrides = new Map([
344344
// absent, so AdapterMissing replaces the misleading NotInstalled. Includes
345345
// the deliberate-divergence doc comments; net after the inline preset
346346
// entries.push block collapsed into the helper.
347-
["src-tauri/src/managed_agents/discovery.rs", 1835],
347+
// +6: legacy Goose Windows install dir (%USERPROFILE%\goose) probed in
348+
// common_binary_paths so pre-#2680 standalone installs are discoverable.
349+
["src-tauri/src/managed_agents/discovery.rs", 1841],
348350
// BYOH — save_custom_harness_to_dir (backup-swap atomic write) + save_and_warm /
349351
// delete_and_warm (persist-mutex serialization for concurrent-safe registry
350352
// refresh, B-6). Also: id/collision/load/registry tests (from the file base) +
@@ -627,7 +629,11 @@ const overrides = new Map([
627629
// return value so the frontend immediately has the updated env.
628630
// +1: rebase over main (#2680) — requires_external_cli: false added to
629631
// save_custom_harness catalog entry construction (new required field).
630-
["src-tauri/src/commands/agent_discovery.rs", 2167],
632+
// -359: install command execution (spawn, output drain under timeout, retry
633+
// with backoff, output truncation) extracted to agent_discovery/install_exec.rs
634+
// alongside its tests, matching the managed_node.rs / post_install_verification.rs
635+
// split. The entries above describe the file's history, not its current shape.
636+
["src-tauri/src/commands/agent_discovery.rs", 1808],
631637
// draft-persistence predicate: submit-time `loadDraft` check + inline comment
632638
// + deps-array entry in submitMessage closes the never-persisted-boundary
633639
// defect (Thufir Pass-3 finding). Load-bearing correctness fix; queued to

‎desktop/src-tauri/Cargo.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)