{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/financeops-controlled-pilot-execution.schema.json",
  "title": "FinanceOps Controlled Pilot Execution",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema_version",
    "pilot_id",
    "tool",
    "task_token",
    "work_order_id",
    "callback_url"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "financeops-controlled-pilot-execution.v1"
    },
    "pilot_id": {
      "type": "string"
    },
    "tool": {
      "type": "string",
      "const": "financeops"
    },
    "execution_mode": {
      "type": "string",
      "enum": [
        "controlled_pilot"
      ]
    },
    "agent_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "client_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "task_token": {
      "type": "string"
    },
    "work_order_id": {
      "type": "string"
    },
    "execution_binding_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "tool_command_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "callback_url": {
      "type": "string",
      "format": "uri"
    },
    "financial_records": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "reconciliation_scope": {
      "type": "object"
    },
    "proof_requirements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "pilot_controls": {
      "type": "object"
    },
    "requested_output": {
      "type": "object"
    }
  }
}
