Files
clawmates/migrations/0025_node_tools.sql
T
Omar SobhandClaude Opus 4.8 9263418fcb
ci / gates (push) Successful in 5s
ci / rust (push) Failing after 7s
ci / frontend (push) Successful in 23s
ci / e2e (push) Has been skipped
Fleet: per-node dev-tool version cards + nightly latest-check (Phase 1, read-only)
Each node card now shows installed versions of Docker / Claude Code / Kimi / GLM /
Ollama (conditional per node) under the ssh card, with an "update available" badge.

- daemon: probe_tools() finds docker/claude/kimi-cli/ollama across candidate bin dirs,
  extracts semver from --version, reports {"t":"node_tools",...} on connect + every 15m.
- migration node_tools + tool_latest; cm-db repo node_tools (upsert/list/latest).
- cm-api: fleet.rs NodeTools uplink → upsert; tool_versions.rs spawn_latest_checker
  (24h, npm/pypi/github; docker display-only); GET /api/nodes/{id}/tools (glm mirrors
  claude). Spawned in clawmates-server.
- frontend: NodeTools cards on each HostCard with the ↑latest badge.

Phase 2 (one-click update execution) intentionally deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-27 06:01:51 -07:00

17 lines
587 B
SQL

-- Per-node installed dev-tool versions (probed by the daemon) + the latest
-- upstream version per tool (a nightly checker), so the fleet UI can flag updates.
CREATE TABLE IF NOT EXISTS node_tools (
node_id UUID NOT NULL REFERENCES nodes (id) ON DELETE CASCADE,
tool TEXT NOT NULL,
version TEXT NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (node_id, tool)
);
CREATE TABLE IF NOT EXISTS tool_latest (
tool TEXT PRIMARY KEY,
latest_version TEXT NOT NULL,
checked_at TIMESTAMPTZ NOT NULL DEFAULT now()
);