changedOutput schema / oneOf
Previous value: -[
- {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "created_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "credit_pause": {
- "additionalProperties": false,
- "description": "The run paused because a step could not reserve credits. It resumes from the StewAI web app after credits are added.",
- "properties": {
- "available_credits": {
- "maxLength": 32,
- "type": [
- "string",
- "null"
- ]
- },
- "required_credits": {
- "maxLength": 32,
- "type": [
- "string",
- "null"
- ]
- },
- "resumable": {
- "const": true
- }
- },
- "required": [
- "required_credits",
- "available_credits",
- "resumable"
- ],
- "type": "object"
- },
- "progress": {
- "additionalProperties": false,
- "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
- "properties": {
- "active_steps": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "kind": {
- "maxLength": 32,
- "type": "string"
- },
- "started_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "step_id": {
- "maxLength": 128,
- "type": "string"
- },
- "title": {
- "maxLength": 120,
- "type": "string"
- }
- },
- "required": [
- "step_id",
- "kind",
- "started_at",
- "elapsed_seconds"
- ],
- "type": "object"
- },
- "maxItems": 5,
- "type": "array"
- },
- "last_step_activity_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "observed_at": {
- "maxLength": 40,
- "type": "string"
- },
- "phase": {
- "enum": [
- "queued",
- "running_steps",
- "between_steps",
- "waiting_for_input",
- "paused_insufficient_credits",
- "terminal"
- ]
- },
- "run_elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "steps": {
- "additionalProperties": false,
- "properties": {
- "done": {
- "minimum": 0,
- "type": "integer"
- },
- "failed": {
- "minimum": 0,
- "type": "integer"
- },
- "queued": {
- "minimum": 0,
- "type": "integer"
- },
- "running": {
- "minimum": 0,
- "type": "integer"
- },
- "total": {
- "minimum": 0,
- "type": "integer"
- },
- "waiting_for_input": {
- "minimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "total",
- "queued",
- "running",
- "waiting_for_input",
- "done",
- "failed"
- ],
- "type": "object"
- }
- },
- "required": [
- "phase",
- "steps",
- "active_steps",
- "run_elapsed_seconds",
- "last_step_activity_at",
- "observed_at"
- ],
- "type": "object"
- },
- "run_id": {
- "maxLength": 26,
- "minLength": 26,
- "pattern": "^[0-9A-Za-z]{26}$",
- "type": "string"
- },
- "status": {
- "enum": [
- "queued",
- "running",
- "blocked"
- ]
- },
- "updated_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- }
- },
- "required": [
- "run_id",
- "status",
- "created_at",
- "updated_at"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "billing": {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "retry_after_seconds": {
- "const": 2
- },
- "state": {
- "const": "pending"
- }
- },
- "required": [
- "state",
- "retry_after_seconds"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "state": {
- "const": "unavailable"
- }
- },
- "required": [
- "state"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "available_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "balance_as_of": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits",
- "available_credits",
- "balance_as_of"
- ],
- "type": "object"
- }
- ]
- },
- "created_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "progress": {
- "additionalProperties": false,
- "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
- "properties": {
- "active_steps": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "kind": {
- "maxLength": 32,
- "type": "string"
- },
- "started_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "step_id": {
- "maxLength": 128,
- "type": "string"
- },
- "title": {
- "maxLength": 120,
- "type": "string"
- }
- },
- "required": [
- "step_id",
- "kind",
- "started_at",
- "elapsed_seconds"
- ],
- "type": "object"
- },
- "maxItems": 5,
- "type": "array"
- },
- "last_step_activity_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "observed_at": {
- "maxLength": 40,
- "type": "string"
- },
- "phase": {
- "enum": [
- "queued",
- "running_steps",
- "between_steps",
- "waiting_for_input",
- "paused_insufficient_credits",
- "terminal"
- ]
- },
- "run_elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "steps": {
- "additionalProperties": false,
- "properties": {
- "done": {
- "minimum": 0,
- "type": "integer"
- },
- "failed": {
- "minimum": 0,
- "type": "integer"
- },
- "queued": {
- "minimum": 0,
- "type": "integer"
- },
- "running": {
- "minimum": 0,
- "type": "integer"
- },
- "total": {
- "minimum": 0,
- "type": "integer"
- },
- "waiting_for_input": {
- "minimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "total",
- "queued",
- "running",
- "waiting_for_input",
- "done",
- "failed"
- ],
- "type": "object"
- }
- },
- "required": [
- "phase",
- "steps",
- "active_steps",
- "run_elapsed_seconds",
- "last_step_activity_at",
- "observed_at"
- ],
- "type": "object"
- },
- "results_available": {
- "type": "boolean"
- },
- "run_id": {
- "maxLength": 26,
- "minLength": 26,
- "pattern": "^[0-9A-Za-z]{26}$",
- "type": "string"
- },
- "status": {
- "const": "done"
- },
- "updated_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- }
- },
- "required": [
- "run_id",
- "status",
- "created_at",
- "updated_at",
- "results_available",
- "billing"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "billing": {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "retry_after_seconds": {
- "const": 2
- },
- "state": {
- "const": "pending"
- }
- },
- "required": [
- "state",
- "retry_after_seconds"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "state": {
- "const": "unavailable"
- }
- },
- "required": [
- "state"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "available_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "balance_as_of": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits",
- "available_credits",
- "balance_as_of"
- ],
- "type": "object"
- }
- ]
- },
- "created_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "progress": {
- "additionalProperties": false,
- "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
- "properties": {
- "active_steps": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "kind": {
- "maxLength": 32,
- "type": "string"
- },
- "started_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "step_id": {
- "maxLength": 128,
- "type": "string"
- },
- "title": {
- "maxLength": 120,
- "type": "string"
- }
- },
- "required": [
- "step_id",
- "kind",
- "started_at",
- "elapsed_seconds"
- ],
- "type": "object"
- },
- "maxItems": 5,
- "type": "array"
- },
- "last_step_activity_at": {
- "maxLength": 40,
- "type": [
- "string",
- "null"
- ]
- },
- "observed_at": {
- "maxLength": 40,
- "type": "string"
- },
- "phase": {
- "enum": [
- "queued",
- "running_steps",
- "between_steps",
- "waiting_for_input",
- "paused_insufficient_credits",
- "terminal"
- ]
- },
- "run_elapsed_seconds": {
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "steps": {
- "additionalProperties": false,
- "properties": {
- "done": {
- "minimum": 0,
- "type": "integer"
- },
- "failed": {
- "minimum": 0,
- "type": "integer"
- },
- "queued": {
- "minimum": 0,
- "type": "integer"
- },
- "running": {
- "minimum": 0,
- "type": "integer"
- },
- "total": {
- "minimum": 0,
- "type": "integer"
- },
- "waiting_for_input": {
- "minimum": 0,
- "type": "integer"
- }
- },
- "required": [
- "total",
- "queued",
- "running",
- "waiting_for_input",
- "done",
- "failed"
- ],
- "type": "object"
- }
- },
- "required": [
- "phase",
- "steps",
- "active_steps",
- "run_elapsed_seconds",
- "last_step_activity_at",
- "observed_at"
- ],
- "type": "object"
- },
- "run_id": {
- "maxLength": 26,
- "minLength": 26,
- "pattern": "^[0-9A-Za-z]{26}$",
- "type": "string"
- },
- "status": {
- "enum": [
- "failed",
- "cancelled"
- ]
- },
- "updated_at": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- }
- },
- "required": [
- "run_id",
- "status",
- "created_at",
- "updated_at",
- "billing"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "const": "run_not_found"
- }
- },
- "required": [
- "error"
- ],
- "type": "object"
- }
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "next_cursor": {
- "maxLength": 1024,
- "type": [
- "string",
- "null"
- ]
- },
- "runs": {
- "items": {
- "additionalProperties": false,
- "properties": {
- "created_at": {
- "type": "string"
- },
- "recipe_id": {
- "type": "string"
- },
- "run_id": {
- "maxLength": 26,
- "minLength": 26,
- "pattern": "^[0-9A-Za-z]{26}$",
- "type": "string"
- },
- "status": {
- "enum": [
- "queued",
- "running",
- "done",
- "failed",
- "cancelled",
- "blocked"
- ]
- },
- "updated_at": {
- "type": "string"
- }
- },
- "required": [
- "run_id",
- "recipe_id",
- "status",
- "created_at",
- "updated_at"
- ],
- "type": "object"
- },
- "maxItems": 20,
- "type": "array"
- },
- "view": {
- "const": "history"
- }
- },
- "required": [
- "view",
- "runs",
- "next_cursor"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "basis": {
- "const": "UI receipt estimate versus settled charge; not an admission ceiling. Null means unavailable."
- },
- "billing": {
- "oneOf": [
- {
- "additionalProperties": false,
- "properties": {
- "retry_after_seconds": {
- "const": 2
- },
- "state": {
- "const": "pending"
- }
- },
- "required": [
- "state",
- "retry_after_seconds"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "state": {
- "const": "unavailable"
- }
- },
- "required": [
- "state"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "available_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "balance_as_of": {
- "format": "date-time",
- "maxLength": 64,
- "type": "string"
- },
- "charged_credits": {
- "maxLength": 64,
- "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
- "type": "string"
- },
- "state": {
- "const": "settled"
- }
- },
- "required": [
- "state",
- "charged_credits",
- "available_credits",
- "balance_as_of"
- ],
- "type": "object"
- }
- ]
- },
- "receipt": {
- "additionalProperties": false,
- "properties": {
- "charged_credits": {
- "type": [
- "number",
- "null"
- ]
- },
- "estimated_credits": {
- "type": [
- "number",
- "null"
- ]
- },
- "variance_pct": {
- "type": [
- "number",
- "null"
- ]
- }
- },
- "required": [
- "estimated_credits",
- "charged_credits",
- "variance_pct"
- ],
- "type": "object"
- },
- "run_id": {
- "maxLength": 26,
- "minLength": 26,
- "pattern": "^[0-9A-Za-z]{26}$",
- "type": "string"
- },
- "view": {
- "const": "diagnostics"
- }
- },
- "required": [
- "view",
- "run_id",
- "billing",
- "receipt",
- "basis"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "error": {
- "const": "invalid_history_query"
- }
- },
- "required": [
- "error"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "created_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "credit_pause": {
+ "additionalProperties": false,
+ "description": "The run paused because a step could not reserve credits. It resumes from the StewAI web app after credits are added.",
+ "properties": {
+ "available_credits": {
+ "maxLength": 32,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "required_credits": {
+ "maxLength": 32,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "resumable": {
+ "const": true
+ }
+ },
+ "required": [
+ "required_credits",
+ "available_credits",
+ "resumable"
+ ],
+ "type": "object"
+ },
+ "progress": {
+ "additionalProperties": false,
+ "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
+ "properties": {
+ "active_steps": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "kind": {
+ "maxLength": 32,
+ "type": "string"
+ },
+ "started_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "step_id": {
+ "maxLength": 128,
+ "type": "string"
+ },
+ "title": {
+ "maxLength": 120,
+ "type": "string"
+ }
+ },
+ "required": [
+ "step_id",
+ "kind",
+ "started_at",
+ "elapsed_seconds"
+ ],
+ "type": "object"
+ },
+ "maxItems": 5,
+ "type": "array"
+ },
+ "last_step_activity_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "observed_at": {
+ "maxLength": 40,
+ "type": "string"
+ },
+ "phase": {
+ "enum": [
+ "queued",
+ "running_steps",
+ "between_steps",
+ "waiting_for_input",
+ "paused_insufficient_credits",
+ "terminal"
+ ]
+ },
+ "run_elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "steps": {
+ "additionalProperties": false,
+ "properties": {
+ "done": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "failed": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "queued": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "running": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "waiting_for_input": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "total",
+ "queued",
+ "running",
+ "waiting_for_input",
+ "done",
+ "failed"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "phase",
+ "steps",
+ "active_steps",
+ "run_elapsed_seconds",
+ "last_step_activity_at",
+ "observed_at"
+ ],
+ "type": "object"
+ },
+ "run_id": {
+ "maxLength": 26,
+ "minLength": 26,
+ "pattern": "^[0-9A-Za-z]{26}$",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "queued",
+ "running",
+ "blocked"
+ ]
+ },
+ "updated_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "run_id",
+ "status",
+ "created_at",
+ "updated_at"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "billing": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "retry_after_seconds": {
+ "const": 2
+ },
+ "state": {
+ "const": "pending"
+ }
+ },
+ "required": [
+ "state",
+ "retry_after_seconds"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "state": {
+ "const": "unavailable"
+ }
+ },
+ "required": [
+ "state"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "available_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "balance_as_of": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits",
+ "available_credits",
+ "balance_as_of"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "created_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "progress": {
+ "additionalProperties": false,
+ "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
+ "properties": {
+ "active_steps": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "kind": {
+ "maxLength": 32,
+ "type": "string"
+ },
+ "started_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "step_id": {
+ "maxLength": 128,
+ "type": "string"
+ },
+ "title": {
+ "maxLength": 120,
+ "type": "string"
+ }
+ },
+ "required": [
+ "step_id",
+ "kind",
+ "started_at",
+ "elapsed_seconds"
+ ],
+ "type": "object"
+ },
+ "maxItems": 5,
+ "type": "array"
+ },
+ "last_step_activity_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "observed_at": {
+ "maxLength": 40,
+ "type": "string"
+ },
+ "phase": {
+ "enum": [
+ "queued",
+ "running_steps",
+ "between_steps",
+ "waiting_for_input",
+ "paused_insufficient_credits",
+ "terminal"
+ ]
+ },
+ "run_elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "steps": {
+ "additionalProperties": false,
+ "properties": {
+ "done": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "failed": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "queued": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "running": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "waiting_for_input": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "total",
+ "queued",
+ "running",
+ "waiting_for_input",
+ "done",
+ "failed"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "phase",
+ "steps",
+ "active_steps",
+ "run_elapsed_seconds",
+ "last_step_activity_at",
+ "observed_at"
+ ],
+ "type": "object"
+ },
+ "results_available": {
+ "type": "boolean"
+ },
+ "run_id": {
+ "maxLength": 26,
+ "minLength": 26,
+ "pattern": "^[0-9A-Za-z]{26}$",
+ "type": "string"
+ },
+ "status": {
+ "const": "done"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "run_id",
+ "status",
+ "created_at",
+ "updated_at",
+ "results_available",
+ "billing"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "billing": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "retry_after_seconds": {
+ "const": 2
+ },
+ "state": {
+ "const": "pending"
+ }
+ },
+ "required": [
+ "state",
+ "retry_after_seconds"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "state": {
+ "const": "unavailable"
+ }
+ },
+ "required": [
+ "state"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "available_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "balance_as_of": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits",
+ "available_credits",
+ "balance_as_of"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "created_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "progress": {
+ "additionalProperties": false,
+ "description": "Live progress from committed step rows. updated_at is the run record's time; last_step_activity_at shows the latest step start or finish.",
+ "properties": {
+ "active_steps": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "kind": {
+ "maxLength": 32,
+ "type": "string"
+ },
+ "started_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "step_id": {
+ "maxLength": 128,
+ "type": "string"
+ },
+ "title": {
+ "maxLength": 120,
+ "type": "string"
+ }
+ },
+ "required": [
+ "step_id",
+ "kind",
+ "started_at",
+ "elapsed_seconds"
+ ],
+ "type": "object"
+ },
+ "maxItems": 5,
+ "type": "array"
+ },
+ "last_step_activity_at": {
+ "maxLength": 40,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "observed_at": {
+ "maxLength": 40,
+ "type": "string"
+ },
+ "phase": {
+ "enum": [
+ "queued",
+ "running_steps",
+ "between_steps",
+ "waiting_for_input",
+ "paused_insufficient_credits",
+ "terminal"
+ ]
+ },
+ "run_elapsed_seconds": {
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "steps": {
+ "additionalProperties": false,
+ "properties": {
+ "done": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "failed": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "queued": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "running": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "total": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "waiting_for_input": {
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "required": [
+ "total",
+ "queued",
+ "running",
+ "waiting_for_input",
+ "done",
+ "failed"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "phase",
+ "steps",
+ "active_steps",
+ "run_elapsed_seconds",
+ "last_step_activity_at",
+ "observed_at"
+ ],
+ "type": "object"
+ },
+ "run_id": {
+ "maxLength": 26,
+ "minLength": 26,
+ "pattern": "^[0-9A-Za-z]{26}$",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "failed",
+ "cancelled"
+ ]
+ },
+ "updated_at": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "run_id",
+ "status",
+ "created_at",
+ "updated_at",
+ "billing"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "error": {
+ "const": "run_not_found"
+ }
+ },
+ "required": [
+ "error"
+ ],
+ "type": "object"
+ }
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "next_cursor": {
+ "maxLength": 1024,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "runs": {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "charged_credits": {
+ "description": "Credits charged by a finished run; null while it is active.",
+ "maxLength": 32,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "recipe_id": {
+ "type": "string"
+ },
+ "recipe_title": {
+ "maxLength": 200,
+ "type": "string"
+ },
+ "run_id": {
+ "maxLength": 26,
+ "minLength": 26,
+ "pattern": "^[0-9A-Za-z]{26}$",
+ "type": "string"
+ },
+ "status": {
+ "enum": [
+ "queued",
+ "running",
+ "done",
+ "failed",
+ "cancelled",
+ "blocked"
+ ]
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "run_id",
+ "recipe_id",
+ "recipe_title",
+ "status",
+ "created_at",
+ "updated_at",
+ "charged_credits"
+ ],
+ "type": "object"
+ },
+ "maxItems": 20,
+ "type": "array"
+ },
+ "view": {
+ "const": "history"
+ }
+ },
+ "required": [
+ "view",
+ "runs",
+ "next_cursor"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "basis": {
+ "const": "UI receipt estimate versus settled charge; not an admission ceiling. Null means unavailable."
+ },
+ "billing": {
+ "oneOf": [
+ {
+ "additionalProperties": false,
+ "properties": {
+ "retry_after_seconds": {
+ "const": 2
+ },
+ "state": {
+ "const": "pending"
+ }
+ },
+ "required": [
+ "state",
+ "retry_after_seconds"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "state": {
+ "const": "unavailable"
+ }
+ },
+ "required": [
+ "state"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "available_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "balance_as_of": {
+ "format": "date-time",
+ "maxLength": 64,
+ "type": "string"
+ },
+ "charged_credits": {
+ "maxLength": 64,
+ "pattern": "^(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
+ "type": "string"
+ },
+ "state": {
+ "const": "settled"
+ }
+ },
+ "required": [
+ "state",
+ "charged_credits",
+ "available_credits",
+ "balance_as_of"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "receipt": {
+ "additionalProperties": false,
+ "properties": {
+ "charged_credits": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "estimated_credits": {
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "variance_pct": {
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "estimated_credits",
+ "charged_credits",
+ "variance_pct"
+ ],
+ "type": "object"
+ },
+ "run_id": {
+ "maxLength": 26,
+ "minLength": 26,
+ "pattern": "^[0-9A-Za-z]{26}$",
+ "type": "string"
+ },
+ "view": {
+ "const": "diagnostics"
+ }
+ },
+ "required": [
+ "view",
+ "run_id",
+ "billing",
+ "receipt",
+ "basis"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "error": {
+ "const": "invalid_history_query"
+ }
+ },
+ "required": [
+ "error"
+ ],
+ "type": "object"
+ }
+]