{
  "components": {
    "schemas": {
      "CaseHistory": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Items",
            "type": "array"
          },
          "next": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next"
          }
        },
        "required": [
          "items",
          "next"
        ],
        "title": "CaseHistory",
        "type": "object"
      },
      "CasePage": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CaseView"
            },
            "title": "Items",
            "type": "array"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next"
          }
        },
        "required": [
          "items",
          "next"
        ],
        "title": "CasePage",
        "type": "object"
      },
      "CaseView": {
        "additionalProperties": false,
        "properties": {
          "app_key": {
            "title": "App Key",
            "type": "string"
          },
          "case_id": {
            "title": "Case Id",
            "type": "string"
          },
          "decision": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decision"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "input": {
            "$ref": "#/components/schemas/EvaluationRequest"
          },
          "major_version": {
            "title": "Major Version",
            "type": "integer"
          },
          "prediction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvaluationResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "default": false,
            "title": "Replayed",
            "type": "boolean"
          },
          "revision": {
            "title": "Revision",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "version": {
            "additionalProperties": true,
            "title": "Version",
            "type": "object"
          }
        },
        "required": [
          "case_id",
          "app_key",
          "major_version",
          "revision",
          "status",
          "version",
          "input",
          "prediction",
          "decision",
          "error_code"
        ],
        "title": "CaseView",
        "type": "object"
      },
      "Column": {
        "additionalProperties": false,
        "properties": {
          "key": {
            "maxLength": 100,
            "pattern": "^[a-z][a-z0-9_]*$",
            "title": "Key",
            "type": "string"
          },
          "nullable": {
            "default": false,
            "title": "Nullable",
            "type": "boolean"
          },
          "tolerance": {
            "default": "0",
            "title": "Tolerance",
            "type": "string"
          },
          "type": {
            "enum": [
              "string",
              "decimal",
              "integer",
              "boolean"
            ],
            "title": "Type",
            "type": "string"
          },
          "unit": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          }
        },
        "required": [
          "key",
          "type"
        ],
        "title": "Column",
        "type": "object"
      },
      "Difference": {
        "additionalProperties": false,
        "properties": {
          "actual": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "column": {
            "title": "Column",
            "type": "string"
          },
          "expected": {
            "$ref": "#/components/schemas/JsonValue"
          },
          "key": {
            "items": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "title": "Key",
            "type": "array"
          }
        },
        "required": [
          "key",
          "column",
          "expected",
          "actual"
        ],
        "title": "Difference",
        "type": "object"
      },
      "EvaluationRequest": {
        "additionalProperties": false,
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/Snapshot"
          }
        },
        "required": [
          "snapshot"
        ],
        "title": "EvaluationRequest",
        "type": "object"
      },
      "EvaluationResult": {
        "additionalProperties": false,
        "properties": {
          "actual_digest": {
            "title": "Actual Digest",
            "type": "string"
          },
          "actual_rows": {
            "title": "Actual Rows",
            "type": "integer"
          },
          "differences": {
            "items": {
              "$ref": "#/components/schemas/Difference"
            },
            "title": "Differences",
            "type": "array"
          },
          "differences_truncated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Differences Truncated"
          },
          "different_values": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Different Values"
          },
          "duplicate_actual": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duplicate Actual"
          },
          "duplicate_expected": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duplicate Expected"
          },
          "expected_digest": {
            "title": "Expected Digest",
            "type": "string"
          },
          "expected_rows": {
            "title": "Expected Rows",
            "type": "integer"
          },
          "extra_rows": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra Rows"
          },
          "missing_rows": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Missing Rows"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "state": {
            "enum": [
              "equal",
              "different",
              "unverified"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state",
          "expected_rows",
          "actual_rows",
          "expected_digest",
          "actual_digest",
          "differences"
        ],
        "title": "EvaluationResult",
        "type": "object"
      },
      "ExtractResult": {
        "additionalProperties": false,
        "properties": {
          "complete": {
            "title": "Complete",
            "type": "boolean"
          },
          "customer_certified": {
            "const": false,
            "default": false,
            "title": "Customer Certified",
            "type": "boolean"
          },
          "decision": {
            "const": "pending",
            "title": "Decision",
            "type": "string"
          },
          "document_type": {
            "title": "Document Type",
            "type": "string"
          },
          "document_version_id": {
            "title": "Document Version Id",
            "type": "string"
          },
          "fields": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Fields",
            "type": "array"
          },
          "issues": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Issues",
            "type": "array"
          },
          "parser_revision": {
            "title": "Parser Revision",
            "type": "string"
          },
          "rows": {
            "items": {
              "additionalProperties": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          },
          "run_id": {
            "title": "Run Id",
            "type": "string"
          },
          "template_version": {
            "title": "Template Version",
            "type": "integer"
          },
          "usage": {
            "$ref": "#/components/schemas/ExtractionUsage"
          }
        },
        "required": [
          "run_id",
          "document_version_id",
          "parser_revision",
          "complete",
          "issues",
          "fields",
          "rows",
          "decision",
          "document_type",
          "template_version",
          "usage"
        ],
        "title": "ExtractResult",
        "type": "object"
      },
      "ExtractionUsage": {
        "additionalProperties": false,
        "properties": {
          "documents": {
            "minimum": 0.0,
            "title": "Documents",
            "type": "integer"
          },
          "llm_tokens": {
            "minimum": 0.0,
            "title": "Llm Tokens",
            "type": "integer"
          },
          "llm_tokens_estimated": {
            "minimum": 0.0,
            "title": "Llm Tokens Estimated",
            "type": "integer"
          },
          "pages": {
            "minimum": 0.0,
            "title": "Pages",
            "type": "integer"
          },
          "tokens_exact": {
            "title": "Tokens Exact",
            "type": "boolean"
          }
        },
        "required": [
          "documents",
          "pages",
          "llm_tokens",
          "llm_tokens_estimated",
          "tokens_exact"
        ],
        "title": "ExtractionUsage",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "JsonValue": {},
      "PoRow": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "pattern": "^[A-Z]{3}$",
            "title": "Currency",
            "type": "string"
          },
          "key": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Key",
            "type": "string"
          },
          "po_number": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Po Number",
            "type": "string"
          },
          "remaining": {
            "maxLength": 200,
            "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
            "title": "Remaining",
            "type": "string"
          },
          "supplier": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Supplier",
            "type": "string"
          }
        },
        "required": [
          "key",
          "po_number",
          "supplier",
          "currency",
          "remaining"
        ],
        "title": "PoRow",
        "type": "object"
      },
      "ResolveResult": {
        "additionalProperties": false,
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/PoRow"
            },
            "title": "Candidates",
            "type": "array"
          },
          "mode": {
            "const": "isolated_replay",
            "default": "isolated_replay",
            "title": "Mode",
            "type": "string"
          },
          "reservation_created": {
            "const": false,
            "default": false,
            "title": "Reservation Created",
            "type": "boolean"
          },
          "state": {
            "enum": [
              "matched",
              "unmatched",
              "ambiguous",
              "insufficient_remaining"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state",
          "candidates"
        ],
        "title": "ResolveResult",
        "type": "object"
      },
      "Snapshot": {
        "additionalProperties": false,
        "properties": {
          "columns": {
            "items": {
              "$ref": "#/components/schemas/Column"
            },
            "minItems": 1,
            "title": "Columns",
            "type": "array"
          },
          "complete": {
            "title": "Complete",
            "type": "boolean"
          },
          "grain": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Grain",
            "type": "string"
          },
          "primary_key": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Primary Key",
            "type": "array"
          },
          "rows": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "grain",
          "primary_key",
          "columns",
          "rows",
          "complete"
        ],
        "title": "Snapshot",
        "type": "object"
      },
      "SourceQueryResult": {
        "additionalProperties": false,
        "properties": {
          "columns": {
            "items": {
              "type": "string"
            },
            "title": "Columns",
            "type": "array"
          },
          "mode": {
            "enum": [
              "workload",
              "delegated_oauth",
              "kerberos"
            ],
            "title": "Mode",
            "type": "string"
          },
          "rows": {
            "items": {
              "items": {
                "$ref": "#/components/schemas/JsonValue"
              },
              "type": "array"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "columns",
          "rows",
          "mode"
        ],
        "title": "SourceQueryResult",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    },
    "securitySchemes": {
      "AppCredential": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "AgentData External App API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/app-api/apps/{app_key}/v{major}/cases": {
      "get": {
        "description": "List only cases owned by the verified caller.",
        "operationId": "listing_app_api_apps__app_key__v_major__cases_get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 64,
              "title": "After",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CasePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Listing"
      },
      "post": {
        "description": "Queue a bounded typed input against an immutable App version with a caller idempotency key.",
        "operationId": "submit_app_api_apps__app_key__v_major__cases_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "input": {
                    "additionalProperties": false,
                    "properties": {
                      "snapshot": {
                        "additionalProperties": false,
                        "properties": {
                          "columns": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "key": {
                                  "maxLength": 100,
                                  "pattern": "^[a-z][a-z0-9_]*$",
                                  "title": "Key",
                                  "type": "string"
                                },
                                "nullable": {
                                  "default": false,
                                  "title": "Nullable",
                                  "type": "boolean"
                                },
                                "tolerance": {
                                  "default": "0",
                                  "title": "Tolerance",
                                  "type": "string"
                                },
                                "type": {
                                  "enum": [
                                    "string",
                                    "decimal",
                                    "integer",
                                    "boolean"
                                  ],
                                  "title": "Type",
                                  "type": "string"
                                },
                                "unit": {
                                  "anyOf": [
                                    {
                                      "maxLength": 100,
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "title": "Unit"
                                }
                              },
                              "required": [
                                "key",
                                "type"
                              ],
                              "title": "Column",
                              "type": "object"
                            },
                            "minItems": 1,
                            "title": "Columns",
                            "type": "array"
                          },
                          "complete": {
                            "title": "Complete",
                            "type": "boolean"
                          },
                          "grain": {
                            "maxLength": 160,
                            "minLength": 1,
                            "title": "Grain",
                            "type": "string"
                          },
                          "primary_key": {
                            "items": {
                              "type": "string"
                            },
                            "minItems": 1,
                            "title": "Primary Key",
                            "type": "array"
                          },
                          "rows": {
                            "items": {
                              "additionalProperties": true,
                              "type": "object"
                            },
                            "title": "Rows",
                            "type": "array"
                          }
                        },
                        "required": [
                          "grain",
                          "primary_key",
                          "columns",
                          "rows",
                          "complete"
                        ],
                        "title": "Snapshot",
                        "type": "object"
                      }
                    },
                    "required": [
                      "snapshot"
                    ],
                    "title": "EvaluationRequest",
                    "type": "object"
                  }
                },
                "required": [
                  "input"
                ],
                "title": "CaseSubmission",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Submit",
        "x-agentdata-required-permission": "cases:create"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}": {
      "get": {
        "description": "Return scoped status, immutable input/prediction and the separate current decision.",
        "operationId": "read_app_api_apps__app_key__v_major__cases__case_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Read"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}/cancel": {
      "post": {
        "description": "Cancel exactly one current queued/running revision.",
        "operationId": "cancel_app_api_apps__app_key__v_major__cases__case_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "exclusiveMinimum": 0,
                    "title": "Expected Revision",
                    "type": "integer"
                  }
                },
                "required": [
                  "expected_revision"
                ],
                "title": "CaseMutation",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Cancel"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}/decisions": {
      "post": {
        "description": "Approve/reject/correct an owned result with exact revision and explicit training consent.",
        "operationId": "decide_app_api_apps__app_key__v_major__cases__case_id__decisions_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "correction": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "snapshot": {
                            "additionalProperties": false,
                            "properties": {
                              "columns": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "key": {
                                      "maxLength": 100,
                                      "pattern": "^[a-z][a-z0-9_]*$",
                                      "title": "Key",
                                      "type": "string"
                                    },
                                    "nullable": {
                                      "default": false,
                                      "title": "Nullable",
                                      "type": "boolean"
                                    },
                                    "tolerance": {
                                      "default": "0",
                                      "title": "Tolerance",
                                      "type": "string"
                                    },
                                    "type": {
                                      "enum": [
                                        "string",
                                        "decimal",
                                        "integer",
                                        "boolean"
                                      ],
                                      "title": "Type",
                                      "type": "string"
                                    },
                                    "unit": {
                                      "anyOf": [
                                        {
                                          "maxLength": 100,
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "title": "Unit"
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "type"
                                  ],
                                  "title": "Column",
                                  "type": "object"
                                },
                                "minItems": 1,
                                "title": "Columns",
                                "type": "array"
                              },
                              "complete": {
                                "title": "Complete",
                                "type": "boolean"
                              },
                              "grain": {
                                "maxLength": 160,
                                "minLength": 1,
                                "title": "Grain",
                                "type": "string"
                              },
                              "primary_key": {
                                "items": {
                                  "type": "string"
                                },
                                "minItems": 1,
                                "title": "Primary Key",
                                "type": "array"
                              },
                              "rows": {
                                "items": {
                                  "additionalProperties": true,
                                  "type": "object"
                                },
                                "title": "Rows",
                                "type": "array"
                              }
                            },
                            "required": [
                              "grain",
                              "primary_key",
                              "columns",
                              "rows",
                              "complete"
                            ],
                            "title": "Snapshot",
                            "type": "object"
                          }
                        },
                        "required": [
                          "snapshot"
                        ],
                        "title": "EvaluationRequest",
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "decision": {
                    "enum": [
                      "approve",
                      "reject",
                      "correct"
                    ],
                    "title": "Decision",
                    "type": "string"
                  },
                  "expected_revision": {
                    "exclusiveMinimum": 0,
                    "title": "Expected Revision",
                    "type": "integer"
                  },
                  "golden_consent": {
                    "default": false,
                    "title": "Golden Consent",
                    "type": "boolean"
                  },
                  "reason": {
                    "maxLength": 2000,
                    "minLength": 1,
                    "title": "Reason",
                    "type": "string"
                  }
                },
                "required": [
                  "expected_revision",
                  "decision",
                  "reason"
                ],
                "title": "CaseDecision",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Decide",
        "x-agentdata-required-permission": "cases:decide"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}/golden-candidate": {
      "get": {
        "description": "Read the consented pending candidate; this does not add a golden or holdout test.",
        "operationId": "golden_app_api_apps__app_key__v_major__cases__case_id__golden_candidate_get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Golden",
        "x-agentdata-required-permission": "cases:decide"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}/history": {
      "get": {
        "description": "Page immutable transitions after owner authorization.",
        "operationId": "history_app_api_apps__app_key__v_major__cases__case_id__history_get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "After",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseHistory"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "History"
      }
    },
    "/app-api/apps/{app_key}/v{major}/cases/{case_id}/retry": {
      "post": {
        "description": "Reauthorize a failed case with the caller's fresh credential; input/version stay pinned.",
        "operationId": "retry_app_api_apps__app_key__v_major__cases__case_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "case_id",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 1,
              "title": "Case Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "expected_revision": {
                    "exclusiveMinimum": 0,
                    "title": "Expected Revision",
                    "type": "integer"
                  }
                },
                "required": [
                  "expected_revision"
                ],
                "title": "CaseMutation",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "422": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "429": {
            "description": "Authentication, grant, case, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, case, quota or availability gate."
          }
        },
        "summary": "Retry"
      }
    },
    "/app-api/apps/{app_key}/v{major}/evaluate": {
      "post": {
        "description": "Execute the pinned source-free App through its shared engine; this creates no case record.",
        "operationId": "app_evaluate_app_api_apps__app_key__v_major__evaluate_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "snapshot": {
                    "additionalProperties": false,
                    "properties": {
                      "columns": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "key": {
                              "maxLength": 100,
                              "pattern": "^[a-z][a-z0-9_]*$",
                              "title": "Key",
                              "type": "string"
                            },
                            "nullable": {
                              "default": false,
                              "title": "Nullable",
                              "type": "boolean"
                            },
                            "tolerance": {
                              "default": "0",
                              "title": "Tolerance",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "string",
                                "decimal",
                                "integer",
                                "boolean"
                              ],
                              "title": "Type",
                              "type": "string"
                            },
                            "unit": {
                              "anyOf": [
                                {
                                  "maxLength": 100,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Unit"
                            }
                          },
                          "required": [
                            "key",
                            "type"
                          ],
                          "title": "Column",
                          "type": "object"
                        },
                        "minItems": 1,
                        "title": "Columns",
                        "type": "array"
                      },
                      "complete": {
                        "title": "Complete",
                        "type": "boolean"
                      },
                      "grain": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Grain",
                        "type": "string"
                      },
                      "primary_key": {
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1,
                        "title": "Primary Key",
                        "type": "array"
                      },
                      "rows": {
                        "items": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "title": "Rows",
                        "type": "array"
                      }
                    },
                    "required": [
                      "grain",
                      "primary_key",
                      "columns",
                      "rows",
                      "complete"
                    ],
                    "title": "Snapshot",
                    "type": "object"
                  }
                },
                "required": [
                  "snapshot"
                ],
                "title": "EvaluationRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, version, quota or availability gate."
          }
        },
        "summary": "App Evaluate"
      }
    },
    "/app-api/apps/{app_key}/v{major}/openapi.json": {
      "get": {
        "description": "Return the retained exact version contract only to an authorized registered caller.",
        "operationId": "app_schema_app_api_apps__app_key__v_major__openapi_json_get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "403": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "404": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "409": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Authentication, grant, version, quota or availability gate."
          },
          "503": {
            "description": "Authentication, grant, version, quota or availability gate."
          }
        },
        "summary": "App Schema"
      }
    },
    "/app-api/apps/{app_key}/v{major}/queries/{query_key}": {
      "get": {
        "description": "Run an immutable named query; caller input cannot select SQL, sources or another owner.",
        "operationId": "saved_query_app_api_apps__app_key__v_major__queries__query_key__get",
        "parameters": [
          {
            "in": "path",
            "name": "app_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "App Key",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "major",
            "required": true,
            "schema": {
              "exclusiveMinimum": 0,
              "title": "Major",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "query_key",
            "required": true,
            "schema": {
              "maxLength": 100,
              "pattern": "^[a-z][a-z0-9_]*$",
              "title": "Query Key",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 64,
              "title": "After",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Saved Query",
        "x-agentdata-required-permission": "queries:read"
      }
    },
    "/app-api/v1/capabilities/compare": {
      "post": {
        "description": "Compare caller-supplied typed snapshots through the shared deterministic engine.",
        "operationId": "compare_app_api_v1_capabilities_compare_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "actual": {
                    "additionalProperties": false,
                    "properties": {
                      "columns": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "key": {
                              "maxLength": 100,
                              "pattern": "^[a-z][a-z0-9_]*$",
                              "title": "Key",
                              "type": "string"
                            },
                            "nullable": {
                              "default": false,
                              "title": "Nullable",
                              "type": "boolean"
                            },
                            "tolerance": {
                              "default": "0",
                              "title": "Tolerance",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "string",
                                "decimal",
                                "integer",
                                "boolean"
                              ],
                              "title": "Type",
                              "type": "string"
                            },
                            "unit": {
                              "anyOf": [
                                {
                                  "maxLength": 100,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Unit"
                            }
                          },
                          "required": [
                            "key",
                            "type"
                          ],
                          "title": "Column",
                          "type": "object"
                        },
                        "minItems": 1,
                        "title": "Columns",
                        "type": "array"
                      },
                      "complete": {
                        "title": "Complete",
                        "type": "boolean"
                      },
                      "grain": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Grain",
                        "type": "string"
                      },
                      "primary_key": {
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1,
                        "title": "Primary Key",
                        "type": "array"
                      },
                      "rows": {
                        "items": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "title": "Rows",
                        "type": "array"
                      }
                    },
                    "required": [
                      "grain",
                      "primary_key",
                      "columns",
                      "rows",
                      "complete"
                    ],
                    "title": "Snapshot",
                    "type": "object"
                  },
                  "expected": {
                    "additionalProperties": false,
                    "properties": {
                      "columns": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "key": {
                              "maxLength": 100,
                              "pattern": "^[a-z][a-z0-9_]*$",
                              "title": "Key",
                              "type": "string"
                            },
                            "nullable": {
                              "default": false,
                              "title": "Nullable",
                              "type": "boolean"
                            },
                            "tolerance": {
                              "default": "0",
                              "title": "Tolerance",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "string",
                                "decimal",
                                "integer",
                                "boolean"
                              ],
                              "title": "Type",
                              "type": "string"
                            },
                            "unit": {
                              "anyOf": [
                                {
                                  "maxLength": 100,
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Unit"
                            }
                          },
                          "required": [
                            "key",
                            "type"
                          ],
                          "title": "Column",
                          "type": "object"
                        },
                        "minItems": 1,
                        "title": "Columns",
                        "type": "array"
                      },
                      "complete": {
                        "title": "Complete",
                        "type": "boolean"
                      },
                      "grain": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Grain",
                        "type": "string"
                      },
                      "primary_key": {
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1,
                        "title": "Primary Key",
                        "type": "array"
                      },
                      "rows": {
                        "items": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "title": "Rows",
                        "type": "array"
                      }
                    },
                    "required": [
                      "grain",
                      "primary_key",
                      "columns",
                      "rows",
                      "complete"
                    ],
                    "title": "Snapshot",
                    "type": "object"
                  }
                },
                "required": [
                  "expected",
                  "actual"
                ],
                "title": "CompareRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationResult"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Compare",
        "x-agentdata-required-capability": "compare"
      }
    },
    "/app-api/v1/capabilities/extract": {
      "post": {
        "description": "Extract uploaded document bytes under an explicit immutable template grant.",
        "operationId": "extract_app_api_v1_capabilities_extract_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "content_base64": {
                    "minLength": 1,
                    "title": "Content Base64",
                    "type": "string"
                  },
                  "document_type": {
                    "maxLength": 100,
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "title": "Document Type",
                    "type": "string"
                  },
                  "inputs": {
                    "additionalProperties": {},
                    "title": "Inputs",
                    "type": "object"
                  },
                  "mime_type": {
                    "enum": [
                      "application/pdf",
                      "image/png",
                      "image/jpeg"
                    ],
                    "title": "Mime Type",
                    "type": "string"
                  }
                },
                "required": [
                  "document_type",
                  "mime_type",
                  "content_base64"
                ],
                "title": "ExtractRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractResult"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Extract",
        "x-agentdata-required-capability": "extract"
      }
    },
    "/app-api/v1/capabilities/notify": {
      "post": {
        "description": "Schedule an owned existing lifecycle event to its registered approved webhook target.",
        "operationId": "notify_app_api_v1_capabilities_notify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "app_key": {
                    "maxLength": 100,
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "title": "App Key",
                    "type": "string"
                  },
                  "case_id": {
                    "maxLength": 64,
                    "minLength": 1,
                    "title": "Case Id",
                    "type": "string"
                  },
                  "expected_revision": {
                    "exclusiveMinimum": 0.0,
                    "title": "Expected Revision",
                    "type": "integer"
                  },
                  "major_version": {
                    "exclusiveMinimum": 0.0,
                    "title": "Major Version",
                    "type": "integer"
                  }
                },
                "required": [
                  "app_key",
                  "major_version",
                  "case_id",
                  "expected_revision"
                ],
                "title": "NotifyRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Notify",
        "x-agentdata-required-capability": "notify"
      }
    },
    "/app-api/v1/capabilities/query": {
      "post": {
        "description": "Run only a released named case query with both capability and App query grants.",
        "operationId": "query_app_api_v1_capabilities_query_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "after": {
                    "default": "",
                    "maxLength": 64,
                    "title": "After",
                    "type": "string"
                  },
                  "app_key": {
                    "maxLength": 100,
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "title": "App Key",
                    "type": "string"
                  },
                  "major_version": {
                    "exclusiveMinimum": 0.0,
                    "title": "Major Version",
                    "type": "integer"
                  },
                  "query_key": {
                    "maxLength": 100,
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "title": "Query Key",
                    "type": "string"
                  }
                },
                "required": [
                  "app_key",
                  "major_version",
                  "query_key"
                ],
                "title": "QueryRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Query",
        "x-agentdata-required-capability": "query"
      }
    },
    "/app-api/v1/capabilities/query/source": {
      "post": {
        "description": "Read an administrator-bound named query using a certified source-specific identity.",
        "operationId": "source_query_app_api_v1_capabilities_query_source_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "identity_session": {
                    "anyOf": [
                      {
                        "maxLength": 64,
                        "minLength": 1,
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Identity Session"
                  },
                  "parameters": {
                    "additionalProperties": {},
                    "title": "Parameters",
                    "type": "object"
                  },
                  "query_key": {
                    "maxLength": 100,
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "title": "Query Key",
                    "type": "string"
                  }
                },
                "required": [
                  "query_key"
                ],
                "title": "SourceQueryRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceQueryResult"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Source Query",
        "x-agentdata-required-capability": "query"
      }
    },
    "/app-api/v1/capabilities/resolve": {
      "post": {
        "description": "Preview exact PO matching on supplied isolated snapshots; no financial reservation occurs.",
        "operationId": "resolve_app_api_v1_capabilities_resolve_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "invoice": {
                    "additionalProperties": false,
                    "properties": {
                      "amount": {
                        "maxLength": 200,
                        "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                        "title": "Amount",
                        "type": "string"
                      },
                      "currency": {
                        "pattern": "^[A-Z]{3}$",
                        "title": "Currency",
                        "type": "string"
                      },
                      "invoice_number": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Invoice Number",
                        "type": "string"
                      },
                      "po_number": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Po Number",
                        "type": "string"
                      },
                      "po_row_key": {
                        "anyOf": [
                          {
                            "maxLength": 160,
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "title": "Po Row Key"
                      },
                      "supplier": {
                        "maxLength": 160,
                        "minLength": 1,
                        "title": "Supplier",
                        "type": "string"
                      }
                    },
                    "required": [
                      "invoice_number",
                      "po_number",
                      "supplier",
                      "currency",
                      "amount"
                    ],
                    "title": "Invoice",
                    "type": "object"
                  },
                  "snapshot": {
                    "additionalProperties": false,
                    "properties": {
                      "authority": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "capture_id": {
                                "maxLength": 64,
                                "minLength": 1,
                                "title": "Capture Id",
                                "type": "string"
                              },
                              "snapshot_digest": {
                                "pattern": "^[a-f0-9]{64}$",
                                "title": "Snapshot Digest",
                                "type": "string"
                              }
                            },
                            "required": [
                              "capture_id",
                              "snapshot_digest"
                            ],
                            "title": "PoAuthority",
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mode": {
                        "const": "isolated_replay",
                        "title": "Mode",
                        "type": "string"
                      },
                      "policy": {
                        "additionalProperties": false,
                        "properties": {
                          "amount_basis": {
                            "maxLength": 300,
                            "minLength": 1,
                            "title": "Amount Basis",
                            "type": "string"
                          },
                          "currency": {
                            "pattern": "^[A-Z]{3}$",
                            "title": "Currency",
                            "type": "string"
                          },
                          "decimal_places": {
                            "maximum": 6.0,
                            "minimum": 0.0,
                            "title": "Decimal Places",
                            "type": "integer"
                          },
                          "normalization": {
                            "enum": [
                              "exact",
                              "trim_casefold"
                            ],
                            "title": "Normalization",
                            "type": "string"
                          },
                          "revision": {
                            "maxLength": 100,
                            "minLength": 1,
                            "title": "Revision",
                            "type": "string"
                          }
                        },
                        "required": [
                          "currency",
                          "decimal_places",
                          "normalization",
                          "amount_basis",
                          "revision"
                        ],
                        "title": "FinancePolicy",
                        "type": "object"
                      },
                      "provenance": {
                        "maxLength": 500,
                        "minLength": 1,
                        "title": "Provenance",
                        "type": "string"
                      },
                      "rows": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "title": "Currency",
                              "type": "string"
                            },
                            "key": {
                              "maxLength": 160,
                              "minLength": 1,
                              "title": "Key",
                              "type": "string"
                            },
                            "po_number": {
                              "maxLength": 160,
                              "minLength": 1,
                              "title": "Po Number",
                              "type": "string"
                            },
                            "remaining": {
                              "maxLength": 200,
                              "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$",
                              "title": "Remaining",
                              "type": "string"
                            },
                            "supplier": {
                              "maxLength": 160,
                              "minLength": 1,
                              "title": "Supplier",
                              "type": "string"
                            }
                          },
                          "required": [
                            "key",
                            "po_number",
                            "supplier",
                            "currency",
                            "remaining"
                          ],
                          "title": "PoRow",
                          "type": "object"
                        },
                        "minItems": 1,
                        "title": "Rows",
                        "type": "array"
                      },
                      "schema_version": {
                        "const": "1",
                        "default": "1",
                        "title": "Schema Version",
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode",
                      "provenance",
                      "policy",
                      "rows"
                    ],
                    "title": "PoSnapshot",
                    "type": "object"
                  }
                },
                "required": [
                  "snapshot",
                  "invoice"
                ],
                "title": "ResolveRequest",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResult"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Resolve",
        "x-agentdata-required-capability": "resolve"
      }
    },
    "/app-api/v1/session": {
      "get": {
        "description": "Verify application and owner proof without executing an unpublished App.",
        "operationId": "session_app_api_v1_session_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Session"
      }
    }
  },
  "security": [
    {
      "AppCredential": []
    }
  ]
}
