Expand description
Helpers the tool handlers share: cron, durations, quit-self and bulk-stop outcomes, delivery text. Split out of main.rs unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md §4.2).
Functions§
- await_
shutdown 🔒 - Polls srv for a shutdown waiting on the user’s override
(SPEC_AGENT_SELF_QUIT_2026_09_24.md §6.5) until it leaves
pending— andproceedingtoo whento_the_end— and returns the last status seen. One long request instead would outlast the client’s own timeout. - close_
pane_ 🔒outcome - What
ClosePane block_id=tells the agent once the target’s user has answered (§6.5). - cron_
set_ 🔒enabled - deferred_
delivery_ 🔒text SendMessage’s answer when srv accepted the message but queued it because the target’s process is starting up, restarting or stopping (SPEC_JEKT_IMMEDIATE_DELIVERY_2026_09_28.md §2.1). A target that is up gets it at once, mid-turn included, and is reported as delivered.- format_
duration 🔒 - Human-readable representation of a clamped Duration — used in the Loop success message so the reported cadence matches the actual run cadence.
- merge_
bulk_ 🔒stop_ outcomes - Folds each waited-on target into
FleetBulkStop’s usual shape: stopped (or already gone) →succeeded; kept by the user or failed →failed, with the kept ones also listed inkept_by_user. - parse_
interval 🔒 - Parse a loop interval string into a
Duration. Accepts a number with an optional unit suffix:s(seconds),m(minutes),h(hours); a bare number is treated as minutes. Clamped to [10s, 24h]. - quit_
self_ 🔒outcome - What
QuitSelftells the agent once the user’s override window has settled (§6.5). - quit_
self_ 🔒result - What
QuitSelftells the agent, from srv’s answer (§4.2, §6.3). - send_
message_ 🔒outcome - What
SendMessagetells the sender, from srv’s/agentmux/reactive/injectbody. Each answer keeps its first word (Delivered,QUEUED,HELD) so existing prompts keep working, and adds the message id and the receiver’s condition where srv’s answer already implies it (SPEC_JEKT_DELIVERY_STATES_AND_MAILBOX_2026_10_01.md §5.2, Phase 0 item 3).