{
  "openapi": "3.1.0",
  "info": {
    "title": "Hybrid ID Cortex execution and delegation",
    "version": "1.0.0",
    "description": "Purpose-bound Ed25519 Hybrid-PoP. Human tokens only manage explicit delegations; canonical knowledge returns reviewed projections, not raw Vault documents."
  },
  "servers": [
    {
      "url": "https://auth.hybrid-id.com"
    }
  ],
  "externalDocs": {
    "url": "https://hybrid-id.com/integrations/cortex-execution.md"
  },
  "paths": {
    "/cortex/runtime": {
      "post": {
        "operationId": "exchangeCortexRuntime",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Exchange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed result; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Authority denied / expired / replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or private ingress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Authority unavailable; fail closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/hybrid/cortex-execution": {
      "post": {
        "operationId": "manageOrValidateCortexExecution",
        "security": [
          {
            "CortexClient": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Management"
                  },
                  {
                    "$ref": "#/components/schemas/Runtime"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed result; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Delegation"
                    },
                    {
                      "$ref": "#/components/schemas/Inventory"
                    },
                    {
                      "$ref": "#/components/schemas/Authority"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Authority denied / expired / replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or private ingress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Authority unavailable; fail closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "http://127.0.0.1:3152",
            "description": "Core-local confidential backchannel only"
          }
        ]
      }
    },
    "/hybrid/cortex-knowledge": {
      "post": {
        "operationId": "readDelegatedCortexKnowledge",
        "security": [
          {
            "CortexClient": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Runtime"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Confirmed result; no-store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Knowledge"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Invalid app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Authority denied / expired / replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or private ingress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Authority unavailable; fail closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "http://127.0.0.1:3152",
            "description": "Core-local confidential backchannel only"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "CortexClient": {
        "type": "http",
        "scheme": "basic",
        "description": "Existing confidential Cortex client. Never forward to runtimes."
      }
    },
    "schemas": {
      "PublicKey": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "kty": {
            "const": "OKP"
          },
          "crv": {
            "const": "Ed25519"
          },
          "x": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          }
        },
        "required": [
          "kty",
          "crv",
          "x"
        ]
      },
      "Resource": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "collection_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "collection_id",
          "document_id",
          "version",
          "commitment"
        ]
      },
      "GrantStatement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "app": {
            "type": "string"
          },
          "controller_subject": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          },
          "operation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "agent_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "workspace": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tasks:claim",
                "tasks:result",
                "knowledge:read",
                "drafts:write",
                "messages:write",
                "posts:publish",
                "pipelines:advance"
              ]
            },
            "minItems": 1,
            "uniqueItems": true
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "maxItems": 50,
            "uniqueItems": true
          },
          "expires_at": {
            "type": "integer"
          },
          "public_key_jwk": {
            "$ref": "#/components/schemas/PublicKey"
          }
        },
        "required": [
          "app",
          "controller_subject",
          "operation_id",
          "agent_id",
          "workspace",
          "actions",
          "resources",
          "expires_at",
          "public_key_jwk"
        ]
      },
      "GrantPayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "statement": {
            "$ref": "#/components/schemas/GrantStatement"
          },
          "proof": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{86}$"
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_GRANT"
          }
        },
        "required": [
          "statement",
          "proof",
          "acknowledgement"
        ]
      },
      "ListPayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "workspace"
        ]
      },
      "InspectPayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          }
        },
        "required": [
          "id"
        ]
      },
      "ApprovePayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_APPROVE"
          }
        },
        "required": [
          "id",
          "expected_revision",
          "acknowledgement"
        ]
      },
      "PausePayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_PAUSE"
          }
        },
        "required": [
          "id",
          "expected_revision",
          "acknowledgement"
        ]
      },
      "ResumePayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_RESUME"
          }
        },
        "required": [
          "id",
          "expected_revision",
          "acknowledgement"
        ]
      },
      "RevokePayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_REVOKE"
          }
        },
        "required": [
          "id",
          "expected_revision",
          "acknowledgement"
        ]
      },
      "RotatePayload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1
          },
          "acknowledgement": {
            "const": "I_APPROVE_CORTEX_ROTATE"
          },
          "public_key_jwk": {
            "$ref": "#/components/schemas/PublicKey"
          },
          "proof": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{86}$"
          }
        },
        "required": [
          "id",
          "expected_revision",
          "acknowledgement",
          "public_key_jwk",
          "proof"
        ]
      },
      "Management": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "grant"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/GrantPayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "list"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/ListPayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "inspect"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/InspectPayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "approve"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/ApprovePayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "pause"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/PausePayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "resume"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/ResumePayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "revoke"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/RevokePayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "operation": {
                "const": "rotate"
              },
              "access_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 4096
              },
              "subject": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "workspace": {
                "type": "string",
                "pattern": "^([a-f0-9]{32})?$"
              },
              "payload": {
                "$ref": "#/components/schemas/RotatePayload"
              }
            },
            "required": [
              "operation",
              "access_token",
              "subject",
              "workspace",
              "payload"
            ]
          }
        ]
      },
      "Request": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "tasks:claim",
              "tasks:result",
              "knowledge:read",
              "drafts:write",
              "messages:write",
              "posts:publish",
              "pipelines:advance"
            ]
          },
          "method": {
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "path": {
            "type": "string",
            "pattern": "^/api/",
            "maxLength": 2048
          },
          "body_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{16,96}$"
          },
          "resource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Resource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "action",
          "method",
          "path",
          "body_sha256",
          "request_id",
          "resource"
        ]
      },
      "ExchangeStatement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "issuer": {
            "const": "https://auth.hybrid-id.com"
          },
          "audience": {
            "const": "https://hybrid-cortex.com"
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "issued_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "nonce": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{24,96}$"
          },
          "operation": {
            "const": "exchange"
          },
          "token_sha256": {
            "type": "null"
          },
          "request": {
            "type": "null"
          }
        },
        "required": [
          "issuer",
          "audience",
          "delegation_id",
          "issued_at",
          "expires_at",
          "nonce",
          "operation",
          "token_sha256",
          "request"
        ]
      },
      "RuntimeStatement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "issuer": {
            "const": "https://auth.hybrid-id.com"
          },
          "audience": {
            "const": "https://hybrid-cortex.com"
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "issued_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "nonce": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{24,96}$"
          },
          "operation": {
            "const": "authorize"
          },
          "token_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "request": {
            "$ref": "#/components/schemas/Request"
          }
        },
        "required": [
          "issuer",
          "audience",
          "delegation_id",
          "issued_at",
          "expires_at",
          "nonce",
          "operation",
          "token_sha256",
          "request"
        ]
      },
      "Exchange": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "statement": {
            "$ref": "#/components/schemas/ExchangeStatement"
          },
          "proof": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{86}$"
          }
        },
        "required": [
          "statement",
          "proof"
        ]
      },
      "Runtime": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "statement": {
            "$ref": "#/components/schemas/RuntimeStatement"
          },
          "proof": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{86}$"
          },
          "access_token": {
            "type": "string",
            "pattern": "^hcxc_[A-Za-z0-9_-]{64}$"
          }
        },
        "required": [
          "statement",
          "proof",
          "access_token"
        ]
      },
      "Delegation": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schema": {
            "const": "HYBRID_CORTEX_DELEGATION_V1"
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "agent_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "audience": {
            "const": "https://hybrid-cortex.com"
          },
          "controller_subject": {
            "type": "string"
          },
          "knowledge_principal": {
            "type": "string"
          },
          "workspace": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "manager_subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tasks:claim",
                "tasks:result",
                "knowledge:read",
                "drafts:write",
                "messages:write",
                "posts:publish",
                "pipelines:advance"
              ]
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            }
          },
          "expires_at": {
            "type": "integer"
          },
          "state": {
            "enum": [
              "ACTIVE",
              "PENDING_COMPANY",
              "PAUSED",
              "REVOKED"
            ]
          },
          "revision": {
            "type": "integer"
          },
          "key_revision": {
            "type": "integer"
          },
          "public_key_jwk": {
            "$ref": "#/components/schemas/PublicKey"
          },
          "created_at": {
            "type": "integer"
          },
          "updated_at": {
            "type": "integer"
          },
          "financial_authority": {
            "const": false
          }
        },
        "required": [
          "schema",
          "delegation_id",
          "agent_id",
          "audience",
          "controller_subject",
          "knowledge_principal",
          "workspace",
          "manager_subject",
          "actions",
          "resources",
          "expires_at",
          "state",
          "revision",
          "key_revision",
          "public_key_jwk",
          "created_at",
          "updated_at",
          "financial_authority"
        ]
      },
      "Inventory": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Delegation"
            },
            "maxItems": 250
          },
          "limit": {
            "const": 250
          }
        },
        "required": [
          "items",
          "limit"
        ]
      },
      "Token": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schema": {
            "const": "HYBRID_CORTEX_RUNTIME_TOKEN_V1"
          },
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "const": "Hybrid-PoP"
          },
          "expires_at": {
            "type": "integer"
          },
          "renewal_mode": {
            "const": "REASSERT"
          },
          "delegation": {
            "$ref": "#/components/schemas/Delegation"
          }
        },
        "required": [
          "schema",
          "access_token",
          "token_type",
          "expires_at",
          "renewal_mode",
          "delegation"
        ]
      },
      "Authority": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schema": {
            "const": "HYBRID_CORTEX_EXECUTION_AUTHORITY_V1"
          },
          "issuer": {
            "const": "https://auth.hybrid-id.com"
          },
          "audience": {
            "const": "https://hybrid-cortex.com"
          },
          "active": {
            "const": true
          },
          "checked_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "request_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "delegation": {
            "$ref": "#/components/schemas/Delegation"
          }
        },
        "required": [
          "schema",
          "issuer",
          "audience",
          "active",
          "checked_at",
          "expires_at",
          "request_digest",
          "delegation"
        ]
      },
      "Knowledge": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "schema": {
            "const": "HYBRID_CORTEX_KNOWLEDGE_V1"
          },
          "resource": {
            "$ref": "#/components/schemas/Resource"
          },
          "title": {
            "type": "string"
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "document_id": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "source_version": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                }
              },
              "required": [
                "document_id",
                "source_version",
                "title",
                "summary",
                "category"
              ]
            }
          },
          "private_source_access": {
            "const": false
          },
          "content_kind": {
            "const": "reviewed_projection"
          },
          "delegation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "delegation_revision": {
            "type": "integer"
          },
          "checked_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          }
        },
        "required": [
          "schema",
          "resource",
          "title",
          "documents",
          "private_source_access",
          "content_kind",
          "delegation_id",
          "delegation_revision",
          "checked_at",
          "expires_at"
        ]
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
