@network-harness/protocol-router
v0.2.0
Published
Part of the network harness: @network-harness/protocol-router.
Readme
@network-harness/protocol-router
A human types one thing, and something has to decide which protocol that is.
The only protocol here that talks to no peer. It reads what the network is offering -- the skills board, the query board, and what this human holds -- asks its own agent which of those the text is asking for, and writes the answer down.
Dispatching is deliberately not its job. An interface reads the decision, starts the thing, and says what it started. A protocol that reached into another protocol to start work would be deciding on that protocol's behalf, with its own caller, and none of the caller-derived accounting the harness is built on would mean anything.
What it can route to is not a list in this file. The choices are the intents the protocols installed on this node declare, read back from what the host advertises, so a protocol somebody adds afterwards is routable the moment it is installed, and one that is removed stops being offered -- without this protocol knowing anything about either.
The board is the part worth being careful about. Its rows come from a directory: not this node, not a peer this node chose, so a name or a description is text of unknown origin. It travels as the run's context, which the loop delimits and labels as data, and anything in it that could close a delimiter is neutralized first -- otherwise a hostile row would not so much inject a prompt as break every routing run this node ever does. The model's answer is then re-validated against the live board: a skill that is not on it cannot be picked.
| | |
| --------- | ----------------------------------------------------------------------------------------------------------------- |
| routes | POST /prompts, GET /prompts, GET /board, POST /prompts/:prompt/dispatched, POST /prompts/:prompt/failed |
| payloads | none -- nothing crosses the wire |
| schedules | sweep every 60s, for a decision nothing ever dispatched |
| needs | any source, to say what this human holds; no operations, no tools |
| intents | none: it is the thing that routes, not a thing routed to |
