From 53fa05daaf62deac69f5ff67db9133e0cc0631b9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Jul 2026 14:25:52 +0000 Subject: [PATCH 1/2] Report the NULL-plan send backstop in email_usage_get email_sends_per_day joined nullPlanEmailFallbackLimits when the username-based email model landed, so plan-less users are capped at the deployment backstop rather than unlimited. email_usage_get still reported limit: null for them; use resolveEmailResourceLimit so the usage surface matches enforcement. --- email-received-subscriber-pkg | 1 + .../worker/src/mcp/capabilities/email/email-usage-get.ts | 5 +---- .../mcp/capabilities/email/email-usage-get.workers.test.ts | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) create mode 160000 email-received-subscriber-pkg diff --git a/email-received-subscriber-pkg b/email-received-subscriber-pkg new file mode 160000 index 0000000000..d45ba38268 --- /dev/null +++ b/email-received-subscriber-pkg @@ -0,0 +1 @@ +Subproject commit d45ba38268807073a43cb21a71d3a4cd7722c10d diff --git a/packages/worker/src/mcp/capabilities/email/email-usage-get.ts b/packages/worker/src/mcp/capabilities/email/email-usage-get.ts index 94c9cf7c8a..4eb180a3e0 100644 --- a/packages/worker/src/mcp/capabilities/email/email-usage-get.ts +++ b/packages/worker/src/mcp/capabilities/email/email-usage-get.ts @@ -5,7 +5,6 @@ import { emptyCapabilityInputSchema } from '#mcp/capabilities/types.ts' import { planNames, resolveEmailResourceLimit, - resolvePlanLimit, } from '#worker/entitlements/plans.ts' import { getUserPlan, @@ -78,9 +77,7 @@ export const emailUsageGetCapability = defineDomainCapability( }, sends_today: { count: sendsToday, - // Outbound sends have no NULL-plan fallback: plan-less users - // are unlimited (attempts are still counted). - limit: plan ? resolvePlanLimit(plan, 'email_sends_per_day') : null, + limit: resolveEmailResourceLimit(plan, 'email_sends_per_day'), }, receives_today: { count: receivesToday, diff --git a/packages/worker/src/mcp/capabilities/email/email-usage-get.workers.test.ts b/packages/worker/src/mcp/capabilities/email/email-usage-get.workers.test.ts index 1d04e1ac6d..47a6c97652 100644 --- a/packages/worker/src/mcp/capabilities/email/email-usage-get.workers.test.ts +++ b/packages/worker/src/mcp/capabilities/email/email-usage-get.workers.test.ts @@ -156,7 +156,10 @@ test('email_usage_get returns usage for verified users and enforces auth require count: 0, limit: nullPlanEmailFallbackLimits.stored_email_messages, }, - sends_today: { count: 0, limit: null }, + sends_today: { + count: 0, + limit: nullPlanEmailFallbackLimits.email_sends_per_day, + }, receives_today: { count: 0, limit: nullPlanEmailFallbackLimits.email_receives_per_day, From c8f605a5d6c9c5cb424d7e64c07c1ae5824523d1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Jul 2026 14:26:10 +0000 Subject: [PATCH 2/2] Remove accidentally committed local package clone gitlink --- email-received-subscriber-pkg | 1 - 1 file changed, 1 deletion(-) delete mode 160000 email-received-subscriber-pkg diff --git a/email-received-subscriber-pkg b/email-received-subscriber-pkg deleted file mode 160000 index d45ba38268..0000000000 --- a/email-received-subscriber-pkg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d45ba38268807073a43cb21a71d3a4cd7722c10d