Switch to mailparser, UID watermarking, and 45s polling

- Replace hand-rolled MIME parsing with mailparser's simpleParser
- Use HTML body in prompts for better encoding/structure fidelity
- Replace IMAP IDLE (unreliable on Loopia) with 45s polling loop
- Track highest UID on startup; only fetch uid > last_uid each poll
  to avoid re-transferring old messages
- Add node: prefix to built-in imports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 03:35:40 +00:00
parent 797f18519a
commit 8710dd9685
2 changed files with 51 additions and 37 deletions

View File

@@ -3,6 +3,7 @@
"version": "0.1.0",
"type": "module",
"dependencies": {
"imapflow": "^1.0.0"
"imapflow": "^1.0.0",
"mailparser": "^3.9.4"
}
}
}