{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/goodeye-dev/json-schema/goodeye-dev-deploy-verifier-input-schema.json",
  "title": "DeployVerifierInput",
  "description": "Payload for ``deploy_verifier``: create a new verifier or append a new\nversion to an existing one (owner-scoped, name-uniqueness within owner).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/goodeye-dev-openapi.json#/components/schemas/DeployVerifierInput",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z0-9][a-z0-9-]*$",
      "title": "Name",
      "description": "Verifier name, unique per owner among non-revoked verifiers. Lowercase letters, digits, and hyphens; no spaces."
    },
    "description": {
      "type": "string",
      "maxLength": 1024,
      "minLength": 1,
      "title": "Description",
      "description": "Short human-readable summary of what the verifier judges."
    },
    "criterion": {
      "type": "string",
      "maxLength": 20000,
      "minLength": 1,
      "title": "Criterion",
      "description": "The rubric prose the judge applies. Write it as a direct instruction to the judge (e.g. 'Return passed=true when ...')."
    },
    "input_contract": {
      "$ref": "#/$defs/InputContract",
      "description": "Shape of inputs at run time: ``text``, ``text_image``, or ``image``. Drives signature shape and what ``run_verifier`` accepts."
    },
    "input_fields": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Input Fields",
      "description": "Names of the text inputs the judge sees. Required for ``text`` and ``text_image``; must be empty for ``image``. Names are deduplicated case-insensitively. ``run_verifier`` rejects callers whose ``inputs`` keys do not match this list exactly."
    },
    "few_shot_examples": {
      "items": {
        "$ref": "#/$defs/FewShotExample"
      },
      "type": "array",
      "title": "Few Shot Examples",
      "description": "Labeled calibration examples (3 to 10 are typical). Each example must satisfy the contract: ``text`` examples carry only ``inputs``; ``text_image`` carries both ``inputs`` and ``media_url``; ``image`` carries only ``media_url``."
    },
    "model_settings": {
      "$ref": "#/$defs/ModelConfig",
      "description": "Judge LM settings. Only ``model`` and ``reasoning_effort`` are honored; see ``ModelConfig``."
    },
    "expected_version_token": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Version Token",
      "description": "Optimistic-concurrency token. Required when re-deploying an existing verifier to confirm you've seen the latest version (get it from ``deploy_verifier``, ``list_verifiers``, or ``get_verifier``). Must be omitted on first deploy. Mismatch returns a Conflict with the current token."
    }
  },
  "type": "object",
  "required": [
    "name",
    "description",
    "criterion",
    "input_contract"
  ],
  "$defs": {
    "FewShotExample": {
      "properties": {
        "inputs": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Inputs",
          "description": "Map of ``input_fields`` name to value. Required for ``text`` and ``text_image`` contracts, must be empty for ``image``."
        },
        "media_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Media Url",
          "description": "Public HTTPS image URL. Required for ``text_image`` and ``image`` contracts, rejected for ``text``."
        },
        "passed": {
          "type": "boolean",
          "title": "Passed",
          "description": "Ground-truth label: did this example satisfy the criterion?"
        },
        "reasoning": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reasoning",
          "description": "Optional rationale shown to the judge alongside the label."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "passed"
      ],
      "title": "FewShotExample",
      "description": "A single labeled example attached to a verifier version. The runtime\nshows these to the judge as calibration demonstrations."
    },
    "InputContract": {
      "type": "string",
      "enum": [
        "text",
        "text_image",
        "image"
      ],
      "title": "InputContract",
      "description": "Shape of inputs the verifier judges.\n\n``text``: text fields only (``input_fields`` required, ``media_url`` rejected).\n``text_image``: text fields plus one image (both required at run time).\n``image``: a single image only (``input_fields`` must be empty, ``media_url`` required)."
    },
    "ModelConfig": {
      "properties": {
        "model": {
          "type": "string",
          "maxLength": 128,
          "minLength": 1,
          "title": "Model",
          "description": "Model identifier for the judge LLM (e.g. ``openai/gpt-5.4-mini``, ``anthropic/claude-sonnet-4-6``). Must be one of the platform's supported models. Defaults to the platform's standard judge model."
        },
        "reasoning_effort": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "xhigh"
          ],
          "title": "Reasoning Effort",
          "description": "Reasoning budget hint forwarded to providers that accept it. Silently dropped for models that don't expose ``reasoning_effort``.",
          "default": "medium"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "ModelConfig",
      "description": "Verifier judge LM configuration. Only ``model`` and ``reasoning_effort``\nare honored; any other field is rejected so callers can't quietly leak\nsampling knobs (temperature, max_tokens, etc.) into the judge."
    }
  }
}