Expand description
Maildir-based inbox messaging system.
Each team member gets a Maildir at .batty/inboxes/<member>/ with
new/, cur/, tmp/ subdirectories. Messages are JSON blobs stored
atomically via the maildir crate.
new/— undelivered messages (daemon picks these up)cur/— delivered messages (moved here after tmux injection)tmp/— atomic write staging (managed bymaildircrate)
Structs§
- Digest
Entry - A single entry in the digested inbox view.
- Inbox
Message - A message stored in a member’s inbox.
- Inbox
Purge Summary
Enums§
- Message
Category - Category of an inbox message, used for priority sorting and collapsing.
- Message
Type - Type of inbox message.
Functions§
- all_
messages - List all messages (both pending and delivered) for a member.
- classify_
message - Classify a message body into a category.
- delete_
message - Delete a message from a member’s inbox (from either new/ or cur/).
- deliver_
to_ inbox - Deliver a message to a member’s inbox.
- demote_
stale_ escalations - Demote digest entries whose referenced tasks are already
done,archived, or otherwise cleared on the board. Escalations for cleared tasks are re-categorised asMessageCategory::Statusso they no longer occupy the top of the inbox digest (#612). - digest_
messages - Digest a list of inbox messages: collapse nudges per sender, status updates per task (keep latest), and priority-sort the result.
- expire_
stale_ pending_ messages - Expire pending messages older than the provided age by marking them delivered.
- extract_
task_ ids_ from_ body - Extract
#NNtask references from a message body. Used bydemote_stale_escalations(#612) to determine whether an escalation body is still actionable against the current board state. - find_
recent_ duplicate - Return the most recent duplicate message seen within the provided window.
- inboxes_
root - Resolve the inboxes root directory:
.batty/inboxes/. - init_
inbox - Initialize a member’s inbox (create
new/,cur/,tmp/dirs). - mark_
delivered - Mark a message as delivered (move from
new/tocur/). - message_
signature - Produce a stable signature for duplicate detection.
- pending_
message_ count - Count undelivered messages in
new/for a member. - pending_
messages - List all pending (undelivered) messages in a member’s inbox.
- purge_
delivered_ messages - Purge delivered messages from a member inbox.
- purge_
delivered_ messages_ for_ all - Purge delivered messages from every member inbox under
.batty/inboxes/. - read_
recent_ messages - Read recent messages for a member across both pending and delivered states.