Add the wake queue and the mail_wakes read tool #22
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Epic: #8
The wake queue and its read tools (ADR 0003 §3 and §7, as amended in PR #25). Wakes are pulled: a client polls on its own schedule.
A Grok Automation starts every run fresh, with the same instructions and no memory of earlier runs. A Grok Bot routine keeps memory. So the server must hold the cursor for the stateless case, and may let a stateful client hold its own.
What to build
wakestable withseq, the message ref, class, score and raised time.wakesrows.wake_consumerstable withconsumer(a short name,[a-z0-9-]{1,32}),seqandupdated_at. It holds positions only, never mail data. Theapiprocess writes it; that is the second table it writes, afteractions(ADR 0004 §2).mail_wakes(consumer, cursor, limit), read scope:consumer: returns wakes after that consumer's storedseq. An unknown consumer starts at the current end, not at the start of the queue.cursor: returns wakes after it, for a client that keeps its own state.seq | id | class | score | at, then a footer withack_seq(the lastseqreturned) andmore.mail_wakes_ack(consumer, seq), read scope: sets the consumer'sseq. It refuses aseqhigher than the queue's end and never moves a cursor backwards. A run that fails before the ack sees the same wakes again (at-least-once).mail_wakes(consumer=...), handle each wake withmail_read, then callmail_wakes_ackwith the footer'sack_seq.Acceptance
cursormode works without a consumer row.make checkgreen.Blocked by
Add the wake container that posts to Matrixto Add the wake queue and the mail_wakes read tool