summaryrefslogtreecommitdiff
path: root/bin/smack
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-10-22 15:20:59 +0100
committerIgor Soarez <igor@soarez.org>2026-10-22 15:20:59 +0100
commit13d7482ae9ed4ff2d8e9f6bf81e1a2074dbe8980 (patch)
treed781eb286b09304864a5591e89a64135183fb638 /bin/smack
parent599b0bf8bd460fe061a053f1725c87b83773ab4c (diff)
pi: alarm extension, timed notes the agent sets for itself
An `alarm` tool sets, lists and cancels alarms: after a delay, at a wall-clock time, or repeating (at most 12 fires, the last within 24 hours). A fired alarm is a pi.sendMessage custom message, customType "alarm", rendered as set by the agent rather than typed by the user, and wrapped in fixed text the agent cannot drop: it is the agent's own earlier note, not the user's, and grants no permission -- outward actions still need the user's approval. /alarms lists and cancels. An alarm due while pi is busy waits for the task to finish, held here rather than in pi's queue, which drops a custom message on Esc. A run that ended stopped -- Esc, an error, or the abort before /compact, /new, /resume and /fork -- holds due alarms until a later run completes. Timers die with the session; the tool is withdrawn outside the TUI. Reviewed by Fable and GLM 5.3 Flash. Fixed from the review: unbounded every_minutes overflowed setTimeout into 1 ms fires; a due alarm ran right after Esc, or unseen on a session being replaced; stale repeat fires piled up; the session_compact delivery never ran; impossible dates and times skipped by a clock change were accepted; the note could forge the wrapper's delimiters. Declines dot request 20261021-220352-work-laptop-c46033 (sz-agent-alarm, a skill typing into the agent's tmux pane) in favour of this: a custom message is recorded and shown as the agent's, needs no screen-scraping, and loads only in pi.
Diffstat (limited to 'bin/smack')
0 files changed, 0 insertions, 0 deletions