{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/agent-use.schema.json",
  "title": "Agent Use Pack",
  "type": "object",
  "required": [
    "schema_version",
    "mode"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "default": "agent_use.v1"
    },
    "mode": {
      "type": "string",
      "enum": [
        "read_agent_use_pack",
        "list_rails",
        "quote_run",
        "create_payment_challenge",
        "start_sandbox_run",
        "start_rail_run",
        "start_agent_run",
        "get_run_status",
        "fetch_return_package",
        "record_receipt",
        "record_agent_use_receipt",
        "read_agent_use_runs"
      ]
    },
    "agent_use_run_id": {
      "type": "string"
    },
    "run_id": {
      "type": "string"
    },
    "agent_id": {
      "type": "string"
    },
    "rail_key": {
      "type": "string",
      "enum": [
        "packetops",
        "diligenceops"
      ]
    },
    "package_level": {
      "type": "string",
      "enum": [
        "entry",
        "standard",
        "pro"
      ]
    },
    "idempotency_key": {
      "type": "string"
    },
    "wallet_id": {
      "type": "string"
    },
    "payment_reference": {
      "type": "string"
    },
    "payment_intent_id": {
      "type": "string"
    },
    "settlement_reference": {
      "type": "string"
    },
    "checkout_reference": {
      "type": "string"
    },
    "invoice_reference": {
      "type": "string"
    },
    "mandate_reference": {
      "type": "string"
    },
    "amount_units": {
      "type": "number",
      "minimum": 0
    },
    "currency": {
      "type": "string"
    },
    "work_order_id": {
      "type": "string"
    },
    "return_package_id": {
      "type": "string"
    },
    "receipt_id": {
      "type": "string"
    },
    "fee_event_id": {
      "type": "string"
    },
    "callback_url": {
      "type": "string"
    },
    "run_state": {
      "type": "string"
    },
    "return_package_summary": {
      "type": "object"
    }
  },
  "additionalProperties": true
}
