Developing
lnk-link-harness is Link Harness, the harness a Link agent runs by
default: a small router in Rust that answers you, keeps the thread, and
calls the tools Link runs for it. How to use it, and why it works the
way it does: Link Harness.
Its code
This folder, agents/link/, is its code. It speaks Link's adapter contract
(link_harness_contract::harness), and Link's release builds it and ships it as
one of Link's plugins, at the core's version.
Build and test
In the public workspace, beside the core (its link-plugin, the
conformance kit, and the programs the tests run):
cargo build
# the sandboxed tests skip without bubblewrap, unless LNK_REQUIRE_SANDBOX=1
cargo test
# one file: the tests are one program, each file a module, tests/main.rs
cargo test --test harness turns::
cargo fmt --check
cargo clippy --all-targets --locked -- -D warningsIts fake model
Every test's fake model is tests/common's fake_model: it keeps each
request and streams the events the test makes of it. A test that orders
a step against an answer holds each answer after its first piece with
Hold::Until and lets it go with LetGo, so the order is what the test
let go and never how long anything took.
Conformance and the sandbox
tests/conformance.rs runs the conformance kit, the checks every
harness passes. tests/sandbox.rs calls Link Memory as a tool, built
in the workspace's tools/ (LINK_TOOLS, and LINK_CORE for the
core, for other places).