Developing
lnk-link-file is Link File: an MCP server over stdio that reads and
writes an agent's files, each call in a sandbox of its own. How to use
it: Link File.
Build and test
From link-tools, with link-core beside it (LINK_CORE for another
place):
cargo build -p link-plugin-link-file
# the sandboxed test skips without bubblewrap, unless LNK_REQUIRE_SANDBOX=1
cargo test -p link-plugin-link-fileHow it's put together
serve -- <command>...is the tool. It touches no file: each call runs<command>, which Link makeslnk sandbox runwith the sandbox file's flags, thenlnk-link-file apply --files <folder> --write <folder>..., the call on its stdin as{"name", "arguments"}, and reads{"ok": ...}or{"error": "..."}back.applychecks the folders before the sandbox does, so a refusal says why in words: a path is relative, without.., and never through a link, and a write is in a folder--writenames.- A write goes to a file beside the target, then is moved in place.
tests/calls.rsruns it asapplyalone, and on Linux underlnk-sandbox runfromlink-core, told it may write a folder the sandbox doesn't, to show the sandbox holds.
