Skip to main content

Module jekt_files

Module jekt_files 

Source
Expand description

Files sent with a jekt: the manifest, its digest, and how the msgid binds it (docs/specs/SPEC_JEKT_FILE_TRANSFER_2026_10_05.md §3.2–§3.3).

A jekt with files has a msgid ending in .files-v1.<manifest digest>. Every signing scheme already signs the msgid, so the signature covers the file list, and through each entry’s SHA-256 every byte of every file, without any scheme changing. A text-only jekt is untouched.

Structs§

CloudFile
A file as a cloud jekt’s manifest carries it (spec §4.4): the file, the key its blob is encrypted under, and the relay’s name for the blob.
JektFile
One file in a jekt’s manifest, in send order.

Constants§

CLOUD_FEATURE
What an install that can fetch files sent through the cloud relay says in its agents’ leases, which a sender asks about before sending (§4.4).
FEATURE
What an instance that can receive files advertises, in its registry entries and its GET /agentmux/reactive/agent answer (spec §3.4).
MAX_FILES
At most this many files on one jekt.
MAX_NAME_CHARS
A file name’s length limit, in characters (the attachment store’s).
MSGID_TAG
Separates the msgid a sender would otherwise use from the digest.
SEALED_KEY_PREFIX
Leads a file key sealed to its receiver: x25519.<the receiving agent's WAN key fingerprint>.<base64url of the ephemeral key, the wrapped key and its tag> (spec §7).

Functions§

bind_cloud_msgid
The msgid a WAN jekt carrying files is signed under: msgid without any digest it already ended in, then the cloud manifest’s digest.
bind_msgid
The msgid for a jekt carrying files: base with the digest appended.
bound_digest
The digest a msgid says its jekt was sent with, if it says one.
check_tier_limits
Why files can’t travel on tier, if they can’t. The text names the limit and where it applies.
clean_name
A file’s name as a manifest carries it: the base name of name, with control characters replaced, trimmed, and at most MAX_NAME_CHARS characters. "file" when nothing is left.
cloud_manifest_digest
SHA-256 over a cloud manifest, keys and blob ids included, so the WAN signature that binds it covers them too.
cloud_msgid_binds
Whether msgid binds exactly this cloud manifest.
is_sealed_key
Whether key has a sealed key’s shape. Says nothing about whether it opens.
manifest_digest
Lowercase hex SHA-256 over the label and the entries, in order (§3.2).
msgid_binds
Whether msgid binds exactly this manifest.
tier_limits
The most one file, and all of a jekt’s files together, may weigh when they travel on tier (spec §5): (per file, per jekt). The same machine (host, channel) allows the most; LAN less; anything else nothing yet.
validate
Why a manifest is refused before anything else is checked.
validate_cloud
Why a cloud manifest is refused: the plain checks within the cloud relay’s limits, plus a 44-character base64 key (or a sealed one) and a relay blob id on every entry.
validate_for_tier
validate, and the comparison with the limits of tier: what a sender checks before it sends and a receiver checks before it reads a byte.