{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-docs-draft/0.1",
      "description": "Draft discriminator. This value is not OWP v0.4 conformance or an alpha wire profile."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:Z))$",
      "description": "Draft: UTC date-time, second precision, ending in Z."
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "additionalProperties": {
        "type": "string",
        "maxLength": 500
      },
      "description": "Source metadata dictionary; draft limits keys to 40 and values to 500 characters. Never put secrets here."
    },
    "id": {
      "type": "string",
      "pattern": "^agent_[A-Za-z0-9]{8,64}$",
      "description": "Source defines the prefix; this draft chooses an 8–64 character alphanumeric suffix."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Immutable version label in this draft. New code, capabilities or configuration trigger re-evaluation (§4.2)."
    },
    "verified_entity_id": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ],
      "description": "Coordinator-issued verification reference; null before identity verification. Never self-attested."
    },
    "state": {
      "type": "string",
      "enum": [
        "COLD_START",
        "EVALUATION",
        "ACTIVE",
        "SUSPENDED",
        "DEACTIVATED"
      ]
    },
    "version_review": {
      "type": "boolean",
      "description": "Draft representation of VERSION_REVIEW, a sub-state of ACTIVE in §4."
    },
    "capabilities": {
      "minItems": 1,
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "Declared task category. Registry vocabulary is coordinator-specific."
          },
          "subtypes": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Draft explicit list of supported subtypes."
          },
          "excludes": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Negative capabilities. Empty means none declared; it does not grant extra authority."
          }
        },
        "required": [
          "category",
          "subtypes",
          "excludes"
        ],
        "additionalProperties": false,
        "description": "Capability declaration from §4.4, with a proposed machine-readable shape."
      }
    },
    "public_key": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Draft raw 32-byte Ed25519 public key as lowercase hex. Key encoding and rotation need a wire decision."
    },
    "eval_score": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Evaluation-only aggregate. Per-category scores also gate eligibility."
    },
    "category_scores": {
      "maxItems": 32,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "category",
          "score"
        ],
        "additionalProperties": false
      },
      "description": "Draft per-category evaluation scores. Coordinator verifies every declared category reaches 0.70."
    },
    "reputation": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Production-only score. First ACTIVE entry starts at 0.30 (§10.0)."
    }
  },
  "required": [
    "profile",
    "created_at",
    "updated_at",
    "metadata",
    "id",
    "name",
    "version",
    "verified_entity_id",
    "state",
    "version_review",
    "capabilities",
    "public_key",
    "eval_score",
    "category_scores",
    "reputation"
  ],
  "additionalProperties": false,
  "description": "Coordinator response record, not a registration request. Agents cannot set verification, lifecycle or scores.",
  "title": "Agent",
  "$comment": "owp-docs-draft/0.1: proposed documentation shape only. Source: https://app.notion.com/p/338ed9cb3201819d96e9fc7b8e88594a §3 · §4 · §10.0. No production conformance claim."
}
