Add the wake queue and the mail_wakes read tools #39
No reviewers
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!39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/wakes"
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?
Closes #22. Stacked on #38, which is stacked on #37. Merge them in order: #37, #38, then this.
Schema v3
wakes(seq AUTOINCREMENT, account, mailbox, uidvalidity, uid, thread_key, class, score, raised_at). AUTOINCREMENT means a seq is never reused, so a stored position never points at a different wake.wake_consumers(consumer, seq, updated_at)holds positions only, never mail data. It is the second table theapiwrites (ADR 0003 §7).CREATE IF NOT EXISTS. A v1 or v2 file upgrades in place, and the reader waits for v3, as before.Raising wakes
would_wake(from #38) to each answer, andStore.raise_wakesinserts the accepted ones.[wake] max_age_hours(default 24), means only a fresh message can wake. When you first enable triage over a 14-day backlog, it raises nothing.[wake]section means no wakes.mailmind sync --onceprintswoken=.Tools (read scope, registered only when
[wake]is set)mail_wakes(consumer | cursor, limit)returnsseq | id | class | score | at, thenack_seq=N more=M.ack_seqis returned.mail_wakes_ack(consumer, seq)moves the position forward only. A seq past the queue's end is refused withinvalid_argument.[a-z0-9-]{1,32}. The schema refuses any other name before the tool runs._register_write_toolsbecomes_register_tools(tools, scope, enabled)and serves both groups.Docs
max_age_hoursrow.config.example.toml.apiwrites two tables.Tests
tests/test_wakes.py:[wake].[wake]means no wakes.The store tests now upgrade v1 to v3.
make checkpasses (110 tests).🤖 Generated with Claude Code