{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/scout-controlled-distribution-loop.schema.json",
  "title": "Scout Controlled Distribution Loop",
  "description": "A governed Scout distribution cycle that discovers, classifies, scores, drafts outreach, performs review review, and waits for operator decision.",
  "type": "object",
  "required": [
    "schema_version",
    "target_name"
  ],
  "properties": {
    "schema_version": {
      "const": "scout_controlled_distribution_loop.v1"
    },
    "target_name": {
      "type": "string",
      "minLength": 1
    },
    "target_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "target_type": {
      "type": "string",
      "enum": [
        "agent_directory",
        "agent_platform",
        "developer_tool",
        "community",
        "integration_partner",
        "pilot_candidate",
        "unknown"
      ]
    },
    "target_description": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_channel": {
      "type": [
        "string",
        "null"
      ]
    },
    "requested_tool": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "tokenops",
        "financeops",
        "energyops",
        "packetops",
        "distributionops",
        "diligenceops",
        null
      ]
    },
    "contact": {
      "type": "object"
    },
    "public_contact_available": {
      "type": "boolean"
    },
    "community_rules_checked": {
      "type": "boolean"
    },
    "outreach_allowed": {
      "type": "boolean"
    },
    "operator_decision": {
      "type": "string",
      "enum": [
        "needs_review",
        "approved_for_outreach",
        "rejected",
        "snoozed",
        "record_contact",
        "create_pilot_workspace",
        "archived"
      ]
    },
    "auto_send_requested": {
      "type": "boolean",
      "description": "If true, the loop must open a review exception because Scout never auto-sends."
    },
    "persist_records": {
      "type": "boolean"
    }
  },
  "additionalProperties": true
}