aboutsummaryrefslogtreecommitdiff
path: root/claude-templates
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-20 16:03:08 -0500
committerCraig Jennings <c@cjennings.net>2026-07-20 16:03:08 -0500
commit302b062680c8fbd9743d4e083154ac5fc314955a (patch)
tree4ac4cfb00bee8d863401852a77c41ef8a67127fb /claude-templates
parentfecdf8cc231bc7f75a9b0b3d5f5342e5f2f3d104 (diff)
downloadrulesets-302b062680c8fbd9743d4e083154ac5fc314955a.tar.gz
rulesets-302b062680c8fbd9743d4e083154ac5fc314955a.zip
feat(pager): document the Signal pager and add the receive timer
The pager worked but was undocumented and drifting stale: signal-cli warned the account had gone 47 days without a receive, and no runbook existed to hand a future session or a non-Claude runtime. I added the runbook under docs/design/ and a roam-sync-shaped receive timer that drains the queue every 15 minutes, keeping the account warm and surfacing reply messages. I also generalized agent-page: it now sends directly from any machine holding the pager account and relays to velox only when it doesn't. ratio is linked as a device of the account, so a page lands even when velox is down. The receive script no-ops cleanly where the account isn't registered, since the units stow onto every machine via the shared common package.
Diffstat (limited to 'claude-templates')
-rwxr-xr-xclaude-templates/bin/agent-page25
1 files changed, 16 insertions, 9 deletions
diff --git a/claude-templates/bin/agent-page b/claude-templates/bin/agent-page
index 11a5264..8e9b23c 100755
--- a/claude-templates/bin/agent-page
+++ b/claude-templates/bin/agent-page
@@ -3,19 +3,24 @@
#
# Usage: agent-page <message...>
#
-# The pager identity (+15045173983) is registered in velox's signal-cli, so
-# velox sends directly and every other machine ssh-relays the send over the
-# tailnet. The recipient is Craig's Signal account UUID — his phone number
-# reads as unregistered in Signal's directory, so never page the number.
-# Verified end to end 2026-07-13 (phone push confirmed).
+# The pager identity (+15045173983) is registered in velox's signal-cli, and
+# any daily driver linked as a device of that account (ratio, 2026-07-20) can
+# send directly too. So the dispatch is: if the pager account is registered in
+# the local signal-cli, send directly; otherwise ssh-relay the send to velox
+# over the tailnet. A direct send from a linked device still lands when velox
+# is down — the reason ratio was linked. The recipient is Craig's Signal
+# account UUID — his phone number reads as unregistered in Signal's directory,
+# so never page the number. Verified end to end 2026-07-13 (velox) and
+# 2026-07-20 (ratio, direct).
#
# This is the AWAY channel. At his desk, use the desktop channel instead:
# notify info "Title" "Message" --persist
# See protocols.org "Paging Craig" for choosing between them.
#
-# Known caveats (tracked on the rulesets Signal-pager task): velox must be
-# up and reachable on the tailnet, and the signal-cli account wants a
-# periodic `receive` (staleness warnings appear otherwise).
+# Known caveats (tracked on the rulesets Signal-pager task, full runbook in
+# rulesets docs/design/): a relay from a non-linked machine needs velox up on
+# the tailnet, and each device holding the account wants a periodic `receive`
+# (staleness warnings appear otherwise) — the signal-receive timer handles that.
#
# Source: ~/code/rulesets/claude-templates/bin/agent-page
# Install: make -C ~/code/rulesets install
@@ -31,7 +36,9 @@ fi
msg="$*"
-if [ "$(uname -n)" = "velox" ]; then
+# The pager account is local if this machine's signal-cli holds it — the
+# registered primary (velox) or any linked device. Those send directly.
+if signal-cli listAccounts 2>/dev/null | grep -q "$PAGER_ACCOUNT"; then
signal-cli -a "$PAGER_ACCOUNT" send -m "$msg" "$CRAIG_UUID"
rc=$?
else