mirror of
https://github.com/Mail-0/Zero.git
synced 2026-06-30 15:56:59 +00:00
# Implement Gmail Push Notifications with Workflows This PR implements a comprehensive Gmail push notification system using Cloudflare Workflows. It creates a subscription factory pattern to handle different email providers, with Google implementation completed. The system processes Gmail history updates, vectorizes messages, generates thread summaries, and applies AI-generated labels. ## Type of Change - ✨ New feature (non-breaking change which adds functionality) - ⚡ Performance improvement ## Areas Affected - [x] Email Integration (Gmail, IMAP, etc.) - [x] User Interface/Experience - [x] Data Storage/Management - [x] API Endpoints ## Testing Done - [x] Manual testing performed ## Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in complex areas - [x] My changes generate no new warnings ## Additional Notes Key changes: 1. Created subscription factory pattern with Google implementation 2. Added Cloudflare Workflows for processing Gmail notifications 3. Implemented thread and message vectorization 4. Added AI-based thread labeling 5. Fixed string template in party.tsx component 6. Added cheerio for HTML parsing 7. Enabled interactive dev session in wrangler config The system now processes Gmail notifications in real-time, extracts meaningful data, and provides AI-generated labels for better email organization. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced advanced workflows for processing and labeling email threads using AI, including summarization, vectorization, and automatic label assignment. - Added support for managing subscriptions and notifications for Google and Outlook email providers. - Implemented user notification and token verification features for enhanced security and real-time updates. - **Improvements** - Streamlined subscription management with new queue-based and scheduled background processing for renewals and state tracking. - Enhanced label management with detailed default categories for email threads. - Improved connection and subscription state handling for greater reliability and clarity. - **Bug Fixes** - Adjusted connection handling to ensure correct context usage and state updates. - **Chores** - Updated environment configurations to support new workflows, queues, and storage namespaces. - Added new dependencies and updated development scripts for improved development experience. - **Documentation** - Expanded type definitions and documentation for new features and provider support. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
86 lines
2.5 KiB
JSON
86 lines
2.5 KiB
JSON
{
|
|
"name": "@zero/server",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "wrangler dev --show-interactive-dev-session=false --experimental-vectorize-bind-to-prod --env local",
|
|
"deploy": "wrangler deploy",
|
|
"types": "wrangler types --env local",
|
|
"lint": "eslint .",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:push": "drizzle-kit push",
|
|
"db:studio": "drizzle-kit studio"
|
|
},
|
|
"exports": {
|
|
"./trpc": "./src/trpc/index.ts",
|
|
"./auth": "./src/lib/auth.ts",
|
|
"./auth-providers": "./src/lib/auth-providers.ts",
|
|
"./schemas": "./src/lib/schemas.ts"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/google": "^1.2.18",
|
|
"@ai-sdk/groq": "1.2.9",
|
|
"@ai-sdk/openai": "^1.3.21",
|
|
"@ai-sdk/perplexity": "1.1.9",
|
|
"@ai-sdk/ui-utils": "1.2.11",
|
|
"@coinbase/cookie-manager": "1.1.8",
|
|
"@googleapis/gmail": "12.0.0",
|
|
"@googleapis/people": "3.0.9",
|
|
"@hono/trpc-server": "^0.3.4",
|
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
"@microsoft/microsoft-graph-types": "^2.40.0",
|
|
"@modelcontextprotocol/sdk": "1.12.0",
|
|
"@react-email/components": "^0.0.41",
|
|
"@react-email/render": "^1.1.0",
|
|
"@trpc/client": "catalog:",
|
|
"@trpc/server": "catalog:",
|
|
"@tsndr/cloudflare-worker-jwt": "3.2.0",
|
|
"@upstash/ratelimit": "^2.0.5",
|
|
"@upstash/redis": "^1.34.9",
|
|
"agents": "0.0.93",
|
|
"ai": "^4.3.13",
|
|
"autumn-js": "catalog:",
|
|
"base64-js": "1.5.1",
|
|
"better-auth": "catalog:",
|
|
"cheerio": "1.1.0",
|
|
"date-fns": "^4.1.0",
|
|
"dedent": "^1.6.0",
|
|
"drizzle-orm": "catalog:",
|
|
"elevenlabs": "1.59.0",
|
|
"email-addresses": "^5.0.0",
|
|
"google-auth-library": "9.15.1",
|
|
"he": "^1.2.0",
|
|
"hono": "^4.7.8",
|
|
"hono-agents": "0.0.83",
|
|
"hono-party": "^0.0.12",
|
|
"jose": "6.0.11",
|
|
"jsonrepair": "^3.12.0",
|
|
"mimetext": "^3.0.27",
|
|
"p-retry": "6.2.1",
|
|
"partyserver": "^0.0.71",
|
|
"postgres": "3.4.5",
|
|
"react": "catalog:",
|
|
"remeda": "2.21.3",
|
|
"resend": "^4.5.1",
|
|
"sanitize-html": "^2.16.0",
|
|
"string-strip-html": "^13.4.12",
|
|
"superjson": "catalog:",
|
|
"twilio": "5.7.0",
|
|
"wrangler": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/he": "1.2.3",
|
|
"@types/node": "^22.9.0",
|
|
"@types/react": "19.1.6",
|
|
"@types/sanitize-html": "2.13.0",
|
|
"@zero/eslint-config": "workspace:*",
|
|
"@zero/tsconfig": "workspace:*",
|
|
"drizzle-kit": "catalog:",
|
|
"eslint": "^9.27.0",
|
|
"jiti": "2.4.2",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|