60 Commits
Author SHA1 Message Date
TooonyChen d6731f8180 feat: optional OAuth on /mcp for claude.ai remote connectors
- Wrap the Worker with @cloudflare/workers-oauth-provider: /oauth/token,
  /oauth/register (dynamic client registration), and /.well-known/* are
  implemented by the library; tokens/grants/clients live in OAUTH_KV.
- New consent page at /oauth/authorize reuses the session cookie;
  unauthenticated visitors bounce through the SPA login via returnTo.
- Grant props store only userId; oauthPropsAuth re-fetches the user from
  D1 on every MCP request, so deleting a user revokes access instantly.
  Permissions still flow exclusively through visibleMails().
- OAuth is optional: without the OAUTH_KV binding the provider is skipped
  entirely and /mcp keeps working with aik_ API keys only. With it, both
  credentials coexist (Bearer aik_ requests pre-route around the provider).
- Docs and wrangler examples updated; KV block commented out by default.
2026-07-08 17:44:05 +12:00
TooonyChen b71375bfa7 docs: update all docs for v2 (Hono, multi-user grants, MCP server) 2026-07-08 00:42:12 +12:00
TooonyChen 207cd0c789 fix: handle MIME decoding and deploy workflow 2026-07-08 00:25:26 +12:00
TooonyChen f031612996 feat: Hono rewrite, multi-user grants, remote MCP server 2026-07-07 23:47:08 +12:00
TooonyChen 461dfad44a update screenshots 2026-03-15 04:27:01 +13:00
TooonyChen c80f470130 update readme diagram again 2026-03-15 04:13:19 +13:00
TooonyChen 78fea0cdbc update readme diagram 2026-03-15 04:09:13 +13:00
TooonyChen c0e838b780 feat: replace provider-specific AI clients with unified callProvider()
- Remove callGemini() / callOpenAI() and all Gemini/OpenAI-specific env
    vars (GoogleAPIKey, GeminiModel, OpenAIAPIKey, OpenAIBaseUrl, OpenAIModel)
  - Add callProvider() supporting three API formats:
      openai      → POST /v1/chat/completions
      responses   → POST /v1/responses
      anthropic   → POST /v1/messages (x-api-key, anthropic-version header)
  - New env vars: AI_BASE_URL, AI_API_KEY, AI_API_FORMAT, AI_MODEL
  - Optional fallback provider via AI_FALLBACK_* (all four or none);
    primary retries 3×, fallback attempts 1×
  - Update wrangler.toml.example* to new var schema (default: Gemini OpenAI-compat)
  - Update README, README_CN, AGENTS.md, CLAUDE.md accordingly
2026-03-15 03:29:29 +13:00
TooonyChen 4835e758a4 feat: add React frontend, migrate to pnpm, and harden email processing
- Replace server-rendered HTML with React 18 + Vite + shadcn/ui dashboard
    (mail list, detail panel, Extracted/Raw/Rendered tabs, sonner toasts)
  - Add REST API endpoints: GET /api/mails, GET /api/mails/:id
  - Fix MIME base64 body extraction (rewrite extractMailBodies with proper
    multipart boundary parsing and atob decoding)
  - Add isPromotionalEmail() pre-LLM filter (List-Unsubscribe, List-ID,
    Precedence: bulk, ESP X-headers) to avoid wasting AI tokens on ads
  - Fix codeAndLink() to use regex URL extraction instead of comma-split,
    preventing layout break on URLs containing commas
  - Add ASSETS binding to wrangler.toml.example for static frontend serving
- Migrate from npm to pnpm; add pnpm-workspace.yaml
  - Add CLAUDE.md and update AGENTS.md with current architecture
2026-03-15 03:11:08 +13:00
Tony Chen c65f34d7a1 Update README.md 2024-10-17 06:13:09 +13:00
Tony Chen 585bd7b459 Update README.md 2024-10-17 06:11:40 +13:00
Tony Chen 351b13b3b8 Update README.md 2024-10-16 21:35:22 +13:00
TooonyChen 170f968f38 modify readme 2024-10-08 21:14:20 +13:00
TooonyChen d1a512899d modify readme 2024-10-08 21:11:16 +13:00
TooonyChen a5980b293a modify readme 2024-10-08 21:09:59 +13:00
Tony Chen 1c0e3929cc Update README.md 2024-10-08 20:52:32 +13:00
TooonyChen 4a6f2cbf50 modify readme 2024-10-08 20:52:03 +13:00
TooonyChen a488bdf7b7 modify readme 2024-10-08 20:45:59 +13:00
TooonyChen 361a94a981 modify readme 2024-10-08 20:39:23 +13:00
TooonyChen 4cc046a0e6 modify readme 2024-10-08 20:36:08 +13:00
Tony Chen 57dd096a9a Update README.md 2024-10-08 20:31:04 +13:00
TooonyChen 469f603b8b modify readme 2024-10-08 20:26:57 +13:00
TooonyChen 6c4b86644b modify readme 2024-10-08 20:24:37 +13:00
TooonyChen c44688fbcb modify readme 2024-10-08 20:21:36 +13:00
TooonyChen 7c93abeb3f modify readme 2024-10-08 20:05:46 +13:00
TooonyChen 0f3b11411e modify readme 2024-10-08 19:45:35 +13:00
TooonyChen 9031f3a7c4 modify readme file 2024-10-08 19:29:08 +13:00
TooonyChen 1dd1c5f686 modify readme file 2024-10-08 19:27:41 +13:00
TooonyChen 470f12aec5 modify readme file 2024-10-08 19:24:23 +13:00
TooonyChen fa00d7e0a2 modify readme file 2024-10-08 19:23:52 +13:00
TooonyChen 33d7bb3bc9 modify readme file 2024-10-08 19:23:21 +13:00
TooonyChen d5a687f578 modify readme file 2024-10-08 19:19:38 +13:00
TooonyChen 6e6a94c120 v0.0.4 github action deployment 2024-10-08 19:17:37 +13:00
Tony Chen b773167376 Update README.md 2024-10-08 15:31:55 +13:00
Tony Chen 48c5a3236a Update README.md 2024-10-08 15:31:03 +13:00
Tony Chen cf2f7d3396 Update README.md 2024-10-08 14:04:55 +13:00
TooonyChen c1207f91dc changed the 'barkToken' variable 2024-10-08 14:03:16 +13:00
Tony Chen 301ec0e9bb Update README.md 2024-10-08 13:14:33 +13:00
Tony Chen 6440f74952 Update README.md 2024-10-08 13:06:50 +13:00
Tony Chen 3e3a3b151e Update README.md 2024-10-08 13:04:20 +13:00
Tony Chen 4875f0c28e Update README.md 2024-10-08 04:51:26 +13:00
Tony Chen 2ea1c4b2aa Update README.md 2024-10-08 04:27:44 +13:00
Tony Chen befdb869f8 Update README.md 2024-10-08 04:23:00 +13:00
Tony Chen 817b1a769d Update README.md 2024-10-08 04:21:37 +13:00
TooonyChen 43a35cd656 update caption about vars 2024-10-08 04:04:35 +13:00
TooonyChen dd1b450d78 update v0.0.3 2024-10-08 04:00:48 +13:00
Tony Chen 9b7d290878 Update README.md 2024-10-08 03:47:03 +13:00
Tony Chen 55d7f1485d Update README.md 2024-10-08 03:46:18 +13:00
Tony Chen b74ea137ab Update README.md 2024-10-08 03:45:50 +13:00
Tony Chen fefc4dc56b Update README.md 2024-10-08 03:30:39 +13:00