{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Capability-Based Routing v1",
  "description": "Schema for the infrastructure routing manifest (routing.json)",
  "type": "object",
  "required": [
    "mappings"
  ],
  "properties": {
    "mappings": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "protocol",
          "endpoint"
        ],
        "properties": {
          "protocol": {
            "type": "string",
            "enum": [
              "http",
              "local",
              "socket",
              "grpc",
              "openapi"
            ]
          },
          "endpoint": {
            "type": "string",
            "description": "URL, CLI command, or socket identifier"
          },
          "metadata": {
            "type": "object",
            "description": "Optional environment-specific metadata (e.g. headers, timeout, overrides)",
            "properties": {
              "mapping_overrides": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "description": "Standardized Harness Action (e.g. hitl_pause, final_answer)"
                }
              }
            }
          }
        }
      }
    }
  }
}