{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://local/harness/adapters.schema.json",
  "title": "Harness adapter catalog",
  "description": "Catalog of wrapper-backed adapters available to the harness.",
  "type": "object",
  "additionalProperties": false,
  "required": ["version", "adapters"],
  "properties": {
    "version": {
      "const": "adapters/v1"
    },
    "adapters": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/adapter"
      }
    }
  },
  "$defs": {
    "adapter": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "wrapper", "models", "safeProbeArgv"],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9-]*$"
        },
        "wrapper": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string"
        },
        "listModels": {
          "type": "boolean",
          "description": "When true, the wrapper supports --list-models."
        },
        "metered": {
          "type": "boolean",
          "description": "When true, the wrapper is expected to emit concrete usage events."
        },
        "models": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "string", "minLength": 1 },
          "description": "Model ids the wrapper accepts; presets cross-check bindings against this list."
        },
        "safeProbeArgv": {
          "type": "array",
          "minItems": 1,
          "items": { "type": "string", "minLength": 1 },
          "description": "Explicit bounded argv passed to the wrapper for no-op capability probes when --health is unsupported."
        }
      }
    }
  }
}
