v367.1 CORI Mail schema JSON build fix

Purpose

v367.1 is a build-fix package for v367. It keeps the CORI Mail schema-backed storage and Workspace Integrations foundation intact while correcting the TypeScript JSON typing issue reported during the server build.

What was fixed

The server build failed because Prisma JSON fields were receiving raw Record<string, unknown> values. Prisma requires JSON inputs to be typed as safe JSON values, not arbitrary unknown records.

Updated files:

Both files now sanitize staged JSON objects before saving them to Prisma JSON fields.

Behavior preserved

Prisma impact

No new Prisma schema changes were added in v367.1 beyond the v367 schema already deployed by npx prisma db push.

Because the v367 build already ran npx prisma generate and npx prisma db push successfully before the TypeScript error, the v367.1 command keeps Prisma generate in the sequence for safety but does not need another schema change.