refactor: rename clawdie-hw-probe → clawdie-system-probe #263

Merged
clawdie merged 2 commits from refactor/rename-hw-to-system-probe into main 2026-06-28 08:34:30 +02:00
5 changed files with 24 additions and 17 deletions

View file

@ -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<String, String> = 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<String> {
match std::process::Command::new("clawdie-hw-probe")
match std::process::Command::new("clawdie-system-probe")
.arg("--capabilities")
.output()
{

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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;