From 9f1e6920c69fdc071c671a7d5081a88bff77590f Mon Sep 17 00:00:00 2001 From: 123kupola <123kupola@gmail.com> Date: Sun, 28 Jun 2026 08:30:43 +0200 Subject: [PATCH 1/2] feat(schema): add blender_available detection to derive_capabilities() trigger --- packaging/mother/mother_schema.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/mother/mother_schema.sql b/packaging/mother/mother_schema.sql index 7cd1715..8951353 100644 --- a/packaging/mother/mother_schema.sql +++ b/packaging/mother/mother_schema.sql @@ -152,6 +152,13 @@ BEGIN ); END IF; END IF; + -- Blender detection from hw-probe. + IF NEW.hw_profile->'blender'->>'available' = 'true' THEN + caps := caps || jsonb_build_object( + 'blender_available', true, + 'blender_version', NEW.hw_profile->'blender'->>'version' + ); + END IF; -- Inference tier: what this node can run locally. IF caps->>'has_gpu' = 'true' AND (caps->>'ollama_available' = 'true' OR caps->>'llama_cpp_available' = 'true') THEN caps := caps || '{"inference_tier": "local-fast"}'::JSONB; -- 2.45.3 From add2c742842f550ebf60ca418959c126e7bccb77 Mon Sep 17 00:00:00 2001 From: 123kupola <123kupola@gmail.com> Date: Sun, 28 Jun 2026 08:33:17 +0200 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20rename=20clawdie-hw-probe=20?= =?UTF-8?q?=E2=86=92=20clawdie-system-probe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/colibri-daemon/src/socket.rs | 18 +++++++++--------- docs/guide/sl/reference/okrajsave.md | 2 +- docs/wiki/hive-routing.md | 8 ++++---- packaging/mother/MOTHER-SETUP.md | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/colibri-daemon/src/socket.rs b/crates/colibri-daemon/src/socket.rs index 59fd3d5..02c87dc 100644 --- a/crates/colibri-daemon/src/socket.rs +++ b/crates/colibri-daemon/src/socket.rs @@ -573,11 +573,11 @@ pub async fn autospawn_agent_if_configured(state: &SharedState) { info!(binary = %agent_binary, ?args, "autospawn: spawning agent on host (DeepSeek-backed)"); - // Collect hardware profile via clawdie-hw-probe (non-blocking). + // Collect hardware profile via clawdie-system-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"; + let probe_binary = "/usr/local/bin/clawdie-system-probe"; if std::path::Path::new(probe_binary).exists() { match std::process::Command::new(probe_binary).output() { Ok(output) if output.status.success() => { @@ -589,7 +589,7 @@ pub async fn autospawn_agent_if_configured(state: &SharedState) { ); extra_env.insert("CLAWDIE_HW_PROFILE".to_string(), stdout); } else { - warn!("autospawn: clawdie-hw-probe returned empty stdout"); + warn!("autospawn: clawdie-system-probe returned empty stdout"); } } Ok(output) => { @@ -597,18 +597,18 @@ pub async fn autospawn_agent_if_configured(state: &SharedState) { warn!( status = %output.status, stderr = %stderr.trim(), - "autospawn: clawdie-hw-probe failed (continuing without hw profile)" + "autospawn: clawdie-system-probe failed (continuing without hw profile)" ); } Err(e) => { warn!( error = %e, - "autospawn: failed to run clawdie-hw-probe (continuing without hw profile)" + "autospawn: failed to run clawdie-system-probe (continuing without hw profile)" ); } } } else { - debug!("autospawn: clawdie-hw-probe not found at {probe_binary}; skipping hw profile"); + debug!("autospawn: clawdie-system-probe not found at {probe_binary}; skipping hw profile"); } // Capture the hw profile before extra_env moves into cmd_spawn_agent. @@ -724,7 +724,7 @@ async fn try_register_hw_with_mother(hostname: &str, hw_profile: &str) { const RETRY_DELAY_SECS: u64 = 5; const REGISTER_TOOL: &str = "node_register"; - // Only relevant when clawdie-hw-probe was actually shipped. + // Only relevant when clawdie-system-probe was actually shipped. if hw_profile.is_empty() { return; } @@ -887,10 +887,10 @@ async fn try_register_hw_with_mother(hostname: &str, hw_profile: &str) { } } -/// Run `clawdie-hw-probe --capabilities` to get a dynamic capability list. +/// Run `clawdie-system-probe --capabilities` to get a dynamic capability list. /// Falls back to direct probing if the script is unavailable. fn probe_capabilities() -> Vec { - match std::process::Command::new("clawdie-hw-probe") + match std::process::Command::new("clawdie-system-probe") .arg("--capabilities") .output() { diff --git a/docs/guide/sl/reference/okrajsave.md b/docs/guide/sl/reference/okrajsave.md index 0b1e856..ee1ec5a 100644 --- a/docs/guide/sl/reference/okrajsave.md +++ b/docs/guide/sl/reference/okrajsave.md @@ -133,7 +133,7 @@ Blocked → Done / Error. ### harvest -**Žetev** — zajem podatkov o strojni opremi (`clawdie-hw-probe`). +**Žetev** — zajem podatkov o strojni opremi (`clawdie-system-probe`). Pobrano (harvested) se pošlje matičnemu vozlišču (mother) prek MCP. ### hive diff --git a/docs/wiki/hive-routing.md b/docs/wiki/hive-routing.md index 5d3d60a..019a5d8 100644 --- a/docs/wiki/hive-routing.md +++ b/docs/wiki/hive-routing.md @@ -14,7 +14,7 @@ | ---------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------- | | `mother_schema.sql` | `hive_nodes` table with `hw_profile` + `capabilities` JSONB | No stable node UUID; hostname is the key | | `derive_capabilities()` trigger | Auto-computes `has_gpu`, `gpu_vendor`, `can_run_local_llm`, `max_model` from hw_profile | Only GPU/VRAM heuristics — doesn't probe running services | -| `clawdie-hw-probe` | Collects GPU, RAM, CPU, disks, ZFS, WiFi, Vulkan, Colibri status | No ollama/llama.cpp probing | +| `clawdie-system-probe` | Collects GPU, RAM, CPU, disks, ZFS, WiFi, Vulkan, Colibri status | No ollama/llama.cpp probing | | `node-register-mcp` | UPSERTs hw_profile into `hive_nodes` on join | No UUID generation at join time | | `crates/colibri-daemon/src/scheduler.rs` | Cron/interval/one-shot jobs, capability matching stubs | No cost-aware routing, no hive awareness | | `colibri-store` | Local SQLite `agents` table with UUID (v4 random) | UUID is session-local, not hive-stable | @@ -154,7 +154,7 @@ Extend the hw-probe to detect running local LLM services and extend the trigger | `can_embed_locally` | `nomic-embed-text` in ollama OR any embedding model loaded | | `inference_tier` | `local-fast` (GPU ≥ 24GB), `local-slow` (CPU-only, RAM ≥ 16GB), `cloud-only` | -### Probe additions to `clawdie-hw-probe` +### Probe additions to `clawdie-system-probe` ```sh # New collectors @@ -220,7 +220,7 @@ ALTER TABLE tasks ADD COLUMN routing JSONB; ### Phase 1: Join (existing, extended) ``` -Node boots → clawdie-hw-probe runs → MCP tools/call node_register +Node boots → clawdie-system-probe runs → MCP tools/call node_register → mother UPSERTs hive_nodes → derive_capabilities() trigger fires → capabilities JSONB updated → node is "online" ``` @@ -264,7 +264,7 @@ When the task completes, the local daemon writes cost to its SQLite (T1.5). The 2. Extend `derive_capabilities()` for local LLM (1 day) 3. Add `routing_score()` function to mother's PostgreSQL (stored function — zero Rust changes) 4. Extend `node-register-mcp` to accept `local_llm` block (0.5 day) -5. Add `local_llm` probe to `clawdie-hw-probe` (1 day) +5. Add `local_llm` probe to `clawdie-system-probe` (1 day) **Rust changes:** Scheduler reads `capabilities` from hive_nodes via MCP query, computes score, dispatches. ~200 lines. diff --git a/packaging/mother/MOTHER-SETUP.md b/packaging/mother/MOTHER-SETUP.md index 0a6a178..e978348 100644 --- a/packaging/mother/MOTHER-SETUP.md +++ b/packaging/mother/MOTHER-SETUP.md @@ -34,7 +34,7 @@ infrastructure. ``` USB node Mother (osa) ──────── ──────────── -clawdie-hw-probe PostgreSQL (mother_hive) +clawdie-system-probe PostgreSQL (mother_hive) │ ▲ ▼ │ colibri-daemon │ INSERT / UPSERT @@ -258,7 +258,7 @@ with an empty remote command; the forced-command wrapper starts colibri-mcp tools 2>&1 | grep external # On mother: test node_register with a sample hw-probe -sudo clawdie-hw-probe 2>/dev/null | \ +sudo clawdie-system-probe 2>/dev/null | \ jq '{jsonrpc:"2.0",method:"tools/call",id:1, params:{name:"node_register", arguments:{hostname:"test-node",hw_profile:.}}}' | \ @@ -277,7 +277,7 @@ ssh colibri@mother tools | grep node_register 1. Copy the mother-mcp private key to the USB node's seed partition (`CLAWDIESEED/colibri/ssh/mother-mcp`) 2. On the USB, install `external-mcp.json` as shown above -3. On the USB, install `clawdie-hw-probe` from clawdie-iso +3. On the USB, install `clawdie-system-probe` from clawdie-iso 4. Restart `colibri_daemon` — autospawn runs hw-probe and registers the node with mother -- 2.45.3