Expand description
Typed JSON envelopes for the agent contract (success, dry-run, error).
Every envelope serializes directly from a typed struct — no intermediate
serde_json::Value on the write path. Optional fields are omitted on None
(skip_serializing_if) rather than emitted as JSON null.
Structs§
- DryRun
Data - Dry-run
dataobject (planned_url+ typedplanned_params). - DryRun
Envelope - JSON dry-run success envelope with planned URL and params.
- Error
Body - Error body fields inside the envelope.
- Error
Envelope - JSON error envelope for agents.
- Success
Envelope - JSON success envelope for agents (
schema_version,ok,command,data,duration_ms).
Functions§
- dry_
run_ envelope - Build a typed dry-run success envelope with planned URL/params.
- error_
envelope - Build an error envelope. SIGINT/SIGTERM surface as kind
canceledwith exit 130/143. - success_
envelope - Build a typed success envelope (
schema_version,ok,command,data,duration_ms). - success_
envelope_ with_ ok - Build a success-shaped envelope with an explicit top-level
ok(used bydoctor). - usage_
error - Map clap parse failures to usage errors.