{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/deployment.json",
  "title": "Deployment",
  "description": "A signal deployment to a specific deployment target with activation status and key",
  "discriminator": {
    "propertyName": "type"
  },
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "platform",
          "description": "Discriminator indicating this is a platform-based deployment"
        },
        "platform": {
          "type": "string",
          "description": "Platform identifier for DSPs"
        },
        "account": {
          "type": "string",
          "description": "Account identifier if applicable"
        },
        "is_live": {
          "type": "boolean",
          "description": "Whether signal is currently active on this deployment"
        },
        "activation_key": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/activation-key.json",
          "description": "The key to use for targeting. Only present if is_live=true AND requester has access to this deployment."
        },
        "estimated_activation_duration_minutes": {
          "type": "number",
          "description": "Estimated time to activate if not live, or to complete activation if in progress",
          "minimum": 0
        },
        "deployed_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when activation completed (if is_live=true)"
        }
      },
      "required": [
        "type",
        "platform",
        "is_live"
      ],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "agent",
          "description": "Discriminator indicating this is an agent URL-based deployment"
        },
        "agent_url": {
          "type": "string",
          "format": "uri",
          "description": "URL identifying the deployment agent"
        },
        "account": {
          "type": "string",
          "description": "Account identifier if applicable"
        },
        "is_live": {
          "type": "boolean",
          "description": "Whether signal is currently active on this deployment"
        },
        "activation_key": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/activation-key.json",
          "description": "The key to use for targeting. Only present if is_live=true AND requester has access to this deployment."
        },
        "estimated_activation_duration_minutes": {
          "type": "number",
          "description": "Estimated time to activate if not live, or to complete activation if in progress",
          "minimum": 0
        },
        "deployed_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when activation completed (if is_live=true)"
        },
        "delivery_status": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/enums/signal-delivery-status.json",
          "description": "Arrival of provider-initiated membership delivery; separate from is_live (addressability) and match_status.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "delivery": {
          "allOf": [
            {
              "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/audience-source.json"
            },
            {
              "not": {
                "required": [
                  "access_expires_at"
                ]
              }
            }
          ],
          "description": "What the signal agent shipped, as a core/audience-source.json reference: the destination-side join key. No access_expires_at. Omitted when the rail has no vendor-addressable artifact. Never a credential.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "delivery_error": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/error.json",
          "description": "Why delivery failed; present when delivery_status is failed. UNSUPPORTED_FEATURE when no declared rail intersects or the pin does not match.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "match_status": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/enums/audience-status.json",
          "description": "Match outcome in the audience-status vocabulary sync_audiences reports; optional and rail-independent. too_small implies is_live false.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "matched_count": {
          "type": "integer",
          "minimum": 0,
          "description": "Members matched; absence is not zero.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "effective_match_rate": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Deduplicated match rate; absence is not zero.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "match_rate_basis": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/enums/audience-match-rate-basis.json",
          "description": "Where effective_match_rate came from, as on sync_audiences.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        },
        "audience_size": {
          "$ref": "https://adcontextprotocol.org/schemas/3.3.0-beta.1/core/audience-size.json",
          "description": "People matched, as a range with stated precision (the #8024 shape), for platforms that report an interval. May replace matched_count. Omit when match_status is too_small.",
          "x-status": "experimental",
          "x-added-in": "3.3.0"
        }
      },
      "required": [
        "type",
        "agent_url",
        "is_live"
      ],
      "additionalProperties": true
    }
  ]
}
