Add Strategy 0: disk-read path for get_email()#54
Merged
Conversation
Implement new strategy for get_email to read directly from disk before trying JXA
Build on vkostakos's disk-read strategy to extract all fields: - read/flagged status from .emlx plist footer flags bitmask - date_sent, reply_to, message_id from MIME headers - Move Strategy 0 after _enrich_attachments definition - Add structured logging for fallthrough debugging - Fix existing tests to mock _get_index_manager - Add dedicated Strategy 0 test Co-Authored-By: Claude Opus 4.6 <[email protected]>
1cac1fa to
b067ef6
Compare
- Version bump to 0.1.7 in pyproject.toml and server.json - Add CHANGELOG.md covering all releases (0.1.0–0.1.7) - Add CONTRIBUTING.md with dev setup, architecture notes, PR guidelines - Update CLAUDE.md with Strategy 0 cascade docs and hybrid access table - Add plist bitmask parsing tests (read/flagged from flags integer) - Add Strategy 0 fallthrough test (disk fail → JXA pickup) Co-Authored-By: Claude Opus 4.6 <[email protected]>
Update all project descriptions (README, pyproject.toml, server.json, mkdocs.yml, docs, CLAUDE.md) to lead with disk-first reads as the headline feature alongside batch JXA and FTS5 search. Add architecture deep-dive page with .emlx format, JXA IPC tradeoffs, FTS5 index design, and Gemini-generated diagrams. Add get_email benchmark scenario with dynamic message ID discovery, re-run full competitive benchmarks, and update results. Co-Authored-By: Claude Opus 4.6 <[email protected]>
date_received and date_sent were both extracted from the Date header, making them always identical. Now date_received parses the topmost Received header (delivery time) with fallback to Date header, while date_sent correctly uses Date (composition time). Co-Authored-By: Claude Opus 4.6 <[email protected]>
… to README - Add date_received fix note with rebuild instructions to CHANGELOG - Gitignore root-level benchmark chart PNGs (duplicates of docs/) - Add "Fetch 50 emails" row to README performance table (46x faster) Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.emlxfiles on disk — the fastest path forget_email(), bypassing JXA/Apple Events entirely.emlxplist footer flags bitmask (bit 0 = read, bit 4 = flagged)Date,Reply-To,Message-IDfrom MIME headers for full schema parity with JXA strategiesBased on the disk-read idea from PR #53 by @vkostakos.
Changes
src/apple_mail_mcp/index/disk.pyEmlxEmailwith 5 new fields, plist + MIME header parsingsrc/apple_mail_mcp/server.pytests/test_server.pyTest plan
get_emailreturns disk-read results).emlxis missing/corrupt🤖 Generated with Claude Code