druks.files for an agent file that must outlive its sandbox. Druks pulls
the file from the sandbox. It stores immutable bytes under a stable ID and
returns a File handle. Apps declare files and decide when to delete them.
Apps do not implement transport or file routes.
Receive a file from an agent
Annotate the file in the agent output contract. Every nested object must also inheritAgentOutput. The harness needs a strict schema at every object node.
File field as a string path. The agent writes the file
inside its workspace and reports that path. Druks accepts only a regular file
whose resolved path stays inside the workspace. One file can contain at most
10 GiB. A missing path, a symlink escape, or an oversized transfer fails the
agent call.
The returned value has a stable identity and metadata:
url is /api/files/{id}. The route uses the normal Druks identity gate. It
shows images, PDF, and plain text inline. It downloads all other content. The
route sends X-Content-Type-Options: nosniff and validates the file with its
SHA-256 ETag.
Pass a file to another agent
Pass theFile as ordinary agent context:
Keep a file on an app row
UseFileField for one file reference. It stores a real foreign key to the
platform files table and does not copy the bytes.
image.id or image.url does not start another query. Use one app row for each
file in a collection.