{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/danilo-aguiar-br/ssh-cli/docs/schemas/error-envelope.schema.json",
"title": "Error semantics for agents",
"description": "Emitted on stderr when JSON errors mode is active (--json, global --output-format json, or effective JSON on scp/tunnel). Not a success payload.",
"type": "object",
"additionalProperties": true,
"properties": {
"exit_code": {
"type": "integer",
"description": "Process exit code following sysexits-inspired mapping"
},
"message": {
"type": "string",
"description": "Human-readable error text carried inside the JSON envelope on stderr"
},
"remote_exit_code": {
"type": "integer",
"description": "Optional remote shell exit when process exit is EX_GENERAL (1) after non-zero remote command"
}
},
"required": [
"exit_code"
]
}