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.
Each note waits for its agent’s next turn (reactive::held_notes), one
per Note::key: a pause that ends before that turn reaches the agent as
one outage_note instead of a pause note and a resume note.
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§
- Expired
Item - A message the relay dropped undelivered because it outlived its delivery
window, as
GET /reactive/pending/:agent_idreports 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 hold for its next turn.
- Note
Book - Which agents were told delivery paused, and which still await their resume note.
- Retry
Queue - Notes that couldn’t be held (the agent wasn’t registered for a moment,
say), retried on later ticks: the
NoteBookhas already counted them as told, so it won’t produce them again.
Enums§
- Expired
Kind - Note
Kind - What a note says, which decides the one slot it waits in (
Note::key).
Constants§
- DELAYED_
AFTER_ MS - A message delivered later than this after the relay received it is marked with when it was sent.
- LIMITED_
KEY - Where a note about messages left at the relay waits.
- NOTE_
ATTEMPTS - Tries for a note that couldn’t be held (one per tick), before it is given up with a warning.
- NOTE_
MARKER - How every AgentMux system note begins.
- OUTAGE_
KEY - Where an outage note waits.
- PAUSED_
KEY - Where a pause note waits.
- RESUMED_
KEY - Where a resume note waits.
- 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§
- delayed_
prefix (sent 14:30, delivered 14:41)for a message delivered more thanDELAYED_AFTER_MSafter 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.
Nonewhen nothing expired. - hhmm
msas local wall-clock time,HH:MM.- limited_
note - The note an agent gets once, when it can work again after relay messages were left at the relay for it
(
first_mstolast_ms) because it was out of quota or signed out. - outage_
note - The note an agent gets in place of a pause note still waiting for its
turn when delivery resumes at
until_ms.again: an earlier outage’s note, fromsince_ms, was waiting too. - 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.
- resume_
note - The note an agent gets when delivery resumes.
deliveredisNonewhen its first pull after resuming didn’t come in time to count. - without_
delayed_ prefix textwithout adelayed_prefixat its start: the message as the sender wrote it. A text that does not begin with one comes back as it is.