{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://thinkloom.app/schemas/provenance/1.0/invocation-state.schema.json", "title": "Invocation state", "description": "Operational invocation lifecycle projection.", "type": "object", "properties": { "schema_version": { "const": "1.0" }, "invocation_id": { "type": "string", "pattern": "^invocation_[0-9A-HJKMNP-TV-Z]{26}$" }, "state": { "enum": [ "REQUEST_PREPARED", "REQUEST_RECORDED", "MODEL_RUNNING", "RESPONSE_RECEIVED", "RESPONSE_RECORDED", "STAGED_PREVIEW", "FAILED", "CANCELLED", "ABANDONED" ] }, "state_sequence": { "type": "integer", "minimum": 1 }, "updated_at": { "type": "string", "format": "date-time", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "failure_id": { "anyOf": [ { "type": "string", "pattern": "^failure_[0-9A-HJKMNP-TV-Z]{26}$" }, { "type": "null" } ] } }, "required": [ "schema_version", "invocation_id", "state", "state_sequence", "updated_at", "failure_id" ], "additionalProperties": false, "examples": [ { "schema_version": "1.0", "invocation_id": "invocation_01J00000000000000000000008", "state": "REQUEST_RECORDED", "state_sequence": 2, "updated_at": "2026-07-17T18:42:10.123Z", "failure_id": null } ] }