{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "execution": {
      "type": "object",
      "properties": {
        "environmentVariables": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Z_][A-Z0-9_]*$"
                  },
                  "source": {
                    "type": "string",
                    "const": "inline"
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 8192
                  },
                  "targets": {
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "setup",
                        "harness"
                      ]
                    }
                  }
                },
                "required": [
                  "key",
                  "source",
                  "value",
                  "targets"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Z_][A-Z0-9_]*$"
                  },
                  "source": {
                    "type": "string",
                    "const": "managed"
                  },
                  "secretName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9_-]+$"
                  },
                  "targets": {
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "setup",
                        "harness"
                      ]
                    }
                  }
                },
                "required": [
                  "key",
                  "source",
                  "secretName",
                  "targets"
                ],
                "additionalProperties": false
              }
            ]
          }
        }
      },
      "required": [
        "environmentVariables"
      ],
      "additionalProperties": false
    },
    "triggers": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "oneOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "issues"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "edited",
                        "closed",
                        "reopened",
                        "labeled",
                        "unlabeled"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "pull_request"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "opened",
                        "edited",
                        "closed",
                        "reopened",
                        "synchronize",
                        "labeled",
                        "unlabeled",
                        "ready_for_review"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "issue_comment"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "created",
                        "edited"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "pull_request_review"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "submitted",
                        "edited",
                        "dismissed"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "pull_request_review_comment"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "created",
                        "edited"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "pull_request_review_thread"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "resolved",
                        "unresolved"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "push"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "pushed"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "check_run"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "rerequested"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "workflow_run"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "requested"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "const": "github"
                  },
                  "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]+)*$"
                  },
                  "guards": {
                    "default": [],
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_occurrences"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "limit": {
                              "default": 3,
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "scope": {
                              "default": "subject",
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "cooldown"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "seconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "seconds"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "max_concurrent"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "repository",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "limit": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "type",
                            "scope",
                            "limit"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "deduplicate"
                            },
                            "enabled": {
                              "default": true,
                              "type": "boolean"
                            },
                            "scope": {
                              "type": "string",
                              "enum": [
                                "delivery",
                                "subject",
                                "commit",
                                "event"
                              ]
                            },
                            "windowSeconds": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "maximum": 31536000
                            }
                          },
                          "required": [
                            "type",
                            "scope"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "initialPrompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "labelOperator": {
                    "default": "has_any",
                    "type": "string",
                    "enum": [
                      "has_any",
                      "has_all",
                      "has_none",
                      "is_empty"
                    ]
                  },
                  "labelScope": {
                    "default": "current",
                    "type": "string",
                    "enum": [
                      "current",
                      "changed"
                    ]
                  },
                  "labels": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commentKeywords": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "mentionedLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "commands": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "actorLogins": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "authorAssociations": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "MEMBER",
                        "COLLABORATOR",
                        "CONTRIBUTOR",
                        "FIRST_TIME_CONTRIBUTOR",
                        "FIRST_TIMER",
                        "NONE",
                        "MANNEQUIN"
                      ]
                    }
                  },
                  "checkNames": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "checkApps": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseTags": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "releaseKinds": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "stable",
                        "prerelease",
                        "draft"
                      ]
                    }
                  },
                  "matchAllComments": {
                    "default": false,
                    "type": "boolean"
                  },
                  "commentScopes": {
                    "default": [
                      "issue",
                      "pull_request"
                    ],
                    "minItems": 1,
                    "maxItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "issue",
                        "pull_request"
                      ]
                    }
                  },
                  "branches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "sourceBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "targetBranches": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "pathPrefixes": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    }
                  },
                  "conclusions": {
                    "default": [],
                    "maxItems": 9,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "neutral",
                        "cancelled",
                        "timed_out",
                        "action_required",
                        "stale",
                        "skipped",
                        "startup_failure"
                      ]
                    }
                  },
                  "reviewStates": {
                    "default": [],
                    "maxItems": 4,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "approved",
                        "changes_requested",
                        "commented",
                        "dismissed"
                      ]
                    }
                  },
                  "merged": {
                    "type": "boolean"
                  },
                  "workflows": {
                    "default": [],
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\.github\\/workflows\\/[^/]+\\.ya?ml$"
                    }
                  },
                  "pushBranchesOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreBots": {
                    "default": false,
                    "type": "boolean"
                  },
                  "ignoreDrafts": {
                    "default": false,
                    "type": "boolean"
                  },
                  "eventType": {
                    "type": "string",
                    "const": "release"
                  },
                  "actions": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "published",
                        "created",
                        "prereleased"
                      ]
                    }
                  }
                },
                "required": [
                  "provider",
                  "key",
                  "name",
                  "harness",
                  "sandbox",
                  "agentId",
                  "initialPrompt",
                  "eventType",
                  "actions"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "const": "webhook"
              },
              "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"
              },
              "guards": {
                "default": [],
                "maxItems": 10,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "max_occurrences"
                        },
                        "enabled": {
                          "default": true,
                          "type": "boolean"
                        },
                        "limit": {
                          "default": 3,
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "scope": {
                          "default": "subject",
                          "type": "string",
                          "enum": [
                            "repository",
                            "subject",
                            "commit",
                            "event"
                          ]
                        },
                        "windowSeconds": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 31536000
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "cooldown"
                        },
                        "enabled": {
                          "default": true,
                          "type": "boolean"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "repository",
                            "subject",
                            "commit",
                            "event"
                          ]
                        },
                        "seconds": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 31536000
                        }
                      },
                      "required": [
                        "type",
                        "scope",
                        "seconds"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "max_concurrent"
                        },
                        "enabled": {
                          "default": true,
                          "type": "boolean"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "repository",
                            "subject",
                            "commit",
                            "event"
                          ]
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "type",
                        "scope",
                        "limit"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "deduplicate"
                        },
                        "enabled": {
                          "default": true,
                          "type": "boolean"
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "delivery",
                            "subject",
                            "commit",
                            "event"
                          ]
                        },
                        "windowSeconds": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 31536000
                        }
                      },
                      "required": [
                        "type",
                        "scope"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "events": {
                "default": [],
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "payloadFilter": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "provider",
              "key",
              "name",
              "harness",
              "sandbox",
              "agentId",
              "initialPrompt"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "harnesses": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "type": {
                "type": "string",
                "const": "codex"
              },
              "version": {
                "default": "0.157.0",
                "type": "string",
                "enum": [
                  "0.157.0"
                ]
              },
              "auth": {
                "default": [],
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "openai_api_key",
                          "title": "OpenAI API key",
                          "description": "Create an API key in the OpenAI Platform (https://platform.openai.com/api-keys). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "aws_bedrock_api_key",
                          "title": "Amazon Bedrock API key",
                          "description": "Create an Amazon Bedrock API key in the AWS console, not in the OpenAI Platform. Store it as a Stitch secret and reference it in the harness auth entry. Set AWS_REGION or AWS_DEFAULT_REGION in the factory harness environment."
                        },
                        {
                          "type": "string",
                          "const": "azure_openai_api_key",
                          "title": "Azure OpenAI API key",
                          "description": "Get the API key from your Azure OpenAI resource in the Azure portal. Store it as a Stitch secret and reference it in the harness auth entry. Set AZURE_OPENAI_BASE_URL in the factory harness environment."
                        }
                      ]
                    },
                    "secretName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_-]+$"
                    }
                  },
                  "required": [
                    "method",
                    "secretName"
                  ],
                  "additionalProperties": false
                }
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "reasoningEffort": {
                "default": "default",
                "type": "string",
                "enum": [
                  "default",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max",
                  "ultra"
                ]
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,63}$"
              }
            },
            "required": [
              "name",
              "type",
              "model",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "type": {
                "type": "string",
                "const": "claude_code"
              },
              "version": {
                "default": "2.1.283",
                "type": "string",
                "enum": [
                  "2.1.283"
                ]
              },
              "auth": {
                "default": [],
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "anthropic_api_key",
                          "title": "Anthropic API key",
                          "description": "Create an API key in the Anthropic Console (https://console.anthropic.com/). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "aws_bedrock_api_key",
                          "title": "Amazon Bedrock API key",
                          "description": "Create an Amazon Bedrock API key in the AWS console, not in the Anthropic Console. Store it as a Stitch secret and reference it in the harness auth entry. Set AWS_REGION or AWS_DEFAULT_REGION in the factory harness environment."
                        },
                        {
                          "type": "string",
                          "const": "gcp_application_credentials",
                          "title": "Google Cloud service account credentials",
                          "description": "Create a service account JSON key in Google Cloud IAM with access to Vertex AI. Store the JSON as a Stitch secret and reference it in the harness auth entry. Set ANTHROPIC_VERTEX_PROJECT_ID and optionally CLOUD_ML_REGION in the factory harness environment."
                        },
                        {
                          "type": "string",
                          "const": "azure_foundry_api_key",
                          "title": "Microsoft Foundry API key",
                          "description": "Get the API key from your Microsoft Foundry resource in the Azure portal. Store it as a Stitch secret and reference it in the harness auth entry. Set ANTHROPIC_FOUNDRY_RESOURCE or ANTHROPIC_FOUNDRY_BASE_URL in the factory harness environment."
                        },
                        {
                          "type": "string",
                          "const": "azure_foundry_auth_token",
                          "title": "Microsoft Entra bearer token",
                          "description": "Obtain a Microsoft Entra bearer token for your Microsoft Foundry resource through Azure authentication. Store it as a Stitch secret and reference it in the harness auth entry. Set ANTHROPIC_FOUNDRY_RESOURCE or ANTHROPIC_FOUNDRY_BASE_URL in the factory harness environment. Renew the secret before the token expires."
                        }
                      ]
                    },
                    "secretName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_-]+$"
                    }
                  },
                  "required": [
                    "method",
                    "secretName"
                  ],
                  "additionalProperties": false
                }
              },
              "model": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "effort": {
                "default": "default",
                "type": "string",
                "enum": [
                  "default",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,63}$"
              }
            },
            "required": [
              "name",
              "type",
              "model",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "type": {
                "type": "string",
                "const": "antigravity"
              },
              "version": {
                "default": "1.2.7",
                "type": "string",
                "enum": [
                  "1.2.7"
                ]
              },
              "auth": {
                "default": [],
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "gemini_api_key",
                          "title": "Gemini API key",
                          "description": "Create a Gemini API key in Google AI Studio (https://aistudio.google.com/apikey). Store it as a Stitch secret and reference it in the harness auth entry."
                        }
                      ]
                    },
                    "secretName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_-]+$"
                    }
                  },
                  "required": [
                    "method",
                    "secretName"
                  ],
                  "additionalProperties": false
                }
              },
              "model": {
                "type": "string",
                "enum": [
                  "gemini-3.6-flash",
                  "gemini-3.7-flash",
                  "gemini-3.8-flash",
                  "gemini-3.1-pro"
                ]
              },
              "thinkingLevel": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,63}$"
              }
            },
            "required": [
              "name",
              "type",
              "model",
              "thinkingLevel",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "type": {
                "type": "string",
                "const": "opencode"
              },
              "version": {
                "type": "string",
                "enum": [
                  "1.18.30"
                ]
              },
              "auth": {
                "default": [],
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "openai_api_key",
                          "title": "OpenAI API key",
                          "description": "Create an API key in the OpenAI Platform (https://platform.openai.com/api-keys). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "anthropic_api_key",
                          "title": "Anthropic API key",
                          "description": "Create an API key in the Anthropic Console (https://console.anthropic.com/). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "gemini_api_key",
                          "title": "Gemini API key",
                          "description": "Create a Gemini API key in Google AI Studio (https://aistudio.google.com/apikey). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "meta_api_key",
                          "title": "Meta API key",
                          "description": "Get an API key from the Meta Llama API developer portal (https://llama.developer.meta.com/). Store it as a Stitch secret and reference it in the harness auth entry."
                        },
                        {
                          "type": "string",
                          "const": "opencode_api_key",
                          "title": "OpenCode Zen API key",
                          "description": "Create an OpenCode Zen API key at https://opencode.ai/auth. Store it as a Stitch secret and reference it in the harness auth entry."
                        }
                      ]
                    },
                    "secretName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[A-Za-z0-9_-]+$"
                    }
                  },
                  "required": [
                    "method",
                    "secretName"
                  ],
                  "additionalProperties": false
                }
              },
              "model": {
                "type": "string",
                "enum": [
                  "openai/gpt-5.3-codex",
                  "openai/gpt-5.4",
                  "openai/gpt-5.4-mini",
                  "openai/gpt-5.6-sol",
                  "openai/gpt-5.6-terra",
                  "openai/gpt-5.6-luna",
                  "anthropic/claude-sonnet-4-6",
                  "anthropic/claude-opus-4-6",
                  "anthropic/claude-sonnet-5",
                  "anthropic/claude-opus-5",
                  "google/gemini-3.6-flash",
                  "google/gemini-3.7-flash",
                  "google/gemini-3.8-flash",
                  "google/gemini-3.1-pro-preview",
                  "meta/muse-spark-1.1",
                  "meta/muse-spark-1.2",
                  "meta/muse-spark-1.3",
                  "meta/muse-spark-1.2-contributor",
                  "meta/muse-spark-1.3-contributor",
                  "opencode/muse-spark-1.2",
                  "opencode/muse-spark-1.3",
                  "opencode/muse-spark-1.2-contributor-free",
                  "opencode/muse-spark-1.3-contributor-free"
                ]
              },
              "reasoningEffort": {
                "default": "default",
                "type": "string",
                "enum": [
                  "default",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,63}$"
              }
            },
            "required": [
              "name",
              "type",
              "version",
              "model",
              "key"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "sandboxes": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "setup": {
                "default": {
                  "mode": "none"
                },
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "none"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "script"
                      },
                      "shell": {
                        "type": "string",
                        "enum": [
                          "sh",
                          "bash"
                        ]
                      },
                      "script": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 65536
                      },
                      "timeoutMs": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 3600000
                      }
                    },
                    "required": [
                      "mode",
                      "shell",
                      "script",
                      "timeoutMs"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "provider": {
                "default": "vercel",
                "type": "string",
                "const": "vercel"
              },
              "auth": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "byok"
                      },
                      "teamId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "projectId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "tokenSecretName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$"
                      }
                    },
                    "required": [
                      "mode",
                      "teamId",
                      "projectId",
                      "tokenSecretName"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "imageProfileId": {
                "default": "vercel-universal",
                "type": "string",
                "enum": [
                  "vercel-universal",
                  "vercel-node22",
                  "vercel-node24",
                  "vercel-node26",
                  "vercel-python",
                  "vercel-ubuntu",
                  "vercel-arch"
                ]
              },
              "resources": {
                "default": {},
                "type": "object",
                "properties": {
                  "vcpus": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 1
                      },
                      {
                        "type": "integer",
                        "minimum": 2,
                        "maximum": 32
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              "timeoutMs": {
                "default": 600000,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 86400000
              },
              "key": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,63}$"
              }
            },
            "required": [
              "name",
              "auth",
              "key"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "schemaVersion",
    "name",
    "description",
    "execution",
    "triggers",
    "harnesses",
    "sandboxes"
  ],
  "additionalProperties": false,
  "title": "Stitch factory configuration",
  "description": "Configuration for stitch-factory.yaml. Use stitch validate for cross-field rules, references and server checks."
}
