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
|
The indicator uses `<txt>`/`<tool>`/`<txtclick>` genmon markup. It depends on
|
||||||
`nc` and `python3`; the Clawdie ISO stages Python 3.12 and creates `python3` /
|
`nc` and `python3`; warns with `⚠ missing deps` if either is absent instead of
|
||||||
`python` symlinks.
|
failing silently. Socket-down and no-response states are distinct, each with
|
||||||
|
actionable tooltip text.
|
||||||
|
|
||||||
## 2. Identity Wallpaper Helper
|
## 2. Identity Wallpaper Helper
|
||||||
|
|
||||||
|
|
@ -142,6 +143,7 @@ The launcher runs in `xfce4-terminal` with geometry 80x24 and pauses on
|
||||||
idempotent success;
|
idempotent success;
|
||||||
- does not fail just because `/usr/local/etc/colibri/provider.env` is mode `0600`;
|
- does not fail just because `/usr/local/etc/colibri/provider.env` is mode `0600`;
|
||||||
- uses `mdo -u root` for privileged checks/start where available;
|
- 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.
|
- never prints Vaultwarden credentials or provider keys.
|
||||||
|
|
||||||
## Build integration (`clawdie-iso` `build.sh`)
|
## Build integration (`clawdie-iso` `build.sh`)
|
||||||
|
|
|
||||||
|
|
@ -123,9 +123,19 @@ else
|
||||||
finish 1
|
finish 1
|
||||||
fi
|
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 "[4/4] Agent ${AGENT_NAME} is live on the Colibri board."
|
||||||
echo ""
|
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 " Check: colibri status"
|
||||||
echo " Tasks: colibri list-tasks --status started"
|
echo " Tasks: colibri list-tasks --status started"
|
||||||
echo " Board: colibri list-agents"
|
echo " Board: colibri list-agents"
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,39 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# xfce4-genmon panel indicator — polls colibri daemon health.
|
# xfce4-genmon panel indicator — polls colibri daemon health.
|
||||||
# Install: add a Generic Monitor panel item pointing to this script.
|
# Wired into a Generic Monitor panel item with 30s refresh.
|
||||||
# Refresh interval: 30s.
|
# Output: genmon XML with green/red dot + agent count + task count.
|
||||||
#
|
|
||||||
# Output: green/red dot + agent count + task count.
|
|
||||||
# 🟢 2 agents · 3 tasks
|
# 🟢 2 agents · 3 tasks
|
||||||
# 🔴 daemon down
|
# 🔴 daemon down
|
||||||
|
|
||||||
SOCKET="${COLIBRI_SOCKET:-/var/run/colibri/colibri.sock}"
|
SOCKET="${COLIBRI_SOCKET:-/var/run/colibri/colibri.sock}"
|
||||||
TOOLTIP=""
|
|
||||||
|
|
||||||
if [ -S "$SOCKET" ]; then
|
have() {
|
||||||
STATUS=$(printf '{"cmd":"status"}\n' | nc -U "$SOCKET" -w 2 2>/dev/null)
|
command -v "$1" >/dev/null 2>&1
|
||||||
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)
|
|
||||||
|
|
||||||
echo "<txt>🟢 ${AGENTS} agents · ${TASKS} tasks</txt>"
|
if ! have nc || ! have python3; then
|
||||||
TOOLTIP="Colibri: ${HOST} | socket: ${SOCKET} | agents: ${AGENTS} | started tasks: ${TASKS}"
|
echo "<txt>⚠ missing deps</txt>"
|
||||||
else
|
echo "<tool>nc and python3 required for colibri panel indicator</tool>"
|
||||||
echo "<txt>🔴 no response</txt>"
|
exit 0
|
||||||
TOOLTIP="Colibri socket exists but not responding"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "<txt>🔴 down</txt>"
|
|
||||||
TOOLTIP="Colibri daemon not running (no socket at ${SOCKET})"
|
|
||||||
fi
|
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>"
|
echo "<txtclick>xfce4-terminal --title 'Colibri Status' --command 'colibri status'</txtclick>"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue