fix(iso-visuals): harden panel indicator + auto-apply wallpaper on join
- Panel indicator: add have() checks for nc/python3, warn on missing deps instead of failing silently, distinct states for socket-down vs no-response with actionable tooltip text - Join Hive: generate and apply identity wallpaper on success as visual 'you're in' confirmation via xfconf-query - SKILL.md: document new behaviors
This commit is contained in:
parent
1a352e0d24
commit
43c65c8632
3 changed files with 43 additions and 24 deletions
|
|
@ -46,8 +46,9 @@ xfconf-query -c xfce4-panel -p /plugins/plugin-20/command -n -t string -s /usr/l
|
|||
```
|
||||
|
||||
The indicator uses `<txt>`/`<tool>`/`<txtclick>` 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`)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 "<txt>🟢 ${AGENTS} agents · ${TASKS} tasks</txt>"
|
||||
TOOLTIP="Colibri: ${HOST} | socket: ${SOCKET} | agents: ${AGENTS} | started tasks: ${TASKS}"
|
||||
else
|
||||
echo "<txt>🔴 no response</txt>"
|
||||
TOOLTIP="Colibri socket exists but not responding"
|
||||
fi
|
||||
else
|
||||
echo "<txt>🔴 down</txt>"
|
||||
TOOLTIP="Colibri daemon not running (no socket at ${SOCKET})"
|
||||
if ! have nc || ! have python3; then
|
||||
echo "<txt>⚠ missing deps</txt>"
|
||||
echo "<tool>nc and python3 required for colibri panel indicator</tool>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "<tool>${TOOLTIP}</tool>"
|
||||
if [ ! -S "$SOCKET" ]; then
|
||||
echo "<txt>🔴 down</txt>"
|
||||
echo "<tool>Colibri daemon not running (no socket at ${SOCKET})</tool>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
STATUS=$(printf '{"cmd":"status"}\n' | nc -U "$SOCKET" -w 2 2>/dev/null)
|
||||
if [ -z "$STATUS" ]; then
|
||||
echo "<txt>🔴 no response</txt>"
|
||||
echo "<tool>Colibri socket exists but not responding</tool>"
|
||||
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 "<txt>🟢 ${AGENTS:-?} agents · ${TASKS:-?} tasks</txt>"
|
||||
echo "<tool>Colibri: ${HOST:-?} | socket: ${SOCKET} | agents: ${AGENTS:-?} | started tasks: ${TASKS:-?}</tool>"
|
||||
echo "<txtclick>xfce4-terminal --title 'Colibri Status' --command 'colibri status'</txtclick>"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue