diff --git a/skills/iso-visuals/SKILL.md b/skills/iso-visuals/SKILL.md index fbd6b1a..d79bf37 100644 --- a/skills/iso-visuals/SKILL.md +++ b/skills/iso-visuals/SKILL.md @@ -46,8 +46,9 @@ xfconf-query -c xfce4-panel -p /plugins/plugin-20/command -n -t string -s /usr/l ``` The indicator uses ``/``/`` genmon markup. It depends on -`nc` and `python3`; the Clawdie ISO stages Python 3.12 and creates `python3` / -`python` symlinks. +`nc` and `python3`; warns with `โš  missing deps` if either is absent instead of +failing silently. Socket-down and no-response states are distinct, each with +actionable tooltip text. ## 2. Identity Wallpaper Helper @@ -142,6 +143,7 @@ The launcher runs in `xfce4-terminal` with geometry 80x24 and pauses on idempotent success; - does not fail just because `/usr/local/etc/colibri/provider.env` is mode `0600`; - uses `mdo -u root` for privileged checks/start where available; +- on success, generates and applies the identity wallpaper as visual confirmation; - never prints Vaultwarden credentials or provider keys. ## Build integration (`clawdie-iso` `build.sh`) diff --git a/skills/iso-visuals/scripts/clawdie-join-hive.sh b/skills/iso-visuals/scripts/clawdie-join-hive.sh index 4095da5..1d0984d 100755 --- a/skills/iso-visuals/scripts/clawdie-join-hive.sh +++ b/skills/iso-visuals/scripts/clawdie-join-hive.sh @@ -123,9 +123,19 @@ else finish 1 fi -# 4. Start poll loop +# 4. Apply identity wallpaper as visual confirmation echo "[4/4] Agent ${AGENT_NAME} is live on the Colibri board." echo "" + +if have clawdie-wallpaper-gen; then + echo " Setting identity wallpaper..." + if have xfconf-query; then + WP="/tmp/clawdie-wallpaper.png" + clawdie-wallpaper-gen "$WP" 2>/dev/null && \ + xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image -s "$WP" 2>/dev/null + fi +fi + echo " Check: colibri status" echo " Tasks: colibri list-tasks --status started" echo " Board: colibri list-agents" diff --git a/skills/iso-visuals/scripts/colibri-panel-indicator.sh b/skills/iso-visuals/scripts/colibri-panel-indicator.sh index 09213f6..11465ef 100755 --- a/skills/iso-visuals/scripts/colibri-panel-indicator.sh +++ b/skills/iso-visuals/scripts/colibri-panel-indicator.sh @@ -1,32 +1,39 @@ #!/bin/sh # xfce4-genmon panel indicator โ€” polls colibri daemon health. -# Install: add a Generic Monitor panel item pointing to this script. -# Refresh interval: 30s. -# -# Output: green/red dot + agent count + task count. +# Wired into a Generic Monitor panel item with 30s refresh. +# Output: genmon XML with green/red dot + agent count + task count. # ๐ŸŸข 2 agents ยท 3 tasks # ๐Ÿ”ด daemon down SOCKET="${COLIBRI_SOCKET:-/var/run/colibri/colibri.sock}" -TOOLTIP="" -if [ -S "$SOCKET" ]; then - STATUS=$(printf '{"cmd":"status"}\n' | nc -U "$SOCKET" -w 2 2>/dev/null) - if [ -n "$STATUS" ]; then - AGENTS=$(echo "$STATUS" | python3 -c "import sys,json; d=json.load(sys.stdin)['data']; print(d['agents'])" 2>/dev/null) - TASKS=$(echo "$STATUS" | python3 -c "import sys,json; d=json.load(sys.stdin)['data']; t=d['tasks']; print(t['started'])" 2>/dev/null) - HOST=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['host'])" 2>/dev/null) +have() { + command -v "$1" >/dev/null 2>&1 +} - echo "๐ŸŸข ${AGENTS} agents ยท ${TASKS} tasks" - TOOLTIP="Colibri: ${HOST} | socket: ${SOCKET} | agents: ${AGENTS} | started tasks: ${TASKS}" - else - echo "๐Ÿ”ด no response" - TOOLTIP="Colibri socket exists but not responding" - fi -else - echo "๐Ÿ”ด down" - TOOLTIP="Colibri daemon not running (no socket at ${SOCKET})" +if ! have nc || ! have python3; then + echo "โš  missing deps" + echo "nc and python3 required for colibri panel indicator" + exit 0 fi -echo "${TOOLTIP}" +if [ ! -S "$SOCKET" ]; then + echo "๐Ÿ”ด down" + echo "Colibri daemon not running (no socket at ${SOCKET})" + exit 0 +fi + +STATUS=$(printf '{"cmd":"status"}\n' | nc -U "$SOCKET" -w 2 2>/dev/null) +if [ -z "$STATUS" ]; then + echo "๐Ÿ”ด no response" + echo "Colibri socket exists but not responding" + exit 0 +fi + +AGENTS=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['agents'])" 2>/dev/null) +TASKS=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['tasks']['started'])" 2>/dev/null) +HOST=$(echo "$STATUS" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['host'])" 2>/dev/null) + +echo "๐ŸŸข ${AGENTS:-?} agents ยท ${TASKS:-?} tasks" +echo "Colibri: ${HOST:-?} | socket: ${SOCKET} | agents: ${AGENTS:-?} | started tasks: ${TASKS:-?}" echo "xfce4-terminal --title 'Colibri Status' --command 'colibri status'"