Expand description
A person’s words to an agent out of quota: kept, checked, sent when it can work (task #2648). The person’s words to an agent that is out of quota.
A Swarm broadcast to an agent marked limited used to be refused (“not sent”) and nothing
looked at whether the limit was still real; a quota refilled before the provider’s reset left the
agent limited for days. Now the words are kept, a check turn starts on the agent at once
(limit_probe::check_now, no wait for the 15-minute slot a message between agents has), and the
broadcast’s answer waits [CHECK_WAIT_MS] for the result: delivered when the check cleared the
limit, otherwise “held”, with the reason. Kept words are sent as soon as the agent can work,
whoever cleared it (the check, a clean turn of another agent on its account, the reset), and
for at most [KEEP_MS]. The words never ride the check turn: a check that fails leaves the agent
limited and the words kept.
Structs§
- Pending 🔒
- A broadcast’s words kept for an agent out of quota, with its check started: what the answer waits for.
- Words 🔒
Constants§
- CHECK_
WAIT_ 🔒MS - How long a broadcast’s answer waits for the check.
- FAST_
FOR_ 🔒MS - HELD_
PREFIX 🔒 - An answer that starts with this is “kept, not sent yet”, not a failure.
- KEEP_MS 🔒
- How long words are kept for an agent that stays out of quota (the held-message hold’s 24 hours).
- MAX_
KEPT 🔒 - The most messages kept for one agent.
- PENDING_
PREFIX 🔒 - An answer that starts with this stands for a
Pendingto be waited for (resolve_pending). - POLL_
FAST_ 🔒MS - How often the watcher looks while the check is fresh, then after
FAST_FOR_MS. - POLL_
SLOW_ 🔒MS
Statics§
- KEPT 🔒
- The words kept per pane, oldest first.
- NEXT_
TICKET 🔒 - PARKED 🔒
Functions§
- deliver_
person_ 🔒broadcast - One target of a Swarm broadcast: the person’s words. To an agent that can work they go as a turn; to
one out of quota by its plan they are kept and its check starts at once, instead of being refused
(
resolve_pendingthen waits for the check, for every such target together); any other agent that cannot work refuses them as before. Only this path keeps: a task start or an agent’s message to a limited agent (deliver_broadcast_turn) still refuses, since it undoes its work on a refusal. - expire 🔒
- Drops what has been kept
KEEP_MS, answering each sender (if still waiting) with that. - held_
note 🔒 - The reason in a broadcast answer that means “kept, not sent yet” (
HELD_PREFIX);Nonefor a failure. - is_
kept_ 🔒for_ check - Whether a message to an agent in this state is kept and checked, rather than refused: a plan’s limit (not a route out of credits, and not a sign-in: neither ends by itself being asked).
- keep 🔒
- Keeps
wordsforblock_id;truewhen it is the first (the caller starts the watcher).Errwhen the agent already hasMAX_KEPT. - keep_
and_ 🔒check - Keeps
textforblock_id, an agent out of quota, and starts its check turn. - kept_
count 🔒 - How many are kept for
block_id. - resolve_
pending 🔒 - Waits for every target parked by
deliver_person_broadcasttogether, up toCHECK_WAIT_MSfrom when its check started, and puts each one’s answer in its outcome. - resolve_
pending_ 🔒within - spawn_
watch 🔒 - Watches
block_iduntil it can work, then sends what is kept, oldest first. - take_
all 🔒 - Takes everything kept for
block_id. - watch 🔒
- The watcher: looks every
fastforfast_for, then everyslow, and whenholdingsays the agent can work, sends what is kept throughdeliverand answers each sender still waiting. Ends when nothing is kept forblock_id.