{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "harness": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$"
    },
    "sandbox": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$"
    },
    "agentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "initialPrompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536
    },
    "enabled": {
      "default": true,
      "type": "boolean"
    },
    "provider": {
      "type": "string",
      "const": "cron"
    },
    "concurrency": {
      "type": "object",
      "properties": {
        "scope": {
          "type": "string",
          "const": "repository"
        },
        "limit": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 100
        }
      },
      "required": [
        "scope",
        "limit"
      ],
      "additionalProperties": false
    },
    "schedule": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "timezone": {
      "default": "UTC",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "key",
    "name",
    "harness",
    "sandbox",
    "agentId",
    "initialPrompt",
    "provider",
    "schedule"
  ],
  "additionalProperties": false
}
