8 Commits
Author SHA1 Message Date
TooonyChen 83927b8b2b test: add real-mail fixture evals 2026-07-09 16:22:12 +12:00
TooonyChen b6a1ad7d9d fix: keep anchor hrefs when stripping HTML and accept bare text/html fragments
Forwarded mails (e.g. Yandex webmail) arrive as a single text/html part
with no <html>/<body> wrapper and no text/plain alternative. Two bugs made
their codes unextractable:

- stripHtmlTags dropped href attributes, so button-only mails (Netflix
  'Get Code') reached the LLM with no URL at all → codeExist=0.
  Anchors now render as 'label [url]' with &amp; decoded.
- extractMailBodies only recognised single-part HTML wrapped in
  <html>/<body>, so htmlBody was null and the Rendered preview was empty.
  A bare fragment with Content-Type text/html now counts as the html body.

Verified against the real forwarded Netflix mail from production raw_mails:
content now carries the travel/verify link and classifies 5/5 as
login_code.
2026-07-09 15:43:18 +12:00
TooonyChen bc76275d04 fix: stop treating List-Unsubscribe alone as promotional for transactional mail
Gmail/Yahoo bulk-sender rules (2024) force large senders (Netflix via SES,
etc.) to add List-Unsubscribe to verification emails too, so it can no
longer be an unconditional bulk signal — real access-code mail was being
filtered before the LLM and never reached code_mails.

List-ID/List-Post, Precedence bulk/list, and ESP campaign X-headers remain
unconditional. List-Unsubscribe alone is now exempted when the decoded
subject looks transactional (code/verify/OTP/sign-in/reset/验证码/…);
genuine ads that slip through still get codeExist=0 from the classifier.
2026-07-08 18:12:21 +12:00
TooonyChen 5b6e8b0efc chore: remove dead v1 MCP code and legacy schema dump
- src/mcp.ts: unused v1 JSON-RPC MCP implementation (claimed Basic Auth,
  old tool names); the live server is src/mcp/server.ts
- test/mcp.test.ts: only tested the dead file
- db/schema.sql: superseded by migrations/
2026-07-08 00:48:13 +12:00
TooonyChen 207cd0c789 fix: handle MIME decoding and deploy workflow 2026-07-08 00:25:26 +12:00
TooonyChen 1551de0868 feat: add mcp access and remove legacy frontend 2026-03-17 11:20:52 +13:00
TooonyChen 5021b41ae8 updated directory name 2024-10-08 16:19:45 +13:00
TooonyChen 8ef7a7a0f1 Initial commit (by create-cloudflare CLI)
Details:
  C3 = create-cloudflare@2.29.2
  project name = auth-inbox
  package manager = npm@9.6.6
  wrangler = wrangler@3.80.0
  git = 2.45.1.windows.1
2024-10-07 19:42:03 +13:00