{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/agent-status-response.schema.json",
  "title": "Agent Status Response",
  "description": "Public-safe task status response for a trusted agent checking quote, entitlement, Work Order, result, receipt, and callback state.",
  "type": "object",
  "required": [
    "status_response_type",
    "status",
    "requested_tool",
    "updated_at"
  ],
  "additionalProperties": true,
  "properties": {
    "status_response_type": {
      "type": "string",
      "const": "agent_status_response"
    },
    "status_token": {
      "type": "string"
    },
    "work_order_id": {
      "type": "string"
    },
    "agent_task_run_id": {
      "type": "string"
    },
    "quote_id": {
      "type": "string"
    },
    "credit_entitlement_id": {
      "type": "string"
    },
    "requested_tool": {
      "type": "string",
      "enum": [
        "packetops",
        "distributionops",
        "tokenops",
        "wever_labs_os"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "registered",
        "quoted",
        "pending_payment",
        "funded",
        "queued",
        "operating",
        "partial",
        "ready",
        "delivered",
        "failed"
      ]
    },
    "evidence_status": {
      "type": "string",
      "enum": [
        "unknown",
        "insufficient",
        "partial",
        "sufficient"
      ]
    },
    "result_status": {
      "type": "string",
      "enum": [
        "not_started",
        "queued",
        "operating",
        "partial",
        "ready",
        "delivered",
        "failed"
      ]
    },
    "receipt_url": {
      "type": "string",
      "format": "uri"
    },
    "callback_status": {
      "type": "string",
      "enum": [
        "not_requested",
        "pending",
        "ready",
        "delivered",
        "failed",
        "retry_required"
      ]
    },
    "next_actions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
