Skip to main content

Crate domarinn_protocol

Crate domarinn_protocol 

Source
Expand description

The exec JSON protocol shared by providers, asserts, and generators.

One protocol, three kinds. v1 is one-shot: domarinn writes exactly one JSON request to the child’s stdin, closes it, and reads one JSON document from stdout. The domarinn.protocol field makes the envelope evolvable.

§Compatibility

Every optional field is skip_serializing_if, so a program written against an earlier build of this crate emits a byte-identical document and is parsed identically. New fields are added the same way and the wire version stays 1. Both sides ignore unknown fields; that is the whole forward-compat story, and it is why none of these types use deny_unknown_fields.

§Scope

Serde shapes only — no I/O, no engine, no schema generation. See this crate’s README for why it is separate from domarinn-types, and docs/protocol.md in the repository for the normative field tables.

Structs§

AssertReq
An assert request (GradingResult-shaped response).
AssertResp
Envelope
The envelope every request carries.
GenerateReq
A generate-tests request.
GenerateResp
A generate-tests response (JSON object form; JSONL is also accepted).
ProtocolError
ProviderRef
ProviderReq
A provider request written to the child’s stdin.
ProviderResp
A provider response read from the child’s stdout. Only output is required.
TestRef
ToolCall
One tool call the model decided to make.
ToolDef
A tool the model may call, as declared by the suite.
Usage

Enums§

Kind

Constants§

PROTOCOL_ENV
PROTOCOL_VERSION