chore/0.12.0-model-version #151
3 changed files with 47 additions and 4 deletions
|
|
@ -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"]
|
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]
|
[workspace.package]
|
||||||
version = "0.11.0"
|
version = "0.12.0"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "colibri"
|
name = "colibri"
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,7 @@ async fn dispatch(cmd: ColibriCommand, state: &SharedState) -> ColibriResponse {
|
||||||
system_prompt,
|
system_prompt,
|
||||||
local_args,
|
local_args,
|
||||||
jail,
|
jail,
|
||||||
|
HashMap::new(),
|
||||||
)
|
)
|
||||||
.await
|
.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)");
|
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<String, String> = 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.
|
// provider=local → binary is the Pi executable; jail=None → host-spawn.
|
||||||
let resp = cmd_spawn_agent(
|
let resp = cmd_spawn_agent(
|
||||||
state,
|
state,
|
||||||
|
|
@ -458,6 +497,7 @@ pub async fn autospawn_pi_if_configured(state: &SharedState) {
|
||||||
None,
|
None,
|
||||||
Some(args),
|
Some(args),
|
||||||
None,
|
None,
|
||||||
|
extra_env,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
|
@ -498,6 +538,7 @@ async fn cmd_spawn_agent(
|
||||||
system_prompt: Option<String>,
|
system_prompt: Option<String>,
|
||||||
local_args: Option<Vec<String>>,
|
local_args: Option<Vec<String>>,
|
||||||
jail: Option<JailConfig>,
|
jail: Option<JailConfig>,
|
||||||
|
extra_env: HashMap<String, String>,
|
||||||
) -> ColibriResponse {
|
) -> ColibriResponse {
|
||||||
let provider = match provider_str.to_lowercase().as_str() {
|
let provider = match provider_str.to_lowercase().as_str() {
|
||||||
"deepseek" => Provider::DeepSeek,
|
"deepseek" => Provider::DeepSeek,
|
||||||
|
|
@ -531,8 +572,10 @@ async fn cmd_spawn_agent(
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
// T1.4 PR3a: inject session prompt context as env var when enabled
|
// T1.4 PR3a: inject session prompt context as env var when enabled.
|
||||||
let mut extra_env = HashMap::new();
|
// 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 state.config.scheduler_prompt_injection {
|
||||||
if let Some(ref sid) = session_id {
|
if let Some(ref sid) = session_id {
|
||||||
if let Some(session) = state.sessions.get(sid) {
|
if let Some(session) = state.sessions.get(sid) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use serde_json::{json, Value};
|
||||||
pub const DEFAULT_ENDPOINT: &str = "https://api.deepseek.com/chat/completions";
|
pub const DEFAULT_ENDPOINT: &str = "https://api.deepseek.com/chat/completions";
|
||||||
// DeepSeek API model string (cache-capable). Distinct from our internal
|
// DeepSeek API model string (cache-capable). Distinct from our internal
|
||||||
// `deepseek-v4-flash` alias; override with DEEPSEEK_MODEL.
|
// `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
|
// Deliberately long and byte-stable. Reasonix discipline: the immutable region
|
||||||
// must not change between turns or the cache will not hit.
|
// must not change between turns or the cache will not hit.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue