mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
## Description This PR integrates Dormroom for managing durable objects and enabling queryable storage for email agents. It improves how we handle agent instances and database operations, making our system more robust and maintainable. ## Type of Change - ✨ New feature (non-breaking change which adds functionality) - ⚡ Performance improvement ## Areas Affected - [x] Email Integration (Gmail, IMAP, etc.) - [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] My changes generate no new warnings ## Key Changes 1. Added Dormroom dependency for better durable object management 2. Implemented `@Migratable` and `@Queryable` decorators for ZeroDriver class 3. Created new `getZeroClient` function to replace direct agent instantiation 4. Fixed redirect header handling to prevent header persistence after redirects 5. Improved folder sync logic to skip unnecessary operations for aggregate instances 6. Standardized environment variable access through instance properties 7. Added structured database migrations for thread storage 8. Enhanced type safety with proper environment type definitions These changes improve our agent architecture and make database operations more reliable while maintaining backward compatibility. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced new methods for database size reporting and conditional folder synchronization. * Added structured environment typing for improved configuration management. * **Refactor** * Standardized environment variable access throughout the server and agent components. * Migrated database schema management to a migration system. * Updated client acquisition logic to utilize execution context. * **Bug Fixes** * Improved redirect handling in the mail provider to clean up response headers after navigation. * Adjusted redirect logic to only trigger under specific authorization conditions. * **Chores** * Added the "dormroom" dependency to the server application. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
104 lines
3.0 KiB
JSON
104 lines
3.0 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",
|
|
"eval": "evalite",
|
|
"eval:dev": "evalite watch"
|
|
},
|
|
"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/anthropic": "1.2.12",
|
|
"@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",
|
|
"@arcadeai/arcadejs": "1.8.1",
|
|
"@barkleapp/css-sanitizer": "1.0.0",
|
|
"@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.15.1",
|
|
"@react-email/components": "^0.0.41",
|
|
"@react-email/render": "1.1.0",
|
|
"@sentry/cloudflare": "9.43.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.106",
|
|
"ai": "^4.3.13",
|
|
"autumn-js": "catalog:",
|
|
"base64-js": "1.5.1",
|
|
"better-auth": "catalog:",
|
|
"cheerio": "1.1.0",
|
|
"cloudflare": "4.5.0",
|
|
"date-fns": "^4.1.0",
|
|
"dedent": "^1.6.0",
|
|
"dormroom": "1.0.1",
|
|
"drizzle-orm": "catalog:",
|
|
"effect": "3.16.12",
|
|
"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",
|
|
"mime-types": "3.0.1",
|
|
"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",
|
|
"ulid": "3.0.1",
|
|
"uuid": "11.1.0",
|
|
"wrangler": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@effect/language-service": "0.31.1",
|
|
"@types/he": "1.2.3",
|
|
"@types/node": "^22.9.0",
|
|
"@types/react": "19.1.6",
|
|
"@types/sanitize-html": "2.13.0",
|
|
"@types/uuid": "10.0.0",
|
|
"@zero/eslint-config": "workspace:*",
|
|
"@zero/tsconfig": "workspace:*",
|
|
"autoevals": "0.0.130",
|
|
"drizzle-kit": "catalog:",
|
|
"eslint": "^9.27.0",
|
|
"evalite": "0.11.4",
|
|
"jiti": "2.4.2",
|
|
"typescript": "catalog:",
|
|
"vite": "^6.3.5",
|
|
"vitest": "3.2.4"
|
|
}
|
|
}
|