Skip to main content

Module send_files

Module send_files 

Source
Expand description

SendMessage’s files: each file is put in this agent’s own attachment store first, through srv’s upload route, and the jekt then names them by hash (docs/specs/SPEC_JEKT_FILE_TRANSFER_2026_10_05.md §3.1). This process runs as the agent, so it sends exactly what the agent can read.

Structs§

Limits 🔒
What a call may carry: how many files, and how many bytes in all (one file is at most MAX_FILE_BYTES).
Local 🔒
One file to send: where it is and how big it is.

Constants§

MAX_FILE_BYTES 🔒
The most one file, and all of a jekt’s files together, may weigh on the same machine (spec §5).
MAX_TOTAL_BYTES 🔒
MESSAGE_LIMITS 🔒
A jekt’s limits (spec §5).
TASK_LIMITS 🔒
What one task call carries: at most 10 files, within a task’s 300 MiB (srv enforces the rest: sizes by kind, and 30 files and 300 MiB per task in all).
UPLOAD_TIMEOUT 🔒
An upload waits for srv to store and process the file (thumbnails, a document’s text version), well past the client’s usual 10 s.

Functions§

captions_for 🔒
The captions argument, one per file in the same order (missing ones are empty).
check 🔒
Check every path before anything is uploaded: each names a readable, non-empty file within the limits. The error names the file.
check_within 🔒
check against another call’s limits (a task’s files are not a jekt’s).
files_arg 🔒
The files argument: None when absent or empty.
missing_hint 🔒
What to add to a “No such file” for a container agent: its file tools only see its own container, so a path on the host (a screenshot’s older answer, a file in a host folder) is simply not there.
upload 🔒
Upload each file into this agent’s attachment store and return the manifest, in the order given.
upload_task_media 🔒
Check each path, then upload each to srv’s task media store; returns what Tasks update and submit carry: [{sha256, name, caption}]. Nothing has changed on the task when this fails.