{
  "openapi": "3.1.0",
  "info": {
    "title": "Cayu",
    "version": "0.9.1",
    "description": "Cayu control-plane schema for the default local-development server. Authentication and optional route groups depend on your application configuration."
  },
  "paths": {
    "/api/contract": {
      "get": {
        "summary": "Get Contract",
        "description": "Return the versioned Cayu server contract. Authentication controls access to protected routes, but AuthContext.tenant is actor provenance only and does not filter or isolate Cayu data. Capability metadata supports presentation and discovery only; route enforcement remains authoritative.",
        "operationId": "get_contract_api_contract_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerContractResponse"
                }
              }
            }
          }
        },
        "x-cayu-auth-context": {
          "additionalProperties": false,
          "description": "Authenticated caller identity and operator-action provenance.\n\nAuthentication protects access to Cayu's server surfaces. ``tenant`` does\nnot scope sessions, events, transcripts, tasks, knowledge, artifacts,\nusage, or dashboard/control-plane reads; applications must enforce any\ntenant authorization and storage isolation separately.",
          "properties": {
            "subject": {
              "description": "Verified identity of the authenticated caller.",
              "maxLength": 512,
              "title": "Subject",
              "type": "string"
            },
            "tenant": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional verified tenant identity for actor provenance only. It is not a storage partition, authorization rule, row-level filter, or tenant-isolation primitive, and it does not scope Cayu data.",
              "title": "Tenant"
            },
            "claims": {
              "additionalProperties": true,
              "description": "Verified authentication claims available to trusted server code.",
              "title": "Claims",
              "type": "object"
            }
          },
          "required": [
            "subject"
          ],
          "title": "AuthContext",
          "type": "object"
        }
      }
    },
    "/api/system/diagnostics": {
      "get": {
        "summary": "Get System Diagnostics",
        "description": "Return bounded protected Cayu configuration and registration diagnostics. This is an explicit operator snapshot, not readiness, infrastructure monitoring, or an authorization token. It performs no dependency probes.",
        "operationId": "get_system_diagnostics_api_system_diagnostics_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemDiagnosticsResponse"
                }
              }
            }
          }
        },
        "x-cayu-auth-context": {
          "additionalProperties": false,
          "description": "Authenticated caller identity and operator-action provenance.\n\nAuthentication protects access to Cayu's server surfaces. ``tenant`` does\nnot scope sessions, events, transcripts, tasks, knowledge, artifacts,\nusage, or dashboard/control-plane reads; applications must enforce any\ntenant authorization and storage isolation separately.",
          "properties": {
            "subject": {
              "description": "Verified identity of the authenticated caller.",
              "maxLength": 512,
              "title": "Subject",
              "type": "string"
            },
            "tenant": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional verified tenant identity for actor provenance only. It is not a storage partition, authorization rule, row-level filter, or tenant-isolation primitive, and it does not scope Cayu data.",
              "title": "Tenant"
            },
            "claims": {
              "additionalProperties": true,
              "description": "Verified authentication claims available to trusted server code.",
              "title": "Claims",
              "type": "object"
            }
          },
          "required": [
            "subject"
          ],
          "title": "AuthContext",
          "type": "object"
        }
      }
    },
    "/api/diagnostics/requests": {
      "get": {
        "summary": "Get Request Cost Diagnostics",
        "description": "Summarize this process's recent request cost from the bounded in-memory request-timing buffer: per-route rate, wall time, apportioned CPU seconds, and the estimated share of `vcpu` CPUs. Records use route templates and keyed client hashes only. Returns `enabled: false` when request timing is off.",
        "operationId": "get_request_cost_diagnostics_api_diagnostics_requests_get",
        "parameters": [
          {
            "name": "since_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 86400,
              "exclusiveMinimum": 0,
              "default": 300,
              "title": "Since Seconds"
            }
          },
          {
            "name": "vcpu",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 1024,
              "exclusiveMinimum": 0,
              "default": 1.0,
              "title": "Vcpu"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestCostSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/operations/snapshot": {
      "post": {
        "summary": "Get Operational Snapshot",
        "description": "Return exact current status counts from each configured store. Session and task sections are separate store-local snapshots and are not presented as one cross-store atomic read. Scope is the configured stores; authentication does not add tenant filtering.",
        "operationId": "get_operational_snapshot_api_operations_snapshot_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationalSnapshotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationalSnapshotResponse"
                }
              }
            }
          },
          "501": {
            "description": "The configured store does not implement this aggregate read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/usage/rollup": {
      "post": {
        "summary": "Get Usage Rollup",
        "description": "Aggregate usage-bearing events in a UTC-normalized half-open event-time window. Session filters apply to current session attributes. Totals remain exact when provider/model detail is bounded into an explicit remainder; callers may opt into a bounded per-session breakdown with its own exact remainder; cost is omitted from evaluation rather than reported partially when its price-input bound is exceeded. Scope is the configured session store; authentication does not add tenant filtering.",
        "operationId": "get_usage_rollup_api_usage_rollup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsageRollupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageRollupResponse"
                }
              }
            }
          },
          "501": {
            "description": "The configured store does not implement this aggregate read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A per-session identity cannot cross the configured redaction boundary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The usage-rollup request or serialized response exceeds its byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The configured store returned an inconsistent usage projection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/compact": {
      "post": {
        "summary": "Compact Session",
        "operationId": "compact_session_api_sessions__session_id__compact_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "pattern": "^[^\\x00]+$",
              "title": "Session Id"
            }
          },
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompactSessionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/human-review": {
      "get": {
        "summary": "Inspect Human Review",
        "operationId": "inspect_human_review_api_sessions__session_id__human_review_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "title": "Purpose"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HumanReviewView"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents": {
      "get": {
        "summary": "List Agents",
        "operationId": "list_agents_api_agents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{agent_name}": {
      "get": {
        "summary": "Get Agent",
        "operationId": "get_agent_api_agents__agent_name__get",
        "parameters": [
          {
            "name": "agent_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Agent Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/environments": {
      "get": {
        "summary": "List Environments",
        "operationId": "list_environments_api_environments_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/environments/{environment_name}": {
      "get": {
        "summary": "Get Environment",
        "operationId": "get_environment_api_environments__environment_name__get",
        "parameters": [
          {
            "name": "environment_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Environment Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts": {
      "get": {
        "summary": "List Artifacts",
        "operationId": "list_artifacts_api_artifacts_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "artifact_store_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Artifact Store Id"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ArtifactScope"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scope"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "name": "agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "name": "environment_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactsResponse"
                }
              }
            }
          },
          "404": {
            "description": "The requested artifact store or artifact does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Registered artifact-store identifiers are not unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An artifact store is misconfigured or returned invalid data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "An artifact store is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{artifact_id}": {
      "get": {
        "summary": "Get Artifact",
        "operationId": "get_artifact_api_artifacts__artifact_id__get",
        "parameters": [
          {
            "name": "artifact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Artifact Id"
            }
          },
          {
            "name": "artifact_store_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Artifact Store Id"
            }
          },
          {
            "name": "max_bytes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 262144,
              "minimum": 1,
              "default": 64000,
              "title": "Max Bytes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactReadResponse"
                }
              }
            }
          },
          "404": {
            "description": "The requested artifact store or artifact does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Registered artifact-store identifiers are not unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An artifact store is misconfigured or returned invalid data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "An artifact store is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/artifacts/{artifact_id}/content": {
      "get": {
        "summary": "Get Artifact Content",
        "operationId": "get_artifact_content_api_artifacts__artifact_id__content_get",
        "parameters": [
          {
            "name": "artifact_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Artifact Id"
            }
          },
          {
            "name": "artifact_store_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Artifact Store Id"
            }
          },
          {
            "name": "disposition",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "attachment",
                "inline"
              ],
              "type": "string",
              "default": "attachment",
              "title": "Disposition"
            }
          },
          {
            "name": "max_bytes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 268435456,
              "minimum": 1,
              "default": 268435456,
              "title": "Max Bytes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Complete artifact bytes. The response Content-Type reflects validated stored artifact metadata.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "Content-Disposition": {
                "description": "Sanitized inline or attachment disposition and filename.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "description": "Always nosniff.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "nosniff"
                  ]
                }
              },
              "X-Cayu-Artifact-Id": {
                "description": "Sanitized artifact identifier.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Cayu-Artifact-Store-Id": {
                "description": "Sanitized artifact-store identifier.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "Prevents authenticated artifact bytes from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Artifact exceeds the direct content response limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The requested artifact store or artifact does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Registered artifact-store identifiers are not unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "An artifact store is misconfigured or returned invalid data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "An artifact store is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/recovery/startup": {
      "get": {
        "summary": "Startup Recovery Status",
        "description": "Latest process-local interruption sweep; authenticated server operator view.",
        "operationId": "startup_recovery_status_api_recovery_startup_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartupRecoveryResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/event-side-effects/health": {
      "get": {
        "summary": "Event Side Effect Health",
        "operationId": "event_side_effect_health_api_event_side_effects_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSideEffectHealthResponse"
                }
              }
            }
          },
          "503": {
            "description": "Delivery store unavailable"
          }
        }
      }
    },
    "/api/event-side-effects/deliveries": {
      "get": {
        "summary": "Event Side Effect Deliveries",
        "operationId": "event_side_effect_deliveries_api_event_side_effects_deliveries_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "leased",
                    "failed",
                    "delivered",
                    "dead_lettered"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "claimable_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Claimable Only"
            }
          },
          {
            "name": "outstanding_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Outstanding Only"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 16384
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersistedEventSideEffectPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid cursor"
          },
          "503": {
            "description": "Delivery store unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/pending-actions": {
      "get": {
        "summary": "List Pending Actions",
        "operationId": "list_pending_actions_api_pending_actions_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PendingActionKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "name": "environment_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment Name"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingActionsResponse"
                }
              }
            }
          },
          "409": {
            "description": "A checkpoint requires a different Cayu runtime version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckpointCompatibilityErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The pending-action page exceeds the bounded response size.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions": {
      "get": {
        "summary": "List Sessions",
        "operationId": "list_sessions_api_sessions_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SessionStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "debug_state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SessionDebugState"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Debug State"
            }
          },
          {
            "name": "agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "name": "provider_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider Name"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          },
          {
            "name": "environment_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment Name"
            }
          },
          {
            "name": "parent_session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Parent Session Id"
            }
          },
          {
            "name": "causal_budget_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Causal Budget Id"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SessionOrder",
              "default": "updated_at_desc"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "label_selector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label Selector"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "const": "usage",
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Include"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSessionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/topology": {
      "post": {
        "summary": "Get Session Topology",
        "operationId": "get_session_topology_api_sessions__session_id__topology_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionTopologyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTopologyResponse"
                }
              }
            }
          },
          "404": {
            "description": "The focus session or one requested expanded session/task parent does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Durable session/task lineage is inconsistent, or continuation authority cannot cross the configured redaction boundary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request bytes, session/task ancestry, or serialized response exceed a safety bound.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "The configured session store does not implement topology reads.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/summary": {
      "post": {
        "summary": "Get Sessions Summary",
        "operationId": "get_sessions_summary_api_sessions_summary_post",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 1000,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SessionStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "debug_state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SessionDebugState"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Debug State"
            }
          },
          {
            "name": "agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "name": "provider_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Provider Name"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          },
          {
            "name": "environment_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment Name"
            }
          },
          {
            "name": "parent_session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Parent Session Id"
            }
          },
          {
            "name": "causal_budget_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Causal Budget Id"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SessionOrder",
              "default": "updated_at_desc"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "label_selector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label Selector"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SessionsSummaryBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionsSummaryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/usage": {
      "get": {
        "summary": "Get Session Usage",
        "operationId": "get_session_usage_api_sessions__session_id__usage_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "if-none-match",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionUsageSummary"
                }
              }
            }
          },
          "304": {
            "description": "The summary still matches `If-None-Match`."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/cost": {
      "post": {
        "summary": "Estimate Session Cost",
        "operationId": "estimate_session_cost_api_sessions__session_id__cost_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCostBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCostSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/causal-budgets/{causal_budget_id}/usage": {
      "get": {
        "summary": "Get Causal Budget Usage",
        "operationId": "get_causal_budget_usage_api_causal_budgets__causal_budget_id__usage_get",
        "parameters": [
          {
            "name": "causal_budget_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Causal Budget Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CausalBudgetUsageSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/causal-budgets/{causal_budget_id}/cost": {
      "post": {
        "summary": "Estimate Causal Budget Cost",
        "operationId": "estimate_causal_budget_cost_api_causal_budgets__causal_budget_id__cost_post",
        "parameters": [
          {
            "name": "causal_budget_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Causal Budget Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCostBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CausalBudgetCostSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/causal-budgets/{causal_budget_id}/summary": {
      "post": {
        "summary": "Get Causal Budget Summary",
        "operationId": "get_causal_budget_summary_api_causal_budgets__causal_budget_id__summary_post",
        "parameters": [
          {
            "name": "causal_budget_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Causal Budget Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCostBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CausalBudgetSummaryResponse"
                }
              }
            }
          },
          "413": {
            "description": "The causal-budget summary exceeds its session or serialized response safety bound.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "The configured session store cannot enforce bounded accounting reads.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/state": {
      "get": {
        "summary": "Get Session State",
        "description": "Return bounded lifecycle state. The response carries a weak `ETag`; a matching `If-None-Match` returns `304` without a body.",
        "operationId": "get_session_state_api_sessions__session_id__state_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionStateResponse"
                }
              }
            }
          },
          "304": {
            "description": "The session state is unchanged from the `If-None-Match` entity tag."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/tool-view": {
      "get": {
        "summary": "Get Session Tool View",
        "description": "Inspect one tenant-bound current view without callable authority.",
        "operationId": "get_session_tool_view_api_sessions__session_id__tool_view_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 256,
              "minimum": 1,
              "default": 256,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A bounded, content-minimized current discovery view.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolDiscoveryViewInspection"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The request has no valid authenticated identity.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The authenticated identity has no verified tenant.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The session/view does not exist or belongs to a different verified tenant.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The durable discovery view is inconsistent with current authority.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "The bounded tool-view inspection request is invalid.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Tool-view inspection failed before a safe view could be returned.",
            "headers": {
              "Cache-Control": {
                "description": "Prevents authenticated discovery metadata from being cached.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "private, no-store"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/summary": {
      "get": {
        "summary": "Get Session Summary",
        "operationId": "get_session_summary_api_sessions__session_id__summary_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionSummaryResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/interactions": {
      "get": {
        "summary": "List Session Interactions",
        "operationId": "list_session_interactions_api_sessions__session_id__interactions_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "before_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Before Sequence"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSessionInteractionsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/interactions/{interaction_id}": {
      "get": {
        "summary": "Get Session Interaction",
        "operationId": "get_session_interaction_api_sessions__session_id__interactions__interaction_id__get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "interaction_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Interaction Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInteractionSummary"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/events": {
      "get": {
        "summary": "List Session Events",
        "operationId": "list_session_events_api_sessions__session_id__events_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return the event with this exact session-scoped event ID, if it exists.",
              "title": "Event Id"
            },
            "description": "Return the event with this exact session-scoped event ID, if it exists."
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "name": "interaction_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only events attributed to this interaction.",
              "title": "Interaction Id"
            },
            "description": "Return only events attributed to this interaction."
          },
          {
            "name": "exclude_event_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exclude one event type before applying pagination.",
              "title": "Exclude Event Type"
            },
            "description": "Exclude one event type before applying pagination."
          },
          {
            "name": "tool_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tool Name"
            }
          },
          {
            "name": "agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Name"
            }
          },
          {
            "name": "environment_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Environment Name"
            }
          },
          {
            "name": "workflow_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workflow Name"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only events with a greater durable sequence.",
              "title": "After Sequence"
            },
            "description": "Return only events with a greater durable sequence."
          },
          {
            "name": "before_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only events with a smaller durable sequence.",
              "title": "Before Sequence"
            },
            "description": "Return only events with a smaller durable sequence."
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EventOrder",
              "description": "Return events in durable sequence order.",
              "default": "sequence_asc"
            },
            "description": "Return events in durable sequence order."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "wait_seconds",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 25.0,
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Long-poll fallback for clients that cannot hold the follow stream open. Wait up to this many seconds for a matching event after `after_sequence` while the session is pending, running, or interrupting, then return the page (possibly empty).",
              "title": "Wait Seconds"
            },
            "description": "Long-poll fallback for clients that cannot hold the follow stream open. Wait up to this many seconds for a matching event after `after_sequence` while the session is pending, running, or interrupting, then return the page (possibly empty)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSessionEventsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/events/stream": {
      "get": {
        "summary": "Follow Session Events",
        "description": "Follow one session's durable events over Server-Sent Events without admitting or re-running any mutation. Start after `after_sequence`, or resume after the event named by the standard `Last-Event-ID` header, which takes precedence so a browser EventSource reconnects natively. Filters match `GET /sessions/{session_id}/events`. The stream sends SSE comment heartbeats and, after the session's terminal event, one `event: end` frame before closing; an already-terminal session drains and closes immediately. Concurrent streams are capped per caller and per session and return `429` with `Retry-After` when exceeded.",
        "operationId": "follow_session_events_api_sessions__session_id__events_stream_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "description": "Stream only events with a greater durable sequence. Ignored when a `Last-Event-ID` header is present.",
              "title": "After Sequence"
            },
            "description": "Stream only events with a greater durable sequence. Ignored when a `Last-Event-ID` header is present."
          },
          {
            "name": "event_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Send only events of this type.",
              "title": "Event Type"
            },
            "description": "Send only events of this type."
          },
          {
            "name": "exclude_event_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Do not send events of this type.",
              "title": "Exclude Event Type"
            },
            "description": "Do not send events of this type."
          },
          {
            "name": "interaction_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Send only events attributed to this interaction.",
              "title": "Interaction Id"
            },
            "description": "Send only events attributed to this interaction."
          }
        ],
        "responses": {
          "200": {
            "description": "Read-only Server-Sent Events stream of one session's durable events. Each event is an SSE frame with an `id:` marker and a JSON SseEventEnvelope `data:` value. Heartbeats are SSE comment lines. After the session's terminal event the stream sends `event: end` with a SseSessionFollowEndEnvelope and closes. A classified observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Event `data:` frames contain SseEventEnvelope JSON; `event: end` frames contain SseSessionFollowEndEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The session does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The Last-Event-ID event marker is unknown in this session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "The caller or session already holds the configured maximum number of follow streams. Retry after the `Retry-After` header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/transcript": {
      "get": {
        "summary": "Get Session Transcript",
        "operationId": "get_session_transcript_api_sessions__session_id__transcript_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "role",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/MessageRole"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Role"
            }
          },
          {
            "name": "interaction_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only transcript records attributed to this interaction.",
              "title": "Interaction Id"
            },
            "description": "Return only transcript records attributed to this interaction."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "include_thinking",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Include Thinking"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTranscriptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}": {
      "get": {
        "summary": "Get Session",
        "operationId": "get_session_api_sessions__session_id__get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSessionDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Session",
        "operationId": "delete_session_api_sessions__session_id__delete",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/labels": {
      "patch": {
        "summary": "Update Session Labels",
        "operationId": "update_session_labels_api_sessions__session_id__labels_patch",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionLabelsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSession"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/metadata": {
      "patch": {
        "summary": "Update Session Metadata",
        "operationId": "update_session_metadata_api_sessions__session_id__metadata_patch",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionMetadataBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSession"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks": {
      "get": {
        "summary": "List Tasks",
        "operationId": "list_tasks_api_tasks_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TaskStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "name": "parent_task_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Parent Task Id"
            }
          },
          {
            "name": "assigned_agent_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assigned Agent Name"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TaskOrder",
              "default": "updated_at_desc"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiTaskListItem"
                  },
                  "title": "Response List Tasks Api Tasks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}/schedule/events": {
      "get": {
        "summary": "List Task Schedule Events",
        "operationId": "list_task_schedule_events_api_tasks__task_id__schedule_events_get",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          },
          {
            "name": "after_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0,
              "default": 0,
              "title": "After Sequence"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiTaskScheduleEvent"
                  },
                  "title": "Response List Task Schedule Events Api Tasks  Task Id  Schedule Events Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/schedule/reschedule": {
      "post": {
        "summary": "Reschedule Task",
        "operationId": "reschedule_task_api_tasks_schedule_reschedule_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRescheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskScheduleReceipt"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/schedule/cancel": {
      "post": {
        "summary": "Cancel Scheduled Task",
        "operationId": "cancel_scheduled_task_api_tasks_schedule_cancel_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskScheduleCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskScheduleReceipt"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}": {
      "get": {
        "summary": "Get Task",
        "operationId": "get_task_api_tasks__task_id__get",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}/pause": {
      "post": {
        "summary": "Pause Task",
        "operationId": "pause_task_api_tasks__task_id__pause_post",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TaskHoldBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}/block": {
      "post": {
        "summary": "Block Task",
        "operationId": "block_task_api_tasks__task_id__block_post",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TaskHoldBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}/needs-attention": {
      "post": {
        "summary": "Mark Task Needs Attention",
        "operationId": "mark_task_needs_attention_api_tasks__task_id__needs_attention_post",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TaskHoldBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tasks/{task_id}/resume": {
      "post": {
        "summary": "Resume Task",
        "operationId": "resume_task_api_tasks__task_id__resume_post",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/pending": {
      "get": {
        "summary": "List Pending Knowledge",
        "operationId": "list_pending_knowledge_api_knowledge_pending_get",
        "parameters": [
          {
            "name": "namespace",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Namespace"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "name": "aspect",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Aspect"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeVisibility"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "title": "Visibility"
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Type"
            }
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "max_bytes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20000,
              "title": "Max Bytes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingKnowledgeListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/pending/{entry_id}": {
      "get": {
        "summary": "Get Pending Knowledge",
        "operationId": "get_pending_knowledge_api_knowledge_pending__entry_id__get",
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Entry Id"
            }
          },
          {
            "name": "max_chunks",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 50,
              "minimum": 1,
              "default": 50,
              "title": "Max Chunks"
            }
          },
          {
            "name": "max_bytes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 128000,
              "minimum": 1,
              "default": 128000,
              "title": "Max Bytes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingKnowledgeDetailResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/{entry_id}/approve": {
      "post": {
        "summary": "Approve Knowledge",
        "operationId": "approve_knowledge_api_knowledge__entry_id__approve_post",
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Entry Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiReviewedKnowledgeEntry"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/knowledge/{entry_id}/reject": {
      "post": {
        "summary": "Reject Knowledge",
        "operationId": "reject_knowledge_api_knowledge__entry_id__reject_post",
        "parameters": [
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Entry Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiReviewedKnowledgeEntry"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_api_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/run": {
      "post": {
        "summary": "Run Agent",
        "operationId": "run_agent_api_run_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "The authenticated caller identity cannot be represented as durable invocation provenance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/resume": {
      "post": {
        "summary": "Resume Agent",
        "operationId": "resume_agent_api_resume_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/interrupt": {
      "post": {
        "summary": "Interrupt Session",
        "operationId": "interrupt_session_api_sessions__session_id__interrupt_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/InterruptSessionBody"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/provider-operations/resolve": {
      "post": {
        "summary": "Resolve Provider Operation",
        "operationId": "resolve_provider_operation_api_provider_operations_resolve_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderOperationResolutionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tool-approvals/resolve": {
      "post": {
        "summary": "Resolve Tool Approval",
        "operationId": "resolve_tool_approval_api_tool_approvals_resolve_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolApprovalBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tool-approvals/recover": {
      "post": {
        "summary": "Recover Tool Approval",
        "operationId": "recover_tool_approval_api_tool_approvals_recover_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolApprovalRecoveryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tool-rounds/recover": {
      "post": {
        "summary": "Recover Tool Round",
        "operationId": "recover_tool_round_api_tool_rounds_recover_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolRoundRecoveryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/user-input/resolve": {
      "post": {
        "summary": "Resolve User Input",
        "operationId": "resolve_user_input_api_user_input_resolve_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserInputResolveBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/user-input/recover": {
      "post": {
        "summary": "Recover User Input",
        "operationId": "recover_user_input_api_user_input_recover_post",
        "parameters": [
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserInputRecoveryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The replay event marker is unknown or the mutation conflicts with the current session state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The mutation could not open an accepted durable stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The control-plane request exceeds its encoded byte limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/messages": {
      "post": {
        "summary": "Enqueue Session Message",
        "operationId": "enqueue_session_message_api_sessions__session_id__messages_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Session Id"
            }
          },
          {
            "name": "Cayu-Mutation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST.",
              "title": "Cayu-Mutation-Id"
            },
            "description": "Client-generated mutation identity used to correlate an ambiguous SSE reconnect with its durable server acceptance event. Send the same value on the initial mutation and every Last-Event-ID replay request; it is a replay correlation key, not permission to repeat the POST."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueSessionMessageBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-Sent Events stream. Each runtime event is emitted as an SSE frame whose `data:` value is a JSON SseEventEnvelope. A classified terminal runtime or observer condition is emitted as `event: error` with a SseErrorEnvelope payload.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Runtime `data:` frames contain SseEventEnvelope JSON; `event: error` frames contain SseErrorEnvelope JSON."
                }
              }
            }
          },
          "400": {
            "description": "The request attempts to override authenticated actor identity.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Session-message access is not authorized.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with exact durable authority or terminal state.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the private request byte limit.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid session-message request; rejected input is not reflected.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The session-message operation failed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The store does not support this session-message operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The replay session or mutation target does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Inspect Session Messages",
        "operationId": "inspect_session_messages_api_sessions__session_id__messages_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "cursor_session_instance_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 512
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor Session Instance Id"
            }
          },
          {
            "name": "cursor_through_ordering_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor Through Ordering Key"
            }
          },
          {
            "name": "cursor_after_priority",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 2,
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor After Priority"
            }
          },
          {
            "name": "cursor_after_ordering_key",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 9223372036854775807,
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor After Ordering Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessageInspection"
                }
              }
            }
          },
          "400": {
            "description": "The request attempts to override authenticated actor identity.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Session-message access is not authorized.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with exact durable authority or terminal state.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the private request byte limit.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid session-message request; rejected input is not reflected.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The session-message operation failed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The store does not support this session-message operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/messages/source-snapshot": {
      "post": {
        "summary": "Snapshot Session Message Source",
        "operationId": "snapshot_session_message_source_api_sessions__session_id__messages_source_snapshot_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionMessageSourceBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessageSource"
                }
              }
            }
          },
          "400": {
            "description": "The request attempts to override authenticated actor identity.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Session-message access is not authorized.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with exact durable authority or terminal state.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the private request byte limit.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid session-message request; rejected input is not reflected.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The session-message operation failed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The store does not support this session-message operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/messages/{queue_id}/withdraw": {
      "post": {
        "summary": "Withdraw Session Message",
        "operationId": "withdraw_session_message_api_sessions__session_id__messages__queue_id__withdraw_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "queue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Queue Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionMessageActionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessageActionResult"
                }
              }
            }
          },
          "400": {
            "description": "The request attempts to override authenticated actor identity.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Session-message access is not authorized.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with exact durable authority or terminal state.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the private request byte limit.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid session-message request; rejected input is not reflected.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The session-message operation failed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The store does not support this session-message operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/sessions/{session_id}/messages/{queue_id}/quarantine": {
      "post": {
        "summary": "Quarantine Session Message",
        "operationId": "quarantine_session_message_api_sessions__session_id__messages__queue_id__quarantine_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "queue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Queue Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionMessageActionBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionMessageActionResult"
                }
              }
            }
          },
          "400": {
            "description": "The request attempts to override authenticated actor identity.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Session-message access is not authorized.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with exact durable authority or terminal state.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "The request exceeds the private request byte limit.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid session-message request; rejected input is not reflected.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "The session-message operation failed.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The store does not support this session-message operation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountingContract": {
        "properties": {
          "usage": {
            "$ref": "#/components/schemas/SessionUsageEndpointContract"
          },
          "cost": {
            "$ref": "#/components/schemas/SessionCostEndpointContract"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "usage",
          "cost"
        ],
        "title": "AccountingContract",
        "description": "Server-owned token and cost accounting.\n\nClients read these endpoints instead of folding raw `model.completed`\nevents, which would skip cache, provider-attempt, and price-book semantics."
      },
      "AgentsResponse": {
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/ApiAgentSummary"
            },
            "type": "array",
            "title": "Agents"
          },
          "total_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "agents",
          "total_count"
        ],
        "title": "AgentsResponse"
      },
      "AggregateAccuracy": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AggregateAccuracyKind"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "AggregateAccuracy",
        "description": "Truthfulness metadata for a bounded aggregate or one of its sections."
      },
      "AggregateAccuracyKind": {
        "type": "string",
        "enum": [
          "exact",
          "sampled",
          "truncated"
        ],
        "title": "AggregateAccuracyKind",
        "description": "How completely an aggregate projection represents its requested scope."
      },
      "AggregateCacheUsageMetrics": {
        "properties": {
          "read_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Read Tokens"
          },
          "write_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Write Tokens"
          },
          "write_5m_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Write 5M Tokens"
          },
          "write_1h_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Write 1H Tokens"
          },
          "write_unknown_ttl_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Write Unknown Ttl Tokens"
          },
          "cached_input_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Cached Input Tokens"
          },
          "uncached_input_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Uncached Input Tokens"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "read_tokens",
          "write_tokens",
          "write_5m_tokens",
          "write_1h_tokens",
          "write_unknown_ttl_tokens",
          "cached_input_tokens",
          "uncached_input_tokens"
        ],
        "title": "AggregateCacheUsageMetrics",
        "description": "Lossless JSON projection of identity-free aggregate cache counters."
      },
      "AggregateCostSummary": {
        "properties": {
          "session_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Session Ids"
          },
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Steps"
          },
          "priced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Model Steps"
          },
          "auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Auxiliary Attempts",
            "default": 0
          },
          "unpriced_auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Auxiliary Attempts",
            "default": 0
          },
          "missing_usage_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Usage Model Steps",
            "default": 0
          },
          "missing_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Pricing Model Steps",
            "default": 0
          },
          "unsupported_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unsupported Pricing Model Steps",
            "default": 0
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/CostLineItem"
            },
            "type": "array",
            "title": "Line Items"
          },
          "session_costs": {
            "items": {
              "$ref": "#/components/schemas/SessionCostSummary"
            },
            "type": "array",
            "title": "Session Costs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_ids",
          "session_count",
          "currency",
          "model_steps",
          "priced_model_steps",
          "unpriced_model_steps",
          "total_cost",
          "line_items",
          "session_costs"
        ],
        "title": "AggregateCostSummary"
      },
      "AggregateHostedToolUsageMetrics": {
        "properties": {
          "web_search_calls": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Web Search Calls",
            "default": "0"
          },
          "web_search_outcome_unknown": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Web Search Outcome Unknown",
            "default": "0"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AggregateHostedToolUsageMetrics",
        "description": "Lossless aggregate provider-hosted resource counters."
      },
      "AggregateUsageMetrics": {
        "properties": {
          "input_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Output Tokens"
          },
          "total_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Total Tokens"
          },
          "reasoning_output_tokens": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Reasoning Output Tokens"
          },
          "cache": {
            "$ref": "#/components/schemas/AggregateCacheUsageMetrics"
          },
          "hosted_tools": {
            "$ref": "#/components/schemas/AggregateHostedToolUsageMetrics"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "reasoning_output_tokens",
          "cache"
        ],
        "title": "AggregateUsageMetrics",
        "description": "Lossless JSON projection of identity-free aggregate token counters."
      },
      "AggregateUsageSummary": {
        "properties": {
          "session_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Session Ids"
          },
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count"
          },
          "model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Steps"
          },
          "unmeasured_model_attempts": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Unmeasured Model Attempts",
            "default": 0
          },
          "tool_calls": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Tool Calls"
          },
          "provider_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Provider Names"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          },
          "session_summaries": {
            "items": {
              "$ref": "#/components/schemas/SessionUsageSummary"
            },
            "type": "array",
            "title": "Session Summaries"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_ids",
          "session_count",
          "model_steps",
          "tool_calls",
          "provider_names",
          "models",
          "usage",
          "session_summaries"
        ],
        "title": "AggregateUsageSummary"
      },
      "ApiAgentSummary": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "tool_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Tool Count"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/ApiToolSummary"
            },
            "type": "array",
            "title": "Tools"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "provider_options": {
            "additionalProperties": true,
            "type": "object",
            "title": "Provider Options"
          },
          "thinking": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thinking"
          },
          "has_system_prompt": {
            "type": "boolean",
            "title": "Has System Prompt"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "provider_name",
          "model",
          "tool_count",
          "tools",
          "metadata",
          "provider_options",
          "thinking",
          "has_system_prompt"
        ],
        "title": "ApiAgentSummary"
      },
      "ApiArtifactSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "artifact_store_id": {
            "type": "string",
            "title": "Artifact Store Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Size Bytes"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "artifact_store_id",
          "filename",
          "content_type",
          "size_bytes",
          "scope",
          "session_id",
          "agent_name",
          "environment_name",
          "created_at",
          "metadata"
        ],
        "title": "ApiArtifactSummary"
      },
      "ApiEnvironmentSummary": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "is_factory": {
            "type": "boolean",
            "title": "Is Factory"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Id"
          },
          "workspace_branch_capabilities": {
            "$ref": "#/components/schemas/ApiWorkspaceBranchCapabilities"
          },
          "workspace_branch_lifecycle": {
            "$ref": "#/components/schemas/ApiWorkspaceBranchLifecycle"
          },
          "artifact_store_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifact Store Id"
          },
          "runner_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runner Type"
          },
          "binding_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Binding Type"
          },
          "vault_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vault Type"
          },
          "proxy_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proxy Type"
          },
          "knowledge_store_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Store Type"
          },
          "mcp_server_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Mcp Server Count"
          },
          "workspace_checkpoint_policy": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Checkpoint Policy"
          },
          "lifecycle_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnvironmentLifecyclePolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "workspace_instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Instructions"
          },
          "bound_workspace": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bound Workspace"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "metadata",
          "is_factory",
          "workspace_id",
          "workspace_branch_capabilities",
          "workspace_branch_lifecycle",
          "artifact_store_id",
          "runner_type",
          "binding_type",
          "vault_type",
          "proxy_type",
          "knowledge_store_type",
          "mcp_server_count",
          "lifecycle_policy",
          "workspace_instructions"
        ],
        "title": "ApiEnvironmentSummary"
      },
      "ApiErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ApiErrorResponse"
      },
      "ApiEventRecord": {
        "properties": {
          "sequence": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Sequence"
          },
          "id": {
            "type": "string",
            "maxLength": 512,
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sequence",
          "id",
          "type",
          "session_id",
          "interaction_id",
          "agent_name",
          "environment_name",
          "workflow_name",
          "tool_name",
          "payload",
          "timestamp"
        ],
        "title": "ApiEventRecord"
      },
      "ApiEventSummary": {
        "properties": {
          "total_events": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Events"
          },
          "counts_by_type": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Counts By Type"
          },
          "latest_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiEventRecord"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total_events",
          "counts_by_type",
          "latest_event"
        ],
        "title": "ApiEventSummary"
      },
      "ApiExecutionTopologyEdge": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "session_parent",
              "task_parent",
              "task_session"
            ],
            "title": "Kind"
          },
          "source_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Source Id"
          },
          "target_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Target Id"
          },
          "target_loaded": {
            "type": "boolean",
            "title": "Target Loaded"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "kind",
          "source_id",
          "target_id",
          "target_loaded"
        ],
        "title": "ApiExecutionTopologyEdge"
      },
      "ApiInteractionSummary": {
        "properties": {
          "model_policy": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Policy"
          },
          "tool_completion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolCompletionResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/InteractionStatus"
          },
          "start_event_id": {
            "type": "string",
            "title": "Start Event Id"
          },
          "start_event_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Event Sequence"
          },
          "source_transcript_start": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Transcript Start"
          },
          "source_transcript_end": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Transcript End"
          },
          "result_transcript_start": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Transcript Start"
          },
          "result_transcript_end": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Transcript End"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "active_duration_ms": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Active Duration Ms",
            "default": 0
          },
          "wall_duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Duration Ms"
          },
          "model_step_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Step Count",
            "default": 0
          },
          "tool_call_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Tool Call Count",
            "default": 0
          },
          "token_usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          },
          "provider_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Provider Names"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models"
          },
          "pending_action_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pending Action Kind"
          },
          "targeted_tool_grant_count": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 32.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Targeted Tool Grant Count"
          },
          "targeted_tool_grant_batch_fingerprint": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^sha256:[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Targeted Tool Grant Batch Fingerprint"
          },
          "queued_interaction_profile_handoff": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Queued Interaction Profile Handoff"
          },
          "interaction_id": {
            "type": "string",
            "title": "Interaction Id"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "terminal_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Terminal Event Id"
          },
          "terminal_event_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Terminal Event Sequence"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "start_event_id",
          "started_at",
          "interaction_id",
          "session_id",
          "terminal_event_id",
          "updated_at"
        ],
        "title": "ApiInteractionSummary"
      },
      "ApiInvocationOrigin": {
        "properties": {
          "trust": {
            "$ref": "#/components/schemas/InvocationOriginTrust"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "tenant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "trust",
          "subject",
          "tenant"
        ],
        "title": "ApiInvocationOrigin"
      },
      "ApiKnowledgeChunk": {
        "properties": {
          "chunk_id": {
            "type": "string",
            "title": "Chunk Id"
          },
          "entry_id": {
            "type": "string",
            "title": "Entry Id"
          },
          "entry_revision": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 1.0,
            "title": "Entry Revision"
          },
          "chunk_index": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Chunk Index"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "source_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Uri"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chunk_id",
          "entry_id",
          "entry_revision",
          "chunk_index",
          "text",
          "content_hash",
          "source_uri",
          "metadata"
        ],
        "title": "ApiKnowledgeChunk"
      },
      "ApiKnowledgeListItem": {
        "properties": {
          "entry_id": {
            "type": "string",
            "title": "Entry Id"
          },
          "revision": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 1.0,
            "title": "Revision"
          },
          "namespace": {
            "type": "string",
            "title": "Namespace"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "aspects": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Aspects"
          },
          "impact_targets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Impact Targets"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Type"
          },
          "source_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Uri"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "created_by_type": {
            "type": "string",
            "title": "Created By Type"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "importance": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance"
          },
          "importance_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance Source"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "chunk_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Chunk Count"
          },
          "text_preview": {
            "type": "string",
            "title": "Text Preview"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entry_id",
          "revision",
          "namespace",
          "kind",
          "visibility",
          "status",
          "title",
          "labels",
          "aspects",
          "impact_targets",
          "source_type",
          "source_uri",
          "source_id",
          "created_by_type",
          "created_by",
          "created_at",
          "updated_at",
          "importance",
          "importance_source",
          "confidence",
          "chunk_count",
          "text_preview"
        ],
        "title": "ApiKnowledgeListItem"
      },
      "ApiPendingAction": {
        "properties": {
          "attention_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attention Id"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "tool_approval",
              "user_input",
              "manual_recovery",
              "delegated_action"
            ],
            "title": "Kind"
          },
          "session": {
            "$ref": "#/components/schemas/ApiSessionBase"
          },
          "event": {
            "$ref": "#/components/schemas/ApiEventRecord"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          },
          "approval_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approval Id"
          },
          "input_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Id"
          },
          "round_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Round Id"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          },
          "policy_evidence": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "unplanned",
                  "authoritative",
                  "unregistered",
                  "ambiguous"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Evidence"
          },
          "question": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Question"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Options"
          },
          "arguments": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arguments"
          },
          "delegated_action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DelegatedActionReference"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "kind",
          "session",
          "event",
          "title"
        ],
        "title": "ApiPendingAction"
      },
      "ApiPendingActionIssue": {
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "source_too_large",
              "source_too_complex",
              "source_invalid"
            ],
            "title": "Code"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "status": {
            "type": "string",
            "enum": [
              "interrupted",
              "failed",
              "completed"
            ],
            "title": "Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "session_id",
          "agent_name",
          "status",
          "updated_at",
          "detail"
        ],
        "title": "ApiPendingActionIssue"
      },
      "ApiProviderOperationInspection": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "synchronous",
              "provider_operation_in_progress",
              "reconnect_scheduled",
              "reconnect_in_progress",
              "provider_operation_reconciled",
              "provider_operation_unavailable",
              "ambiguous_submission",
              "fallback_retry"
            ],
            "title": "Status"
          },
          "stage_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Stage Id"
          },
          "run_epoch": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Epoch"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Id"
          },
          "stream_protocol": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream Protocol"
          },
          "recovery_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "failed",
                  "expired",
                  "cancelled",
                  "malformed",
                  "wrong_provider",
                  "unavailable",
                  "ambiguous_submission"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Recovery Reason"
          },
          "duplicate_request_risk": {
            "type": "boolean",
            "title": "Duplicate Request Risk",
            "default": false
          },
          "allowed_resolutions": {
            "items": {
              "type": "string",
              "enum": [
                "fallback_retry",
                "fail"
              ]
            },
            "type": "array",
            "maxItems": 2,
            "title": "Allowed Resolutions"
          },
          "resolution_action": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "fallback_retry",
                  "fail"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution Action"
          },
          "resolution_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolution Id"
          },
          "cancellation_status": {
            "type": "string",
            "enum": [
              "not_requested",
              "requested",
              "unsupported",
              "pending",
              "cancelled",
              "completed",
              "failed",
              "unavailable"
            ],
            "title": "Cancellation Status"
          },
          "accounting_status": {
            "type": "string",
            "enum": [
              "not_applicable",
              "reserved",
              "settled"
            ],
            "title": "Accounting Status"
          },
          "reservation_count": {
            "type": "integer",
            "maximum": 32.0,
            "minimum": 0.0,
            "title": "Reservation Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "cancellation_status",
          "accounting_status",
          "reservation_count"
        ],
        "title": "ApiProviderOperationInspection"
      },
      "ApiReviewedKnowledgeEntry": {
        "properties": {
          "entry_id": {
            "type": "string",
            "title": "Entry Id"
          },
          "revision": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 1.0,
            "title": "Revision"
          },
          "namespace": {
            "type": "string",
            "title": "Namespace"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "aspects": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Aspects"
          },
          "impact_targets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Impact Targets"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Type"
          },
          "source_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Uri"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "created_by_type": {
            "type": "string",
            "title": "Created By Type"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "importance": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance"
          },
          "importance_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance Source"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "text_preview": {
            "type": "string",
            "title": "Text Preview"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entry_id",
          "revision",
          "namespace",
          "kind",
          "visibility",
          "status",
          "title",
          "labels",
          "aspects",
          "impact_targets",
          "source_type",
          "source_uri",
          "source_id",
          "created_by_type",
          "created_by",
          "created_at",
          "updated_at",
          "importance",
          "importance_source",
          "confidence",
          "text_preview"
        ],
        "title": "ApiReviewedKnowledgeEntry"
      },
      "ApiSession": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "parent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Session Id"
          },
          "causal_budget_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Budget Id"
          },
          "runtime_name": {
            "type": "string",
            "title": "Runtime Name"
          },
          "runtime_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Version"
          },
          "runtime_build_provenance": {
            "$ref": "#/components/schemas/RuntimeBuildProvenance"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status",
          "agent_name",
          "provider_name",
          "model",
          "parent_session_id",
          "causal_budget_id",
          "runtime_name",
          "runtime_version",
          "runtime_build_provenance",
          "environment_name",
          "created_at",
          "updated_at",
          "labels",
          "metadata"
        ],
        "title": "ApiSession"
      },
      "ApiSessionBase": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "parent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Session Id"
          },
          "causal_budget_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Budget Id"
          },
          "runtime_name": {
            "type": "string",
            "title": "Runtime Name"
          },
          "runtime_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Version"
          },
          "runtime_build_provenance": {
            "$ref": "#/components/schemas/RuntimeBuildProvenance"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status",
          "agent_name",
          "provider_name",
          "model",
          "parent_session_id",
          "causal_budget_id",
          "runtime_name",
          "runtime_version",
          "runtime_build_provenance",
          "environment_name",
          "created_at",
          "updated_at",
          "labels"
        ],
        "title": "ApiSessionBase"
      },
      "ApiSessionDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "parent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Session Id"
          },
          "causal_budget_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Budget Id"
          },
          "runtime_name": {
            "type": "string",
            "title": "Runtime Name"
          },
          "runtime_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Version"
          },
          "runtime_build_provenance": {
            "$ref": "#/components/schemas/RuntimeBuildProvenance"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "invocation": {
            "$ref": "#/components/schemas/ApiSessionInvocation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status",
          "agent_name",
          "provider_name",
          "model",
          "parent_session_id",
          "causal_budget_id",
          "runtime_name",
          "runtime_version",
          "runtime_build_provenance",
          "environment_name",
          "created_at",
          "updated_at",
          "labels",
          "metadata",
          "invocation"
        ],
        "title": "ApiSessionDetail"
      },
      "ApiSessionInvocation": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version"
          },
          "origin": {
            "$ref": "#/components/schemas/ApiInvocationOrigin"
          },
          "root_invocation_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Root Invocation Id"
          },
          "root_session_id": {
            "type": "string",
            "title": "Root Session Id"
          },
          "source": {
            "$ref": "#/components/schemas/SessionExecutionSource"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "schema_version",
          "origin",
          "root_invocation_id",
          "root_session_id",
          "source"
        ],
        "title": "ApiSessionInvocation"
      },
      "ApiSessionOutcome": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          },
          "retry": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry"
          },
          "terminal_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiEventRecord"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_retry_event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiEventRecord"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "status",
          "reason",
          "details",
          "retry",
          "terminal_event",
          "latest_retry_event"
        ],
        "title": "ApiSessionOutcome"
      },
      "ApiSessionSummaryItem": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/ApiSession"
          },
          "outcome": {
            "$ref": "#/components/schemas/ApiSessionOutcome"
          },
          "events": {
            "$ref": "#/components/schemas/ApiEventSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session",
          "outcome",
          "events"
        ],
        "title": "ApiSessionSummaryItem"
      },
      "ApiSessionTopologyBranch": {
        "properties": {
          "parent_session_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Parent Session Id"
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionTopologyNode"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Children"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "parent_session_id",
          "children",
          "next_cursor",
          "has_more"
        ],
        "title": "ApiSessionTopologyBranch"
      },
      "ApiSessionTopologyNode": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Id"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "parent_session_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Session Id"
          },
          "causal_budget_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Causal Budget Id"
          },
          "runtime_name": {
            "type": "string",
            "title": "Runtime Name"
          },
          "runtime_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Runtime Version"
          },
          "runtime_build_provenance": {
            "$ref": "#/components/schemas/RuntimeBuildProvenance"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "last_activity_at": {
            "type": "string",
            "title": "Last Activity At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "agent_name",
          "provider_name",
          "model",
          "parent_session_id",
          "causal_budget_id",
          "runtime_name",
          "runtime_version",
          "runtime_build_provenance",
          "environment_name",
          "status",
          "created_at",
          "updated_at",
          "last_activity_at"
        ],
        "title": "ApiSessionTopologyNode"
      },
      "ApiTaskDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Reason"
          },
          "status_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Payload"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "assigned_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Name"
          },
          "available_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available At"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          },
          "lease_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lease Expires At"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "retry_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiTaskRetrySeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiTaskScheduleState"
              },
              {
                "type": "null"
              }
            ]
          },
          "invocation": {
            "$ref": "#/components/schemas/ApiTaskInvocation"
          },
          "input": {
            "additionalProperties": true,
            "type": "object",
            "title": "Input"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "description",
          "status",
          "status_reason",
          "status_payload",
          "session_id",
          "parent_task_id",
          "assigned_agent_name",
          "available_at",
          "worker_id",
          "lease_expires_at",
          "created_at",
          "updated_at",
          "completed_at",
          "retry_series",
          "schedule",
          "invocation",
          "input",
          "result",
          "error",
          "metadata",
          "started_at"
        ],
        "title": "ApiTaskDetail"
      },
      "ApiTaskInvocation": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version"
          },
          "origin": {
            "$ref": "#/components/schemas/ApiInvocationOrigin"
          },
          "root_invocation_id": {
            "type": "string",
            "format": "uuid4",
            "title": "Root Invocation Id"
          },
          "root_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Root Session Id"
          },
          "source": {
            "$ref": "#/components/schemas/TaskExecutionSource"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "schema_version",
          "origin",
          "root_invocation_id",
          "root_session_id",
          "source"
        ],
        "title": "ApiTaskInvocation"
      },
      "ApiTaskListItem": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Reason"
          },
          "status_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Payload"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "assigned_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Name"
          },
          "available_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available At"
          },
          "worker_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Id"
          },
          "lease_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lease Expires At"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "retry_series": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiTaskRetrySeries"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApiTaskScheduleState"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "description",
          "status",
          "status_reason",
          "status_payload",
          "session_id",
          "parent_task_id",
          "assigned_agent_name",
          "available_at",
          "worker_id",
          "lease_expires_at",
          "created_at",
          "updated_at",
          "completed_at",
          "retry_series",
          "schedule"
        ],
        "title": "ApiTaskListItem"
      },
      "ApiTaskRetryPolicy": {
        "properties": {
          "max_attempts": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Max Attempts"
          },
          "max_elapsed_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Elapsed Seconds"
          },
          "max_total_tokens": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Total Tokens"
          },
          "max_estimated_cost": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Estimated Cost"
          },
          "cost_currency": {
            "type": "string",
            "title": "Cost Currency"
          },
          "initial_backoff_seconds": {
            "type": "number",
            "minimum": 0.0,
            "title": "Initial Backoff Seconds"
          },
          "backoff_multiplier": {
            "type": "number",
            "minimum": 1.0,
            "title": "Backoff Multiplier"
          },
          "max_backoff_seconds": {
            "type": "number",
            "minimum": 0.0,
            "title": "Max Backoff Seconds"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "max_attempts",
          "max_elapsed_seconds",
          "max_total_tokens",
          "max_estimated_cost",
          "cost_currency",
          "initial_backoff_seconds",
          "backoff_multiplier",
          "max_backoff_seconds"
        ],
        "title": "ApiTaskRetryPolicy"
      },
      "ApiTaskRetrySeries": {
        "properties": {
          "series_id": {
            "type": "string",
            "title": "Series Id"
          },
          "causal_budget_id": {
            "type": "string",
            "title": "Causal Budget Id"
          },
          "attempt": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Attempt"
          },
          "policy": {
            "$ref": "#/components/schemas/ApiTaskRetryPolicy"
          },
          "started_at": {
            "type": "string",
            "title": "Started At"
          },
          "cumulative_tokens": {
            "type": "string",
            "title": "Cumulative Tokens"
          },
          "cumulative_estimated_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cumulative Estimated Cost"
          },
          "attempts_remaining": {
            "type": "integer",
            "maximum": 99.0,
            "minimum": 0.0,
            "title": "Attempts Remaining"
          },
          "tokens_remaining": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens Remaining"
          },
          "estimated_cost_remaining": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Estimated Cost Remaining"
          },
          "elapsed_deadline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Elapsed Deadline"
          },
          "disposition": {
            "type": "string",
            "title": "Disposition"
          },
          "predecessor_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Predecessor Task Id"
          },
          "successor_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Successor Task Id"
          },
          "next_eligible_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Eligible At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "series_id",
          "causal_budget_id",
          "attempt",
          "policy",
          "started_at",
          "cumulative_tokens",
          "cumulative_estimated_cost",
          "attempts_remaining",
          "tokens_remaining",
          "estimated_cost_remaining",
          "elapsed_deadline",
          "disposition",
          "predecessor_task_id",
          "successor_task_id",
          "next_eligible_at"
        ],
        "title": "ApiTaskRetrySeries"
      },
      "ApiTaskScheduleEvent": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "sequence": {
            "type": "integer",
            "title": "Sequence"
          },
          "type": {
            "$ref": "#/components/schemas/TaskScheduleEventType"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "occurred_at": {
            "type": "string",
            "title": "Occurred At"
          },
          "available_at": {
            "type": "string",
            "title": "Available At"
          },
          "policy": {
            "$ref": "#/components/schemas/ApiTaskSchedulePolicy"
          },
          "invocation_id": {
            "type": "string",
            "title": "Invocation Id"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_id",
          "sequence",
          "type",
          "revision",
          "occurred_at",
          "available_at",
          "policy",
          "invocation_id",
          "operation_id"
        ],
        "title": "ApiTaskScheduleEvent"
      },
      "ApiTaskSchedulePolicy": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "misfire_policy": {
            "type": "string",
            "enum": [
              "fire_once",
              "skip"
            ],
            "title": "Misfire Policy"
          },
          "misfire_grace_seconds": {
            "type": "integer",
            "title": "Misfire Grace Seconds"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "expires_at",
          "misfire_policy",
          "misfire_grace_seconds"
        ],
        "title": "ApiTaskSchedulePolicy"
      },
      "ApiTaskScheduleReceipt": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "operation_id": {
            "type": "string",
            "title": "Operation Id"
          },
          "expected_revision": {
            "type": "integer",
            "title": "Expected Revision"
          },
          "schedule": {
            "$ref": "#/components/schemas/ApiTaskScheduleState"
          },
          "available_at": {
            "type": "string",
            "title": "Available At"
          },
          "committed_at": {
            "type": "string",
            "title": "Committed At"
          },
          "type": {
            "type": "string",
            "enum": [
              "task.rescheduled",
              "task.schedule_cancelled",
              "task.schedule_cancellation_requested"
            ],
            "title": "Type"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_id",
          "operation_id",
          "expected_revision",
          "schedule",
          "available_at",
          "committed_at",
          "type"
        ],
        "title": "ApiTaskScheduleReceipt"
      },
      "ApiTaskScheduleState": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "policy": {
            "$ref": "#/components/schemas/ApiTaskSchedulePolicy"
          },
          "admitted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admitted At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "schema_version",
          "revision",
          "policy",
          "admitted_at"
        ],
        "title": "ApiTaskScheduleState"
      },
      "ApiTaskTopologyChildBranch": {
        "properties": {
          "parent_task_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Parent Task Id"
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/ApiTaskTopologyNode"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Children"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "parent_task_id",
          "children",
          "next_cursor",
          "has_more"
        ],
        "title": "ApiTaskTopologyChildBranch"
      },
      "ApiTaskTopologyNode": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Id"
          },
          "type": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "status_reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Reason"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "assigned_agent_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Name"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "truncated_fields": {
            "items": {
              "type": "string",
              "enum": [
                "type",
                "title",
                "assigned_agent_name",
                "status_reason"
              ]
            },
            "type": "array",
            "maxItems": 4,
            "title": "Truncated Fields"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "title",
          "status",
          "status_reason",
          "session_id",
          "parent_task_id",
          "assigned_agent_name",
          "created_at",
          "updated_at",
          "truncated_fields"
        ],
        "title": "ApiTaskTopologyNode"
      },
      "ApiTaskTopologyProjection": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "available",
              "not_configured",
              "unsupported"
            ],
            "title": "Status"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed At"
          },
          "session_branches": {
            "items": {
              "$ref": "#/components/schemas/ApiTaskTopologySessionBranch"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Session Branches"
          },
          "expanded_parents": {
            "items": {
              "$ref": "#/components/schemas/ApiTaskTopologyNode"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Expanded Parents"
          },
          "child_branches": {
            "items": {
              "$ref": "#/components/schemas/ApiTaskTopologyChildBranch"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Child Branches"
          },
          "unique_node_count": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 0.0,
            "title": "Unique Node Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "observed_at",
          "session_branches",
          "expanded_parents",
          "child_branches",
          "unique_node_count"
        ],
        "title": "ApiTaskTopologyProjection"
      },
      "ApiTaskTopologySessionBranch": {
        "properties": {
          "session_id": {
            "type": "string",
            "maxLength": 1024,
            "minLength": 1,
            "title": "Session Id"
          },
          "tasks": {
            "items": {
              "$ref": "#/components/schemas/ApiTaskTopologyNode"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Tasks"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "tasks",
          "next_cursor",
          "has_more"
        ],
        "title": "ApiTaskTopologySessionBranch"
      },
      "ApiToolSummary": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "input_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Input Schema"
          },
          "parallel_safe": {
            "type": "boolean",
            "title": "Parallel Safe"
          },
          "effect": {
            "type": "string",
            "title": "Effect"
          },
          "workspace_mutation": {
            "type": "boolean",
            "title": "Workspace Mutation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "description",
          "input_schema",
          "parallel_safe",
          "effect",
          "workspace_mutation"
        ],
        "title": "ApiToolSummary"
      },
      "ApiTranscriptMessage": {
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Index"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Content"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "index",
          "interaction_id",
          "role",
          "content"
        ],
        "title": "ApiTranscriptMessage"
      },
      "ApiWorkspaceBranchCapabilities": {
        "properties": {
          "isolation": {
            "type": "boolean",
            "title": "Isolation"
          },
          "net_changes": {
            "type": "boolean",
            "title": "Net Changes"
          },
          "publication": {
            "type": "string",
            "enum": [
              "unsupported",
              "cooperative_atomic"
            ],
            "title": "Publication"
          },
          "recovery": {
            "type": "string",
            "enum": [
              "unsupported",
              "process_local",
              "durable"
            ],
            "title": "Recovery"
          },
          "retention": {
            "type": "string",
            "enum": [
              "unsupported",
              "process_local",
              "durable"
            ],
            "title": "Retention"
          },
          "lifecycle_inspection": {
            "type": "string",
            "enum": [
              "unsupported",
              "attached",
              "recoverable_by_id"
            ],
            "title": "Lifecycle Inspection"
          },
          "detail_code": {
            "type": "string",
            "title": "Detail Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "isolation",
          "net_changes",
          "publication",
          "recovery",
          "retention",
          "lifecycle_inspection",
          "detail_code"
        ],
        "title": "ApiWorkspaceBranchCapabilities"
      },
      "ApiWorkspaceBranchLifecycle": {
        "properties": {
          "attached_count": {
            "type": "integer",
            "maximum": 256.0,
            "minimum": 0.0,
            "title": "Attached Count"
          },
          "statuses": {
            "items": {
              "type": "string",
              "enum": [
                "active",
                "publishing",
                "rolling_back",
                "committed",
                "rolled_back",
                "fenced"
              ]
            },
            "type": "array",
            "maxItems": 256,
            "title": "Statuses"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "attached_count",
          "statuses",
          "truncated"
        ],
        "title": "ApiWorkspaceBranchLifecycle"
      },
      "ArtifactReadResponse": {
        "properties": {
          "artifact": {
            "$ref": "#/components/schemas/ApiArtifactSummary"
          },
          "preview_base64": {
            "type": "string",
            "title": "Preview Base64"
          },
          "text_preview": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text Preview"
          },
          "total_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Bytes"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "artifact",
          "preview_base64",
          "text_preview",
          "total_bytes",
          "truncated"
        ],
        "title": "ArtifactReadResponse"
      },
      "ArtifactScope": {
        "type": "string",
        "enum": [
          "session",
          "environment"
        ],
        "title": "ArtifactScope"
      },
      "ArtifactStoreDiagnostic": {
        "properties": {
          "fingerprint": {
            "type": "string",
            "maxLength": 71,
            "pattern": "^sha256:[0-9a-f]{64}$",
            "title": "Fingerprint"
          },
          "store_contract_operations": {
            "prefixItems": [
              {
                "type": "string",
                "const": "list"
              },
              {
                "type": "string",
                "const": "read"
              },
              {
                "type": "string",
                "const": "write"
              },
              {
                "type": "string",
                "const": "delete"
              }
            ],
            "type": "array",
            "maxItems": 4,
            "minItems": 4,
            "title": "Store Contract Operations",
            "default": [
              "list",
              "read",
              "write",
              "delete"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "fingerprint"
        ],
        "title": "ArtifactStoreDiagnostic",
        "description": "Path-safe registration identity and the required ArtifactStore contract."
      },
      "ArtifactStoreDiagnostics": {
        "properties": {
          "registrations": {
            "items": {
              "$ref": "#/components/schemas/ArtifactStoreDiagnostic"
            },
            "type": "array",
            "maxItems": 64,
            "title": "Registrations"
          },
          "total_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Count"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "registrations",
          "total_count",
          "truncated"
        ],
        "title": "ArtifactStoreDiagnostics"
      },
      "ArtifactsResponse": {
        "properties": {
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/ApiArtifactSummary"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "total_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Count"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          },
          "limit": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Offset"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "artifacts",
          "truncated",
          "limit",
          "offset"
        ],
        "title": "ArtifactsResponse"
      },
      "BillingIdentity": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "resource_id": {
            "type": "string",
            "title": "Resource Id"
          },
          "request_evidence": {
            "additionalProperties": true,
            "type": "object",
            "title": "Request Evidence"
          },
          "completion_evidence": {
            "additionalProperties": true,
            "type": "object",
            "title": "Completion Evidence"
          },
          "pricing_contexts": {
            "items": {
              "$ref": "#/components/schemas/PricingContext"
            },
            "type": "array",
            "title": "Pricing Contexts",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "resource_id"
        ],
        "title": "BillingIdentity",
        "description": "Provider-neutral commercial identity and possible pricing contexts.\n\nProviders own the meaning of their evidence. Core preserves it durably and\nenforces that completion cannot rewrite request evidence or widen the set of\npricing outcomes established before dispatch."
      },
      "BrowserClientContract": {
        "properties": {
          "module_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Module Url"
          },
          "types_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Types Url"
          },
          "version": {
            "type": "string",
            "const": "1",
            "title": "Version",
            "default": "1"
          },
          "guide_topic": {
            "type": "string",
            "const": "app-ui",
            "title": "Guide Topic",
            "default": "app-ui"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "BrowserClientContract",
        "description": "Where to load the dependency-free browser client served with the API.\n\n``module_url`` and ``types_url`` are ``None`` when the host did not serve\nthe module, for example when it composed ``create_router`` itself or used\nan API path whose last segment is not ``api``."
      },
      "BudgetLimit": {
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "app",
              "agent",
              "causal",
              "session",
              "run"
            ],
            "title": "Scope",
            "default": "session"
          },
          "max_estimated_cost": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Max Estimated Cost"
          },
          "pricing": {
            "$ref": "#/components/schemas/PriceBook"
          },
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "USD"
          },
          "window": {
            "$ref": "#/components/schemas/BudgetWindow"
          },
          "key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key"
          },
          "allow_unpriced": {
            "type": "boolean",
            "title": "Allow Unpriced",
            "default": false
          },
          "reservation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetReservation"
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "interrupt",
              "notify"
            ],
            "title": "Action",
            "default": "interrupt"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "max_estimated_cost",
          "pricing"
        ],
        "title": "BudgetLimit",
        "description": "Estimated-cost budget that applies across one durable runtime scope."
      },
      "BudgetReservation": {
        "properties": {
          "max_input_tokens": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Max Input Tokens"
          },
          "max_output_tokens": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Max Output Tokens"
          },
          "max_cache_read_input_tokens": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Max Cache Read Input Tokens",
            "default": 0
          },
          "max_cache_write_input_tokens": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Max Cache Write Input Tokens",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "max_input_tokens",
          "max_output_tokens"
        ],
        "title": "BudgetReservation",
        "description": "Conservative per-model-step reservation configured by the app."
      },
      "BudgetWindow": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "all_time",
              "rolling",
              "calendar"
            ],
            "title": "Kind",
            "default": "all_time"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "period": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Period"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "BudgetWindow",
        "description": "Time window used when selecting events for budget accounting."
      },
      "CapabilityOperation": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "not_configured",
                  "unsupported"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Unavailable Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "CapabilityOperation",
        "description": "Availability of one control-plane read or mutation operation."
      },
      "CausalBudgetCostSummary": {
        "properties": {
          "causal_budget_id": {
            "type": "string",
            "title": "Causal Budget Id"
          },
          "session_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Session Ids"
          },
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count",
            "default": 0
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Steps"
          },
          "priced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Model Steps"
          },
          "auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Auxiliary Attempts",
            "default": 0
          },
          "unpriced_auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Auxiliary Attempts",
            "default": 0
          },
          "missing_usage_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Usage Model Steps",
            "default": 0
          },
          "missing_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Pricing Model Steps",
            "default": 0
          },
          "unsupported_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unsupported Pricing Model Steps",
            "default": 0
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/CostLineItem"
            },
            "type": "array",
            "title": "Line Items"
          },
          "session_costs": {
            "items": {
              "$ref": "#/components/schemas/SessionCostSummary"
            },
            "type": "array",
            "title": "Session Costs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "causal_budget_id",
          "currency",
          "model_steps",
          "priced_model_steps",
          "unpriced_model_steps",
          "total_cost"
        ],
        "title": "CausalBudgetCostSummary",
        "description": "Estimated cost for all sessions sharing one causal budget id."
      },
      "CausalBudgetSummaryResponse": {
        "properties": {
          "causal_budget_id": {
            "type": "string",
            "title": "Causal Budget Id"
          },
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionSummaryItem"
            },
            "type": "array",
            "title": "Sessions"
          },
          "usage": {
            "$ref": "#/components/schemas/CausalBudgetUsageSummary"
          },
          "cost": {
            "$ref": "#/components/schemas/CausalBudgetCostSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "causal_budget_id",
          "session_count",
          "sessions",
          "usage",
          "cost"
        ],
        "title": "CausalBudgetSummaryResponse"
      },
      "CausalBudgetUsageSummary": {
        "properties": {
          "causal_budget_id": {
            "type": "string",
            "title": "Causal Budget Id"
          },
          "session_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Session Ids"
          },
          "session_count": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Session Count",
            "default": 0
          },
          "model_steps": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Model Steps",
            "default": 0
          },
          "unmeasured_model_attempts": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Unmeasured Model Attempts",
            "default": 0
          },
          "tool_calls": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Tool Calls",
            "default": 0
          },
          "provider_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Provider Names"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          },
          "session_summaries": {
            "items": {
              "$ref": "#/components/schemas/SessionUsageSummary"
            },
            "type": "array",
            "title": "Session Summaries"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "causal_budget_id"
        ],
        "title": "CausalBudgetUsageSummary",
        "description": "Usage totals for all sessions sharing one causal budget id."
      },
      "CheckpointCompatibilityErrorResponse": {
        "properties": {
          "detail": {
            "$ref": "#/components/schemas/CheckpointCompatibilityEvidence"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "CheckpointCompatibilityErrorResponse"
      },
      "CheckpointCompatibilityEvidence": {
        "properties": {
          "checkpoint_kind": {
            "type": "string",
            "const": "root",
            "title": "Checkpoint Kind"
          },
          "observed_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed Version"
          },
          "reason": {
            "type": "string",
            "enum": [
              "invalid_root_checkpoint",
              "invalid_checkpoint_schema_version",
              "checkpoint_schema_version_too_new",
              "checkpoint_schema_version_too_old"
            ],
            "title": "Reason"
          },
          "recovery_disposition": {
            "type": "string",
            "const": "cannot_migrate",
            "title": "Recovery Disposition"
          },
          "resumable_in_place": {
            "type": "boolean",
            "const": false,
            "title": "Resumable In Place"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "supported_max_version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Supported Max Version"
          },
          "supported_min_version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Supported Min Version"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "checkpoint_kind",
          "observed_version",
          "reason",
          "recovery_disposition",
          "resumable_in_place",
          "session_id",
          "supported_max_version",
          "supported_min_version"
        ],
        "title": "CheckpointCompatibilityEvidence"
      },
      "CitationPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "citation",
            "title": "Type",
            "default": "citation"
          },
          "citation_type": {
            "type": "string",
            "const": "url_citation",
            "title": "Citation Type",
            "default": "url_citation"
          },
          "url": {
            "type": "string",
            "maxLength": 4096,
            "title": "Url"
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "start_index": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Index"
          },
          "end_index": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "End Index"
          },
          "provenance": {
            "$ref": "#/components/schemas/CitationProvenance"
          },
          "model_step_id": {
            "type": "string",
            "title": "Model Step Id"
          },
          "model_attempt_id": {
            "type": "string",
            "title": "Model Attempt Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url",
          "provenance",
          "model_step_id",
          "model_attempt_id"
        ],
        "title": "CitationPart",
        "description": "Provider-neutral citation annotation over assistant text."
      },
      "CitationProvenance": {
        "properties": {
          "provider_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Provider Name"
          },
          "hosted_tool": {
            "type": "string",
            "const": "web_search",
            "title": "Hosted Tool",
            "default": "web_search"
          },
          "untrusted_external_evidence": {
            "type": "boolean",
            "const": true,
            "title": "Untrusted External Evidence",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name"
        ],
        "title": "CitationProvenance",
        "description": "Trust label for provider-hosted citation evidence."
      },
      "ClientGenerationContract": {
        "properties": {
          "openapi_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openapi Url",
            "default": "/openapi.json"
          },
          "supported_targets": {
            "items": {
              "type": "string",
              "enum": [
                "typescript",
                "python"
              ]
            },
            "type": "array",
            "title": "Supported Targets",
            "default": [
              "typescript",
              "python"
            ]
          },
          "source_of_truth": {
            "type": "string",
            "const": "openapi",
            "title": "Source Of Truth",
            "default": "openapi"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ClientGenerationContract"
      },
      "CompactSessionBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "pattern": "^[^\\x00]+$",
            "title": "Idempotency Key"
          },
          "expected_run_epoch": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Expected Run Epoch"
          },
          "expected_transcript_cursor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Expected Transcript Cursor"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32768,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "limits": {
            "$ref": "#/components/schemas/RunLimits"
          },
          "budget_limits": {
            "items": {
              "$ref": "#/components/schemas/BudgetLimit"
            },
            "type": "array",
            "title": "Budget Limits"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "expected_run_epoch",
          "expected_transcript_cursor"
        ],
        "title": "CompactSessionBody"
      },
      "ContextualPricingRequirement": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "dimensions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Dimensions"
          },
          "requires_cache_write_ttls": {
            "type": "boolean",
            "title": "Requires Cache Write Ttls",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "dimensions"
        ],
        "title": "ContextualPricingRequirement",
        "description": "Commercial constraints every contextual price for one provider must declare."
      },
      "ControlPlaneCapabilities": {
        "properties": {
          "cayu_version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Cayu Version"
          },
          "configured_store_roles": {
            "items": {
              "type": "string",
              "enum": [
                "session",
                "task",
                "knowledge",
                "artifact"
              ]
            },
            "type": "array",
            "maxItems": 4,
            "title": "Configured Store Roles"
          },
          "actor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ServerContractActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "surfaces": {
            "$ref": "#/components/schemas/ControlPlaneSurfaceCapabilities"
          },
          "mutations": {
            "$ref": "#/components/schemas/ControlPlaneMutationCapabilities"
          },
          "evals_readiness": {
            "$ref": "#/components/schemas/EvalsReadiness"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cayu_version",
          "configured_store_roles",
          "actor",
          "surfaces",
          "mutations",
          "evals_readiness"
        ],
        "title": "ControlPlaneCapabilities",
        "description": "Server-authoritative discovery metadata for the Cayu control plane.\n\nThis projection is presentation metadata rather than an authorization\ntoken. Every underlying route continues to enforce its configured access\ndependency and runtime preconditions."
      },
      "ControlPlaneMutationCapabilities": {
        "properties": {
          "session_execution": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "session_interruption": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "provider_operation_resolution": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "pending_action_resolution": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "session_annotations": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "task_lifecycle": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "knowledge_review": {
            "$ref": "#/components/schemas/CapabilityOperation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_execution",
          "session_interruption",
          "provider_operation_resolution",
          "pending_action_resolution",
          "session_annotations",
          "task_lifecycle",
          "knowledge_review"
        ],
        "title": "ControlPlaneMutationCapabilities"
      },
      "ControlPlaneSurfaceCapabilities": {
        "properties": {
          "dashboard": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "workflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OptionalSurfaceCapability"
              },
              {
                "type": "null"
              }
            ]
          },
          "browser_recordings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OptionalSurfaceCapability"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_follow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OptionalSurfaceCapability"
              },
              {
                "type": "null"
              }
            ]
          },
          "tasks": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "reviewed_knowledge": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "artifacts": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "usage": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "pricing": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "evaluation_promotion": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          },
          "evals": {
            "$ref": "#/components/schemas/OptionalSurfaceCapability"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dashboard",
          "tasks",
          "reviewed_knowledge",
          "artifacts",
          "usage",
          "pricing",
          "evaluation_promotion",
          "evals"
        ],
        "title": "ControlPlaneSurfaceCapabilities"
      },
      "CostLineItem": {
        "properties": {
          "model_step": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Step"
          },
          "auxiliary_attempt": {
            "type": "boolean",
            "title": "Auxiliary Attempt",
            "default": false
          },
          "execution_profile_fingerprint": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Profile Fingerprint"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "requested_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested Model"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "billing_identity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingIdentity"
              },
              {
                "type": "null"
              }
            ]
          },
          "pricing_provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Provider Name"
          },
          "pricing_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Model"
          },
          "pricing_match": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "exact",
                  "prefix",
                  "resource_mapping"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Match"
          },
          "pricing_provenance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Provenance"
              },
              {
                "type": "null"
              }
            ]
          },
          "pricing_effective_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Effective From"
          },
          "pricing_effective_through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Effective Through"
          },
          "pricing_tier_max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Tier Max Input Tokens"
          },
          "priced": {
            "type": "boolean",
            "title": "Priced"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Output Tokens"
          },
          "cache_read_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cache Read Input Tokens"
          },
          "cache_write_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cache Write Input Tokens"
          },
          "cache_write_5m_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cache Write 5M Input Tokens",
            "default": 0
          },
          "cache_write_1h_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cache Write 1H Input Tokens",
            "default": 0
          },
          "cache_write_unknown_ttl_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cache Write Unknown Ttl Input Tokens",
            "default": 0
          },
          "web_search_calls": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Web Search Calls",
            "default": 0
          },
          "web_search_outcome_unknown": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Web Search Outcome Unknown",
            "default": 0
          },
          "uncached_input_tokens": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Uncached Input Tokens"
          },
          "input_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Input Cost"
          },
          "output_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Output Cost"
          },
          "cache_read_input_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cache Read Input Cost"
          },
          "cache_write_input_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Cache Write Input Cost"
          },
          "web_search_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Web Search Cost",
            "default": "0"
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          },
          "unpriced_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "missing_usage",
                  "missing_pricing",
                  "unsupported_pricing"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Unpriced Reason"
          },
          "missing_pricing_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Missing Pricing Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model_step",
          "priced",
          "currency",
          "input_tokens",
          "output_tokens",
          "cache_read_input_tokens",
          "cache_write_input_tokens",
          "uncached_input_tokens",
          "input_cost",
          "output_cost",
          "cache_read_input_cost",
          "cache_write_input_cost",
          "total_cost"
        ],
        "title": "CostLineItem",
        "description": "Estimated cost for one model attempt or standalone hosted resource evidence."
      },
      "DelegatedActionReference": {
        "properties": {
          "child_session_id": {
            "type": "string",
            "title": "Child Session Id"
          },
          "action_kind": {
            "type": "string",
            "enum": [
              "tool_approval",
              "user_input",
              "delegated_action"
            ],
            "title": "Action Kind"
          },
          "action_id": {
            "type": "string",
            "title": "Action Id"
          },
          "status": {
            "type": "string",
            "const": "waiting_on_child_action",
            "title": "Status",
            "default": "waiting_on_child_action"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "child_session_id",
          "action_kind",
          "action_id"
        ],
        "title": "DelegatedActionReference",
        "description": "Bounded discovery of a child-owned action; not resolution authority."
      },
      "EnqueueSessionMessageBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Idempotency Key"
          },
          "content": {
            "type": "string",
            "maxLength": 983040,
            "minLength": 1,
            "title": "Content"
          },
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_mode": {
            "$ref": "#/components/schemas/SessionMessageDeliveryMode"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "conditions": {
            "$ref": "#/components/schemas/SessionMessageConditions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "content",
          "delivery_mode"
        ],
        "title": "EnqueueSessionMessageBody"
      },
      "EnvironmentLifecyclePhase": {
        "type": "string",
        "enum": [
          "ownership_admission",
          "factory_provisioning",
          "factory_reconnect",
          "source_observation",
          "staging_admission",
          "archive_preparation",
          "transfer",
          "target_materialization",
          "execution_ready_publication",
          "final_source_observation",
          "final_target_observation",
          "copy_back_conflict_preflight",
          "copy_back_publication",
          "environment_release",
          "retained_cleanup"
        ],
        "title": "EnvironmentLifecyclePhase",
        "description": "Content-free phases shared by factories, bindings, and cleanup."
      },
      "EnvironmentLifecyclePolicy": {
        "properties": {
          "lifecycle_timeout_seconds": {
            "type": "number",
            "maximum": 86400.0,
            "exclusiveMinimum": 0.0,
            "title": "Lifecycle Timeout Seconds",
            "default": 3600.0
          },
          "phase_timeout_seconds": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object",
            "title": "Phase Timeout Seconds"
          },
          "progress_min_interval_seconds": {
            "type": "number",
            "maximum": 60.0,
            "minimum": 0.0,
            "title": "Progress Min Interval Seconds",
            "default": 0.25
          },
          "max_progress_events": {
            "type": "integer",
            "maximum": 1024.0,
            "minimum": 32.0,
            "title": "Max Progress Events",
            "default": 128
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "EnvironmentLifecyclePolicy",
        "description": "Finite lifecycle, phase, and progress-volume ceilings for one environment."
      },
      "EnvironmentsResponse": {
        "properties": {
          "environments": {
            "items": {
              "$ref": "#/components/schemas/ApiEnvironmentSummary"
            },
            "type": "array",
            "title": "Environments"
          },
          "total_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "environments",
          "total_count"
        ],
        "title": "EnvironmentsResponse"
      },
      "EvalsOperationReadiness": {
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "ready",
              "gated",
              "unsupported"
            ],
            "title": "State"
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "evaluation_promotion_not_configured",
                  "terminal_evidence_not_supported",
                  "session_lineage_not_supported",
                  "eval_store_not_configured",
                  "eval_target_not_configured",
                  "captured_result_persistence_not_available",
                  "scenario_v2_not_available"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "state",
          "reason_code"
        ],
        "title": "EvalsOperationReadiness",
        "description": "Discovery state for one Evals product operation.\n\nReadiness is presentation metadata, not an authorization grant. Underlying\nroutes continue to enforce authentication, mutation policy, and runtime\npreconditions."
      },
      "EvalsReadiness": {
        "properties": {
          "captured_evaluation": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "catalog_read": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "catalog_write": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "captured_result_persistence": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "scenario_conversion": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "fresh_launch": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "cancellation": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "comparison": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          },
          "reports": {
            "$ref": "#/components/schemas/EvalsOperationReadiness"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "captured_evaluation",
          "catalog_read",
          "catalog_write",
          "captured_result_persistence",
          "scenario_conversion",
          "fresh_launch",
          "cancellation",
          "comparison",
          "reports"
        ],
        "title": "EvalsReadiness",
        "description": "Independent availability of the Evals product workflows."
      },
      "Event": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventType"
              },
              {
                "type": "string"
              }
            ],
            "title": "Type"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "id": {
            "type": "string",
            "maxLength": 512,
            "title": "Id"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "session_id"
        ],
        "title": "Event",
        "description": "Append-only runtime event.\n\nEvents are the common language between terminal output, dashboard views,\npersistent sessions, webhooks, and hosted-platform adapters."
      },
      "EventOrder": {
        "type": "string",
        "enum": [
          "sequence_asc",
          "sequence_desc"
        ],
        "title": "EventOrder"
      },
      "EventSideEffectHealthResponse": {
        "properties": {
          "durable": {
            "$ref": "#/components/schemas/PersistedEventSideEffectHealth"
          },
          "recovery_loop": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EventSideEffectRecoveryLoop"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "durable"
        ],
        "title": "EventSideEffectHealthResponse"
      },
      "EventSideEffectRecoveryLoop": {
        "properties": {
          "scope": {
            "type": "string",
            "const": "process_local_reset_on_restart",
            "title": "Scope",
            "default": "process_local_reset_on_restart"
          },
          "state": {
            "type": "string",
            "enum": [
              "configured",
              "running",
              "stopped"
            ],
            "title": "State",
            "default": "configured"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "last_sweep_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sweep Started At"
          },
          "last_sweep_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Sweep Completed At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "last_delivered_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered Count"
          },
          "last_duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Duration Seconds"
          },
          "interval_seconds": {
            "type": "number",
            "title": "Interval Seconds"
          },
          "batch_limit": {
            "type": "integer",
            "title": "Batch Limit"
          },
          "last_success_saturated": {
            "type": "boolean",
            "title": "Last Success Saturated",
            "default": false
          },
          "consecutive_failures": {
            "type": "integer",
            "title": "Consecutive Failures",
            "default": 0
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_error_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error At"
          },
          "sweep_attempts": {
            "type": "integer",
            "title": "Sweep Attempts",
            "default": 0
          },
          "sweep_successes": {
            "type": "integer",
            "title": "Sweep Successes",
            "default": 0
          },
          "sweep_failures": {
            "type": "integer",
            "title": "Sweep Failures",
            "default": 0
          },
          "delivered_rows": {
            "type": "integer",
            "title": "Delivered Rows",
            "default": 0
          },
          "saturated_batches": {
            "type": "integer",
            "title": "Saturated Batches",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "interval_seconds",
          "batch_limit"
        ],
        "title": "EventSideEffectRecoveryLoop"
      },
      "EventType": {
        "type": "string",
        "enum": [
          "workspace.checkpoint.updated",
          "server.mutation.accepted",
          "recovery.plan.item.executed",
          "session.started",
          "session.resumed",
          "session.completed",
          "session.failed",
          "session.interrupted",
          "session.delegated_action.updated",
          "session.interruption_cascade_retry_requested",
          "session.interruption_cascade_completed",
          "session.interruption_cascade_failed",
          "session.awaiting_user_input",
          "session.checkpointed",
          "session.forked",
          "session.export.published",
          "session.export.released",
          "session.export.retired",
          "session.limit_reached",
          "session.message.queued",
          "session.message.delivered",
          "session.message.withdrawn",
          "session.message.quarantined",
          "session.message.stale",
          "session.message.expired",
          "session.model.switched",
          "session.execution_profile.decided",
          "session.execution_profile.rejected",
          "session.run_fenced",
          "turn.completed",
          "interaction.started",
          "interaction.resumed",
          "interaction.paused",
          "interaction.completed",
          "interaction.failed",
          "interaction.interrupted",
          "budget.checked",
          "budget.limit_reached",
          "budget.reserved",
          "budget.reconciled",
          "budget.reservation_failed",
          "budget.reservation_released",
          "credential.proxy.checked",
          "credential.mode.selected",
          "egress.grant.minted",
          "egress.grant.revoked",
          "egress.request.authorized",
          "egress.request.denied",
          "egress.authority.requested",
          "egress.authority.authorized",
          "egress.authority.installing",
          "egress.authority.activated",
          "egress.authority.refused",
          "egress.authority.ambiguous",
          "mcp.manifest.checked",
          "mcp.manifest.blocked",
          "task.created",
          "task.started",
          "task.completed",
          "task.failed",
          "task.cancelled",
          "task.interrupted_handoff",
          "task.completion_result.resolved",
          "model.started",
          "model.text.delta",
          "model.thinking.delta",
          "model.hosted_tool_call",
          "model.citation",
          "model.completed",
          "model.auxiliary.attempt_started",
          "model.auxiliary.attempt_settled",
          "model.error",
          "model.http_cleanup",
          "model.retry",
          "model.attempt_discarded",
          "model.failover.selected",
          "model.failover.exhausted",
          "provider.operation.starting",
          "provider.operation.started",
          "provider.operation.progress",
          "provider.operation.cancel_requested",
          "provider.operation.cancel_resolved",
          "provider.operation.reconnect_scheduled",
          "provider.operation.reconnect_started",
          "provider.operation.recovery_required",
          "provider.operation.resolved",
          "provider.operation.reconciled",
          "request.footprint.recorded",
          "tool.exposure.recorded",
          "tool.grant.issued",
          "tool.grant.reused",
          "tool.grant.reconstructed",
          "tool.grant.expired",
          "tool.grant.revoked",
          "tool.grant.fork_reset",
          "tool.reference.consumed",
          "tool.reference.rejoined",
          "tool.reference.rejected",
          "structured_output.validated",
          "structured_output.validating",
          "structured_output.failed",
          "structured_output.retry",
          "context.compaction.started",
          "context.compaction.completed",
          "context.compaction.failed",
          "context.counted",
          "context.count.failed",
          "context.count.reconciled",
          "context.pressure.estimated",
          "context.pressure.reconciled",
          "context.overflow.detected",
          "context.overflow.recovering",
          "context.overflow.failed",
          "memory.recall.started",
          "memory.recall.completed",
          "memory.recall.failed",
          "memory.recall.admitted",
          "environment.binding.started",
          "environment.binding.completed",
          "environment.binding.failed",
          "environment.binding.finalize_started",
          "environment.binding.finalize_completed",
          "environment.binding.finalize_failed",
          "environment.factory.started",
          "environment.factory.completed",
          "environment.factory.failed",
          "environment.lifecycle.progress",
          "environment.lifecycle.transition",
          "environment.deferred",
          "environment.materialization.started",
          "environment.materialization.completed",
          "environment.materialization.failed",
          "workspace.revision.observed",
          "workspace.mutation.recorded",
          "workspace.observation.finalized",
          "hook.started",
          "hook.completed",
          "hook.failed",
          "tool.call.started",
          "tool.call.completed",
          "tool.call.failed",
          "tool.effect.reconciliation.observed",
          "tool.effect.outcome_unknown",
          "tool.effect.cleanup.observed",
          "tool.effect.reconciliation.started",
          "tool.effect.reconciliation.conflict",
          "tool.effect.receipt.validated",
          "tool.call.blocked",
          "tool.call.approval_requested",
          "tool.call.approved",
          "tool.call.approval_denied",
          "tool.call.approval_expired",
          "workflow.started",
          "workflow.step.started",
          "workflow.step.completed",
          "workflow.completed",
          "memory.search",
          "runner.exec.started",
          "runner.exec.completed",
          "runtime.sink.failed",
          "runtime.interaction_transition.acknowledgement_failed"
        ],
        "title": "EventType"
      },
      "ExecutionProfileAdoptionBody": {
        "properties": {
          "idempotency_key": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "pattern": "^[^\\x00]+$",
            "title": "Idempotency Key"
          },
          "reason": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1,
            "pattern": "^[^\\x00]+$",
            "title": "Reason"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "idempotency_key",
          "reason"
        ],
        "title": "ExecutionProfileAdoptionBody"
      },
      "FilePart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file",
            "title": "Type",
            "default": "file"
          },
          "attachment": {
            "additionalProperties": true,
            "type": "object",
            "title": "Attachment"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "attachment"
        ],
        "title": "FilePart",
        "description": "User-supplied file input (image or document) for a multimodal request.\n\n`attachment` carries a JSON-safe `cayu.file_attachment.v1` payload\nreferencing a stored artifact \u2014 never file bytes. The runtime resolves the\nartifact from the active ArtifactStore immediately before each provider\nrequest, exactly like tool-result attachments."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "ok"
        ],
        "title": "HealthResponse"
      },
      "HostedToolCallPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "hosted_tool_call",
            "title": "Type",
            "default": "hosted_tool_call"
          },
          "hosted_tool": {
            "type": "string",
            "const": "web_search",
            "title": "Hosted Tool",
            "default": "web_search"
          },
          "call_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Call Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "incomplete",
              "failed",
              "outcome_unknown"
            ],
            "title": "Status"
          },
          "action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebSearchAction"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_name": {
            "type": "string",
            "maxLength": 128,
            "title": "Provider Name"
          },
          "model": {
            "type": "string",
            "maxLength": 512,
            "title": "Model"
          },
          "model_step_id": {
            "type": "string",
            "title": "Model Step Id"
          },
          "model_attempt_id": {
            "type": "string",
            "title": "Model Attempt Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "call_id",
          "status",
          "provider_name",
          "model",
          "model_step_id",
          "model_attempt_id"
        ],
        "title": "HostedToolCallPart",
        "description": "Terminal provider-hosted execution evidence in an assistant transcript."
      },
      "HumanReviewCall": {
        "properties": {
          "tool_call_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Tool Call Id"
          },
          "tool_name": {
            "type": "string",
            "maxLength": 512,
            "title": "Tool Name"
          },
          "on_grant": {
            "type": "string",
            "enum": [
              "eligible",
              "denied",
              "withheld"
            ],
            "title": "On Grant"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool_call_id",
          "tool_name",
          "on_grant"
        ],
        "title": "HumanReviewCall"
      },
      "HumanReviewContext": {
        "properties": {
          "recipient": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Recipient"
          },
          "tenant": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant"
          },
          "purpose": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Purpose"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "recipient",
          "purpose"
        ],
        "title": "HumanReviewContext",
        "description": "Verified recipient supplied by trusted SDK code or server authentication."
      },
      "HumanReviewField": {
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Label"
          },
          "text": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 1,
            "title": "Text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "label",
          "text"
        ],
        "title": "HumanReviewField",
        "description": "Untrusted plain text selected by the application policy."
      },
      "HumanReviewReference": {
        "properties": {
          "context": {
            "$ref": "#/components/schemas/HumanReviewContext"
          },
          "policy_version": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Policy Version"
          },
          "content_tag": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "title": "Content Tag"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "context",
          "policy_version",
          "content_tag"
        ],
        "title": "HumanReviewReference",
        "description": "Opaque content binding; conveys no authority to execute or resolve."
      },
      "HumanReviewView": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "permitted",
              "redacted",
              "unavailable"
            ],
            "title": "Status"
          },
          "guidance": {
            "type": "string",
            "enum": [
              "Review all calls before deciding.",
              "Review content is withheld; contact the application owner or deny the action.",
              "No current review is available; refresh pending interactions.",
              "This recovery gate cannot authorize execution; use explicit blocked recovery."
            ],
            "title": "Guidance"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "tool_round_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Round Id"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "user_input",
                  "tool_approval"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "calls": {
            "items": {
              "$ref": "#/components/schemas/HumanReviewCall"
            },
            "type": "array",
            "title": "Calls",
            "default": []
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/HumanReviewField"
            },
            "type": "array",
            "title": "Fields",
            "default": []
          },
          "reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_format": {
            "type": "string",
            "const": "html_escaped_text",
            "title": "Display Format",
            "default": "html_escaped_text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "guidance",
          "session_id"
        ],
        "title": "HumanReviewView",
        "description": "Protected response. All display fields are HTML-escaped untrusted text.\n\nThis response has no generic event, trace, transcript or export contract."
      },
      "InteractionStatus": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "completed",
          "failed",
          "interrupted"
        ],
        "title": "InteractionStatus"
      },
      "InterruptSessionBody": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "InterruptSessionBody"
      },
      "InvocationOriginTrust": {
        "type": "string",
        "enum": [
          "server_verified",
          "host_asserted",
          "unattributed"
        ],
        "title": "InvocationOriginTrust",
        "description": "How Cayu obtained the root invocation identity."
      },
      "KnowledgeVisibility": {
        "type": "string",
        "enum": [
          "global",
          "organization",
          "project",
          "workspace",
          "user",
          "session",
          "task"
        ],
        "title": "KnowledgeVisibility"
      },
      "LabelSelectorOperator": {
        "type": "string",
        "enum": [
          "exists",
          "not_exists",
          "in",
          "not_in"
        ],
        "title": "LabelSelectorOperator"
      },
      "LabelSelectorRequirement": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "operator": {
            "$ref": "#/components/schemas/LabelSelectorOperator"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Values"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "key",
          "operator"
        ],
        "title": "LabelSelectorRequirement"
      },
      "ListSessionEventsResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/ApiEventRecord"
            },
            "type": "array",
            "title": "Events"
          },
          "order_by": {
            "type": "string",
            "enum": [
              "sequence_asc",
              "sequence_desc"
            ],
            "title": "Order By",
            "description": "Ordering applied to the returned event page."
          },
          "next_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Sequence",
            "description": "Exclusive sequence cursor for the next page in the returned order: pass it as after_sequence for ascending pages or before_sequence for descending pages."
          },
          "scan_through_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Scan Through Sequence",
            "description": "Highest durable sequence that a forward tail reader can safely pass as after_sequence. This can be newer than next_sequence when filters exclude events."
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "events",
          "order_by",
          "scan_through_sequence",
          "has_more"
        ],
        "title": "ListSessionEventsResponse"
      },
      "ListSessionInteractionsResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "interactions": {
            "items": {
              "$ref": "#/components/schemas/ApiInteractionSummary"
            },
            "type": "array",
            "title": "Interactions"
          },
          "next_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Sequence"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "interactions",
          "next_sequence",
          "has_more"
        ],
        "title": "ListSessionInteractionsResponse"
      },
      "ListSessionsResponse": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionBase"
            },
            "type": "array",
            "title": "Sessions"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "total_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Count"
          },
          "usage": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SessionUsageSummary"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage",
            "description": "Present only for `include=usage`: one exact usage summary per listed session, in the same order as `sessions`."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sessions",
          "next_cursor"
        ],
        "title": "ListSessionsResponse"
      },
      "Message": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/MessageRole"
          },
          "content": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextPart"
                },
                {
                  "$ref": "#/components/schemas/ToolCallPart"
                },
                {
                  "$ref": "#/components/schemas/ToolResultPart"
                },
                {
                  "$ref": "#/components/schemas/ProviderStatePart"
                },
                {
                  "$ref": "#/components/schemas/ThinkingPart"
                },
                {
                  "$ref": "#/components/schemas/FilePart"
                },
                {
                  "$ref": "#/components/schemas/HostedToolCallPart"
                },
                {
                  "$ref": "#/components/schemas/CitationPart"
                },
                {
                  "$ref": "#/components/schemas/PeerContentPart"
                }
              ]
            },
            "type": "array",
            "title": "Content",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "Message",
        "description": "Frozen transcript message.\n\nMessages and their parts are immutable once constructed: attribute\nassignment is rejected, `content` is a tuple, and every part entering the\nmessage is copied so the message exclusively owns its JSON payloads. The\nfreeze is shallow, though \u2014 nested payload dicts stay mutable \u2014 so sharing\na validated instance is safe only while every holder treats payloads as\nread-only. Hot-path `copy_message` \"copies\" are no-ops under that\ncontract; `detach_message` produces a genuinely isolated copy for\nstorage/trust boundaries, and `copy.deepcopy` isolates as well."
      },
      "MessageRole": {
        "type": "string",
        "enum": [
          "user",
          "assistant",
          "system",
          "tool"
        ],
        "title": "MessageRole"
      },
      "ModelFailoverPolicy": {
        "properties": {
          "fallbacks": {
            "items": {
              "$ref": "#/components/schemas/ModelTarget"
            },
            "type": "array",
            "maxItems": 7,
            "minItems": 1,
            "title": "Fallbacks"
          },
          "max_total_attempts": {
            "type": "integer",
            "maximum": 80.0,
            "minimum": 1.0,
            "title": "Max Total Attempts",
            "default": 20
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "fallbacks"
        ],
        "title": "ModelFailoverPolicy",
        "description": "Bounded, explicit alternatives after an eligible ordinary model failure.\n\nThe primary target is resolved by the run entrance. ``max_total_attempts``\nincludes that primary's attempts and all same-provider retries, not just\ntransitions between targets. This value never authorizes dispatch itself."
      },
      "ModelPrice": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "aliases": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Aliases",
            "default": []
          },
          "match": {
            "type": "string",
            "enum": [
              "exact",
              "prefix"
            ],
            "title": "Match",
            "default": "prefix"
          },
          "match_prefixes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Match Prefixes",
            "default": []
          },
          "pricing_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PricingContextSelector"
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_write_ttls": {
            "items": {
              "type": "string",
              "enum": [
                "5m",
                "1h"
              ]
            },
            "type": "array",
            "title": "Cache Write Ttls",
            "default": []
          },
          "schedules": {
            "items": {
              "$ref": "#/components/schemas/PriceSchedule"
            },
            "type": "array",
            "minItems": 1,
            "title": "Schedules"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "model",
          "schedules"
        ],
        "title": "ModelPrice",
        "description": "Pricing identity and its non-overlapping effective schedules."
      },
      "ModelTarget": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "model"
        ],
        "title": "ModelTarget",
        "description": "An application-selected provider and model pair for one session epoch."
      },
      "OperationalSnapshotRequest": {
        "properties": {
          "session_filter": {
            "$ref": "#/components/schemas/SessionAggregateFilter"
          },
          "task_filter": {
            "$ref": "#/components/schemas/TaskAggregateFilter"
          },
          "include_tasks": {
            "type": "boolean",
            "title": "Include Tasks",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "OperationalSnapshotRequest"
      },
      "OperationalSnapshotResponse": {
        "properties": {
          "scope": {
            "type": "string",
            "const": "configured_stores",
            "title": "Scope"
          },
          "cross_store_atomic": {
            "type": "boolean",
            "const": false,
            "title": "Cross Store Atomic"
          },
          "sessions": {
            "$ref": "#/components/schemas/SessionOperationalSnapshot"
          },
          "task_snapshot_status": {
            "type": "string",
            "enum": [
              "available",
              "not_requested",
              "not_configured",
              "unsupported"
            ],
            "title": "Task Snapshot Status"
          },
          "tasks": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskOperationalSnapshot"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "scope",
          "cross_store_atomic",
          "sessions",
          "task_snapshot_status",
          "tasks"
        ],
        "title": "OperationalSnapshotResponse"
      },
      "OptionalSurfaceCapability": {
        "properties": {
          "configured": {
            "type": "boolean",
            "title": "Configured"
          },
          "read": {
            "$ref": "#/components/schemas/CapabilityOperation"
          },
          "mutate": {
            "$ref": "#/components/schemas/CapabilityOperation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "configured",
          "read",
          "mutate"
        ],
        "title": "OptionalSurfaceCapability",
        "description": "Configuration and operation availability for one optional surface."
      },
      "PeerContentPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "peer_content",
            "title": "Type",
            "default": "peer_content"
          },
          "text": {
            "type": "string",
            "maxLength": 131072,
            "title": "Text"
          },
          "sender_participant_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Sender Participant Id"
          },
          "sender_participant_incarnation": {
            "type": "string",
            "maxLength": 512,
            "title": "Sender Participant Incarnation"
          },
          "sender_session_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Sender Session Id"
          },
          "sender_session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Sender Session Instance Id"
          },
          "occurrence_id": {
            "type": "string",
            "maxLength": 512,
            "title": "Occurrence Id"
          },
          "append_key_json": {
            "type": "string",
            "maxLength": 16384,
            "title": "Append Key Json"
          },
          "operation_key": {
            "type": "string",
            "maxLength": 512,
            "title": "Operation Key"
          },
          "projection_id": {
            "type": "string",
            "maxLength": 256,
            "title": "Projection Id"
          },
          "provenance_sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "title": "Provenance Sha256"
          },
          "executable": {
            "type": "boolean",
            "const": false,
            "title": "Executable",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text",
          "sender_participant_id",
          "sender_participant_incarnation",
          "sender_session_id",
          "sender_session_instance_id",
          "occurrence_id",
          "append_key_json",
          "operation_key",
          "projection_id",
          "provenance_sha256"
        ],
        "title": "PeerContentPart",
        "description": "Attributed, non-executable content delivered by another participant."
      },
      "PendingActionKind": {
        "type": "string",
        "enum": [
          "tool_approval",
          "user_input",
          "manual_recovery",
          "delegated_action"
        ],
        "title": "PendingActionKind"
      },
      "PendingActionsResponse": {
        "properties": {
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ApiPendingAction"
            },
            "type": "array",
            "title": "Actions"
          },
          "issues": {
            "items": {
              "$ref": "#/components/schemas/ApiPendingActionIssue"
            },
            "type": "array",
            "title": "Issues"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "total_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Count"
          },
          "inspected_candidate_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Inspected Candidate Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "actions",
          "issues",
          "next_cursor",
          "has_more",
          "total_count",
          "inspected_candidate_count"
        ],
        "title": "PendingActionsResponse"
      },
      "PendingKnowledgeDetailResponse": {
        "properties": {
          "entry_id": {
            "type": "string",
            "title": "Entry Id"
          },
          "revision": {
            "type": "integer",
            "maximum": 2147483647.0,
            "minimum": 1.0,
            "title": "Revision"
          },
          "namespace": {
            "type": "string",
            "title": "Namespace"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "visibility": {
            "type": "string",
            "title": "Visibility"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "aspects": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Aspects"
          },
          "impact_targets": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Impact Targets"
          },
          "source_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Type"
          },
          "source_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Uri"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "created_by_type": {
            "type": "string",
            "title": "Created By Type"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "importance": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance"
          },
          "importance_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Importance Source"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "chunks": {
            "items": {
              "$ref": "#/components/schemas/ApiKnowledgeChunk"
            },
            "type": "array",
            "title": "Chunks"
          },
          "chunk_limit": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Chunk Limit"
          },
          "chunk_max_bytes": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Chunk Max Bytes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entry_id",
          "revision",
          "namespace",
          "kind",
          "visibility",
          "status",
          "title",
          "labels",
          "aspects",
          "impact_targets",
          "source_type",
          "source_uri",
          "source_id",
          "created_by_type",
          "created_by",
          "created_at",
          "updated_at",
          "importance",
          "importance_source",
          "confidence",
          "text",
          "metadata",
          "expires_at",
          "chunks",
          "chunk_limit",
          "chunk_max_bytes"
        ],
        "title": "PendingKnowledgeDetailResponse"
      },
      "PendingKnowledgeListResponse": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/ApiKnowledgeListItem"
            },
            "type": "array",
            "title": "Entries"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          },
          "limit": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Limit"
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Bytes"
          },
          "total_entries_known": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Entries Known"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "entries",
          "truncated",
          "limit",
          "max_bytes",
          "total_entries_known"
        ],
        "title": "PendingKnowledgeListResponse"
      },
      "PersistedEventSideEffectHealth": {
        "properties": {
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "pending": {
            "type": "integer",
            "title": "Pending",
            "default": 0
          },
          "leased_live": {
            "type": "integer",
            "title": "Leased Live",
            "default": 0
          },
          "leased_expired": {
            "type": "integer",
            "title": "Leased Expired",
            "default": 0
          },
          "failed_retryable": {
            "type": "integer",
            "title": "Failed Retryable",
            "default": 0
          },
          "failed_deferred": {
            "type": "integer",
            "title": "Failed Deferred",
            "default": 0
          },
          "dead_lettered": {
            "type": "integer",
            "title": "Dead Lettered",
            "default": 0
          },
          "delivered": {
            "type": "integer",
            "title": "Delivered",
            "default": 0
          },
          "claimable_total": {
            "type": "integer",
            "title": "Claimable Total",
            "default": 0
          },
          "outstanding_total": {
            "type": "integer",
            "title": "Outstanding Total",
            "default": 0
          },
          "repeatedly_failing": {
            "type": "integer",
            "title": "Repeatedly Failing",
            "default": 0
          },
          "final_attempt_boundary": {
            "type": "integer",
            "title": "Final Attempt Boundary",
            "default": 0
          },
          "max_outstanding_attempts": {
            "type": "integer",
            "title": "Max Outstanding Attempts",
            "default": 0
          },
          "max_automatic_attempts": {
            "type": "integer",
            "title": "Max Automatic Attempts",
            "default": 3
          },
          "oldest_claimable_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Claimable At"
          },
          "oldest_claimable_age_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Claimable Age Seconds"
          },
          "oldest_pending_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Pending At"
          },
          "oldest_pending_age_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Pending Age Seconds"
          },
          "oldest_failed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Failed At"
          },
          "oldest_failed_age_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Failed Age Seconds"
          },
          "oldest_dead_letter_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Dead Letter At"
          },
          "oldest_dead_letter_age_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Dead Letter Age Seconds"
          },
          "earliest_live_lease_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Earliest Live Lease Expires At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "observed_at"
        ],
        "title": "PersistedEventSideEffectHealth"
      },
      "PersistedEventSideEffectInspection": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "event_sequence": {
            "type": "integer",
            "title": "Event Sequence"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "leased",
              "failed",
              "delivered",
              "dead_lettered"
            ],
            "title": "Status"
          },
          "claimable": {
            "type": "boolean",
            "title": "Claimable"
          },
          "attempts": {
            "type": "integer",
            "title": "Attempts"
          },
          "lease_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lease Expires At"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "event_id",
          "event_sequence",
          "status",
          "claimable",
          "attempts",
          "lease_expires_at",
          "next_attempt_at",
          "updated_at",
          "last_error"
        ],
        "title": "PersistedEventSideEffectInspection"
      },
      "PersistedEventSideEffectPage": {
        "properties": {
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "deliveries": {
            "items": {
              "$ref": "#/components/schemas/PersistedEventSideEffectInspection"
            },
            "type": "array",
            "title": "Deliveries"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "observed_at",
          "deliveries"
        ],
        "title": "PersistedEventSideEffectPage"
      },
      "PriceBook": {
        "properties": {
          "price_book_version": {
            "type": "string",
            "title": "Price Book Version",
            "default": "application"
          },
          "generated_at": {
            "type": "string",
            "title": "Generated At",
            "default": "unspecified"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/ModelPrice"
            },
            "type": "array",
            "minItems": 1,
            "title": "Prices"
          },
          "contextual_pricing_requirements": {
            "items": {
              "$ref": "#/components/schemas/ContextualPricingRequirement"
            },
            "type": "array",
            "title": "Contextual Pricing Requirements",
            "default": []
          },
          "resource_mappings": {
            "items": {
              "$ref": "#/components/schemas/PricingResourceMapping"
            },
            "type": "array",
            "title": "Resource Mappings",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prices"
        ],
        "title": "PriceBook",
        "description": "A versioned collection of application-owned commercial model prices."
      },
      "PriceSchedule": {
        "properties": {
          "effective_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective From"
          },
          "effective_through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective Through"
          },
          "pricing": {
            "$ref": "#/components/schemas/TieredPricing"
          },
          "provenance": {
            "$ref": "#/components/schemas/Provenance"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pricing",
          "provenance"
        ],
        "title": "PriceSchedule",
        "description": "One price schedule, effective on inclusive UTC calendar dates."
      },
      "PriceTier": {
        "properties": {
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "input_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Input Per Million"
          },
          "output_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Output Per Million"
          },
          "cache_read_input_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read Input Per Million"
          },
          "cache_write_input_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Input Per Million"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input_per_million",
          "output_per_million"
        ],
        "title": "PriceTier",
        "description": "One context band of tiered pricing.\n\nTiers are ordered ascending by ``max_input_tokens``; the final tier may use\n``None`` to mean \"and above\"."
      },
      "PricingCatalogDiagnostics": {
        "properties": {
          "configured": {
            "type": "boolean",
            "title": "Configured"
          },
          "metadata_status": {
            "type": "string",
            "enum": [
              "available",
              "not_configured",
              "omitted"
            ],
            "title": "Metadata Status"
          },
          "price_book_version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Book Version"
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Generated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "configured",
          "metadata_status"
        ],
        "title": "PricingCatalogDiagnostics"
      },
      "PricingContext": {
        "properties": {
          "dimensions": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Dimensions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dimensions"
        ],
        "title": "PricingContext",
        "description": "One exact set of commercial dimensions that may price a dispatch."
      },
      "PricingContextSelector": {
        "properties": {
          "dimensions": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Dimensions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dimensions"
        ],
        "title": "PricingContextSelector",
        "description": "Exact pricing dimensions accepted by one contextual price row."
      },
      "PricingResourceMapping": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "resource_id": {
            "type": "string",
            "title": "Resource Id"
          },
          "pricing_model": {
            "type": "string",
            "title": "Pricing Model"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "resource_id",
          "pricing_model"
        ],
        "title": "PricingResourceMapping",
        "description": "Map one opaque provider resource to an explicit pricing model."
      },
      "Provenance": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "as_of": {
            "type": "string",
            "title": "As Of"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "source",
          "url",
          "as_of"
        ],
        "title": "Provenance",
        "description": "Where model or pricing facts came from and when they were checked."
      },
      "ProviderOperationResolutionAction": {
        "type": "string",
        "enum": [
          "fallback_retry",
          "fail"
        ],
        "title": "ProviderOperationResolutionAction",
        "description": "Explicit dispositions for a provider operation Cayu cannot continue exactly."
      },
      "ProviderOperationResolutionBody": {
        "properties": {
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "stage_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Stage Id"
          },
          "expected_run_epoch": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Expected Run Epoch"
          },
          "action": {
            "$ref": "#/components/schemas/ProviderOperationResolutionAction"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "stage_id",
          "expected_run_epoch",
          "action"
        ],
        "title": "ProviderOperationResolutionBody",
        "description": "Explicit retry-or-fail disposition for unavailable provider work."
      },
      "ProviderStatePart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "provider_state",
            "title": "Type",
            "default": "provider_state"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "state": {
            "additionalProperties": true,
            "type": "object",
            "title": "State"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider"
        ],
        "title": "ProviderStatePart"
      },
      "RecoveryBlockerCode": {
        "type": "string",
        "enum": [
          "registration_unavailable",
          "registration_incompatible",
          "active_recovery_claim",
          "active_execution_owner",
          "active_task_claim",
          "model_effect_outcome_unknown",
          "tool_effect_outcome_unknown",
          "tool_effect_continuation_required",
          "tool_approval_required",
          "user_input_required",
          "invalid_durable_state"
        ],
        "title": "RecoveryBlockerCode"
      },
      "ReportedCostObservation": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "cost": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 18
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "const": "USD"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "status": {
            "type": "string",
            "enum": [
              "reported",
              "pending",
              "unavailable"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "event_id",
          "timestamp",
          "request_id",
          "provider_name",
          "model",
          "cost",
          "currency",
          "status"
        ],
        "title": "ReportedCostObservation"
      },
      "ReportedCostPage": {
        "properties": {
          "records": {
            "items": {
              "$ref": "#/components/schemas/ReportedCostObservation"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Records",
            "default": []
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ReportedCostPage",
        "description": "Latest retained observations, not a total or a current financial readback."
      },
      "RequestCostRoute": {
        "properties": {
          "method": {
            "type": "string",
            "maxLength": 16,
            "title": "Method"
          },
          "route": {
            "type": "string",
            "maxLength": 512,
            "title": "Route"
          },
          "requests": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Requests"
          },
          "requests_per_minute": {
            "type": "number",
            "minimum": 0.0,
            "title": "Requests Per Minute"
          },
          "streaming_requests": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Streaming Requests"
          },
          "status_2xx": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Status 2Xx"
          },
          "status_3xx": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Status 3Xx"
          },
          "status_4xx": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Status 4Xx"
          },
          "status_5xx": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Status 5Xx"
          },
          "wall_ms_p50": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Ms P50"
          },
          "wall_ms_p95": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Ms P95"
          },
          "wall_ms_max": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Wall Ms Max"
          },
          "cpu_seconds": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Seconds"
          },
          "cpu_seconds_per_minute": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Seconds Per Minute"
          },
          "vcpu_share": {
            "type": "number",
            "minimum": 0.0,
            "title": "Vcpu Share"
          },
          "response_bytes": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Response Bytes"
          },
          "clients": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Clients"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "method",
          "route",
          "requests",
          "requests_per_minute",
          "streaming_requests",
          "status_2xx",
          "status_3xx",
          "status_4xx",
          "status_5xx",
          "cpu_seconds",
          "cpu_seconds_per_minute",
          "vcpu_share",
          "response_bytes",
          "clients"
        ],
        "title": "RequestCostRoute",
        "description": "Aggregated cost of one method and route template inside the window."
      },
      "RequestCostSummary": {
        "properties": {
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "requested_window_seconds": {
            "type": "number",
            "maximum": 86400.0,
            "exclusiveMinimum": 0.0,
            "title": "Requested Window Seconds"
          },
          "window_seconds": {
            "type": "number",
            "maximum": 86400.0,
            "minimum": 0.0,
            "title": "Window Seconds"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          },
          "buffer_capacity": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Buffer Capacity"
          },
          "vcpu": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Vcpu"
          },
          "requests": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Requests"
          },
          "requests_per_minute": {
            "type": "number",
            "minimum": 0.0,
            "title": "Requests Per Minute"
          },
          "cpu_seconds": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Seconds"
          },
          "cpu_seconds_per_minute": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cpu Seconds Per Minute"
          },
          "vcpu_share": {
            "type": "number",
            "minimum": 0.0,
            "title": "Vcpu Share"
          },
          "route_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Route Count"
          },
          "routes": {
            "items": {
              "$ref": "#/components/schemas/RequestCostRoute"
            },
            "type": "array",
            "maxItems": 200,
            "title": "Routes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "observed_at",
          "enabled",
          "requested_window_seconds",
          "window_seconds",
          "truncated",
          "buffer_capacity",
          "vcpu",
          "requests",
          "requests_per_minute",
          "cpu_seconds",
          "cpu_seconds_per_minute",
          "vcpu_share",
          "route_count",
          "routes"
        ],
        "title": "RequestCostSummary",
        "description": "Per-route request rate, latency, and CPU over a recent window.\n\n``window_seconds`` is the span actually covered by retained records: it is\nshorter than ``requested_window_seconds`` when the process started more\nrecently or when the bounded buffer has already evicted records from the\nrequested span (``truncated``). Rates and the vCPU share use the covered\nspan. ``vcpu_share`` is request CPU seconds per second divided by ``vcpu``.\n``routes`` is ordered by CPU seconds, highest first; latency percentiles\nexclude streaming responses, whose duration is the stream lifetime."
      },
      "ResolutionActor": {
        "properties": {
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "tenant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant"
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActorSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "claims": {
            "additionalProperties": true,
            "type": "object",
            "title": "Claims"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "subject"
        ],
        "title": "ResolutionActor",
        "description": "Typed actor identity for trusted runtime operator actions.\n\nStamped into approval, user-input, recovery, and interruption event payloads\nso the audit trail answers who performed an operator action without\nconsulting app-side state. ``reason`` and ``metadata`` on requests remain\ncaller-claimed free-form data; this model is the provenance field."
      },
      "ResolutionActorSource": {
        "type": "string",
        "enum": [
          "http_auth",
          "request",
          "system"
        ],
        "title": "ResolutionActorSource",
        "description": "How a ``ResolutionActor``'s identity claim was established.\n\n``HTTP_AUTH`` is produced only by the server layer from a verified\n``AuthContext``; ``REQUEST`` marks a caller-asserted identity (SDK or\nopen-access HTTP body); ``SYSTEM`` marks runtime-generated actors such as\ndeterministic approval expiry. Direct SDK callers are a trusted boundary\nand may construct system actors; HTTP bodies cannot \u2014 the server re-stamps\nopen-access bodies to ``REQUEST`` and rejects them entirely under auth."
      },
      "ResumeBody": {
        "properties": {
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "title": "Prompt"
          },
          "profile_adoption": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExecutionProfileAdoptionBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "failover": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelFailoverPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "type": "integer",
            "maximum": 9007199254740991.0,
            "minimum": 1.0,
            "title": "Max Steps",
            "default": 64
          },
          "limits": {
            "$ref": "#/components/schemas/RunLimits"
          },
          "budget_limits": {
            "items": {
              "$ref": "#/components/schemas/BudgetLimit"
            },
            "type": "array",
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_completion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolCompletionPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "prompt"
        ],
        "title": "ResumeBody"
      },
      "RetryPolicy": {
        "properties": {
          "max_attempts": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Max Attempts",
            "default": 5
          },
          "max_unknown_attempts": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Max Unknown Attempts",
            "default": 2
          },
          "initial_delay_s": {
            "type": "number",
            "maximum": 600.0,
            "minimum": 0.0,
            "title": "Initial Delay S",
            "default": 0.5
          },
          "max_delay_s": {
            "type": "number",
            "maximum": 3600.0,
            "minimum": 0.0,
            "title": "Max Delay S",
            "default": 30.0
          },
          "backoff_multiplier": {
            "type": "number",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Backoff Multiplier",
            "default": 2.0
          },
          "jitter_s": {
            "type": "number",
            "maximum": 600.0,
            "minimum": 0.0,
            "title": "Jitter S",
            "default": 0.5
          },
          "retry_on_status_codes": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "maxItems": 32,
            "minItems": 0,
            "title": "Retry On Status Codes",
            "default": [
              429,
              500,
              502,
              503,
              504,
              529
            ]
          },
          "retry_on_timeout": {
            "type": "boolean",
            "title": "Retry On Timeout",
            "default": true
          },
          "retry_on_connection_error": {
            "type": "boolean",
            "title": "Retry On Connection Error",
            "default": true
          },
          "retry_on_rate_limit": {
            "type": "boolean",
            "title": "Retry On Rate Limit",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "RetryPolicy",
        "description": "Retry controls for one provider model step.\n\n`max_attempts` includes the initial attempt. The default permits five total\nattempts for classified transient provider failures. Unknown provider\nfailures retain the stricter `max_unknown_attempts` ceiling.\n\nFrozen: policies are immutable value objects, so they can be shared across\nattempts and sessions without per-attempt defensive copies."
      },
      "RunBody": {
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "title": "Prompt"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._~-]*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id",
            "description": "Optional caller-selected identity for replay-safe run observation. Before the first event, reconnect with `session_id:` using this session ID."
          },
          "agent": {
            "type": "string",
            "minLength": 1,
            "title": "Agent",
            "default": "assistant"
          },
          "target": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelTarget"
              },
              {
                "type": "null"
              }
            ]
          },
          "failover": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelFailoverPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "causal_budget_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Budget Id"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          },
          "max_steps": {
            "type": "integer",
            "maximum": 9007199254740991.0,
            "minimum": 1.0,
            "title": "Max Steps",
            "default": 64
          },
          "limits": {
            "$ref": "#/components/schemas/RunLimits"
          },
          "budget_limits": {
            "items": {
              "$ref": "#/components/schemas/BudgetLimit"
            },
            "type": "array",
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_completion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolCompletionPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "RunBody"
      },
      "RunLimits": {
        "properties": {
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens"
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "max_total_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Total Tokens"
          },
          "max_tool_calls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tool Calls"
          },
          "max_elapsed_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Elapsed Seconds"
          },
          "scope": {
            "type": "string",
            "enum": [
              "session",
              "run"
            ],
            "title": "Scope",
            "default": "run"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "RunLimits",
        "description": "Optional hard limits for one session run or resume call.\n\nEvery limit is evaluated against the clock selected by ``scope``:\n\n- ``scope=\"run\"`` (the default): token, tool-call, and elapsed-time\n  limits all measure the current runtime invocation \u2014 usage deltas since\n  the original run entered and active time since the run started. Durable\n  approval and user-input continuations retain the baseline and exclude the\n  human wait interval. A fresh run or clean-boundary resume resets it.\n- ``scope=\"session\"``: token, tool-call, and elapsed-time limits all\n  measure the whole durable session \u2014 cumulative usage from the session\n  event stream and wall time since the session was created. A resumed\n  session that already meets a limit stops immediately."
      },
      "RuntimeBuildArtifactKind": {
        "type": "string",
        "enum": [
          "wheel",
          "oci_image",
          "source_tree",
          "other"
        ],
        "title": "RuntimeBuildArtifactKind",
        "description": "Digest domain whose bytes or manifest identify the build."
      },
      "RuntimeBuildProvenance": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "recipe": {
            "type": "string",
            "const": "cayu.runtime-build-provenance.v1",
            "title": "Recipe",
            "default": "cayu.runtime-build-provenance.v1"
          },
          "origin": {
            "$ref": "#/components/schemas/RuntimeBuildProvenanceOrigin"
          },
          "availability": {
            "$ref": "#/components/schemas/RuntimeBuildProvenanceAvailability"
          },
          "strength": {
            "$ref": "#/components/schemas/RuntimeBuildProvenanceStrength"
          },
          "fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fingerprint"
          },
          "artifact_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuntimeBuildArtifactKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "artifact_digest": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifact Digest"
          },
          "source_revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Revision"
          },
          "detail_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail Code"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "origin",
          "availability",
          "strength"
        ],
        "title": "RuntimeBuildProvenance",
        "description": "Versioned, bounded identity for the exact Cayu runtime build."
      },
      "RuntimeBuildProvenanceAvailability": {
        "type": "string",
        "enum": [
          "available",
          "unavailable"
        ],
        "title": "RuntimeBuildProvenanceAvailability",
        "description": "Whether exact build identity is available for admission."
      },
      "RuntimeBuildProvenanceOrigin": {
        "type": "string",
        "enum": [
          "wheel_record",
          "oci_image_digest",
          "development_source_tree",
          "explicit_manifest",
          "legacy_record",
          "unavailable"
        ],
        "title": "RuntimeBuildProvenanceOrigin",
        "description": "Boundary that supplied one runtime build identity."
      },
      "RuntimeBuildProvenanceStrength": {
        "type": "string",
        "enum": [
          "structural",
          "application_versioned",
          "unavailable"
        ],
        "title": "RuntimeBuildProvenanceStrength",
        "description": "Execution-profile strength vocabulary for runtime build identity."
      },
      "ServerContractActor": {
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 512,
            "title": "Subject"
          },
          "tenant": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512
              },
              {
                "type": "null"
              }
            ],
            "title": "Tenant"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "subject"
        ],
        "title": "ServerContractActor",
        "description": "Bounded actor projection that deliberately excludes arbitrary claims."
      },
      "ServerContractResponse": {
        "properties": {
          "api_prefix": {
            "type": "string",
            "title": "Api Prefix",
            "default": "/api"
          },
          "contract_version": {
            "type": "string",
            "title": "Contract Version",
            "default": "48"
          },
          "versioning": {
            "$ref": "#/components/schemas/VersioningContract"
          },
          "accounting": {
            "$ref": "#/components/schemas/AccountingContract"
          },
          "sse": {
            "$ref": "#/components/schemas/SseContract"
          },
          "client_generation": {
            "$ref": "#/components/schemas/ClientGenerationContract"
          },
          "client": {
            "$ref": "#/components/schemas/BrowserClientContract"
          },
          "capabilities": {
            "$ref": "#/components/schemas/ControlPlaneCapabilities"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "accounting",
          "capabilities"
        ],
        "title": "ServerContractResponse"
      },
      "SessionAggregateFilter": {
        "properties": {
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "parent_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Session Id"
          },
          "causal_budget_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Causal Budget Id"
          },
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Labels"
          },
          "label_selectors": {
            "items": {
              "$ref": "#/components/schemas/LabelSelectorRequirement"
            },
            "type": "array",
            "maxItems": 25,
            "title": "Label Selectors"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SessionAggregateFilter",
        "description": "Current session attributes that may scope a store-native aggregate."
      },
      "SessionCostBody": {
        "properties": {
          "pricing": {
            "$ref": "#/components/schemas/PriceBook"
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "title": "Currency",
            "default": "USD"
          }
        },
        "type": "object",
        "required": [
          "pricing"
        ],
        "title": "SessionCostBody"
      },
      "SessionCostEndpointContract": {
        "properties": {
          "supported": {
            "type": "boolean",
            "title": "Supported"
          },
          "method": {
            "type": "string",
            "const": "POST",
            "title": "Method",
            "default": "POST"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "request_schema": {
            "type": "string",
            "const": "SessionCostBody",
            "title": "Request Schema",
            "default": "SessionCostBody"
          },
          "response_schema": {
            "type": "string",
            "const": "SessionCostSummary",
            "title": "Response Schema",
            "default": "SessionCostSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "supported",
          "path"
        ],
        "title": "SessionCostEndpointContract",
        "description": "Estimated session cost from a caller-supplied price book."
      },
      "SessionCostSummary": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Steps"
          },
          "priced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Model Steps"
          },
          "auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Auxiliary Attempts",
            "default": 0
          },
          "unpriced_auxiliary_attempts": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unpriced Auxiliary Attempts",
            "default": 0
          },
          "missing_usage_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Usage Model Steps",
            "default": 0
          },
          "missing_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Missing Pricing Model Steps",
            "default": 0
          },
          "unsupported_pricing_model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Unsupported Pricing Model Steps",
            "default": 0
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/CostLineItem"
            },
            "type": "array",
            "title": "Line Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "currency",
          "model_steps",
          "priced_model_steps",
          "unpriced_model_steps",
          "total_cost"
        ],
        "title": "SessionCostSummary",
        "description": "Detailed cost inspection, retaining one line item per completed step."
      },
      "SessionDebugState": {
        "type": "string",
        "enum": [
          "needs_attention",
          "session_failure",
          "tool_issue",
          "interruption"
        ],
        "title": "SessionDebugState"
      },
      "SessionExecutionSource": {
        "type": "string",
        "enum": [
          "http_run",
          "sdk_run",
          "fork",
          "subagent",
          "task",
          "workflow_step"
        ],
        "title": "SessionExecutionSource",
        "description": "The runtime boundary that created one session."
      },
      "SessionExecutionState": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "state": {
            "type": "string",
            "enum": [
              "executing",
              "idle",
              "waiting",
              "owner_lost",
              "terminal",
              "unknown"
            ],
            "title": "State"
          },
          "owner_kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_process_runner",
                  "server_stream",
                  "task_worker",
                  "recovery",
                  "foreground_child_delivery"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Kind"
          },
          "owner_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Label"
          },
          "local_owner": {
            "type": "boolean",
            "title": "Local Owner",
            "default": false
          },
          "run_epoch": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Run Epoch"
          },
          "operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation Id"
          },
          "claimed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Claimed At"
          },
          "heartbeat_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Heartbeat At"
          },
          "lease_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lease Expires At"
          },
          "last_progress_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Progress At"
          },
          "last_progress_kind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "model_stream",
                  "tool_call",
                  "waiting_for_input",
                  "publishing"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Progress Kind"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "state",
          "run_epoch"
        ],
        "title": "SessionExecutionState",
        "description": "Content-free liveness evaluated by the store clock; reading never renews it."
      },
      "SessionFollowContract": {
        "properties": {
          "method": {
            "type": "string",
            "const": "GET",
            "title": "Method",
            "default": "GET"
          },
          "path_template": {
            "type": "string",
            "title": "Path Template",
            "default": "/api/sessions/{session_id}/events/stream"
          },
          "event_id_format": {
            "type": "string",
            "const": "session_id:cayu_event_<sequence>",
            "title": "Event Id Format",
            "default": "session_id:cayu_event_<sequence>"
          },
          "start_query_param": {
            "type": "string",
            "const": "after_sequence",
            "title": "Start Query Param",
            "default": "after_sequence"
          },
          "resume_header": {
            "type": "string",
            "const": "Last-Event-ID",
            "title": "Resume Header",
            "default": "Last-Event-ID"
          },
          "unknown_event_marker_behavior": {
            "type": "string",
            "const": "reject",
            "title": "Unknown Event Marker Behavior",
            "default": "reject"
          },
          "filter_query_params": {
            "items": {
              "type": "string",
              "enum": [
                "event_type",
                "exclude_event_type",
                "interaction_id"
              ]
            },
            "type": "array",
            "title": "Filter Query Params",
            "default": [
              "event_type",
              "exclude_event_type",
              "interaction_id"
            ]
          },
          "event_data_schema": {
            "type": "string",
            "const": "SseEventEnvelope",
            "title": "Event Data Schema",
            "default": "SseEventEnvelope"
          },
          "heartbeat_interval_seconds": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Heartbeat Interval Seconds",
            "description": "Seconds between SSE comment heartbeat lines that start with `:`.",
            "default": 15.0
          },
          "end_event_name": {
            "type": "string",
            "const": "end",
            "title": "End Event Name",
            "default": "end"
          },
          "end_data_schema": {
            "type": "string",
            "const": "SseSessionFollowEndEnvelope",
            "title": "End Data Schema",
            "default": "SseSessionFollowEndEnvelope"
          },
          "terminal_behavior": {
            "type": "string",
            "const": "end_after_terminal_event",
            "title": "Terminal Behavior",
            "default": "end_after_terminal_event"
          },
          "idle_timeout_seconds": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Idle Timeout Seconds",
            "description": "Seconds a running session may produce no durable events before the stream sends a retryable `replay_idle_timeout` error and closes.",
            "default": 300.0
          },
          "max_streams_per_principal": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Streams Per Principal",
            "default": 16
          },
          "max_streams_per_session": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Streams Per Session",
            "default": 32
          },
          "limit_exceeded_status": {
            "type": "integer",
            "const": 429,
            "title": "Limit Exceeded Status",
            "default": 429
          },
          "end_data_example": {
            "$ref": "#/components/schemas/SseSessionFollowEndEnvelope"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SessionFollowContract",
        "description": "Read-only SSE stream that follows one session's durable events.\n\nThe stream never admits, re-runs, or acknowledges a mutation. It emits the\nsame ``SseEventEnvelope`` frames as mutation streams, SSE comment heartbeats,\nand one final ``event: end`` frame after the session's terminal event."
      },
      "SessionMessageActionBody": {
        "properties": {
          "session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Instance Id"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Idempotency Key"
          },
          "expected_revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "title": "Expected Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_instance_id",
          "idempotency_key",
          "expected_revision"
        ],
        "title": "SessionMessageActionBody"
      },
      "SessionMessageActionResult": {
        "properties": {
          "record": {
            "$ref": "#/components/schemas/SessionMessageInspectionRecord"
          },
          "event": {
            "$ref": "#/components/schemas/Event"
          },
          "replayed": {
            "type": "boolean",
            "title": "Replayed",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "record",
          "event"
        ],
        "title": "SessionMessageActionResult",
        "description": "Terminal queue mutation and its atomically persisted content-free event."
      },
      "SessionMessageConditions": {
        "properties": {
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionMessageSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionMessageTarget"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SessionMessageConditions",
        "description": "Optional provenance and delivery constraints; never ordinary metadata."
      },
      "SessionMessageCursor": {
        "properties": {
          "session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Instance Id"
          },
          "through_ordering_key": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Through Ordering Key"
          },
          "after_priority": {
            "type": "integer",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "After Priority"
          },
          "after_ordering_key": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "After Ordering Key"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_instance_id",
          "through_ordering_key",
          "after_priority",
          "after_ordering_key"
        ],
        "title": "SessionMessageCursor",
        "description": "Incarnation-bound position within a fixed admission high-water mark.\n\nPriority is NEXT_TURN (0), ON_IDLE (1), then unreadable modes (2).\nThe cursor is pagination input, never application access authority."
      },
      "SessionMessageDeliveryMode": {
        "type": "string",
        "enum": [
          "next_turn",
          "on_idle"
        ],
        "title": "SessionMessageDeliveryMode"
      },
      "SessionMessageInspection": {
        "properties": {
          "session_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Id"
          },
          "session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Instance Id"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/SessionMessageInspectionRecord"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Records",
            "default": []
          },
          "next_cursor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionMessageCursor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "session_instance_id"
        ],
        "title": "SessionMessageInspection",
        "description": "One protected delivery-priority page and its exact session instance."
      },
      "SessionMessageInspectionRecord": {
        "properties": {
          "queue_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Queue Id"
          },
          "ordering_key": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Ordering Key"
          },
          "revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "title": "Revision"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionMessageQueueStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "validity": {
            "type": "string",
            "enum": [
              "valid",
              "unreadable"
            ],
            "title": "Validity"
          },
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionQueuedMessage"
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal_event_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 512,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Terminal Event Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "queue_id",
          "ordering_key",
          "revision",
          "status",
          "validity"
        ],
        "title": "SessionMessageInspectionRecord",
        "description": "Safe row envelope: unreadable content never becomes deliverable input."
      },
      "SessionMessageQueueStatus": {
        "type": "string",
        "enum": [
          "queued",
          "delivered",
          "withdrawn",
          "quarantined",
          "stale",
          "expired"
        ],
        "title": "SessionMessageQueueStatus"
      },
      "SessionMessageSource": {
        "properties": {
          "session_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Id"
          },
          "session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Instance Id"
          },
          "run_epoch": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Run Epoch"
          },
          "transcript_cursor": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Transcript Cursor"
          },
          "transcript_sha256": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transcript Sha256"
          },
          "checkpoint_sha256": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkpoint Sha256"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "session_instance_id",
          "run_epoch",
          "transcript_cursor"
        ],
        "title": "SessionMessageSource",
        "description": "Exact source observation, checked by the store before first acceptance.\n\nSource observations are historical after admission: identical retries do not\nreinterpret them against a newer source. A copied observation is not access\nauthority; the application must independently authorize the source session."
      },
      "SessionMessageSourceBody": {
        "properties": {
          "include_transcript_digest": {
            "type": "boolean",
            "title": "Include Transcript Digest",
            "default": false
          },
          "include_checkpoint_digest": {
            "type": "boolean",
            "title": "Include Checkpoint Digest",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SessionMessageSourceBody"
      },
      "SessionMessageTarget": {
        "properties": {
          "session_instance_id": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1,
            "title": "Session Instance Id"
          },
          "run_epoch": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Run Epoch"
          },
          "transcript_cursor": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Transcript Cursor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_instance_id",
          "run_epoch",
          "transcript_cursor"
        ],
        "title": "SessionMessageTarget",
        "description": "Expected target immediately before this message's transcript append.\n\nThe instance prevents deletion/recreation from satisfying an old request.\nBoth epoch and permanent transcript cursor must match exactly. Earlier\ndelivered messages advance that cursor; terminal rejection does not. This\ndefinition is independent of the store's delivery batch size."
      },
      "SessionOperationalSnapshot": {
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "title": "As Of"
          },
          "total_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Total Count"
          },
          "counts_by_status": {
            "$ref": "#/components/schemas/SessionStatusCounts"
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "as_of",
          "total_count",
          "counts_by_status",
          "accuracy"
        ],
        "title": "SessionOperationalSnapshot",
        "description": "Exact current session counts captured by one store-local read snapshot."
      },
      "SessionOrder": {
        "type": "string",
        "enum": [
          "created_at_asc",
          "created_at_desc",
          "updated_at_asc",
          "updated_at_desc",
          "last_activity_at_asc",
          "last_activity_at_desc"
        ],
        "title": "SessionOrder"
      },
      "SessionQueuedMessage": {
        "properties": {
          "queue_id": {
            "type": "string",
            "title": "Queue Id"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "idempotency_key": {
            "type": "string",
            "title": "Idempotency Key"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "message": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Message"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_mode": {
            "$ref": "#/components/schemas/SessionMessageDeliveryMode"
          },
          "status": {
            "$ref": "#/components/schemas/SessionMessageQueueStatus"
          },
          "ordering_key": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 1.0,
            "title": "Ordering Key"
          },
          "accepted_run_epoch": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Accepted Run Epoch"
          },
          "accepted_transcript_cursor": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Accepted Transcript Cursor"
          },
          "accepted_event_id": {
            "type": "string",
            "title": "Accepted Event Id"
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "title": "Accepted At"
          },
          "requested_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_run_epoch": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered Run Epoch"
          },
          "delivered_transcript_cursor": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9.223372036854776e+18,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered Transcript Cursor"
          },
          "delivered_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered Event Id"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "conditions": {
            "$ref": "#/components/schemas/SessionMessageConditions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "queue_id",
          "session_id",
          "idempotency_key",
          "content",
          "delivery_mode",
          "status",
          "ordering_key",
          "accepted_run_epoch",
          "accepted_transcript_cursor",
          "accepted_event_id",
          "accepted_at"
        ],
        "title": "SessionQueuedMessage",
        "description": "One durable queued user message and its delivery state."
      },
      "SessionStateResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "interrupting",
              "completed",
              "failed",
              "interrupted"
            ],
            "title": "Status"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "last_activity_at": {
            "type": "string",
            "title": "Last Activity At"
          },
          "interruption_cascade": {
            "type": "string",
            "enum": [
              "none",
              "pending",
              "failed"
            ],
            "title": "Interruption Cascade"
          },
          "provider_operation": {
            "$ref": "#/components/schemas/ApiProviderOperationInspection"
          },
          "execution": {
            "$ref": "#/components/schemas/SessionExecutionState"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "status",
          "updated_at",
          "last_activity_at",
          "interruption_cascade",
          "provider_operation",
          "execution"
        ],
        "title": "SessionStateResponse"
      },
      "SessionStatus": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "interrupting",
          "completed",
          "failed",
          "interrupted"
        ],
        "title": "SessionStatus"
      },
      "SessionStatusCounts": {
        "properties": {
          "pending": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Pending"
          },
          "running": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Running"
          },
          "interrupting": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Interrupting"
          },
          "completed": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Completed"
          },
          "failed": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Failed"
          },
          "interrupted": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Interrupted"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pending",
          "running",
          "interrupting",
          "completed",
          "failed",
          "interrupted"
        ],
        "title": "SessionStatusCounts",
        "description": "Complete current-session counts for every lifecycle status."
      },
      "SessionSummaryResponse": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/ApiSession"
          },
          "events": {
            "$ref": "#/components/schemas/ApiEventSummary"
          },
          "transcript": {
            "$ref": "#/components/schemas/TranscriptSummary"
          },
          "outcome": {
            "$ref": "#/components/schemas/ApiSessionOutcome"
          },
          "usage": {
            "$ref": "#/components/schemas/SessionUsageSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session",
          "events",
          "transcript",
          "outcome",
          "usage"
        ],
        "title": "SessionSummaryResponse"
      },
      "SessionTopologyRequest": {
        "properties": {
          "expanded_parent_ids": {
            "items": {
              "type": "string",
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 50,
            "title": "Expanded Parent Ids"
          },
          "child_cursors": {
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096,
              "minLength": 1
            },
            "propertyNames": {
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Child Cursors"
          },
          "ancestor_depth_limit": {
            "type": "integer",
            "maximum": 32.0,
            "minimum": 1.0,
            "title": "Ancestor Depth Limit",
            "default": 32
          },
          "child_limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Child Limit",
            "default": 25
          },
          "linked_task_session_ids": {
            "items": {
              "type": "string",
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 50,
            "title": "Linked Task Session Ids"
          },
          "task_session_cursors": {
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096,
              "minLength": 1
            },
            "propertyNames": {
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Task Session Cursors"
          },
          "expanded_task_parent_ids": {
            "items": {
              "type": "string",
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 50,
            "title": "Expanded Task Parent Ids"
          },
          "task_child_cursors": {
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096,
              "minLength": 1
            },
            "propertyNames": {
              "maxLength": 1024,
              "minLength": 1
            },
            "type": "object",
            "maxProperties": 50,
            "title": "Task Child Cursors"
          },
          "task_session_limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Task Session Limit",
            "default": 25
          },
          "task_child_limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Task Child Limit",
            "default": 25
          },
          "max_result_bytes": {
            "type": "integer",
            "maximum": 4194304.0,
            "minimum": 1024.0,
            "title": "Max Result Bytes",
            "default": 1048576
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SessionTopologyRequest"
      },
      "SessionTopologyResponse": {
        "properties": {
          "scope": {
            "type": "string",
            "const": "session_focus",
            "title": "Scope",
            "default": "session_focus"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "cross_store_atomic": {
            "type": "boolean",
            "const": false,
            "title": "Cross Store Atomic"
          },
          "focus": {
            "$ref": "#/components/schemas/ApiSessionTopologyNode"
          },
          "ancestors": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionTopologyNode"
            },
            "type": "array",
            "maxItems": 32,
            "title": "Ancestors"
          },
          "expanded_parents": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionTopologyNode"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Expanded Parents"
          },
          "branches": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionTopologyBranch"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Branches"
          },
          "unique_node_count": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Unique Node Count"
          },
          "task_projection": {
            "$ref": "#/components/schemas/ApiTaskTopologyProjection"
          },
          "edges": {
            "items": {
              "$ref": "#/components/schemas/ApiExecutionTopologyEdge"
            },
            "type": "array",
            "maxItems": 1500,
            "title": "Edges"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "observed_at",
          "cross_store_atomic",
          "focus",
          "ancestors",
          "expanded_parents",
          "branches",
          "unique_node_count",
          "task_projection",
          "edges"
        ],
        "title": "SessionTopologyResponse"
      },
      "SessionTranscriptResponse": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ApiTranscriptMessage"
            },
            "type": "array",
            "title": "Messages"
          },
          "offset": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Offset"
          },
          "next_offset": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Next Offset"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "total_messages": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Messages"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "messages",
          "offset",
          "next_offset",
          "has_more",
          "total_messages"
        ],
        "title": "SessionTranscriptResponse"
      },
      "SessionUsageEndpointContract": {
        "properties": {
          "supported": {
            "type": "boolean",
            "title": "Supported"
          },
          "method": {
            "type": "string",
            "const": "GET",
            "title": "Method",
            "default": "GET"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "response_schema": {
            "type": "string",
            "const": "SessionUsageSummary",
            "title": "Response Schema",
            "default": "SessionUsageSummary"
          },
          "etag_header": {
            "type": "string",
            "const": "ETag",
            "title": "Etag Header",
            "default": "ETag"
          },
          "conditional_request_header": {
            "type": "string",
            "const": "If-None-Match",
            "title": "Conditional Request Header",
            "default": "If-None-Match"
          },
          "not_modified_status": {
            "type": "integer",
            "const": 304,
            "title": "Not Modified Status",
            "default": 304
          },
          "session_list_include": {
            "type": "string",
            "const": "usage",
            "title": "Session List Include",
            "description": "Pass as `include` on the session list to embed each session's usage.",
            "default": "usage"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "supported",
          "path"
        ],
        "title": "SessionUsageEndpointContract",
        "description": "Exact session token usage, maintained incrementally by the session store."
      },
      "SessionUsageSummary": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "model_steps": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Model Steps",
            "default": 0
          },
          "unmeasured_model_attempts": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Unmeasured Model Attempts",
            "default": 0
          },
          "tool_calls": {
            "type": "integer",
            "maximum": 9.223372036854776e+18,
            "minimum": 0.0,
            "title": "Tool Calls",
            "default": 0
          },
          "provider_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Provider Names"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id"
        ],
        "title": "SessionUsageSummary",
        "description": "Usage totals derived from durable session events."
      },
      "SessionsSummaryBody": {
        "properties": {
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceBook"
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "title": "Currency",
            "default": "USD"
          }
        },
        "type": "object",
        "title": "SessionsSummaryBody"
      },
      "SessionsSummaryResponse": {
        "properties": {
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/ApiSessionSummaryItem"
            },
            "type": "array",
            "title": "Sessions"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "total_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Count"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageSummary"
          },
          "provider_breakdown": {
            "items": {
              "$ref": "#/components/schemas/UsageBreakdownItem"
            },
            "type": "array",
            "title": "Provider Breakdown"
          },
          "model_breakdown": {
            "items": {
              "$ref": "#/components/schemas/UsageBreakdownItem"
            },
            "type": "array",
            "title": "Model Breakdown"
          },
          "cost": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AggregateCostSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_count",
          "sessions",
          "next_cursor",
          "total_count",
          "usage",
          "cost"
        ],
        "title": "SessionsSummaryResponse"
      },
      "SseContract": {
        "properties": {
          "content_type": {
            "type": "string",
            "const": "text/event-stream",
            "title": "Content Type",
            "default": "text/event-stream"
          },
          "event_id_format": {
            "type": "string",
            "const": "session_id:cayu_event_<sequence>",
            "title": "Event Id Format",
            "default": "session_id:cayu_event_<sequence>"
          },
          "replay_header": {
            "type": "string",
            "const": "Last-Event-ID",
            "title": "Replay Header",
            "default": "Last-Event-ID"
          },
          "max_event_id_chars": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Event Id Chars",
            "default": 512
          },
          "mutation_id_header": {
            "type": "string",
            "const": "Cayu-Mutation-ID",
            "title": "Mutation Id Header",
            "default": "Cayu-Mutation-ID"
          },
          "mutation_acceptance_event_type": {
            "type": "string",
            "const": "server.mutation.accepted",
            "title": "Mutation Acceptance Event Type",
            "default": "server.mutation.accepted"
          },
          "replay_start_marker_format": {
            "type": "string",
            "const": "session_id:",
            "title": "Replay Start Marker Format",
            "default": "session_id:"
          },
          "unknown_event_marker_behavior": {
            "type": "string",
            "const": "reject",
            "title": "Unknown Event Marker Behavior",
            "default": "reject"
          },
          "event_data_schema": {
            "type": "string",
            "const": "SseEventEnvelope",
            "title": "Event Data Schema",
            "default": "SseEventEnvelope"
          },
          "error_event_name": {
            "type": "string",
            "const": "error",
            "title": "Error Event Name",
            "default": "error"
          },
          "error_data_schema": {
            "type": "string",
            "const": "SseErrorEnvelope",
            "title": "Error Data Schema",
            "default": "SseErrorEnvelope"
          },
          "max_event_data_bytes": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Event Data Bytes",
            "description": "Maximum UTF-8 bytes in one live SSE event data value.",
            "default": 2097152
          },
          "max_error_text_bytes": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Error Text Bytes",
            "description": "Maximum UTF-8 bytes in the redacted error field.",
            "default": 4096
          },
          "examples": {
            "$ref": "#/components/schemas/SseFrameExamples"
          },
          "session_follow": {
            "$ref": "#/components/schemas/SessionFollowContract"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SseContract"
      },
      "SseErrorEnvelope": {
        "properties": {
          "type": {
            "type": "string",
            "const": "stream.error",
            "title": "Type"
          },
          "kind": {
            "type": "string",
            "enum": [
              "runtime",
              "observer"
            ],
            "title": "Kind"
          },
          "code": {
            "type": "string",
            "enum": [
              "runtime_failed",
              "terminal_event_publication_uncertain",
              "observer_lagged",
              "event_frame_too_large",
              "replay_idle_timeout"
            ],
            "title": "Code"
          },
          "error": {
            "type": "string",
            "title": "Error"
          },
          "error_type": {
            "type": "string",
            "title": "Error Type"
          },
          "retryable": {
            "type": "boolean",
            "title": "Retryable"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "kind",
          "code",
          "error",
          "error_type",
          "retryable",
          "session_id"
        ],
        "title": "SseErrorEnvelope",
        "description": "JSON payload in classified terminal SSE ``event: error`` frames."
      },
      "SseEventEnvelope": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 512,
            "title": "Id"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "interaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Id"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "environment_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment Name"
          },
          "workflow_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Name"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "session_id",
          "interaction_id",
          "agent_name",
          "tool_name",
          "payload",
          "timestamp"
        ],
        "title": "SseEventEnvelope",
        "description": "JSON payload in each runtime event SSE ``data:`` frame."
      },
      "SseFrameExamples": {
        "properties": {
          "event_data": {
            "$ref": "#/components/schemas/SseEventEnvelope"
          },
          "error_data": {
            "$ref": "#/components/schemas/SseErrorEnvelope"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SseFrameExamples"
      },
      "SseSessionFollowEndEnvelope": {
        "properties": {
          "type": {
            "type": "string",
            "const": "session.follow.end",
            "title": "Type"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "interrupting",
              "completed",
              "failed",
              "interrupted"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "session_id",
          "status"
        ],
        "title": "SseSessionFollowEndEnvelope",
        "description": "JSON payload in the final ``event: end`` frame of a session follow stream."
      },
      "StartupRecoveryBlockedSession": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "blocker_codes": {
            "items": {
              "$ref": "#/components/schemas/RecoveryBlockerCode"
            },
            "type": "array",
            "maxItems": 16,
            "minItems": 1,
            "title": "Blocker Codes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "blocker_codes"
        ],
        "title": "StartupRecoveryBlockedSession",
        "description": "Bounded operator evidence; contains no checkpoint or exception content."
      },
      "StartupRecoveryResult": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "completed": {
            "type": "boolean",
            "title": "Completed",
            "default": false
          },
          "status": {
            "type": "string",
            "enum": [
              "not_started",
              "running",
              "completed",
              "failed"
            ],
            "title": "Status",
            "default": "not_started"
          },
          "sweep_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Sweep Count",
            "default": 0
          },
          "scheduled_roots": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Scheduled Roots",
            "default": 0
          },
          "deferred_session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Deferred Session Count",
            "default": 0
          },
          "skipped_session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Skipped Session Count",
            "default": 0
          },
          "blocked_session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Blocked Session Count",
            "default": 0
          },
          "blocked_sessions": {
            "items": {
              "$ref": "#/components/schemas/StartupRecoveryBlockedSession"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Blocked Sessions",
            "default": []
          },
          "blocked_sessions_truncated": {
            "type": "boolean",
            "title": "Blocked Sessions Truncated",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "StartupRecoveryResult",
        "description": "Latest process-local interruption sweep, retaining at most 100 blocked roots."
      },
      "StructuredOutputSpec": {
        "properties": {
          "json_schema": {
            "additionalProperties": true,
            "type": "object",
            "title": "Json Schema"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "max_retries": {
            "type": "integer",
            "maximum": 8.0,
            "minimum": 0.0,
            "title": "Max Retries",
            "default": 2
          },
          "repair_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Repair Prompt"
          },
          "strategy": {
            "$ref": "#/components/schemas/StructuredOutputStrategy",
            "default": "tool"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "json_schema"
        ],
        "title": "StructuredOutputSpec",
        "description": "Provider-neutral JSON structured output requirement."
      },
      "StructuredOutputStrategy": {
        "type": "string",
        "enum": [
          "tool",
          "native"
        ],
        "title": "StructuredOutputStrategy"
      },
      "SystemDeploymentDiagnostics": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "name_status": {
            "type": "string",
            "enum": [
              "available",
              "not_provided",
              "omitted"
            ],
            "title": "Name Status"
          },
          "api_access": {
            "type": "string",
            "enum": [
              "open",
              "authenticated"
            ],
            "title": "Api Access"
          },
          "dashboard_access": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "open",
                  "authenticated"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Dashboard Access"
          },
          "dashboard_enabled": {
            "type": "boolean",
            "title": "Dashboard Enabled"
          },
          "docs_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs Enabled"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name_status",
          "api_access",
          "dashboard_access",
          "dashboard_enabled",
          "docs_enabled"
        ],
        "title": "SystemDeploymentDiagnostics",
        "description": "Bounded resolved server identity and effective access posture."
      },
      "SystemDiagnosticsResponse": {
        "properties": {
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "deployment": {
            "$ref": "#/components/schemas/SystemDeploymentDiagnostics"
          },
          "versions": {
            "$ref": "#/components/schemas/SystemVersionDiagnostics"
          },
          "capabilities": {
            "$ref": "#/components/schemas/ControlPlaneCapabilities"
          },
          "artifact_stores": {
            "$ref": "#/components/schemas/ArtifactStoreDiagnostics"
          },
          "pricing_catalog": {
            "$ref": "#/components/schemas/PricingCatalogDiagnostics"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "observed_at",
          "deployment",
          "versions",
          "capabilities",
          "artifact_stores",
          "pricing_catalog"
        ],
        "title": "SystemDiagnosticsResponse",
        "description": "Protected bounded Cayu configuration and registration diagnostics."
      },
      "SystemVersionDiagnostics": {
        "properties": {
          "cayu": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Cayu"
          },
          "server_contract": {
            "type": "string",
            "maxLength": 32,
            "title": "Server Contract"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cayu",
          "server_contract"
        ],
        "title": "SystemVersionDiagnostics"
      },
      "TaskAggregateFilter": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "parent_task_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Task Id"
          },
          "assigned_agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned Agent Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "TaskAggregateFilter",
        "description": "Current task attributes that may scope a store-native aggregate."
      },
      "TaskExecutionSource": {
        "type": "string",
        "enum": [
          "http_run",
          "product_operation",
          "scheduled",
          "sdk_task",
          "task_dispatch",
          "webhook"
        ],
        "title": "TaskExecutionSource",
        "description": "The trusted boundary that created one durable task."
      },
      "TaskHoldBody": {
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payload"
          }
        },
        "type": "object",
        "title": "TaskHoldBody"
      },
      "TaskMisfirePolicy": {
        "type": "string",
        "enum": [
          "fire_once",
          "skip"
        ],
        "title": "TaskMisfirePolicy"
      },
      "TaskOperationalSnapshot": {
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "title": "As Of"
          },
          "total_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Total Count"
          },
          "counts_by_status": {
            "$ref": "#/components/schemas/TaskStatusCounts"
          },
          "claimable_pending_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Claimable Pending Count"
          },
          "scheduled_pending_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Scheduled Pending Count"
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "as_of",
          "total_count",
          "counts_by_status",
          "claimable_pending_count",
          "scheduled_pending_count",
          "accuracy"
        ],
        "title": "TaskOperationalSnapshot",
        "description": "Exact current task counts captured by one store-local read snapshot."
      },
      "TaskOrder": {
        "type": "string",
        "enum": [
          "created_at_asc",
          "created_at_desc",
          "updated_at_asc",
          "updated_at_desc"
        ],
        "title": "TaskOrder"
      },
      "TaskRescheduleRequest": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "operation_id": {
            "type": "string",
            "title": "Operation Id"
          },
          "expected_revision": {
            "type": "integer",
            "maximum": 9007199254740991.0,
            "minimum": 1.0,
            "title": "Expected Revision"
          },
          "available_at": {
            "type": "string",
            "format": "date-time",
            "title": "Available At"
          },
          "policy": {
            "$ref": "#/components/schemas/TaskSchedulePolicy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_id",
          "operation_id",
          "expected_revision",
          "available_at"
        ],
        "title": "TaskRescheduleRequest",
        "description": "Replace a not-yet-admitted schedule at one expected revision."
      },
      "TaskScheduleCancelRequest": {
        "properties": {
          "task_id": {
            "type": "string",
            "title": "Task Id"
          },
          "operation_id": {
            "type": "string",
            "title": "Operation Id"
          },
          "expected_revision": {
            "type": "integer",
            "maximum": 9007199254740991.0,
            "minimum": 1.0,
            "title": "Expected Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_id",
          "operation_id",
          "expected_revision"
        ],
        "title": "TaskScheduleCancelRequest",
        "description": "Cancel one exact schedule revision without bypassing a live worker."
      },
      "TaskScheduleEventType": {
        "type": "string",
        "enum": [
          "task.scheduled",
          "task.rescheduled",
          "task.schedule_eligible",
          "task.schedule_misfired",
          "task.schedule_expired",
          "task.schedule_skipped",
          "task.schedule_dependency_skipped",
          "task.schedule_claimed",
          "task.schedule_cancellation_requested",
          "task.schedule_cancelled",
          "task.schedule_started",
          "task.schedule_held",
          "task.schedule_resumed",
          "task.schedule_completed",
          "task.schedule_failed"
        ],
        "title": "TaskScheduleEventType"
      },
      "TaskSchedulePolicy": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "misfire_policy": {
            "$ref": "#/components/schemas/TaskMisfirePolicy",
            "default": "fire_once"
          },
          "misfire_grace_seconds": {
            "type": "integer",
            "maximum": 31622400.0,
            "minimum": 0.0,
            "title": "Misfire Grace Seconds",
            "default": 60
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "TaskSchedulePolicy",
        "description": "An optional latest admission time and deterministic late-arrival policy.\n\n``expires_at`` is exclusive. A task observed exactly at expiry cannot be\nadmitted. Lateness strictly greater than the grace interval is a misfire;\nequality stays eligible. Expiry takes precedence over the misfire policy."
      },
      "TaskStatus": {
        "type": "string",
        "enum": [
          "pending",
          "waiting_dependencies",
          "waiting_group",
          "dependency_skipped",
          "claimed",
          "running",
          "paused",
          "blocked",
          "needs_attention",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "TaskStatus"
      },
      "TaskStatusCounts": {
        "properties": {
          "pending": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Pending"
          },
          "waiting_dependencies": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Waiting Dependencies",
            "default": "0"
          },
          "waiting_group": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Waiting Group",
            "default": "0"
          },
          "dependency_skipped": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Dependency Skipped",
            "default": "0"
          },
          "claimed": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Claimed"
          },
          "running": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Running"
          },
          "paused": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Paused"
          },
          "blocked": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Blocked"
          },
          "needs_attention": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Needs Attention"
          },
          "completed": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Completed"
          },
          "failed": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Failed"
          },
          "cancelled": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Cancelled"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "pending",
          "claimed",
          "running",
          "paused",
          "blocked",
          "needs_attention",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "TaskStatusCounts",
        "description": "Complete current-task counts for every lifecycle status."
      },
      "TextPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextPart"
      },
      "ThinkingConfig": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "effort": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minimal",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Effort"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "include_in_transcript": {
            "type": "boolean",
            "title": "Include In Transcript",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ThinkingConfig",
        "description": "Provider-neutral thinking/reasoning configuration.\n\nEffort names are native values, not a portable scale. Supported vocabulary is\n``none``, ``minimal``, ``low``, ``medium``, ``high``, ``xhigh``, and ``max``;\nadapters reject known incompatible model/transport combinations before dispatch.\nUnknown model compatibility remains backend-dependent. ``xlow`` is not a verified\nnative value in the maintained adapters and is not an alias for ``minimal``.\n\nExplicit effort maps unchanged to OpenAI ``reasoning.effort``, compatible Chat\nCompletions ``reasoning_effort``, or Anthropic adaptive thinking plus\n``output_config.effort``. Bedrock Converse has no typed effort mapping and rejects\nit. See ``cayu guide thinking`` for the matrix.\n\n``none`` requests the backend's native non-reasoning effort; ``minimal`` still\npermits reasoning. Both require ``enabled=True`` (the default), which enables\nthis configuration, not a promise that the model thinks. Neither is silently\nmapped to ``enabled=False``. The latter retains its historical best-effort\nbehavior: Anthropic disables thinking; OpenAI and generic Chat Completions no-op.\n\n``effort`` and ``max_tokens`` are mutually exclusive. A token budget selects\nAnthropic legacy thinking (OpenAI and generic Chat Completions historically\nignore it). Disabling thinking cannot be combined with either control. With\nneither control, enabled thinking uses existing provider defaults. Typed effort\nwins over conflicting raw effort; unrelated provider options remain intact."
      },
      "ThinkingPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "thinking",
            "title": "Type",
            "default": "thinking"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "default": ""
          },
          "provider_state": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider State"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ThinkingPart",
        "description": "Model reasoning/thinking content from a single reasoning block.\n\n`text` may be empty (the provider returned the reasoning in an omitted/redacted\nform). `provider_state` carries the opaque round-trip payload \u2014 the Anthropic\n`signature` or `redacted_thinking` data, or an OpenAI encrypted reasoning blob \u2014\nneeded to send the block back to the provider on a later turn. Built-in providers\ntag opaque reasoning state with its provider family, protocol, and protocol version;\nrequest adapters replay it only when all three match. Legacy untagged state remains\nreadable in the durable transcript but is not authoritative for opaque replay."
      },
      "TieredPricing": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency",
            "default": "USD"
          },
          "standard": {
            "items": {
              "$ref": "#/components/schemas/PriceTier"
            },
            "type": "array",
            "minItems": 1,
            "title": "Standard"
          },
          "batch": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceTier"
              },
              {
                "type": "null"
              }
            ]
          },
          "cache_write_5m_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 5M Per Million"
          },
          "cache_write_1h_per_million": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Per Million"
          },
          "web_search_per_thousand": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search Per Thousand"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "standard"
        ],
        "title": "TieredPricing",
        "description": "Full pricing for one model: context-band tiers plus optional batch and\ncache-write-duration rates.\n\nOnly the context-band ``standard`` tiers feed the cost engine today. A tier-local\ncache-write rate takes precedence over the model-wide\n``cache_write_5m_per_million`` fallback.\n``batch`` is carried for completeness and future use. Contextual pricing\napplies ``cache_write_1h_per_million`` only to usage explicitly attributed\nto a one-hour cache write."
      },
      "ToolApprovalBody": {
        "properties": {
          "review_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "approval_id": {
            "type": "string",
            "minLength": 1,
            "title": "Approval Id"
          },
          "tool_round_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Round Id"
          },
          "tool_call_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Call Id"
          },
          "decision": {
            "$ref": "#/components/schemas/ToolApprovalDecision"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Steps"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_limits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BudgetLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "approval_id",
          "tool_round_id",
          "tool_call_id",
          "decision"
        ],
        "title": "ToolApprovalBody",
        "description": "Body for resolving a pending tool approval.\n\n``max_steps``, ``limits``, ``budget_limits``, and ``retry_policy`` default\nto ``None``: the resumed run inherits the original run's configuration\npersisted on the pending approval. Explicit values are accepted only when\nthey preserve the invocation's frozen execution profile."
      },
      "ToolApprovalDecision": {
        "type": "string",
        "enum": [
          "approve",
          "deny"
        ],
        "title": "ToolApprovalDecision"
      },
      "ToolApprovalRecoveryBody": {
        "properties": {
          "review_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "approval_id": {
            "type": "string",
            "minLength": 1,
            "title": "Approval Id"
          },
          "tool_round_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Round Id"
          },
          "tool_call_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Call Id"
          },
          "outcome": {
            "$ref": "#/components/schemas/ToolApprovalRecoveryOutcome"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "title": "Message"
          },
          "structured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Structured"
          },
          "artifacts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Steps"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_limits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BudgetLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "approval_id",
          "tool_round_id",
          "tool_call_id",
          "outcome",
          "message"
        ],
        "title": "ToolApprovalRecoveryBody",
        "description": "Body for recovering an approved tool call with an unknown result.\n\n``max_steps``, ``limits``, ``budget_limits``, and ``retry_policy`` default\nto ``None``: the resumed run inherits the original run's configuration\npersisted on the pending approval. Explicit values are accepted only when\nthey preserve the invocation's frozen execution profile."
      },
      "ToolApprovalRecoveryOutcome": {
        "type": "string",
        "enum": [
          "completed",
          "failed"
        ],
        "title": "ToolApprovalRecoveryOutcome"
      },
      "ToolCallPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_call",
            "title": "Type",
            "default": "tool_call"
          },
          "tool_call_id": {
            "type": "string",
            "title": "Tool Call Id"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "arguments": {
            "additionalProperties": true,
            "type": "object",
            "title": "Arguments"
          },
          "arguments_state": {
            "type": "string",
            "enum": [
              "finalized",
              "unavailable"
            ],
            "title": "Arguments State",
            "default": "finalized"
          },
          "tool_round_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Round Id"
          },
          "model_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Step Id"
          },
          "model_attempt_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Attempt Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool_call_id",
          "tool_name"
        ],
        "title": "ToolCallPart"
      },
      "ToolCompletionPolicy": {
        "properties": {
          "tool_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 64,
            "minItems": 1,
            "title": "Tool Names"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool_names"
        ],
        "title": "ToolCompletionPolicy",
        "description": "Complete a single-call round from a designated successful tool.\n\nThe host renders the tool result. Eligible application tools declare\n``NONE`` or ``IDEMPOTENT`` effects. Rounds with sibling calls continue\nthrough the ordinary model loop. Supply this policy on each new run or\nresumed turn; approval and crash recovery retain the admitted policy."
      },
      "ToolCompletionResult": {
        "properties": {
          "reason": {
            "type": "string",
            "const": "host_rendered_tool",
            "title": "Reason",
            "default": "host_rendered_tool"
          },
          "status": {
            "type": "string",
            "const": "completed",
            "title": "Status",
            "default": "completed"
          },
          "call": {
            "$ref": "#/components/schemas/ToolCallPart"
          },
          "effect": {
            "$ref": "#/components/schemas/ToolEffect"
          },
          "result": {
            "$ref": "#/components/schemas/ToolResultPart"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "call",
          "effect",
          "result"
        ],
        "title": "ToolCompletionResult",
        "description": "Detached host-rendering basis from the canonical published tool outcome."
      },
      "ToolDiscoveryGrantInspection": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "tool_id": {
            "type": "string",
            "title": "Tool Id"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "descriptor_version": {
            "type": "string",
            "title": "Descriptor Version"
          },
          "schema_fingerprint": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$",
            "title": "Schema Fingerprint"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "discovered_revision": {
            "type": "integer",
            "maximum": 256.0,
            "minimum": 1.0,
            "title": "Discovered Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool_id",
          "tool_name",
          "descriptor_version",
          "schema_fingerprint",
          "created_at",
          "discovered_revision"
        ],
        "title": "ToolDiscoveryGrantInspection",
        "description": "Content-minimized discovery grant state safe for control-plane reads."
      },
      "ToolDiscoveryViewInspection": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "generation_id": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$",
            "title": "Generation Id"
          },
          "agent_name": {
            "type": "string",
            "title": "Agent Name"
          },
          "catalogue_revision": {
            "type": "string",
            "title": "Catalogue Revision"
          },
          "ceiling_fingerprint": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$",
            "title": "Ceiling Fingerprint"
          },
          "revision": {
            "type": "integer",
            "maximum": 256.0,
            "minimum": 0.0,
            "title": "Revision"
          },
          "grant_count": {
            "type": "integer",
            "maximum": 256.0,
            "minimum": 0.0,
            "title": "Grant Count"
          },
          "grants": {
            "items": {
              "$ref": "#/components/schemas/ToolDiscoveryGrantInspection"
            },
            "type": "array",
            "title": "Grants",
            "default": []
          },
          "grants_truncated": {
            "type": "boolean",
            "title": "Grants Truncated"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "generation_id",
          "agent_name",
          "catalogue_revision",
          "ceiling_fingerprint",
          "revision",
          "grant_count",
          "grants_truncated"
        ],
        "title": "ToolDiscoveryViewInspection",
        "description": "Bounded current-view projection without schemas or callable references."
      },
      "ToolEffect": {
        "type": "string",
        "enum": [
          "none",
          "idempotent",
          "external"
        ],
        "title": "ToolEffect",
        "description": "Declared side-effect semantics for a tool execution.\n\nClassify what replay can do to externally meaningful durable state. ``NONE``\ndoes not mutate it, ``IDEMPOTENT`` may mutate it but a stable downstream\nidentity or equivalent contract collapses replay, and ``EXTERNAL`` has a\nnon-idempotent or outcome-ambiguous durable mutation. Transport, billing,\nobservability, and names such as \"read\" do not determine the value.\n\nThe runtime uses this as execution metadata, not as an authorization\ndecision: policy still decides whether a call may run. Run\n``cayu guide tool-effects`` for the canonical decision table."
      },
      "ToolResultPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_result",
            "title": "Type",
            "default": "tool_result"
          },
          "tool_call_id": {
            "type": "string",
            "title": "Tool Call Id"
          },
          "tool_name": {
            "type": "string",
            "title": "Tool Name"
          },
          "content": {
            "type": "string",
            "title": "Content",
            "default": ""
          },
          "structured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Structured"
          },
          "artifacts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "is_error": {
            "type": "boolean",
            "title": "Is Error",
            "default": false
          },
          "tool_round_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Round Id"
          },
          "model_step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Step Id"
          },
          "model_attempt_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Attempt Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool_call_id",
          "tool_name"
        ],
        "title": "ToolResultPart"
      },
      "ToolRoundRecoveryBody": {
        "properties": {
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "round_id": {
            "type": "string",
            "minLength": 1,
            "title": "Round Id"
          },
          "tool_call_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Call Id"
          },
          "outcome": {
            "$ref": "#/components/schemas/ToolApprovalRecoveryOutcome"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "title": "Message"
          },
          "structured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Structured"
          },
          "artifacts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Steps"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_limits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BudgetLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "round_id",
          "tool_call_id",
          "outcome",
          "message"
        ],
        "title": "ToolRoundRecoveryBody",
        "description": "Body for recovering a crashed ordinary tool call with an operator outcome.\n\n``max_steps``, ``limits``, ``budget_limits``, and ``retry_policy`` default\nto ``None``, which restores the configuration persisted with the pending\ntool round. An explicit value is accepted only when it preserves the\ninvocation's frozen execution profile."
      },
      "TranscriptSummary": {
        "properties": {
          "total_messages": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Total Messages"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total_messages"
        ],
        "title": "TranscriptSummary"
      },
      "UpdateSessionLabelsBody": {
        "properties": {
          "labels": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Labels"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "labels"
        ],
        "title": "UpdateSessionLabelsBody"
      },
      "UpdateSessionMetadataBody": {
        "properties": {
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata",
            "description": "Complete replacement for user-authored session metadata. Cayu-owned entries are preserved by the store and must not be supplied."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "metadata"
        ],
        "title": "UpdateSessionMetadataBody"
      },
      "UsageAggregateBreakdown": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UsageAggregateGroup"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Groups"
          },
          "remainder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageAggregateRemainder"
              },
              {
                "type": "null"
              }
            ]
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "groups",
          "remainder",
          "accuracy"
        ],
        "title": "UsageAggregateBreakdown",
        "description": "Deterministic top groups plus an exact remainder when detail is bounded."
      },
      "UsageAggregateGroup": {
        "properties": {
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageAggregateTotals"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "model",
          "totals"
        ],
        "title": "UsageAggregateGroup",
        "description": "One provider/model grouping inside a bounded usage breakdown."
      },
      "UsageAggregateRemainder": {
        "properties": {
          "group_count": {
            "type": "string",
            "pattern": "^[1-9]\\d*$",
            "title": "Group Count"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageAggregateTotals"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "group_count",
          "totals"
        ],
        "title": "UsageAggregateRemainder",
        "description": "Exact totals represented by groups omitted from a bounded breakdown."
      },
      "UsageAggregateTotals": {
        "properties": {
          "session_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Session Count"
          },
          "model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps"
          },
          "model_steps_with_usage": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps With Usage"
          },
          "tool_calls": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Tool Calls"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_count",
          "model_steps",
          "model_steps_with_usage",
          "tool_calls",
          "usage"
        ],
        "title": "UsageAggregateTotals",
        "description": "Identity-free activity and token totals for one aggregate scope."
      },
      "UsageBillingCostBreakdown": {
        "properties": {
          "identified_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Identified Model Steps"
          },
          "identified_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Identified Auxiliary Attempts",
            "default": "0"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UsageBillingCostGroup"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Groups"
          },
          "remainder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageBillingCostRemainder"
              },
              {
                "type": "null"
              }
            ]
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "identified_model_steps",
          "groups",
          "remainder",
          "accuracy"
        ],
        "title": "UsageBillingCostBreakdown",
        "description": "Bounded identity detail for evaluated cost inputs, with an exact remainder."
      },
      "UsageBillingCostGroup": {
        "properties": {
          "billing_identity": {
            "$ref": "#/components/schemas/UsageBillingIdentity"
          },
          "pricing_provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Provider Name"
          },
          "pricing_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pricing Model"
          },
          "priced": {
            "type": "boolean",
            "title": "Priced"
          },
          "model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps"
          },
          "auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Auxiliary Attempts",
            "default": "0"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          },
          "missing_pricing_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Missing Pricing Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "billing_identity",
          "priced",
          "model_steps",
          "total_cost"
        ],
        "title": "UsageBillingCostGroup",
        "description": "One bounded, identity-bearing group of equivalent pricing outcomes."
      },
      "UsageBillingCostRemainder": {
        "properties": {
          "group_count": {
            "type": "string",
            "pattern": "^[1-9]\\d*$",
            "title": "Group Count"
          },
          "model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps"
          },
          "auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Auxiliary Attempts",
            "default": "0"
          },
          "priced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Auxiliary Attempts",
            "default": "0"
          },
          "unpriced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Auxiliary Attempts",
            "default": "0"
          },
          "priced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Model Steps"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "group_count",
          "model_steps",
          "priced_model_steps",
          "unpriced_model_steps"
        ],
        "title": "UsageBillingCostRemainder",
        "description": "Exact counts for identity-bearing pricing groups omitted from bounded detail."
      },
      "UsageBillingIdentity": {
        "properties": {
          "provider_name": {
            "type": "string",
            "title": "Provider Name"
          },
          "resource_id": {
            "type": "string",
            "title": "Resource Id"
          },
          "request_evidence": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "maxProperties": 4,
            "title": "Request Evidence"
          },
          "completion_evidence": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "maxProperties": 1,
            "title": "Completion Evidence"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "resource_id"
        ],
        "title": "UsageBillingIdentity",
        "description": "Bounded commercial identity safe to return in an aggregate response."
      },
      "UsageBreakdownItem": {
        "properties": {
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "session_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Session Count"
          },
          "model_steps": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Model Steps"
          },
          "usage": {
            "$ref": "#/components/schemas/AggregateUsageMetrics"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider_name",
          "model",
          "session_count",
          "model_steps",
          "usage"
        ],
        "title": "UsageBreakdownItem"
      },
      "UsageCostRollup": {
        "properties": {
          "price_book_version": {
            "type": "string",
            "title": "Price Book Version"
          },
          "price_book_generated_at": {
            "type": "string",
            "title": "Price Book Generated At"
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          },
          "evaluated_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Evaluated Model Steps"
          },
          "evaluated_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Evaluated Auxiliary Attempts",
            "default": "0"
          },
          "priced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Auxiliary Attempts",
            "default": "0"
          },
          "unpriced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Auxiliary Attempts",
            "default": "0"
          },
          "priced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Model Steps"
          },
          "unevaluated_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unevaluated Model Steps"
          },
          "currencies": {
            "items": {
              "$ref": "#/components/schemas/UsageCurrencyCost"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Currencies"
          },
          "unpriced_reasons": {
            "items": {
              "$ref": "#/components/schemas/UsageUnpricedReason"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Unpriced Reasons"
          },
          "billing_breakdown": {
            "$ref": "#/components/schemas/UsageBillingCostBreakdown"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "price_book_version",
          "price_book_generated_at",
          "accuracy",
          "evaluated_model_steps",
          "priced_model_steps",
          "unpriced_model_steps",
          "unevaluated_model_steps",
          "currencies",
          "unpriced_reasons",
          "billing_breakdown"
        ],
        "title": "UsageCostRollup",
        "description": "Bounded cost result derived from grouped price-relevant inputs."
      },
      "UsageCurrencyCost": {
        "properties": {
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps"
          },
          "auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Auxiliary Attempts",
            "default": "0"
          },
          "hosted_resources": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Hosted Resources",
            "default": "0"
          },
          "total_cost": {
            "type": "string",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total Cost"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "currency",
          "model_steps",
          "total_cost"
        ],
        "title": "UsageCurrencyCost",
        "description": "Exact estimated model-step and hosted-resource cost for one currency."
      },
      "UsageRollupRequest": {
        "properties": {
          "start_at": {
            "type": "string",
            "format": "date-time",
            "title": "Start At"
          },
          "end_at": {
            "type": "string",
            "format": "date-time",
            "title": "End At"
          },
          "session_filter": {
            "$ref": "#/components/schemas/SessionAggregateFilter"
          },
          "group_limit": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Group Limit",
            "description": "Maximum returned groups, applied independently to provider, model, and billing identity breakdowns. Omitted groups are represented by an explicit remainder.",
            "default": 20
          },
          "session_group_limit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Group Limit",
            "description": "Opt-in maximum number of per-session usage groups. Omitted matching sessions are represented by an exact aggregate remainder. When omitted, stores perform no per-session breakdown or session-aware pricing work."
          },
          "pricing_input_limit": {
            "type": "integer",
            "maximum": 5000.0,
            "minimum": 1.0,
            "title": "Pricing Input Limit",
            "description": "Maximum canonical price-input groups, applied independently to the shared projection and, when session_group_limit is present, the session-aware projection.",
            "default": 1000
          },
          "pricing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceBook"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional bounded price book. The serialized value may contain at most 2 MiB, 500 prices, 2,000 price match rules, 1,000 resource mappings, 100 contextual requirements, and 2,000 contextual selector values. Each currency identity may contain at most 64 UTF-8 bytes. The price-input limit multiplied by the resolution candidates may not exceed 500,000."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "start_at",
          "end_at"
        ],
        "title": "UsageRollupRequest"
      },
      "UsageRollupResponse": {
        "properties": {
          "reported_costs": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportedCostPage"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string",
            "const": "configured_session_store",
            "title": "Scope"
          },
          "time_basis": {
            "type": "string",
            "const": "event.timestamp",
            "title": "Time Basis"
          },
          "session_filter_basis": {
            "type": "string",
            "const": "current_session_attributes",
            "title": "Session Filter Basis"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "title": "As Of"
          },
          "start_at": {
            "type": "string",
            "format": "date-time",
            "title": "Start At"
          },
          "end_at": {
            "type": "string",
            "format": "date-time",
            "title": "End At"
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          },
          "matching_session_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Matching Session Count"
          },
          "active_session_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Active Session Count"
          },
          "includes_active_sessions": {
            "type": "boolean",
            "title": "Includes Active Sessions"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageAggregateTotals"
          },
          "provider_breakdown": {
            "$ref": "#/components/schemas/UsageAggregateBreakdown"
          },
          "model_breakdown": {
            "$ref": "#/components/schemas/UsageAggregateBreakdown"
          },
          "cost": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageCostRollup"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_breakdown": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageSessionAggregateBreakdown"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_cost_breakdown": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageSessionCostBreakdown"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "scope",
          "time_basis",
          "session_filter_basis",
          "as_of",
          "start_at",
          "end_at",
          "accuracy",
          "matching_session_count",
          "active_session_count",
          "includes_active_sessions",
          "totals",
          "provider_breakdown",
          "model_breakdown",
          "cost"
        ],
        "title": "UsageRollupResponse"
      },
      "UsageSessionAggregateBreakdown": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UsageSessionAggregateGroup"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Groups"
          },
          "remainder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageSessionAggregateRemainder"
              },
              {
                "type": "null"
              }
            ]
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "groups",
          "remainder",
          "accuracy"
        ],
        "title": "UsageSessionAggregateBreakdown",
        "description": "Deterministic session groups plus an exact aggregate remainder."
      },
      "UsageSessionAggregateGroup": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "interrupting",
              "completed",
              "failed",
              "interrupted"
            ],
            "title": "Status"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageAggregateTotals"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "status",
          "active",
          "totals"
        ],
        "title": "UsageSessionAggregateGroup",
        "description": "Exact usage for one retained current session inside a bounded breakdown."
      },
      "UsageSessionAggregateRemainder": {
        "properties": {
          "group_count": {
            "type": "string",
            "pattern": "^[1-9]\\d*$",
            "title": "Group Count"
          },
          "active_session_count": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Active Session Count"
          },
          "totals": {
            "$ref": "#/components/schemas/UsageAggregateTotals"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "group_count",
          "active_session_count",
          "totals"
        ],
        "title": "UsageSessionAggregateRemainder",
        "description": "Exact usage represented by current sessions omitted from bounded detail."
      },
      "UsageSessionCostBreakdown": {
        "properties": {
          "price_book_version": {
            "type": "string",
            "title": "Price Book Version"
          },
          "price_book_generated_at": {
            "type": "string",
            "title": "Price Book Generated At"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UsageSessionCostGroup"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Groups"
          },
          "remainder": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageSessionCostRemainder"
              },
              {
                "type": "null"
              }
            ]
          },
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "price_book_version",
          "price_book_generated_at",
          "groups",
          "remainder",
          "accuracy"
        ],
        "title": "UsageSessionCostBreakdown",
        "description": "Bounded per-session costs plus an aggregate remainder."
      },
      "UsageSessionCostGroup": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "cost": {
            "$ref": "#/components/schemas/UsageSessionCostSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "session_id",
          "cost"
        ],
        "title": "UsageSessionCostGroup",
        "description": "Cost accounting for one retained session."
      },
      "UsageSessionCostRemainder": {
        "properties": {
          "group_count": {
            "type": "string",
            "pattern": "^[1-9]\\d*$",
            "title": "Group Count"
          },
          "cost": {
            "$ref": "#/components/schemas/UsageSessionCostSummary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "group_count",
          "cost"
        ],
        "title": "UsageSessionCostRemainder",
        "description": "Exact aggregate cost for sessions omitted from bounded detail."
      },
      "UsageSessionCostSummary": {
        "properties": {
          "accuracy": {
            "$ref": "#/components/schemas/AggregateAccuracy"
          },
          "evaluated_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Evaluated Model Steps"
          },
          "evaluated_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Evaluated Auxiliary Attempts",
            "default": "0"
          },
          "priced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Auxiliary Attempts",
            "default": "0"
          },
          "unpriced_auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Auxiliary Attempts",
            "default": "0"
          },
          "priced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Priced Model Steps"
          },
          "unpriced_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unpriced Model Steps"
          },
          "unevaluated_model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Unevaluated Model Steps"
          },
          "currencies": {
            "items": {
              "$ref": "#/components/schemas/UsageCurrencyCost"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Currencies"
          },
          "unpriced_reasons": {
            "items": {
              "$ref": "#/components/schemas/UsageUnpricedReason"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Unpriced Reasons"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "accuracy",
          "evaluated_model_steps",
          "priced_model_steps",
          "unpriced_model_steps",
          "unevaluated_model_steps",
          "currencies",
          "unpriced_reasons"
        ],
        "title": "UsageSessionCostSummary",
        "description": "Cost accounting for one session group or the exact omitted remainder."
      },
      "UsageUnpricedReason": {
        "properties": {
          "unpriced_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "missing_usage",
                  "missing_pricing",
                  "unsupported_pricing"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Unpriced Reason"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "model_steps": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Model Steps"
          },
          "auxiliary_attempts": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Auxiliary Attempts",
            "default": "0"
          },
          "hosted_resources": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d*)$",
            "title": "Hosted Resources",
            "default": "0"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reason",
          "model_steps"
        ],
        "title": "UsageUnpricedReason",
        "description": "Model-step and hosted-resource counts unpriced for one explicit reason."
      },
      "UserInputRecoveryBody": {
        "properties": {
          "review_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "answer_review_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "input_id": {
            "type": "string",
            "minLength": 1,
            "title": "Input Id"
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "title": "Answer"
          },
          "tool_call_id": {
            "type": "string",
            "minLength": 1,
            "title": "Tool Call Id"
          },
          "outcome": {
            "$ref": "#/components/schemas/ToolApprovalRecoveryOutcome"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "title": "Message"
          },
          "structured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Structured"
          },
          "artifacts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Steps"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_limits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BudgetLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "input_id",
          "answer",
          "tool_call_id",
          "outcome",
          "message"
        ],
        "title": "UserInputRecoveryBody",
        "description": "Body for recovering a user-input round stuck on ``manual_recovery_required``.\n\n``max_steps``, ``limits``, ``budget_limits``, and ``retry_policy`` default to ``None``: the\nresumed run inherits the original run's configuration persisted on the pending user input.\nExplicit values are accepted only when they preserve the invocation's frozen execution\nprofile."
      },
      "UserInputResolveBody": {
        "properties": {
          "review_reference": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HumanReviewReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string",
            "minLength": 1,
            "title": "Session Id"
          },
          "task_worker_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Worker Id"
          },
          "task_handoff_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Task Handoff Id"
          },
          "input_id": {
            "type": "string",
            "minLength": 1,
            "title": "Input Id"
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "title": "Answer"
          },
          "structured": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Structured"
          },
          "artifacts": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Artifacts"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "resolved_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolutionActor"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Steps"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RunLimits"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_limits": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BudgetLimit"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Limits"
          },
          "retry_policy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RetryPolicy"
              },
              {
                "type": "null"
              }
            ]
          },
          "structured_output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StructuredOutputSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ThinkingConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "input_id",
          "answer"
        ],
        "title": "UserInputResolveBody",
        "description": "Body for answering a session paused by ``ask_user``.\n\n``max_steps``, ``limits``, ``budget_limits``, and ``retry_policy`` default to ``None``: the\nresumed run inherits the original run's configuration persisted on the pending user input.\nExplicit values are accepted only when they preserve the invocation's frozen execution\nprofile."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VersioningContract": {
        "properties": {
          "contract_version": {
            "type": "string",
            "title": "Contract Version",
            "default": "48"
          },
          "compatibility": {
            "type": "string",
            "const": "additive-with-explicit-breaking-review",
            "title": "Compatibility",
            "default": "additive-with-explicit-breaking-review"
          },
          "breaking_change_requires": {
            "items": {
              "type": "string",
              "enum": [
                "openapi_snapshot_update",
                "client_regeneration",
                "migration_note"
              ]
            },
            "type": "array",
            "title": "Breaking Change Requires",
            "default": [
              "openapi_snapshot_update",
              "client_regeneration",
              "migration_note"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "VersioningContract"
      },
      "WebSearchAPISource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "api",
            "title": "Type",
            "default": "api"
          },
          "name": {
            "type": "string",
            "maxLength": 1024,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "WebSearchAPISource",
        "description": "Named API evidence returned by hosted search, without a fabricated URL."
      },
      "WebSearchAction": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "search",
              "open_page",
              "find_in_page"
            ],
            "title": "Type"
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "queries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Queries",
            "default": []
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "pattern": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4096
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          },
          "sources": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebSearchSource"
                },
                {
                  "$ref": "#/components/schemas/WebSearchAPISource"
                }
              ]
            },
            "type": "array",
            "maxItems": 100,
            "title": "Sources",
            "default": []
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "WebSearchAction",
        "description": "Bounded terminal evidence; optional provider details may be absent."
      },
      "WebSearchSource": {
        "properties": {
          "type": {
            "type": "string",
            "const": "url",
            "title": "Type",
            "default": "url"
          },
          "url": {
            "type": "string",
            "maxLength": 4096,
            "title": "Url"
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url"
        ],
        "title": "WebSearchSource",
        "description": "Bounded URL source returned by a provider-hosted web search."
      }
    }
  }
}
