Decode images within frame and pixel limits before provider use, contain malformed attachments per file, and preserve the host PDFBox font mapper.
Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: James Maes <james@kof22.com>
The turn engine reads pageContext.attachments through AttachmentService and
inlines the framed content (and images for vision models) into the
question's user message, after both cached system blocks. Unreadable files
become notices; image parts are dropped before a call to a model without
vision. In HIPAA mode attachments count as PHI. The system prompt treats
uploaded_file blocks as data and tells the model to propose writes with
create_record/update_record instead of saying it cannot create records.
GET /config reports features.attachments and the attachment limits.
Adds end-to-end, PHI routing and red-team tests.
Part of KofTwentyTwo/Website-Backend#305
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the attachments package: uploads are read as the signed-in user's own
upload (core UploadRefs plus an owner check) into memory with byte caps;
the type is sniffed from content; executables, archives and unknown binary
data are refused; text and JSON are decoded with charset detection; PDF
page text comes from PDFBox (already on the classpath through core) with
page, character and memory caps and no font scan; CSV and XLSX previews
reuse core's bulk-load parsers; image sizes are read from headers.
Content is framed as an untrusted uploaded_file block with neutralized
delimiters. Limits live in AssistantQBitConfig.attachments.
Part of KofTwentyTwo/Website-Backend#305
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>