{
  "$id": "https://agentfacehub.com/schemas/harness.v1.json",
  "title": "AgentFaceHub harness manifest (harness.yaml), spec v1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "spec": {
      "type": "string",
      "const": "v1"
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "license": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9.+-]{0,63}$"
    },
    "distribution": {
      "type": "string",
      "enum": [
        "open",
        "hosted_only"
      ]
    },
    "description": {
      "type": "string",
      "maxLength": 300
    },
    "runtime": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "python"
            },
            "entrypoint": {
              "type": "string",
              "pattern": "^[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*:[A-Za-z_]\\w*$"
            },
            "python": {
              "type": "string",
              "pattern": "^3\\.\\d{1,2}$"
            },
            "deps": {
              "type": "string"
            },
            "protocol": {
              "type": "string",
              "const": "stdio-jsonl/v1"
            }
          },
          "required": [
            "kind",
            "entrypoint",
            "python",
            "deps",
            "protocol"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "node"
            },
            "entrypoint": {
              "type": "string"
            },
            "node": {
              "type": "string",
              "pattern": "^\\d{2}$"
            },
            "deps": {
              "type": "string"
            },
            "protocol": {
              "type": "string",
              "const": "stdio-jsonl/v1"
            }
          },
          "required": [
            "kind",
            "entrypoint",
            "node",
            "deps",
            "protocol"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "container"
            },
            "dockerfile": {
              "type": "string"
            },
            "protocol": {
              "type": "string",
              "const": "stdio-jsonl/v1"
            }
          },
          "required": [
            "kind",
            "dockerfile",
            "protocol"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "declarative"
            },
            "system_prompt": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "system_prompt"
          ],
          "additionalProperties": false
        }
      ]
    },
    "models": {
      "type": "object",
      "properties": {
        "requires": {
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "tool_use",
              "json_mode",
              "vision",
              "reasoning",
              "computer_use"
            ]
          }
        },
        "min_context": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "tested_with": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "additionalProperties": false
    },
    "tools": {
      "type": "object",
      "properties": {
        "mcp_servers": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "skills": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "permissions": {
      "type": "object",
      "properties": {
        "network": {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"
          }
        },
        "filesystem": {
          "type": "string",
          "enum": [
            "workspace-only",
            "none"
          ]
        },
        "max_runtime_s": {
          "type": "integer",
          "minimum": 1,
          "maximum": 86400
        },
        "max_cost_usd": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1000
        }
      },
      "additionalProperties": false
    },
    "io": {
      "type": "object",
      "properties": {
        "input_schema": {
          "type": "string"
        },
        "output_schema": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "evals": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "spec",
    "name",
    "version",
    "license",
    "runtime"
  ],
  "additionalProperties": false
}