#!/usr/bin/env bash # A tmux server of made-up agents, for the README's screenshots: what the # daemon would write to pane options, written directly (no agents run). # # docs/demo-agents.sh # # Every pane runs a copy of `sleep`, in / (search matches directories too, # and a temporary one would match almost any query); nothing touches any # other tmux server. set -eu SOCK=$1 DIR=$2 t() { tmux -u -L "$SOCK" "$@"; } now=$(($(date +%s) * 1000)) ago() { echo $((now - $1 * 60000)); } t kill-server 2>/dev/null || true mkdir -p "$DIR/bin" # Each pane runs a copy of sleep named after its agent, so process detection # (`dingger status`) finds it. for harness in pi claude codex gemini opencode; do cp /bin/sleep "$DIR/bin/$harness" && codesign --force --sign - "$DIR/bin/$harness" 2>/dev/null done # A placeholder session holds the server up while the others are made. t -f /dev/null new-session -d -s _ -x 200 -y 50 "sleep 100000" pane= agent() { # session window harness state minutes name [option=value...] local session=$1 window=$2 harness=$3 state=$4 minutes=$5 name=$6 shift 6 local run="$DIR/bin/$harness 100000" if ! t has-session -t "=$session" 2>/dev/null; then t new-session -d -s "$session" -n "$window" -c / "$run" elif ! t list-windows -t "=$session" -F '#{window_name}' | grep -qx "$window"; then t new-window -d -t "=$session:" -n "$window" -c / "$run" else t split-window -d -t "=$session:$window" -c / "$run" fi pane=$(t list-panes -t "=$session:$window" -F '#{pane_id}' | tail -1) t set -p -t "$pane" @agent "$harness" t set -p -t "$pane" @agent_state "$state" t set -p -t "$pane" @dingger_since "$(ago "$minutes")" t set -p -t "$pane" @agent_name "$name" for kv in "$@"; do t set -p -t "$pane" "@${kv%%=*}" "${kv#*=}"; done } agent api db claude blocked 2 "Approve migration for the orders table" agent infra certs pi blocked 6 "Rotate staging TLS certificates" dingger_importance=high dingger_cost=0.42 dingger_context=18 agent api tests pi done 4 "Fix flaky retry test in the HTTP client" dingger_cost=1.84 dingger_context=38 agent web settings codex done 12 "Add a dark mode toggle to settings" agent web deps pi done 9 "Upgrade to React 19" dingger_cost=0.97 dingger_context=54 "dingger_error=429: rate limit exceeded" agent api perf pi working 3 "Profile the slow search endpoint" dingger_cost=3.10 dingger_context=76 agent docs adr gemini working 1 "Write an ADR for the event bus" agent cli release pi working 7 "Cut the 2.4 release notes" dingger_cost=0.66 dingger_context=22 agent web review claude idle 25 "Review PR #412: lazy-load the editor" agent cli config pi idle 40 "Refactor the config loader" "dingger_draft=also handle XDG_CONFIG_HOME" dingger_cost=2.15 dingger_context=61 agent infra audit pi idle 90 "Nightly dependency audit" dingger_importance=low dingger_cost=0.31 dingger_context=9 agent docs site opencode idle 55 "Migrate the docs site to Astro" agent api auth pi idle 130 "Add passkey sign-in" dingger_cost=4.02 dingger_context=93 t kill-session -t =_ t set -g @dingger_blocked 2 t set -g @dingger_done 3 t set -g @dingger_working 3 t set -g @dingger_cost_today 23.40 t set -g @dingger_cost_week 187.15 t set -g @dingger_cost_month 612.80