Add the JMAP source read path #64
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!64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/jmap-source"
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 #55. Part of epic #51 (phase 6).
What this adds
A JMAP account mirrors into the same store as the IMAP accounts. One
mail_searchcovers both. A JMAP id survives a move.JmapAccountConfigsits beside the IMAP config, andsourcechooses between them.session_urldefaults to Fastmail and must be https, or http on loopback for tests. The token file must not end in.token, because the k8s base routes those files toapi.source_statetable holds the Email state string, the mailbox id-to-path map and the per-account uid counter, as the #55 ruling decided. New methods cover stable-id flags, moves, deletes, renames, and the end of a switch.jmap.py.httpx, with no redirects followed. Every URL the session names must keep its scheme.Mailbox/get. A renamed mailbox renames its rows in place.Email/query, thenEmail/getwithfetchTextBodyValuesandmaxBodyValueBytes. An interrupted backfill resumes without duplicates.Email/changesand page whilehasMoreChangesis true.cannotCalculateChanges, or a change in the wanted mailboxes, starts a full reconcile.refused/unsupporteduntil #57.EmailSubmissionis never called.mailmind checkwarns when the token can send or change mail.auth.unavailable, which is retryable.server_error.ADR 0006 §8 now records
Mailbox/geteach pass and thesource_statetable. README,config.example.toml, SECURITY.md and CLAUDE.md are updated.httpxis now a direct dependency (it was already in the lock through mcp).Tests
tests/test_jmap.pyruns against a fake JMAP server in the test process (19 tests). They cover:cannotCalculateChanges, and narrowing the wanted mailboxes;checkand its CLI path;Stalwart integration is #63.
make check: 163 passed, mypy and ruff clean, pip-audit clean.make test-integration: 8 passed, so the IMAP path is unchanged.Not in this PR
sync.interval_seconds.🤖 Generated with Claude Code