Decisions

Why file keeps to [files] before its sandbox does, and how it works through a files bridge and in a bucket.

Why does file keep to [files] before its sandbox does?

The sandbox decides: file's reads Home and the agent's instructions, skills and conversations, writes only [files] write, reaches no network and runs only lnk-file-tool. The tool checks the same folders first so a refused write says in words where the agent may write, rather than a system's error. It never follows a link, writes a file whole beside it and moves it in place, and reads at most 24 KB a call, whole lines, so a harness keeps the whole answer.

Why can file work through a files bridge?

So an agent whose files folder isn't on its machine (a bucket's folder, on a machine that keeps nothing of it) still reads and writes it, with the same tools and limits. The bridge (link_store_contract::files) runs outside the sandbox, holds the folder's credential and key, and takes a call only from the agent bound, proved with its key (link_bridge); a write of a file read is made only from the version read, so two writers never lose one silently. The other way, the folder mounted into the sandbox, would put its credential where the agent is.

Why rclone's crypt format for a folder in a bucket?

Because it's published and tested, lnk bucket already writes it, and a folder stays readable by standard tools given its key. Each object is encrypted on its own, its name too, so single objects are read and written with the bucket's version conditions. A format of Link's own would buy nothing and be Link's alone to get right.