@network-harness/protocol-fixture
v0.2.0
Published
Part of the network harness: @network-harness/protocol-fixture.
Downloads
433
Readme
@network-harness/protocol-fixture
The smallest complete protocol: it echoes a peer's message back, asks its own model what to say when configured to, and serves one route.
It exists to keep the sdk honest. Everything it touches -- the host events, the
caller-aware components, the manifest -- comes from @network-harness/sdk and cordis
alone, so if the fixture compiles and runs, a protocol nobody here wrote needs
no core package either. That is why the loader smoke suite and the two-node
tests reach for it: a failure in the fixture is a failure in the seam, not in a
workload.
It is also the template. Copy this directory to start a protocol, and read writing-a-protocol.md beside it.
| | |
| --------- | -------------------------------------------------------------------------------------- |
| routes | POST /echo -- answers immediately, or through a run when reasonAboutReplies is set |
| payloads | echo.request, echo.reply |
| schedules | sweep every 60s, so a request a peer never answered ends in a terminal state |
| needs | nothing: no sources, no operations, no tools |
| intents | echo, declared fallback so a router has something to pick when nothing else fits |
