feat: emit stable json errors

This commit is contained in:
Eric Wendland 2026-07-05 18:30:44 +02:00
commit 675e3fb45d
4 changed files with 108 additions and 4 deletions

View file

@ -36,6 +36,12 @@ explicit migration expectation before scripts depend on them.
top-level response variant name and existing field names keep their meaning
within a major release.
Execution failures in `--json` or `--jsonl` mode return a stable JSON error
object on stdout with `type: "error"`, a machine-readable `code`, a human
`message`, full `detail`, and an optional `hint` derived from operator
recovery output. Common codes include `daemon_unavailable`, `unauthorized`,
`peer_not_found`, `resource_not_found`, `invalid_input`, and `command_failed`.
Backward-compatible JSON changes include:
- Adding nullable or optional fields.