{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/agent-preflight-check.schema.json",
  "title": "Agent Preflight Check",
  "description": "Capability, evidence, trust, quote, credit, and contract readiness check before a paid Wever Labs OS run.",
  "type": "object",
  "required": [
    "object_type",
    "preflight_id",
    "requested_tool",
    "requested_capability",
    "support_status",
    "next_required_objects"
  ],
  "properties": {
    "object_type": {
      "const": "agent_preflight_check"
    },
    "preflight_id": {
      "type": "string"
    },
    "handshake_id": {
      "type": "string"
    },
    "requested_tool": {
      "type": "string",
      "enum": [
        "packetops",
        "distributionops",
        "tokenops",
        "wever_labs_os"
      ]
    },
    "requested_capability": {
      "type": "string"
    },
    "support_status": {
      "type": "string",
      "enum": [
        "supported",
        "partially_supported",
        "unsupported",
        "needs_review"
      ]
    },
    "evidence_readiness": {
      "type": "string",
      "enum": [
        "sufficient",
        "partial",
        "insufficient",
        "not_applicable"
      ]
    },
    "trust_readiness": {
      "type": "string",
      "enum": [
        "registered",
        "needs_trust_profile",
        "needs_review",
        "blocked"
      ]
    },
    "quote_readiness": {
      "type": "string",
      "enum": [
        "quote_ready",
        "needs_scope",
        "needs_evidence",
        "not_quoteable"
      ]
    },
    "credit_readiness": {
      "type": "string",
      "enum": [
        "funded",
        "needs_credit_entitlement",
        "not_required_yet"
      ]
    },
    "contract_readiness": {
      "type": "string",
      "enum": [
        "contract_ready",
        "needs_terms",
        "needs_review"
      ]
    },
    "next_required_objects": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "accepted_input_modes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "blocked_items": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recommended_next_endpoint": {
      "type": "string",
      "format": "uri"
    }
  },
  "additionalProperties": true
}
