Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/composer-file-attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@schlessera/brain-ui-sdk": minor
"@schlessera/brain-ui-server": minor
---
Store any file attached in the composer as a real, read-only original the agent can open (#3153). `POST /api/drafts/:draftId/files` streams one file into `.brain-ui/attachments/<fileId>/`, detects its kind from the bytes and reserves room in a configurable host attachment pool (`BRAIN_UI_ATTACHMENT_POOL_BYTES`, default 1 GiB). It creates no inbox work. Drafts bind originals with `fileIds` and keep a held send's files in an `outgoing` snapshot, and both survive a restart. `chat_message.attachmentRefs` sends them: the host verifies each against its records and its bytes on disk, and gives the agent its read-only path in a `<brain-attachments>` block without reading the contents. Accepting the message transfers the originals to the conversation. `GET /api/attachments/:fileId` reads one back after a digest check. Unbound uploads are removed after an hour and formerly referenced ones seven days after their last reference went, with race-safe cleanup. `server_hello` advertises `capabilities.composerFiles` and `attachmentLimits`; `SessionDraftLimits` gains the per-draft file envelope (10 files, 25 MB each, 50 MB together), and `maxDraftBytes` now bounds text and legacy images only. Governed workers see the originals read-only, and reading them taints the session as `chat_attachment`.
Loading
Loading