========================================
[Sun Feb  8 23:54:35 AEDT 2026] CC VPS triggered by Rivet
========================================

Task:
Fix bug: No attachment validation in api/messages/[id]/send/route.ts:29-37. Currently passes attachments array to DB without schema validation. Add Zod or similar validation to ensure attachments match expected schema (url, filename, contentType, size limits) before inserting.
----------------------------------------

## Done ✓

**Fixed attachment validation bug in `/api/messages/[id]/send/route.ts`**

Added Zod schema validation that enforces:
- **URL**: Valid URL format, max 2048 chars
- **Filename**: Required, 1-255 chars
- **Content-Type**: Valid MIME type format (e.g., `image/png`), max 127 chars
- **Size**: 1 byte to 10MB limit
- **Array limit**: Max 5 attachments per message

Invalid attachments now return a 400 error with detailed field-level validation messages before any DB insertion occurs.

Build passed, app restarted, committed and pushed to main.

----------------------------------------
[Sun Feb  8 23:57:12 AEDT 2026] Task finished (exit code: 0)
