{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "TokenOps Live Pilot Flow",
  "type": "object",
  "required": [
    "pilot_id",
    "operating_tool",
    "provider_route",
    "credit_state",
    "run_state",
    "runtime_record_url",
    "result_contract_url",
    "proof_envelope_url"
  ],
  "properties": {
    "pilot_id": {
      "type": "string"
    },
    "operating_tool": {
      "type": "string",
      "const": "tokenops"
    },
    "agent_id": {
      "type": "string"
    },
    "onboarding_id": {
      "type": "string"
    },
    "trust_profile_id": {
      "type": "string"
    },
    "credential_envelope_id": {
      "type": "string"
    },
    "quote_id": {
      "type": "string"
    },
    "provider_route": {
      "type": "string"
    },
    "provider_confirmation_id": {
      "type": "string"
    },
    "credit_entitlement_id": {
      "type": "string"
    },
    "run_contract_id": {
      "type": "string"
    },
    "task_token": {
      "type": "string"
    },
    "credit_state": {
      "type": "string",
      "enum": [
        "requested",
        "funded",
        "reserved",
        "consumed",
        "closed"
      ]
    },
    "run_state": {
      "type": "string",
      "enum": [
        "created",
        "queued",
        "operating",
        "result_ready",
        "callback_delivered",
        "exception",
        "replay_ready",
        "closed"
      ]
    },
    "runtime_record_url": {
      "type": "string",
      "format": "uri"
    },
    "result_contract_url": {
      "type": "string",
      "format": "uri"
    },
    "settlement_receipt_url": {
      "type": "string",
      "format": "uri"
    },
    "usage_receipt_url": {
      "type": "string",
      "format": "uri"
    },
    "callback_state_url": {
      "type": "string",
      "format": "uri"
    },
    "ledger_url": {
      "type": "string",
      "format": "uri"
    },
    "attestation_url": {
      "type": "string",
      "format": "uri"
    },
    "proof_envelope_url": {
      "type": "string",
      "format": "uri"
    },
    "next_action": {
      "type": "string"
    }
  }
}
