Expand description
JSON success/error envelopes for agents.
JSON envelope helpers (schema_version = 1).
Success and error envelopes are written to stdout for agent parsing. Human diagnostics stay on stderr.
§Success shape
{"schema_version":1,"ok":true,"data":{}}§Error shape
{"schema_version":1,"ok":false,"error":{"kind":"unavailable","message":"...","exit_code":69}}Functions§
- print_
error_ json - Print an error envelope derived from
CliError. - print_
success_ json - Print a success envelope with arbitrary JSON
dataand flush a single line.