From b605a99cb38eb22f45037418cc980c223503c7f2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 28 Jun 2026 06:51:13 +0000 Subject: [PATCH] chore(deps-major): migrate zod to 4.4.3 2026-06-28 - Removed kumo zod override from package.json - Bumped zod dependency to 4.4.3 - Run npm install to update package-lock.json - Codemoded z.string().email() to z.email() Co-authored-by: ericmaster <389548+ericmaster@users.noreply.github.com> --- package-lock.json | 37 ++++++++++++++++++++++++++----------- package.json | 12 +++++++----- workers/agent/index.ts | 4 ++-- workers/index.ts | 2 +- workers/lib/schemas.ts | 8 ++++---- workers/mcp/index.ts | 6 +++--- 6 files changed, 43 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4064b219..f444f672 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "react-router": "^7.18.0", "remark-gfm": "^4.0.1", "workers-ai-provider": "^3.2.0", - "zod": "^3.25.76", + "zod": "^4.4.3", "zustand": "^5.0.14" }, "devDependencies": { @@ -858,7 +858,6 @@ "version": "4.20260617.1", "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260617.1.tgz", "integrity": "sha512-HdbP3CNcdMZBwegitFDjWvzv+6wPkFXvV9gBXMnf6RjV2Cy3W8TJL3IhSEGul0S6F1DHjnucP7lrpIsvkzNEjA==", - "dev": true, "license": "MIT OR Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { @@ -3505,7 +3504,6 @@ "version": "19.2.17", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", - "dev": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -3515,7 +3513,6 @@ "version": "19.2.3", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "dev": true, "license": "MIT", "peerDependencies": { "@types/react": "^19.2.0" @@ -4142,7 +4139,6 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, "license": "MIT" }, "node_modules/date-fns": { @@ -4395,6 +4391,17 @@ "node": ">= 0.4" } }, + "node_modules/echarts": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-6.1.0.tgz", + "integrity": "sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "2.3.0", + "zrender": "6.1.0" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -7970,9 +7977,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true, - "license": "0BSD", - "optional": true + "license": "0BSD" }, "node_modules/type-is": { "version": "2.0.1", @@ -9073,9 +9078,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -9090,6 +9095,16 @@ "zod": "^3.25 || ^4" } }, + "node_modules/zrender": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-6.1.0.tgz", + "integrity": "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "tslib": "2.3.0" + } + }, "node_modules/zustand": { "version": "5.0.14", "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.14.tgz", diff --git a/package.json b/package.json index 1f53c3cc..2352a3c2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,12 @@ "type": "module", "cloudflare": { "label": "Agentic Inbox", - "products": ["Workers", "Durable Objects", "R2", "Workers AI"], + "products": [ + "Workers", + "Durable Objects", + "R2", + "Workers AI" + ], "bindings": { "DOMAINS": { "description": "Your domain with [Email Routing](https://developers.cloudflare.com/email-routing/) enabled (e.g. `example.com`). For multiple domains, pass a comma-separated list (e.g. `example.com,another.com`). After deploying, create a catch-all Email Routing rule pointing to this Worker for each domain." @@ -50,13 +55,10 @@ "react-router": "^7.18.0", "remark-gfm": "^4.0.1", "workers-ai-provider": "^3.2.0", - "zod": "^3.25.76", + "zod": "^4.4.3", "zustand": "^5.0.14" }, "overrides": { - "@cloudflare/kumo": { - "zod": "$zod" - }, "@tiptap/core": "3.27.0", "@tiptap/pm": "3.27.0", "@tiptap/extensions": "3.27.0", diff --git a/workers/agent/index.ts b/workers/agent/index.ts index ab6f59b9..8779d005 100644 --- a/workers/agent/index.ts +++ b/workers/agent/index.ts @@ -180,7 +180,7 @@ function createEmailTools(env: Env, mailboxId: string) { description: "Draft a new email (not a reply) and save it to the Drafts folder. This does NOT send — it saves a draft for the operator to review. Use this for composing new outbound emails. Write the body as plain text — no HTML tags.", parameters: z.object({ - to: z.string().email().describe("Recipient email address"), + to: z.email().describe("Recipient email address"), subject: z .string() .describe("Subject line"), @@ -207,7 +207,7 @@ function createEmailTools(env: Env, mailboxId: string) { originalEmailId: z .string() .describe("The ID of the email being replied to"), - to: z.string().email().describe("Recipient email address"), + to: z.email().describe("Recipient email address"), subject: z .string() .describe("Subject line (usually 'Re: ...')"), diff --git a/workers/index.ts b/workers/index.ts index fdd9d1ee..2cbea62c 100644 --- a/workers/index.ts +++ b/workers/index.ts @@ -27,7 +27,7 @@ type AppContext = Context; // -- Request body schemas (kept for validation) --------------------- const CreateMailboxBody = z.object({ - email: z.string().email(), + email: z.email(), name: z.string().min(1), settings: z.record(z.any()).optional(), // unvalidated — agentSystemPrompt goes straight to AI }); diff --git a/workers/lib/schemas.ts b/workers/lib/schemas.ts index 83b39ae3..4118284e 100644 --- a/workers/lib/schemas.ts +++ b/workers/lib/schemas.ts @@ -50,8 +50,8 @@ export interface AttachmentInfo { // ── Zod Schemas ──────────────────────────────────────────────────── const RecipientFieldSchema = z.union([ - z.string().email(), - z.array(z.string().email()).min(1), + z.email(), + z.array(z.email()).min(1), ]); export const ErrorResponseSchema = z.object({ @@ -64,8 +64,8 @@ export const SendEmailRequestSchema = z cc: RecipientFieldSchema.optional(), bcc: RecipientFieldSchema.optional(), from: z.union([ - z.string().email(), - z.object({ email: z.string().email(), name: z.string() }), + z.email(), + z.object({ email: z.email(), name: z.string() }), ]), subject: z.string(), html: z.string().optional(), diff --git a/workers/mcp/index.ts b/workers/mcp/index.ts index 9b69c362..e188652b 100644 --- a/workers/mcp/index.ts +++ b/workers/mcp/index.ts @@ -191,7 +191,7 @@ export class EmailMCP extends McpAgent { originalEmailId: z .string() .describe("The ID of the email being replied to"), - to: z.string().email().describe("Recipient email address"), + to: z.email().describe("Recipient email address"), subject: z.string().describe("Subject line (usually 'Re: ...')"), bodyHtml: z .string() @@ -319,7 +319,7 @@ export class EmailMCP extends McpAgent { originalEmailId: z .string() .describe("The ID of the email being replied to"), - to: z.string().email().describe("Recipient email address"), + to: z.email().describe("Recipient email address"), subject: z.string().describe("Subject line"), bodyHtml: z.string().describe("The HTML body of the reply"), }, @@ -358,7 +358,7 @@ export class EmailMCP extends McpAgent { "Send a new email (not a reply). Only call after getting confirmation.", { mailboxId: z.string().describe("The mailbox email address to send from"), - to: z.string().email().describe("Recipient email address"), + to: z.email().describe("Recipient email address"), subject: z.string().describe("Subject line"), bodyHtml: z.string().describe("The HTML body of the email"), },