{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "llm": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "configuration": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "apiKeyEnvironmentVariable": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "extends": {
      "type": "string"
    },
    "agent": {
      "type": "object",
      "properties": {
        "backend": {
          "type": "string",
          "enum": [
            "lean"
          ]
        }
      }
    },
    "history": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "dbPath": {
          "type": "string"
        }
      }
    },
    "memory": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        }
      }
    },
    "binaryFormats": {
      "anyOf": [
        {
          "type": "boolean",
          "const": false
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "file",
                  "audio"
                ]
              },
              "extensions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "maxSize": {
                "type": "number"
              },
              "mimeTypes": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": [
              "type",
              "extensions"
            ]
          }
        }
      ]
    },
    "contentSource": {
      "type": "string"
    },
    "requirementSource": {
      "type": "string"
    },
    "contentSourceConfig": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "requirementSourceConfig": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "prompts": {
      "type": "object",
      "properties": {
        "backstory": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "guidelines": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "system": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "chat": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "exec": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "review": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "append"
                  ]
                }
              }
            }
          ]
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "match": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "backstory": {
                "type": "string"
              },
              "guidelines": {
                "type": "string"
              },
              "system": {
                "type": "string"
              },
              "chat": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "exec": {
                "type": "string"
              },
              "review": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "match"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "identityProfile": {
      "type": "string"
    },
    "includeCurrentDateAfterGuidelines": {
      "type": "boolean"
    },
    "organization": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      }
    },
    "noDefaultPrompts": {
      "type": "boolean"
    },
    "filesystem": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "string",
          "enum": [
            "all",
            "read",
            "none"
          ]
        }
      ]
    },
    "builtInTools": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "command": {
                    "type": "string"
                  },
                  "timeout": {
                    "type": "number"
                  },
                  "maxTimeout": {
                    "type": "number"
                  },
                  "maxOutputBytes": {
                    "type": "number"
                  },
                  "maxBytes": {
                    "type": "number"
                  },
                  "previewLines": {
                    "type": "number"
                  },
                  "fileSet": {
                    "type": "string",
                    "enum": [
                      "gitignore",
                      "all"
                    ]
                  }
                }
              }
            ]
          }
        }
      ]
    },
    "approvals": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "manual",
            "write",
            "assisted",
            "auto",
            "bypass"
          ]
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "manual",
                "write",
                "assisted",
                "auto",
                "bypass"
              ]
            },
            "rater": {
              "type": "string"
            },
            "alignmentChecker": {
              "type": "string"
            },
            "allow": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ApprovalEntry"
              }
            },
            "deny": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ApprovalEntry"
              }
            },
            "escalate": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ApprovalEntry"
              }
            },
            "raterTimeoutMs": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "mcp": {
              "type": "object",
              "properties": {
                "defaults": {
                  "type": "object",
                  "properties": {
                    "trustAnnotations": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "readOnlyHint",
                          "destructiveHint",
                          "idempotentHint",
                          "openWorldHint"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "servers": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "minLength": 1
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "trustAnnotations": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "readOnlyHint",
                            "destructiveHint",
                            "idempotentHint",
                            "openWorldHint"
                          ]
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          }
        }
      ]
    },
    "tools": {
      "type": "array",
      "items": {}
    },
    "allowedTools": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "middleware": {
      "type": "array",
      "items": {}
    },
    "streamOutput": {
      "type": "boolean"
    },
    "writeOutputToFile": {
      "type": [
        "boolean",
        "string"
      ]
    },
    "writeBinaryOutputsToFile": {
      "type": "boolean"
    },
    "useColour": {
      "type": "boolean"
    },
    "useMouse": {
      "type": "boolean"
    },
    "toolOutputPreviewLines": {
      "type": "number"
    },
    "toolResultCaptureMaxBytes": {
      "description": "UTF-8 bytes of a tool result recorded into run stats and eval results (default 8192). Caps what is RECORDED, not what the model receives (builtInTools.<tool>.maxOutputBytes / maxBytes) and not what is drawn (toolOutputPreviewLines). A longer result is cut on a character boundary. 0 is rejected: it is not \"unlimited\" — set a large number instead.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "evalToolCoverage": {
      "description": "Run-level tool-coverage floor for gth eval, graded against the run aggregate rather than any suite's own tool_coverage.min. min is a percentage (0-100) of the post-waiver denominator; waive lists tool-name patterns removed from that denominator. Absent means the run has no floor.",
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "waive": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "evalToolCallArgs": {
      "description": "Record the arguments of every tool call in gth eval results and allow tool_call_json_path assertions. Arguments are written to the result files and reporters as the model sent them.",
      "type": "boolean"
    },
    "tui": {
      "type": "boolean"
    },
    "streamSessionInferenceLog": {
      "type": "boolean"
    },
    "canInterruptInferenceWithEsc": {
      "type": "boolean"
    },
    "debugLog": {
      "type": "boolean"
    },
    "recursionLimit": {
      "type": "number"
    },
    "consoleLevel": {
      "type": [
        "string",
        "number"
      ]
    },
    "customTools": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string"
                },
                "allow": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "absolute-paths",
                      "directory-traversal",
                      "shell-injection",
                      "null-bytes"
                    ]
                  }
                }
              },
              "required": [
                "description"
              ]
            }
          },
          "timeout": {
            "type": "number"
          }
        },
        "required": [
          "command",
          "description"
        ]
      }
    },
    "commandEnv": {
      "type": "object",
      "properties": {
        "scrubCredentials": {
          "type": "boolean"
        },
        "passthrough": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "additionalProperties": false,
      "description": "Environment of commands Gaunt Sloth spawns (the shell tool and custom tools). scrubCredentials (default false) removes variables whose names end in KEY, TOKEN, SECRET, PASSWORD, PASSWD or CREDENTIALS, plus known cloud credentials; passthrough lists exact names kept when scrubbing is on. With the default, a printed environment reaches the model provider and session history."
    },
    "mcpServers": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "pattern": "^([^*]|[\\s\\S]{2,})$"
      },
      "additionalProperties": {}
    },
    "tls": {
      "type": "object",
      "properties": {
        "extraCaCerts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rejectUnauthorized": {
          "type": "boolean"
        }
      }
    },
    "a2aAgents": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "builtInToolsConfig": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "aiignore": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "patterns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "commands": {
      "type": "object",
      "properties": {
        "pr": {
          "type": "object",
          "properties": {
            "contentSource": {
              "type": "string"
            },
            "requirementSource": {
              "type": "string"
            },
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "logWorkForReviewInSeconds": {
              "type": "number"
            },
            "rating": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "passThreshold": {
                  "type": "number"
                },
                "maxRating": {
                  "type": "number"
                },
                "minRating": {
                  "type": "number"
                },
                "errorOnReviewFail": {
                  "type": "boolean"
                },
                "timeoutMs": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                }
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            },
            "discovery": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "filesystem": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string",
                      "enum": [
                        "all",
                        "read",
                        "none"
                      ]
                    }
                  ]
                },
                "builtInTools": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "command": {
                                "type": "string"
                              },
                              "timeout": {
                                "type": "number"
                              },
                              "maxTimeout": {
                                "type": "number"
                              },
                              "maxOutputBytes": {
                                "type": "number"
                              },
                              "maxBytes": {
                                "type": "number"
                              },
                              "previewLines": {
                                "type": "number"
                              },
                              "fileSet": {
                                "type": "string",
                                "enum": [
                                  "gitignore",
                                  "all"
                                ]
                              }
                            }
                          }
                        ]
                      }
                    }
                  ]
                },
                "customTools": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "const": false
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "parameters": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "allow": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "absolute-paths",
                                      "directory-traversal",
                                      "shell-injection",
                                      "null-bytes"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "description"
                              ]
                            }
                          },
                          "timeout": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "command",
                          "description"
                        ]
                      }
                    }
                  ]
                },
                "tools": {
                  "type": "array",
                  "items": {}
                },
                "allowedTools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "deterministicDiff": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "review": {
          "type": "object",
          "properties": {
            "contentSource": {
              "type": "string"
            },
            "requirementSource": {
              "type": "string"
            },
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "rating": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "passThreshold": {
                  "type": "number"
                },
                "maxRating": {
                  "type": "number"
                },
                "minRating": {
                  "type": "number"
                },
                "errorOnReviewFail": {
                  "type": "boolean"
                },
                "timeoutMs": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                }
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            },
            "discovery": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "filesystem": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "string",
                      "enum": [
                        "all",
                        "read",
                        "none"
                      ]
                    }
                  ]
                },
                "builtInTools": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "command": {
                                "type": "string"
                              },
                              "timeout": {
                                "type": "number"
                              },
                              "maxTimeout": {
                                "type": "number"
                              },
                              "maxOutputBytes": {
                                "type": "number"
                              },
                              "maxBytes": {
                                "type": "number"
                              },
                              "previewLines": {
                                "type": "number"
                              },
                              "fileSet": {
                                "type": "string",
                                "enum": [
                                  "gitignore",
                                  "all"
                                ]
                              }
                            }
                          }
                        ]
                      }
                    }
                  ]
                },
                "customTools": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "const": false
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "parameters": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "allow": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "absolute-paths",
                                      "directory-traversal",
                                      "shell-injection",
                                      "null-bytes"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "description"
                              ]
                            }
                          },
                          "timeout": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "command",
                          "description"
                        ]
                      }
                    }
                  ]
                },
                "tools": {
                  "type": "array",
                  "items": {}
                },
                "allowedTools": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "ask": {
          "type": "object",
          "properties": {
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            }
          }
        },
        "chat": {
          "type": "object",
          "properties": {
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            }
          }
        },
        "code": {
          "type": "object",
          "properties": {
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            }
          }
        },
        "exec": {
          "type": "object",
          "properties": {
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "customTools": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "parameters": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "absolute-paths",
                                  "directory-traversal",
                                  "shell-injection",
                                  "null-bytes"
                                ]
                              }
                            }
                          },
                          "required": [
                            "description"
                          ]
                        }
                      },
                      "timeout": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "command",
                      "description"
                    ]
                  }
                }
              ]
            },
            "allowedTools": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "binaryFormats": {
              "anyOf": [
                {
                  "type": "boolean",
                  "const": false
                },
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "file",
                          "audio"
                        ]
                      },
                      "extensions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "maxSize": {
                        "type": "number"
                      },
                      "mimeTypes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "type",
                      "extensions"
                    ]
                  }
                }
              ]
            }
          }
        },
        "api": {
          "type": "object",
          "properties": {
            "filesystem": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "string",
                  "enum": [
                    "all",
                    "read",
                    "none"
                  ]
                }
              ]
            },
            "builtInTools": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "command": {
                            "type": "string"
                          },
                          "timeout": {
                            "type": "number"
                          },
                          "maxTimeout": {
                            "type": "number"
                          },
                          "maxOutputBytes": {
                            "type": "number"
                          },
                          "maxBytes": {
                            "type": "number"
                          },
                          "previewLines": {
                            "type": "number"
                          },
                          "fileSet": {
                            "type": "string",
                            "enum": [
                              "gitignore",
                              "all"
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "approvals": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "manual",
                    "write",
                    "assisted",
                    "auto",
                    "bypass"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "manual",
                        "write",
                        "assisted",
                        "auto",
                        "bypass"
                      ]
                    },
                    "rater": {
                      "type": "string"
                    },
                    "alignmentChecker": {
                      "type": "string"
                    },
                    "allow": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "escalate": {
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/ApprovalEntry"
                      }
                    },
                    "raterTimeoutMs": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "mcp": {
                      "type": "object",
                      "properties": {
                        "defaults": {
                          "type": "object",
                          "properties": {
                            "trustAnnotations": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "readOnlyHint",
                                  "destructiveHint",
                                  "idempotentHint",
                                  "openWorldHint"
                                ]
                              }
                            }
                          },
                          "additionalProperties": false
                        },
                        "servers": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "trustAnnotations": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "readOnlyHint",
                                    "destructiveHint",
                                    "idempotentHint",
                                    "openWorldHint"
                                  ]
                                }
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              ]
            },
            "port": {
              "type": "number"
            },
            "host": {
              "type": "string"
            },
            "cors": {
              "type": "object",
              "properties": {
                "allowOrigin": {
                  "type": "string"
                },
                "allowMethods": {
                  "type": "string"
                },
                "allowHeaders": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "acp": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "chat",
            "code"
          ]
        }
      }
    },
    "commit": {
      "type": "object",
      "properties": {
        "coAuthor": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string"
            }
          }
        }
      }
    },
    "modelDisplayName": {
      "type": "string"
    },
    "injectModelContext": {
      "type": "boolean"
    },
    "debugDump": {
      "type": "object",
      "properties": {
        "redact": {
          "type": "boolean"
        }
      }
    },
    "allowDirs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "askWriteMode": {
      "type": "boolean"
    },
    "output": {
      "type": "object",
      "properties": {
        "header": {
          "type": "string",
          "enum": [
            "none",
            "compact",
            "debug"
          ]
        },
        "resumeHint": {
          "type": "string",
          "enum": [
            "none",
            "compact",
            "debug"
          ]
        }
      }
    },
    "recap": {
      "type": "string",
      "enum": [
        "off",
        "outstanding",
        "always"
      ]
    },
    "toolLoopGuard": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "properties": {
            "warn": {
              "type": "boolean"
            },
            "halt": {
              "type": "boolean"
            },
            "threshold": {
              "type": "number"
            }
          }
        }
      ]
    },
    "autocompact": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": [
            "number",
            "string"
          ]
        },
        {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "threshold": {
              "type": [
                "number",
                "string"
              ]
            }
          }
        }
      ]
    },
    "reporters": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "subagents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "profile"
        ]
      }
    }
  },
  "additionalProperties": {},
  "$defs": {
    "ApprovalEntry": {
      "oneOf": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "shell"
                },
                "matcher": {
                  "type": "string",
                  "const": "exact"
                },
                "pattern": {
                  "type": "string"
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "shell"
                },
                "matcher": {
                  "type": "string",
                  "const": "glob"
                },
                "pattern": {
                  "type": "string"
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "shell"
                },
                "matcher": {
                  "type": "string",
                  "const": "regexp"
                },
                "pattern": {
                  "type": "string",
                  "maxLength": 200
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            }
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "tool"
                },
                "matcher": {
                  "type": "string",
                  "const": "exact"
                },
                "pattern": {
                  "type": "string"
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "tool"
                },
                "matcher": {
                  "type": "string",
                  "const": "glob"
                },
                "pattern": {
                  "type": "string"
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "tool"
                },
                "matcher": {
                  "type": "string",
                  "const": "regexp"
                },
                "pattern": {
                  "type": "string",
                  "maxLength": 200
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "tool"
                },
                "matcher": {
                  "type": "string",
                  "const": "hint"
                },
                "pattern": {
                  "type": "object",
                  "properties": {
                    "readOnlyHint": {
                      "type": "boolean"
                    },
                    "destructiveHint": {
                      "type": "boolean"
                    },
                    "idempotentHint": {
                      "type": "boolean"
                    },
                    "openWorldHint": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "pattern"
              ],
              "additionalProperties": false
            }
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "mcpTool"
                },
                "matcher": {
                  "type": "string",
                  "const": "exact"
                },
                "server": {
                  "type": "string",
                  "minLength": 1
                },
                "pattern": {
                  "type": "string"
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "server",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "mcpTool"
                },
                "matcher": {
                  "type": "string",
                  "const": "glob"
                },
                "server": {
                  "type": "string",
                  "minLength": 1
                },
                "pattern": {
                  "type": "string"
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "server",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "mcpTool"
                },
                "matcher": {
                  "type": "string",
                  "const": "regexp"
                },
                "server": {
                  "type": "string",
                  "minLength": 1
                },
                "pattern": {
                  "type": "string",
                  "maxLength": 200
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "server",
                "pattern"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "mcpTool"
                },
                "matcher": {
                  "type": "string",
                  "const": "hint"
                },
                "server": {
                  "type": "string",
                  "minLength": 1
                },
                "pattern": {
                  "type": "object",
                  "properties": {
                    "readOnlyHint": {
                      "type": "boolean"
                    },
                    "destructiveHint": {
                      "type": "boolean"
                    },
                    "idempotentHint": {
                      "type": "boolean"
                    },
                    "openWorldHint": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                },
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "rate": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "matcher",
                "server",
                "pattern"
              ],
              "additionalProperties": false
            }
          ]
        }
      ]
    }
  }
}
