generated from coulomb/repo-seed
feat(WARDEN-WP-0021): T3-T5 — visibility, approve loop, runbook (scheduled worker complete)
T4 (review→send loop): conservative tick persists structured drafts to state_dir/worker-drafts.json; `warden worker drafts` lists them, `warden worker approve <id> [--body …]` sends the reviewed draft as the reply + marks read + drops it. Escalated plans persist no draft. Live-verified end-to-end. T3 (visibility): `warden worker status` (pending drafts, triage count, last digest, timer state); best-effort notify-send nudge in the tick when drafts are pending. T5: wiki/playbooks/scheduled-worker.md (enable/disable, the approve loop, failure modes, conservative-only posture) + SCOPE note. WARDEN-WP-0021 finished: the conservative worker now runs on a systemd --user timer (enabled, every 15 min), triages new inbox messages into drafts you approve with one command, degrades gracefully, and stops with one command. 249 tests, lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -58,4 +58,12 @@ if ! LLM_CONNECT_URL="$LLM_URL" WARDEN_HUB_URL="$HUB_URL" \
|
||||
uv run --directory "$ROOT" warden worker run --execute --brain "$BRAIN"; then
|
||||
echo "$(date -Is) tick: worker run returned non-zero; will retry next tick"
|
||||
fi
|
||||
|
||||
# Best-effort desktop nudge when drafts are pending (needs a display; never fails the tick).
|
||||
if command -v notify-send >/dev/null 2>&1; then
|
||||
N="$(uv run --directory "$ROOT" warden worker drafts 2>/dev/null | grep -c '→' || true)"
|
||||
if [[ "${N:-0}" -gt 0 ]]; then
|
||||
notify-send "ops-warden worker" "$N draft(s) pending — run: warden worker drafts" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user