{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://basefoundry.github.io/base-cli/schemas/v1/error.schema.json",
  "title": "base-cli error envelope",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "schema", "code", "type", "message", "details", "run_id"],
  "properties": {
    "schema_version": {"const": 1},
    "schema": {"const": "base-cli.error"},
    "code": {"type": "string", "minLength": 1},
    "type": {"const": "error"},
    "message": {"type": "string"},
    "details": {"type": "object"},
    "run_id": {"type": ["string", "null"]}
  }
}
