{
  "openapi": "3.1.0",
  "info": {
    "title": "Æon runtime",
    "version": "0.5.1"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Health Health Get"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "summary": "Version",
        "operationId": "version_version_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Version Version Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/evaluate": {
      "post": {
        "summary": "Evaluate",
        "operationId": "evaluate_v1_actions_evaluate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Evaluate V1 Actions Evaluate Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/actions/result": {
      "post": {
        "summary": "Result",
        "operationId": "result_v1_actions_result_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResultIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Result V1 Actions Result Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "summary": "Status",
        "operationId": "status_v1_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Status V1 Status Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/policies": {
      "get": {
        "summary": "Policies",
        "operationId": "policies_v1_policies_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Policies V1 Policies Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/policies/{name}": {
      "put": {
        "summary": "Put Policy",
        "operationId": "put_policy_v1_policies__name__put",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Put Policy V1 Policies  Name  Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/mode": {
      "post": {
        "summary": "Set Mode",
        "operationId": "set_mode_v1_mode_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Set Mode V1 Mode Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/kill-switch": {
      "post": {
        "summary": "Kill Switch",
        "operationId": "kill_switch_v1_kill_switch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KillSwitchIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Kill Switch V1 Kill Switch Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/safe-state/{agent}/reset": {
      "post": {
        "summary": "Reset Safe State",
        "operationId": "reset_safe_state_v1_safe_state__agent__reset_post",
        "parameters": [
          {
            "name": "agent",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Reset Safe State V1 Safe State  Agent  Reset Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/decisions": {
      "get": {
        "summary": "Decisions",
        "operationId": "decisions_v1_decisions_get",
        "parameters": [
          {
            "name": "agent",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent"
            }
          },
          {
            "name": "axiom",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Axiom"
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Level"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 5000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Decisions V1 Decisions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/decisions/stream": {
      "get": {
        "summary": "Decisions Stream",
        "operationId": "decisions_stream_v1_decisions_stream_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/campaigns": {
      "get": {
        "summary": "List Campaigns",
        "operationId": "list_campaigns_v1_campaigns_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Campaigns V1 Campaigns Get"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Start Campaign",
        "operationId": "start_campaign_v1_campaigns_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Start Campaign V1 Campaigns Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaign_id}": {
      "get": {
        "summary": "Get Campaign",
        "operationId": "get_campaign_v1_campaigns__campaign_id__get",
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Campaign Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audit": {
      "get": {
        "summary": "Audit Tail",
        "operationId": "audit_tail_v1_audit_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 5000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Audit Tail V1 Audit Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audit/verify": {
      "post": {
        "summary": "Audit Verify",
        "operationId": "audit_verify_v1_audit_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AuditVerifyIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Audit Verify V1 Audit Verify Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audit/export": {
      "get": {
        "summary": "Audit Export",
        "operationId": "audit_export_v1_audit_export_get",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(jsonl|csv)$",
              "default": "jsonl",
              "title": "Format"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/claims": {
      "get": {
        "summary": "Claims",
        "operationId": "claims_v1_claims_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuditVerifyIn": {
        "properties": {
          "expect_head": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expect Head"
          }
        },
        "type": "object",
        "title": "AuditVerifyIn",
        "description": "Request body for audit verification: the head hash the chain is expected to end at."
      },
      "CampaignIn": {
        "properties": {
          "target": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target"
          },
          "campaign": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign"
          },
          "runs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Runs"
          },
          "controls": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Controls"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          },
          "blast_radius": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blast Radius"
          }
        },
        "type": "object",
        "title": "CampaignIn",
        "description": "Request body for starting a campaign: a target name or an inline campaign, plus overrides."
      },
      "EvaluateIn": {
        "properties": {
          "tool": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Tool"
          },
          "args": {
            "additionalProperties": true,
            "type": "object",
            "title": "Args"
          },
          "agent": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Agent",
            "default": "default"
          },
          "approved": {
            "type": "boolean",
            "title": "Approved",
            "default": false
          },
          "context": {
            "additionalProperties": true,
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "tool"
        ],
        "title": "EvaluateIn",
        "description": "Body of ``POST /v1/actions/evaluate``: the action to decide on."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "KillSwitchIn": {
        "properties": {
          "engaged": {
            "type": "boolean",
            "title": "Engaged"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "engaged"
        ],
        "title": "KillSwitchIn",
        "description": "Request body for the kill switch: engage or release it, with an optional reason."
      },
      "ModeIn": {
        "properties": {
          "mode": {
            "type": "string",
            "title": "Mode"
          }
        },
        "type": "object",
        "required": [
          "mode"
        ],
        "title": "ModeIn",
        "description": "Request body for switching the gate mode: ``shadow`` or ``enforce``."
      },
      "PolicyIn": {
        "properties": {
          "level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Level"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "PolicyIn",
        "description": "Body of ``PUT /v1/policies/{name}``: a new level and/or whether the axiom is enabled."
      },
      "ResultIn": {
        "properties": {
          "action_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ],
            "title": "Action Id"
          },
          "tool": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Tool"
          },
          "agent": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Agent",
            "default": "default"
          },
          "latency_ms": {
            "type": "number",
            "minimum": 0.0,
            "title": "Latency Ms"
          },
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          },
          "tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tokens"
          },
          "cost": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          }
        },
        "type": "object",
        "required": [
          "tool",
          "latency_ms"
        ],
        "title": "ResultIn",
        "description": "Body of ``POST /v1/actions/result``: how an evaluated action went (``latency_ms`` in ms)."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}
