{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/pilot-launch-authorization.schema.json",
  "title": "Pilot Launch Authorization",
  "type": "object",
  "required": [
    "schema_version",
    "authorization_id",
    "review_id",
    "intake_id",
    "requested_tool",
    "authorization_state",
    "authorized_rail"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "authorization_id": {
      "type": "string"
    },
    "review_id": {
      "type": "string"
    },
    "intake_id": {
      "type": "string"
    },
    "requested_tool": {
      "type": "string"
    },
    "authorization_state": {
      "type": "string",
      "enum": [
        "authorized",
        "held",
        "revoked"
      ]
    },
    "authorized_rail": {
      "type": "string",
      "enum": [
        "controlled_pilot_execution",
        "work_order_dispatch",
        "evidence_completion",
        "manual_review"
      ]
    },
    "work_order_id": {
      "type": "string"
    },
    "execution_binding_id": {
      "type": "string"
    },
    "callback_delivery_id": {
      "type": "string"
    },
    "proof_requirements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "console_url": {
      "type": "string"
    }
  }
}
