Runtime inventory and host status

Runtime inventory and host status

index

Colibri discovers the host in two complementary ways:

1. Runtime inventory — a one-shot probe that reports versions installed on

the machine (node, npm, pi, zot, package manager, OS, etc.).

2. Watchdog host status — a read-only, newline-framed Unix-socket call to

the Clawdie watchdog that returns live health metrics.

Both are intentionally additive: they read from Clawdie, they do not change

it. This page records the design of those read-only integrations.

Runtime inventory probe

The colibri-runtime-inventory binary (src/bin/runtime_inventory.rs) emits a

single JSON object matching the clawdie.runtime-version-inventory.v1 schema

from crates/colibri-contracts/src/lib.rs.

Detection strategy

FieldHow it is detected
hostCOLIBRI_HOSTHOSTNAMEhostname command → "unknown"
osuname -sr + target architecture; falls back to std::env::consts
nodenode --version
npmnpm --version
npm_prefixnpm config get prefix
package_managerpkg on FreeBSD, otherwise apt / dnf / brew
piPI_BIN~/.npm-global/bin/pipi --version → package.json of @earendil-works/pi-coding-agent
zotZOT_BINzot --version across PATH and candidate locations

Why this shape

fall back to reading its package manifest when --version is missing. still produce a valid inventory.

Watchdog host status

crates/colibri-runtime/src/lib.rs implements the watchdog reader. It connects

over a Unix domain socket, sends {"cmd":"status"}\n, reads back one

newline-terminated JSON line, and normalizes the response into HostStatus.

Socket path resolution

The search order lets operators, services, and test harnesses override the

socket location without recompiling:

1. COLIBRI_WATCHDOG_SOCKET (explicit override)

2. COLIBRI_SERVICE_NAME (default clawdie) → {service}-watchdog.sock

3. TMP_IPC_DIR/{service}-watchdog.sock

4. AGENT_TMP_DIR/ipc/{service}-watchdog.sock or

CLAWDIE_TMP_DIR/ipc/{service}-watchdog.sock

5. $HOME/clawdie-ai/tmp/ipc/{service}-watchdog.sock

6. tmp/ipc/{service}-watchdog.sock (final fallback)

Wire protocol

Normalization rules

normalize_watchdog_status() in crates/colibri-runtime/src/lib.rs is defensive: false for booleans. access fields Colibri does not yet model.

Golden fixtures

crates/colibri-contracts/tests/golden.rs parses committed inventory and

host-status manifests in manifests/ and round-trips them through the Rust

structs. Those fixtures come from real hosts (osa, domedog, debby, the

operator USB) and are treated as cross-platform source material.

See also