Files
kebab/docs/wire-schema/v1/error.schema.json
th-kim0823 c25f4f89e3 📝 docs(wire-schema): schema.v1 + error.v1 JSON Schema (fb-27)
schema.v1: full introspection report shape with required fields for
wire / capabilities / models / stats. capabilities object enumerates
all 10 flag names (current 6 true + future 4 false) as required keys.

error.v1: 7-code enum + permissive details object. Real emitted
details shapes documented in description (per-code context varies and
some fields are interim until IoFailure / OpTimeout typed signals
land in follow-up).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 12:35:15 +09:00

36 lines
1.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://kebab.local/wire-schema/v1/error.schema.json",
"title": "error.v1",
"description": "Structured fatal error emitted on stderr in --json mode. The `details` shape varies per `code`; consumers should branch on `code` and treat `details` as best-effort context.",
"type": "object",
"required": ["schema_version", "code", "message", "details"],
"properties": {
"schema_version": { "const": "error.v1" },
"code": {
"type": "string",
"enum": [
"config_invalid",
"not_indexed",
"model_unreachable",
"model_not_pulled",
"timeout",
"io_error",
"generic"
]
},
"message": { "type": "string" },
"details": {
"type": "object",
"additionalProperties": true,
"description": "Per-code free-form context. config_invalid: { path, cause }. not_indexed: { expected, found }. model_unreachable: { endpoint, source }. model_not_pulled: { model }. timeout: { source }. io_error: { kind }. generic: { chain (when --verbose) }."
},
"hint": {
"anyOf": [
{ "type": "string" },
{ "type": "null" }
]
}
}
}