Skip to main content

Module notes

Module notes 

Source
Expand description

The AgentMux system notes agents get about cloud delivery, and the per-agent bookkeeping behind the resume note. Pure: times come in as unix ms, and hhmm is the one place they become wall-clock text.

Every note starts with NOTE_MARKER. Only srv writes one: reactive::sanitize::neutralize_markers quotes the marker inside any jekt or forwarded text, the way it quotes [BROADCAST:.

Structs§

ExpiredItem
A message the relay dropped undelivered because it outlived its delivery window, as GET /reactive/pending/:agent_id reports it. No message text: it is a pointer to go and look, not something to act on.
Note
A note for one agent, ready to deliver.
NoteBook
Which agents were told delivery paused, and which still await their resume note.
RetryQueue
Notes whose local delivery failed (the agent’s input was briefly unavailable, say), retried on later ticks: the NoteBook has already counted them as told, so it won’t produce them again.

Enums§

ExpiredKind

Constants§

DELAYED_AFTER_MS
A message delivered later than this after the relay received it is marked with when it was sent.
NOTE_ATTEMPTS
Tries for a note whose local delivery failed (one per tick), before it is given up with a warning.
NOTE_MARKER
How every AgentMux system note begins.
PAUSE_NOTE_START 🔒
How every pause note begins (see pause_note).
RESUME_NOTE_GRACE_MS
How long after delivery resumes an agent waits for its first pull before its resume note goes out without a count.

Functions§

clean 🔒
A relay-supplied name as it may appear inside a system note: printable ASCII only, no brackets, bounded. The note is trusted text, so nothing a remote sender chose may add sentences or markers to it.
delayed_prefix
(sent 14:30, delivered 14:41) for a message delivered more than DELAYED_AFTER_MS after the relay received it; empty otherwise.
expired_note
The note for messages that expired outside a pause.
expired_summary
What expired, grouped: notices about pull requests as one list of PRs, everything else counted per sender. None when nothing expired.
hhmm
ms as local wall-clock time, HH:MM.
join_and 🔒
parse_created_at
created_at (RFC 3339) as unix ms.
pause_note
The note an agent gets once cloud delivery has been paused a while.
plural 🔒
pr_label 🔒
pr_number_or_string 🔒
resume_note
The note an agent gets when delivery resumes. delivered is None when its first pull after resuming didn’t come in time to count.