From 32d002b13844072e210f8dc1d6a1ee83bec4a002 Mon Sep 17 00:00:00 2001 From: Seto Elkahfi <1797197+setoelkahfi@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:50:06 +0200 Subject: [PATCH] Use ACP SDK v1 latest --- .github/workflows/ci.yml | 3 ++- Cargo.lock | 14 ++++++++------ Cargo.toml | 2 +- src/main.rs | 18 +++++++++++++----- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eadb64c..7cae722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,11 +6,12 @@ name: CI on: push: + branches: [main, development] pull_request: workflow_dispatch: concurrency: - group: ci + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: diff --git a/Cargo.lock b/Cargo.lock index 432cf19..a847b89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,17 +20,19 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "agent-client-protocol" -version = "1.0.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16302d16c7531355db16593d99c38c8297db0c4653aa7dd80c3556bb17f4cd8c" +checksum = "1d386d6a58f4dbe0ebfa98e915caa54005dabdefd419de3d4678b28cd5752444" dependencies = [ "agent-client-protocol-derive", "agent-client-protocol-schema", + "async-io", "async-process", "blocking", "futures", "futures-concurrency", "rustc-hash 2.1.2", + "rustix 1.1.4", "schemars 1.2.1", "serde", "serde_json", @@ -42,9 +44,9 @@ dependencies = [ [[package]] name = "agent-client-protocol-derive" -version = "1.0.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b37d552feb6981a0109febda6b71fc723678cd065974c2d76279c19c407095" +checksum = "97b94934d118a69e921d14e94d4af5b3076563318c52662c89a0ecb3f139e1da" dependencies = [ "quote", "syn 2.0.117", @@ -52,9 +54,9 @@ dependencies = [ [[package]] name = "agent-client-protocol-schema" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac542aba230234b1591ace7286a47c0514fe3efc3037d43296bde31ba7ee5728" +checksum = "06679e1542356341f4550ccfb16338b64f37f6af70de2105446ef6fbb078234c" dependencies = [ "anyhow", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index 8d79539..fe1497f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ path = "src/main.rs" [dependencies] # ACP protocol SDK -agent-client-protocol = { version = "1.0", features = ["unstable_session_fork", "unstable_auth_methods"] } +agent-client-protocol = { version = "1.3", features = ["unstable_session_fork", "unstable_auth_methods"] } # Onde Inference engine (local LLM) # onde = { path = "../onde" } diff --git a/src/main.rs b/src/main.rs index 0f62f6d..ced7ef1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1873,13 +1873,13 @@ impl SiGitAgent { // ── Local Inference toggle ────────────────────────────────────────── if args.config_id.0.as_ref() == LOCAL_INFERENCE_CONFIG_ID { - let enabled = match args.value.0.as_ref() { - LOCAL_INFERENCE_ON => true, - LOCAL_INFERENCE_OFF => false, + let enabled = match args.value.as_value_id().map(|v| v.0.as_ref()) { + Some(LOCAL_INFERENCE_ON) => true, + Some(LOCAL_INFERENCE_OFF) => false, other => { return Err(agent_client_protocol::Error::new( -32602, - format!("unknown Local Inference value: {other}"), + format!("unknown Local Inference value: {other:?}"), )); } }; @@ -1909,7 +1909,15 @@ impl SiGitAgent { )); } - let model_id = args.value.0.as_ref(); + let Some(model_id) = args.value.as_value_id().map(|v| v.0.as_ref()) else { + return Err(agent_client_protocol::Error::new( + -32602, + format!( + "expected a value-id for {MODEL_CONFIG_ID}, got {:?}", + args.value + ), + )); + }; // can't switch while the startup model is still loading — the old // weights are in GPU memory and the new load gets "does not fit"