roba-types
roba's stable machine contract, as a dependency-light library: the --json
envelope shapes and the exit-code map. No async runtime (no tokio).
roba is meant to be driven as a
subprocess whose --json output and exit code are a stable ABI. This crate is
that ABI, so a downstream harness can deserialize against it and branch on the
exit code without depending on the whole roba binary.
What's here
- Exit codes --
EXIT_FAILURE(1) throughEXIT_MAX_BUDGET(7), the full map the binary returns. Therobabinary references these same constants. - Envelopes --
SuccessEnvelope<T>({ version, result, refusal }),VersionedResult<T>({ version, result }, the read-only commands), andErrorEnvelope({ version, error }). Each derivesSerializeandDeserialize, so producer and consumer share one type per shape. QueryResult-- claude's result payload, re-exported (not mirrored).
Example
use ;
let env: = from_str?;
if exit_code == EXIT_MAX_TURNS
License
MIT OR Apache-2.0.