From aff8c89fba4371f62f9b364806c2282541fa6779 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Tue, 23 Jun 2026 08:49:18 +0200 Subject: [PATCH 1/2] feat: run clawdie-hw-probe on agent autospawn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before spawning an agent (pi/zot), colibri-daemon now runs /usr/local/bin/clawdie-hw-probe (if present) and passes the JSON output as CLAWDIE_HW_PROFILE env var. Non-blocking: probe failure or missing binary logs a warning and the agent spawns normally without hw profile. This gives agents immediate host awareness — USB names, GPU capabilities, RAM, CPU, disks, ZFS pools — without running probes themselves. --- crates/colibri-daemon/src/socket.rs | 47 +++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/crates/colibri-daemon/src/socket.rs b/crates/colibri-daemon/src/socket.rs index 198e84c..a62210d 100644 --- a/crates/colibri-daemon/src/socket.rs +++ b/crates/colibri-daemon/src/socket.rs @@ -243,6 +243,7 @@ async fn dispatch(cmd: ColibriCommand, state: &SharedState) -> ColibriResponse { system_prompt, local_args, jail, + HashMap::new(), ) .await } @@ -449,6 +450,44 @@ pub async fn autospawn_pi_if_configured(state: &SharedState) { info!(binary = %pi_binary, ?args, "autospawn-pi: spawning Pi agent on host (DeepSeek-backed)"); + // Collect hardware profile via clawdie-hw-probe (non-blocking). + // Pass it to the spawned agent as CLAWDIE_HW_PROFILE so the agent can + // self-describe the host hardware without running probes itself. + let mut extra_env: HashMap = HashMap::new(); + let probe_binary = "/usr/local/bin/clawdie-hw-probe"; + if std::path::Path::new(probe_binary).exists() { + match std::process::Command::new(probe_binary).output() { + Ok(output) if output.status.success() => { + let stdout = String::from_utf8_lossy(&output.stdout).trim().to_string(); + if !stdout.is_empty() { + info!( + probe_bytes = output.stdout.len(), + "autospawn-pi: collected hardware profile" + ); + extra_env.insert("CLAWDIE_HW_PROFILE".to_string(), stdout); + } else { + warn!("autospawn-pi: clawdie-hw-probe returned empty stdout"); + } + } + Ok(output) => { + let stderr = String::from_utf8_lossy(&output.stderr); + warn!( + status = %output.status, + stderr = %stderr.trim(), + "autospawn-pi: clawdie-hw-probe failed (continuing without hw profile)" + ); + } + Err(e) => { + warn!( + error = %e, + "autospawn-pi: failed to run clawdie-hw-probe (continuing without hw profile)" + ); + } + } + } else { + debug!("autospawn-pi: clawdie-hw-probe not found at {probe_binary}; skipping hw profile"); + } + // provider=local → binary is the Pi executable; jail=None → host-spawn. let resp = cmd_spawn_agent( state, @@ -458,6 +497,7 @@ pub async fn autospawn_pi_if_configured(state: &SharedState) { None, Some(args), None, + extra_env, ) .await; @@ -498,6 +538,7 @@ async fn cmd_spawn_agent( system_prompt: Option, local_args: Option>, jail: Option, + extra_env: HashMap, ) -> ColibriResponse { let provider = match provider_str.to_lowercase().as_str() { "deepseek" => Provider::DeepSeek, @@ -531,8 +572,10 @@ async fn cmd_spawn_agent( ..Default::default() }; - // T1.4 PR3a: inject session prompt context as env var when enabled - let mut extra_env = HashMap::new(); + // T1.4 PR3a: inject session prompt context as env var when enabled. + // Start with any caller-provided extra env (e.g. CLAWDIE_HW_PROFILE from + // autospawn), then layer in scheduler prompt context on top. + let mut extra_env = extra_env; if state.config.scheduler_prompt_injection { if let Some(ref sid) = session_id { if let Some(session) = state.sessions.get(sid) { -- 2.45.3 From 1e5218b81ba75e7c12fc4165d1a4890f1fd41c89 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Tue, 23 Jun 2026 08:51:02 +0200 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20default=20DeepSeek=20model=20?= =?UTF-8?q?=E2=86=92=20v4-pro=20+=20bump=20to=200.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - colibri-deepseek DEFAULT_MODEL: deepseek-chat → deepseek-v4-pro (matches zot's defaultModelForProvider('deepseek') = 'deepseek-v4-pro') - Workspace version: 0.11.0 → 0.12.0 --- Cargo.toml | 2 +- crates/colibri-deepseek/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7138299..d6855af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = ["crates/colibri-contracts", "crates/colibri-deepseek", "crates/colibri-runtime", "crates/colibri-glasspane", "crates/colibri-daemon", "crates/colibri-client", "crates/colibri-glasspane-tui", "crates/colibri-store", "crates/colibri-skills", "crates/colibri-mcp", "crates/colibri-vault", "crates/clawdie"] [workspace.package] -version = "0.11.0" +version = "0.12.0" [package] name = "colibri" diff --git a/crates/colibri-deepseek/src/lib.rs b/crates/colibri-deepseek/src/lib.rs index 50bde14..8646590 100644 --- a/crates/colibri-deepseek/src/lib.rs +++ b/crates/colibri-deepseek/src/lib.rs @@ -22,7 +22,7 @@ use serde_json::{json, Value}; pub const DEFAULT_ENDPOINT: &str = "https://api.deepseek.com/chat/completions"; // DeepSeek API model string (cache-capable). Distinct from our internal // `deepseek-v4-flash` alias; override with DEEPSEEK_MODEL. -pub const DEFAULT_MODEL: &str = "deepseek-chat"; +pub const DEFAULT_MODEL: &str = "deepseek-v4-pro"; // Deliberately long and byte-stable. Reasonix discipline: the immutable region // must not change between turns or the cache will not hit. -- 2.45.3