File Store

lnk-file-store is the file place's driver: an agent's collections in its folder on this machine (LNK_STORE_DIR), as a person reads and edits them (link_store_contract::store::file). It keeps every collection, its contract saying serve, jobs and files, and the storage bridge runs it outside every sandbox (Interface).

Files by path

A file by its path is a plain file there (instructions/instruction.md), its version the first eight bytes of its SHA-256, written aside and renamed in place under its folder's lock.

Conversations

A conversation is its folder, chats/<thread>/: its events a log only added to (events.jsonl, each line its seq first), its copy for people (conversation.md), its tools (tools.json) and its turn's lease (turn.json). A conversation kept compact goes on compact.

Narrowed before its first event

A conversation narrowed before its first event is its folder of tools.json and a conversation.md of its first line, which names its thread.

It runs outside every sandbox, so it opens each part of a path from the folder before it, never through a link (link_store_contract::store::under): a link in the agent's folder is refused, never followed, and a thread whose folder would be more than one name is refused.

Jobs

It keeps jobs too, in schedule/, as the agent's scheduler finds them, each the job as JSON, moved between its places by a rename. A job's ID there is one name of a folder, not starting with ..

Its files

A job waiting is jobs/<id>.json, one being fired firing/<id>.json, and one whose firing ends firing/<id>.ending; day.json is the day's count, and mark the mark.

Its tests

It's run through link_store_contract::store::check, check_files and check_narrowing, here and behind the store bridge, as every driver of one of Link's three places is.