{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "description": "JSON schema reference for configuration validation",
      "type": "string"
    },
    "logLevel": {
      "description": "Log level",
      "type": "string",
      "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
      "ref": "LogLevel"
    },
    "server": {
      "description": "Server configuration for ax-code serve and web commands",
      "type": "object",
      "properties": {
        "port": {
          "description": "Port to listen on",
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 65535
        },
        "hostname": {
          "description": "Loopback hostname to listen on; network binds are disabled",
          "type": "string"
        },
        "mdns": {
          "description": "Deprecated; mDNS discovery is disabled",
          "type": "boolean"
        },
        "mdnsDomain": {
          "description": "Deprecated; mDNS discovery is disabled",
          "type": "string"
        },
        "cors": {
          "description": "Additional loopback origins to allow for CORS",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "ref": "ServerConfig"
    },
    "command": {
      "description": "Command configuration, see https://ax-code.app/en/docs/",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "model": {
            "type": "string",
            "$ref": "https://models.dev/model-schema.json#/$defs/Model"
          },
          "subtask": {
            "type": "boolean"
          },
          "workflow": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "sourceTool": {
            "type": "string",
            "enum": ["ax-code", "agents", "opencode", "claude", "builtin", "config"]
          },
          "scope": {
            "type": "string",
            "enum": ["project", "user", "config"]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": ["info", "warn", "error"]
                }
              },
              "required": ["code", "message", "severity"],
              "additionalProperties": false
            }
          },
          "allowShell": {
            "type": "boolean"
          }
        },
        "required": ["template"],
        "additionalProperties": false
      }
    },
    "skills": {
      "description": "Additional skill folder paths",
      "type": "object",
      "properties": {
        "paths": {
          "description": "Additional paths to skill folders",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "urls": {
          "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "watcher": {
      "type": "object",
      "properties": {
        "ignore": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "directoryScope": {
      "description": "Controls the startup guard against launching ax-code in an overly broad directory.",
      "type": "object",
      "properties": {
        "enabled": {
          "description": "Warn before indexing an unusually broad directory (home, Desktop, Downloads, Documents, a filesystem root, or a very large top-level listing). Default: true.",
          "type": "boolean"
        },
        "maxTopLevelEntries": {
          "description": "Top-level entry count above which a directory is treated as broad. Default: 300.",
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "extraDenylist": {
          "description": "Additional absolute paths always treated as broad.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "plugin": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "snapshot": {
      "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.",
      "type": "boolean"
    },
    "autoupdate": {
      "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string",
          "const": "notify"
        }
      ]
    },
    "shell": {
      "description": "Default shell to use for terminal and bash tool (e.g. /bin/bash, /usr/bin/zsh). Overrides $SHELL environment variable.",
      "type": "string"
    },
    "language": {
      "description": "UI language (English only)",
      "type": "string",
      "const": "en"
    },
    "disabled_providers": {
      "description": "Disable providers that are loaded automatically",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled_providers": {
      "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "model": {
      "type": "string",
      "$ref": "https://models.dev/model-schema.json#/$defs/Model",
      "description": "Model to use in the format of provider/model, eg openai/gpt-5"
    },
    "llm_routing": {
      "description": "Explicit ordered recovery targets. Empty by default; only user-owned config grants targets.",
      "type": "object",
      "properties": {
        "fallback": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "providerID": {
                "type": "string",
                "minLength": 1
              },
              "modelID": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["providerID", "modelID"],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "small_model": {
      "type": "string",
      "$ref": "https://models.dev/model-schema.json#/$defs/Model",
      "description": "Explicit auxiliary model in provider/model format. When omitted, auxiliary tasks inherit the selected model."
    },
    "default_agent": {
      "description": "Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.",
      "type": "string"
    },
    "username": {
      "description": "Custom username to display in conversations instead of system username",
      "type": "string"
    },
    "mode": {
      "description": "@deprecated Use `agent` field instead.",
      "type": "object",
      "properties": {
        "build": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "plan": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {
        "ref": "AgentConfig",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "$ref": "https://models.dev/model-schema.json#/$defs/Model"
          },
          "variant": {
            "description": "Default model variant for this agent (applies only when using the agent's configured model).",
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "prompt": {
            "type": "string"
          },
          "tools": {
            "description": "@deprecated Use 'permission' field instead",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "disable": {
            "type": "boolean"
          },
          "description": {
            "description": "Description of when to use the agent",
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": ["subagent", "primary", "all"]
          },
          "hidden": {
            "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
            "type": "boolean"
          },
          "tier": {
            "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
            "type": "string",
            "enum": ["core", "specialist", "internal"]
          },
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "color": {
            "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              {
                "type": "string",
                "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
              }
            ]
          },
          "steps": {
            "description": "Maximum number of agentic iterations before forcing text-only response",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxSteps": {
            "description": "@deprecated Use 'steps' field instead.",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "permission": {
            "ref": "PermissionConfig",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "__originalKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "read": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "edit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "glob": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "grep": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "list": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "bash": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "task": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "external_directory": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "todowrite": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "todoread": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "question": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "webfetch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "websearch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "codesearch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "lsp": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "doom_loop": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "skill": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      "ref": "PermissionObjectConfig"
                    }
                  ],
                  "ref": "PermissionRuleConfig"
                }
              },
              {
                "type": "string",
                "enum": ["ask", "allow", "deny"],
                "ref": "PermissionActionConfig"
              }
            ]
          }
        },
        "additionalProperties": {}
      }
    },
    "agent": {
      "description": "Agent configuration, see https://ax-code.app/en/docs/",
      "type": "object",
      "properties": {
        "plan": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "build": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "general": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "explore": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "scout": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "title": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "summary": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        },
        "compaction": {
          "ref": "AgentConfig",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "$ref": "https://models.dev/model-schema.json#/$defs/Model"
            },
            "variant": {
              "description": "Default model variant for this agent (applies only when using the agent's configured model).",
              "type": "string"
            },
            "temperature": {
              "type": "number"
            },
            "top_p": {
              "type": "number"
            },
            "prompt": {
              "type": "string"
            },
            "tools": {
              "description": "@deprecated Use 'permission' field instead",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "disable": {
              "type": "boolean"
            },
            "description": {
              "description": "Description of when to use the agent",
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": ["subagent", "primary", "all"]
            },
            "hidden": {
              "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
              "type": "boolean"
            },
            "tier": {
              "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
              "type": "string",
              "enum": ["core", "specialist", "internal"]
            },
            "options": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "color": {
              "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^#[0-9a-fA-F]{6}$"
                },
                {
                  "type": "string",
                  "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
                }
              ]
            },
            "steps": {
              "description": "Maximum number of agentic iterations before forcing text-only response",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "maxSteps": {
              "description": "@deprecated Use 'steps' field instead.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "permission": {
              "ref": "PermissionConfig",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "__originalKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "read": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "edit": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "glob": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "grep": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "list": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "bash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "external_directory": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "todowrite": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "todoread": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "question": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "webfetch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "websearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "codesearch": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "lsp": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    },
                    "doom_loop": {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    "skill": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "string",
                            "enum": ["ask", "allow", "deny"],
                            "ref": "PermissionActionConfig"
                          },
                          "ref": "PermissionObjectConfig"
                        }
                      ],
                      "ref": "PermissionRuleConfig"
                    }
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                }
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {
        "ref": "AgentConfig",
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "$ref": "https://models.dev/model-schema.json#/$defs/Model"
          },
          "variant": {
            "description": "Default model variant for this agent (applies only when using the agent's configured model).",
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "prompt": {
            "type": "string"
          },
          "tools": {
            "description": "@deprecated Use 'permission' field instead",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "disable": {
            "type": "boolean"
          },
          "description": {
            "description": "Description of when to use the agent",
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": ["subagent", "primary", "all"]
          },
          "hidden": {
            "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
            "type": "boolean"
          },
          "tier": {
            "description": "Agent visibility tier: core (always shown in picker), specialist (expandable, accessed via @-mention), internal (hidden)",
            "type": "string",
            "enum": ["core", "specialist", "internal"]
          },
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "color": {
            "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              {
                "type": "string",
                "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
              }
            ]
          },
          "steps": {
            "description": "Maximum number of agentic iterations before forcing text-only response",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxSteps": {
            "description": "@deprecated Use 'steps' field instead.",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "permission": {
            "ref": "PermissionConfig",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "__originalKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "read": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "edit": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "glob": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "grep": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "list": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "bash": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "task": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "external_directory": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "todowrite": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "todoread": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "question": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "webfetch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "websearch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "codesearch": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "lsp": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  },
                  "doom_loop": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "skill": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "enum": ["ask", "allow", "deny"],
                          "ref": "PermissionActionConfig"
                        },
                        "ref": "PermissionObjectConfig"
                      }
                    ],
                    "ref": "PermissionRuleConfig"
                  }
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": ["ask", "allow", "deny"],
                      "ref": "PermissionActionConfig"
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string",
                        "enum": ["ask", "allow", "deny"],
                        "ref": "PermissionActionConfig"
                      },
                      "ref": "PermissionObjectConfig"
                    }
                  ],
                  "ref": "PermissionRuleConfig"
                }
              },
              {
                "type": "string",
                "enum": ["ask", "allow", "deny"],
                "ref": "PermissionActionConfig"
              }
            ]
          }
        },
        "additionalProperties": {}
      }
    },
    "provider": {
      "description": "Custom provider configurations and model overrides",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "api": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "env": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string"
          },
          "npm": {
            "type": "string"
          },
          "options": {
            "type": "object",
            "properties": {
              "apiKey": {
                "type": "string"
              },
              "baseURL": {
                "type": "string"
              },
              "enterpriseUrl": {
                "description": "GitHub Enterprise URL for copilot authentication",
                "type": "string"
              },
              "setCacheKey": {
                "description": "Enable promptCacheKey for this provider (default false)",
                "type": "boolean"
              },
              "axTrust": {
                "description": "Send X-AX-Prompt-Cache-Key for AX Trust session affinity. AX Trust connections send it by default; set false to disable. Other providers send it only when true.",
                "type": "boolean"
              },
              "timeout": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
                  },
                  {
                    "type": "boolean",
                    "const": false,
                    "description": "Disable timeout for this provider entirely."
                  }
                ]
              },
              "chunkTimeout": {
                "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "toolProfile": {
                "description": "Tool surface: \"coding\" focuses on coding, delegation and verification; \"full\" exposes every enabled tool (cloud default). AX Engine defaults to the smaller \"core\" profile.",
                "type": "string",
                "enum": ["core", "coding", "full"]
              }
            },
            "additionalProperties": {}
          },
          "models": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "family": {
                  "type": "string"
                },
                "release_date": {
                  "type": "string"
                },
                "attachment": {
                  "type": "boolean"
                },
                "reasoning": {
                  "type": "boolean"
                },
                "temperature": {
                  "default": false,
                  "type": "boolean"
                },
                "tool_call": {
                  "type": "boolean"
                },
                "interleaved": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "const": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": ["reasoning_content", "reasoning_details"]
                        }
                      },
                      "required": ["field"],
                      "additionalProperties": false
                    }
                  ]
                },
                "limit": {
                  "type": "object",
                  "properties": {
                    "context": {
                      "type": "number"
                    },
                    "input": {
                      "type": "number"
                    },
                    "output": {
                      "type": "number"
                    }
                  },
                  "required": ["context", "output"],
                  "additionalProperties": false
                },
                "modalities": {
                  "type": "object",
                  "properties": {
                    "input": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["text", "audio", "image", "video", "pdf"]
                      }
                    },
                    "output": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": ["text", "audio", "image", "video", "pdf"]
                      }
                    }
                  },
                  "required": ["input", "output"],
                  "additionalProperties": false
                },
                "experimental": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": ["alpha", "beta", "deprecated", "active"]
                },
                "options": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "headers": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "provider": {
                  "type": "object",
                  "properties": {
                    "npm": {
                      "type": "string"
                    },
                    "api": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "variants": {
                  "description": "Variant-specific configuration",
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "description": "Disable this variant for the model",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": {}
                  }
                },
                "websearch": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "management": {
            "type": "string",
            "enum": ["custom-api", "ax-trust"]
          },
          "whitelist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blacklist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "ref": "ProviderConfig"
      }
    },
    "mcp": {
      "description": "MCP (Model Context Protocol) server configurations",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "local",
                    "description": "Type of MCP server connection"
                  },
                  "command": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Command and arguments to run the MCP server"
                  },
                  "environment": {
                    "description": "Environment variables to set when running the MCP server",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "enabled": {
                    "description": "Enable or disable the MCP server on startup",
                    "type": "boolean"
                  },
                  "timeout": {
                    "description": "Timeout in ms for MCP server requests. Defaults to 30000 (30 seconds) if not specified.",
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "webmcp": {
                    "description": "Experimental pinned WebMCP bridge policy; requires explicit enablement and interactive approval for every call",
                    "type": "object",
                    "properties": {
                      "allowedOrigins": {
                        "maxItems": 8,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 240
                        },
                        "description": "Exact permitted origins; no wildcards, credentials, paths, queries or fragments. Empty (the product default) navigates any http(s) origin; a non-empty list narrows navigation to exactly those origins."
                      },
                      "headless": {
                        "description": "Use an isolated headless Chrome instead of a visible window",
                        "type": "boolean"
                      },
                      "persistentProfile": {
                        "description": "Use a persistent AX-owned browser profile so authenticated WebMCP tools work. Requires the managed allowPersistentProfile requirement and forces a visible window.",
                        "type": "boolean"
                      },
                      "vendored": {
                        "description": "Launch a vendored, integrity-pinned bridge install instead of npx. Requires the managed allowVendored requirement.",
                        "type": "boolean"
                      },
                      "read": {
                        "description": "Enable the T1 read tier: page snapshot, screenshot and console tools for granted origins. Default off. A managed allowRead: false forces it off.",
                        "type": "boolean"
                      },
                      "interact": {
                        "description": "Enable the T2 interact tier: click, hover, wait_for, fill, fill_form, press_key and handle_dialog for granted origins, each confirmed interactively. Default off. A managed allowInteract: false forces it off.",
                        "type": "boolean"
                      },
                      "executablePath": {
                        "description": "Optional explicit Chrome 150+ executable; never attaches to an existing browser session",
                        "type": "string",
                        "maxLength": 4096
                      }
                    },
                    "required": ["allowedOrigins"],
                    "additionalProperties": false,
                    "ref": "WebMcpProfileConfig"
                  }
                },
                "required": ["type", "command"],
                "additionalProperties": false,
                "ref": "McpLocalConfig"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "remote",
                    "description": "Type of MCP server connection"
                  },
                  "url": {
                    "type": "string",
                    "description": "URL of the remote MCP server"
                  },
                  "allowLoopback": {
                    "description": "Opt in to localhost, 127.0.0.1, or [::1] HTTP(S) MCP on the configured origin only. Defaults to false; project entries still require trust.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "Enable or disable the MCP server on startup",
                    "type": "boolean"
                  },
                  "headers": {
                    "description": "Headers to send with the request",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "oauth": {
                    "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "clientId": {
                            "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
                            "type": "string"
                          },
                          "clientSecret": {
                            "description": "OAuth client secret (if required by the authorization server)",
                            "type": "string"
                          },
                          "scope": {
                            "description": "OAuth scopes to request during authorization",
                            "type": "string"
                          }
                        },
                        "additionalProperties": false,
                        "ref": "McpOAuthConfig"
                      },
                      {
                        "type": "boolean",
                        "const": false
                      }
                    ]
                  },
                  "timeout": {
                    "description": "Timeout in ms for MCP server requests. Defaults to 30000 (30 seconds) if not specified.",
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": ["type", "url"],
                "additionalProperties": false,
                "ref": "McpRemoteConfig"
              }
            ],
            "description": "MCP server config. Tools surface as permission keys `<server>_<tool>` — use the top-level `permission` map (with wildcards) to allow / deny them, or scope them per agent via `agent.<name>.permission`."
          },
          {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              }
            },
            "required": ["enabled"],
            "additionalProperties": false
          }
        ]
      }
    },
    "formatter": {
      "anyOf": [
        {
          "type": "boolean",
          "const": false
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "disabled": {
                "type": "boolean"
              },
              "command": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "environment": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "extensions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          }
        }
      ]
    },
    "lsp": {
      "anyOf": [
        {
          "type": "boolean",
          "const": false
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "disabled": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": ["disabled"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "extensions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "languageId": {
                    "type": "string"
                  },
                  "disabled": {
                    "type": "boolean"
                  },
                  "semantic": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "concurrency": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "capabilities": {
                    "type": "object",
                    "properties": {
                      "hover": {
                        "type": "boolean"
                      },
                      "definition": {
                        "type": "boolean"
                      },
                      "references": {
                        "type": "boolean"
                      },
                      "implementation": {
                        "type": "boolean"
                      },
                      "documentSymbol": {
                        "type": "boolean"
                      },
                      "workspaceSymbol": {
                        "type": "boolean"
                      },
                      "callHierarchy": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "env": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "initialization": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        }
      ]
    },
    "instructions": {
      "description": "Additional instruction files or patterns to include",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "layout": {
      "description": "@deprecated Always uses stretch layout.",
      "type": "string",
      "enum": ["auto", "stretch"],
      "ref": "LayoutConfig"
    },
    "permission": {
      "ref": "PermissionConfig",
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "__originalKeys": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "read": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "edit": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "glob": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "grep": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "list": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "bash": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "task": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "external_directory": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "todowrite": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "todoread": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "question": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "webfetch": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "websearch": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "codesearch": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "lsp": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            },
            "doom_loop": {
              "type": "string",
              "enum": ["ask", "allow", "deny"],
              "ref": "PermissionActionConfig"
            },
            "skill": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string",
                    "enum": ["ask", "allow", "deny"],
                    "ref": "PermissionActionConfig"
                  },
                  "ref": "PermissionObjectConfig"
                }
              ],
              "ref": "PermissionRuleConfig"
            }
          },
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["ask", "allow", "deny"],
                "ref": "PermissionActionConfig"
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string",
                  "enum": ["ask", "allow", "deny"],
                  "ref": "PermissionActionConfig"
                },
                "ref": "PermissionObjectConfig"
              }
            ],
            "ref": "PermissionRuleConfig"
          }
        },
        {
          "type": "string",
          "enum": ["ask", "allow", "deny"],
          "ref": "PermissionActionConfig"
        }
      ]
    },
    "autonomous": {
      "description": "Enable autonomous mode (default: true)",
      "type": "boolean"
    },
    "autonomy": {
      "description": "Autonomous workload budgets and stall breakers. Prefer this over scattering limits across session and experimental keys. See /limits.",
      "type": "object",
      "properties": {
        "profile": {
          "description": "Named workload profile that seeds budget defaults: quick (tight), standard (shipped defaults), long (multi-file batches), goal (goal-scale headroom), custom (no profile seeds). Explicit autonomy.budget / session.* fields always win over the profile.",
          "type": "string",
          "enum": ["quick", "standard", "long", "goal", "custom"]
        },
        "budget": {
          "description": "First-class autonomy budgets. Takes precedence over session.* and experimental.autonomous_caps when set.",
          "type": "object",
          "properties": {
            "model_turns": {
              "type": "object",
              "properties": {
                "per_segment": {
                  "description": "Outer-loop steps per auto-continuation segment (alias: session.max_steps; default 500)",
                  "type": "integer",
                  "minimum": 10,
                  "maximum": 9007199254740991
                },
                "total": {
                  "description": "Cumulative outer-loop steps across continuations, goals, and Super-Long (alias: session.max_total_steps)",
                  "type": "integer",
                  "minimum": 10,
                  "maximum": 9007199254740991
                }
              },
              "additionalProperties": false
            },
            "continuations": {
              "description": "Auto-continuations after a per-segment step limit (alias: session.max_continuations; default 3)",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "todo_retries": {
              "description": "Auto-continuations while todos remain pending (alias: session.max_todo_retries; default 10)",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "tool_calls": {
              "type": "object",
              "properties": {
                "per_segment": {
                  "description": "Blast-radius tool-call ceiling per continuation (alias: experimental.autonomous_caps.steps; default 500)",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "rate": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "description": "Max tool calls in a rolling window (default 30). Protects against parallel tool floods.",
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "window_seconds": {
                      "description": "Rolling window length in seconds for the tool-call rate limit (default 10)",
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "per_tool": {
                  "description": "Per-tool call-count caps (alias: experimental.autonomous_caps.perTool). 0 or negative disables.",
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                }
              },
              "additionalProperties": false
            },
            "changes": {
              "type": "object",
              "properties": {
                "files_total": {
                  "description": "Max distinct files changed in an autonomous run (alias: experimental.autonomous_caps.files)",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "lines_total": {
                  "description": "Max instrumented line-change total (alias: experimental.autonomous_caps.lines)",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "lines_exempt_paths": {
                  "description": "Glob patterns whose writes count toward the file cap but not the line cap — lockfiles and generated snapshots by default (alias: experimental.autonomous_caps.linesExemptPaths)",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "blocked_paths": {
                  "description": "Glob patterns that refuse writes (alias: experimental.autonomous_caps.blockedPaths)",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "stall": {
          "description": "Stall / loop breakers that are independent of workload step ceilings",
          "type": "object",
          "properties": {
            "tool_only_turns": {
              "description": "Hard stop after this many consecutive tool-only model finishes (default 35)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "tool_only_nudge": {
              "description": "First synthesis checkpoint during a tool-only streak (default 15)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "tool_only_final_nudge": {
              "description": "Final warning checkpoint before the hard stop (default max-5)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "failed_mutation_attempts": {
              "description": "Segment-cumulative cap on failed mutating tool attempts (edit/write/multiedit/apply_patch/todowrite that errored). Reset by a successful mutation or a text finish. Bounds fail -> read -> fail loops that evade the consecutive all-error ladder (default 30).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "max_consecutive_errors": {
              "description": "Hard stop after this many consecutive provider/tool errors in the outer loop (default 3). Raise to tolerate flaky providers; lower for stricter failure handling.",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "super_long": {
      "description": "Enable Super-Long supervised long-run mode (default: on for models with a 64k+ context window, thinking, and prompt caching — e.g. Qwen 3.7 Max/Plus; off otherwise)",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "properties": {
            "enabled": {
              "description": "Enable Super-Long supervised long-run mode",
              "type": "boolean"
            },
            "duration_hours": {
              "description": "Runtime ceiling for a Super-Long run in hours (default and hard maximum: 72)",
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 72
            },
            "pacing_grace_minutes": {
              "description": "Minutes from run start before provider request pacing engages (default 120). The grace window keeps the productive early phase of an agentic run unthrottled; 0 paces from the first request.",
              "type": "number",
              "minimum": 0,
              "maximum": 4320
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "isolation": {
      "description": "Execution isolation configuration",
      "type": "object",
      "properties": {
        "mode": {
          "description": "Isolation mode: read-only blocks all mutations, workspace-write allows writes inside workspace only, full-access disables isolation. Defaults to full-access (sandbox off)",
          "type": "string",
          "enum": ["read-only", "workspace-write", "full-access"],
          "ref": "IsolationMode"
        },
        "network": {
          "description": "Allow network access from tools. Defaults to enabled in full-access and disabled in read-only and workspace-write modes",
          "type": "boolean"
        },
        "protected": {
          "description": "Additional paths relative to workspace root that are protected from writes. .git and .ax-code are always protected",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "backend": {
          "description": "Isolation enforcement backend: app (portable tool checks, default), os (kernel sandbox for bash when available), auto (prefer os with app fallback)",
          "type": "string",
          "enum": ["app", "os", "auto"],
          "ref": "IsolationBackend"
        }
      },
      "additionalProperties": false,
      "ref": "IsolationConfig"
    },
    "webmcp": {
      "description": "Enterprise WebMCP requirement for the experimental chrome-devtools bridge. Managed config only — ignored from project, user, remote and inline config so a repository cannot set or loosen it. allow: false blocks the bridge; allowedOrigins narrows the exact origins admitted. A managed allow never enables the bridge and never bypasses the per-call interactive webmcp approval.",
      "type": "object",
      "properties": {
        "allow": {
          "description": "Managed allow/deny for the experimental WebMCP bridge. false blocks the bridge entirely.",
          "type": "boolean"
        },
        "allowedOrigins": {
          "description": "Managed narrowing list. When set, only these exact origins stay usable: an unrestricted profile narrows to this list; a configured profile is intersected with it and an empty intersection fails closed.",
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 240
          }
        },
        "allowPersistentProfile": {
          "description": "Managed opt-in for a persistent AX-owned browser profile. Default off; never the user's main profile.",
          "type": "boolean"
        },
        "allowVendored": {
          "description": "Managed opt-in for a vendored, integrity-pinned bridge install instead of npx. Default off.",
          "type": "boolean"
        },
        "allowRead": {
          "description": "Managed gate for the T1 read tier. Default off. false forces the read tools off even when the profile sets read: true; it can only restrict, never enable.",
          "type": "boolean"
        },
        "allowInteract": {
          "description": "Managed gate for the T2 interact tier. false forces the interact tools off even when the profile sets interact: true; it can only restrict, never enable.",
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "ref": "WebMcpRequirementConfig"
    },
    "tools": {
      "description": "@deprecated Use 'permission' field instead",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "boolean"
      }
    },
    "session": {
      "description": "Session lifecycle management",
      "type": "object",
      "properties": {
        "ttl_days": {
          "description": "Auto-prune sessions older than this many days (default: 30)",
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "auto_prune": {
          "description": "Automatically prune expired sessions on startup (default: true)",
          "type": "boolean"
        },
        "max_steps": {
          "description": "Maximum agentic steps per session turn before stopping (default: 500)",
          "type": "integer",
          "minimum": 10,
          "maximum": 9007199254740991
        },
        "max_continuations": {
          "description": "In autonomous mode, how many times to auto-continue after hitting step limit (default: 3, 0 to disable)",
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "max_total_steps": {
          "description": "Hard ceiling on cumulative steps across ALL auto-continuations, including active goals and Super-Long runs (default: max_steps × (max_continuations + 1); active-goal and Super-Long runs default: max_steps × 40). When the ceiling ends an active-goal run, the goal is paused and resumable with /goal resume",
          "type": "integer",
          "minimum": 10,
          "maximum": 9007199254740991
        },
        "max_todo_retries": {
          "description": "In autonomous mode, how many times to auto-continue when todos remain pending after the model stops (default: 10, 0 to disable)",
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "routing": {
      "description": "Specialist agent auto-routing and message-complexity routing settings",
      "type": "object",
      "properties": {
        "disable": {
          "description": "Disable automatic specialist agent routing based on message keywords. Default: false.",
          "type": "boolean"
        },
        "mode": {
          "description": "@deprecated Routing mode is no longer used. Field accepted for backwards compatibility but ignored.",
          "type": "string",
          "enum": ["off", "delegate", "switch"]
        },
        "auto_switch": {
          "description": "@deprecated Use routing.disable instead. Field accepted for backwards compatibility but ignored.",
          "type": "boolean"
        },
        "llm": {
          "description": "Enable LLM-based message-complexity classification so simple queries use a small/fast model. Default: false unless the AX_CODE_SMART_LLM flag is set.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "compaction": {
      "type": "object",
      "properties": {
        "auto": {
          "description": "Enable automatic compaction when context is full (default: true)",
          "type": "boolean"
        },
        "prune": {
          "description": "Enable pruning of old tool outputs (default: true)",
          "type": "boolean"
        },
        "reserved": {
          "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "browser": {
      "description": "Browser integration settings",
      "type": "object",
      "properties": {
        "interceptOpen": {
          "description": "Intercept browser-open commands (open/xdg-open/start) targeting local HTML files or localhost URLs to prevent unexpected focus-steals during HTML development. Defaults to true.",
          "type": "boolean"
        },
        "cdpUrl": {
          "description": "Attach to a running Chrome/Edge via CDP (e.g. http://localhost:9222, started with --remote-debugging-port) instead of launching a headless browser. browser_* tools then observe and act in the real browser.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "computer": {
      "description": "Computer-use (desktop control) integration. Disabled unless provider is set.",
      "type": "object",
      "properties": {
        "provider": {
          "description": "Computer-use backend, served by the ax-computer server (canonical AX Computer protocol): \"axnative\" (macOS) or \"cua\" (cross-platform) select the server backend; \"external\" treats computer.command as a complete canonical-protocol MCP server. All values require a resolvable server command (computer.command, AX_COMPUTER_COMMAND, or ax-computer on PATH). Unset = computer tools unavailable.",
          "type": "string",
          "enum": ["cua", "axnative", "external"]
        },
        "command": {
          "description": "Computer-use server command. Precedence: this config > AX_COMPUTER_COMMAND env > ax-computer on PATH. For aliases this is the ax-computer server; for \"external\" it is the full canonical-protocol server command.",
          "type": "string"
        },
        "args": {
          "description": "Server command arguments (default: [\"mcp\", \"--backend\", <provider>] for aliases, [] for external)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "overrides": {
          "description": "Per-app provider overrides: map an application name (as observed by computer_snapshot) to \"cua\", \"axnative\", or \"external\". Observations and element acts against a matching app route to the named provider; everything else uses `provider`. Element ids are only valid against the provider that issued them — crossing providers requires a fresh observation.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": ["cua", "axnative", "external"]
          }
        },
        "grounder": {
          "description": "Grounder fallback for natural-language computer_action targets. Optional; unset = describe targets unavailable.",
          "type": "object",
          "properties": {
            "model": {
              "type": "string",
              "description": "Vision model used to resolve natural-language action targets to screenshot coordinates (e.g. a UI-TARS endpoint), as \"provider/model\""
            }
          },
          "required": ["model"],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "ops": {
      "description": "Cloud Operations mode settings (see docs/guides/cloud-operations.md)",
      "type": "object",
      "properties": {
        "strict": {
          "description": "Cloud-operations strict mode (default: false). When true, destructive-classified bash commands are denied outright — the interactive bash_destructive ask is replaced by a hard deny — and the model is directed to the sanctioned ops workflow (ops_plan -> ops_diff -> ops_approve -> ops_apply with an approved plan token). Set in trusted config only; untrusted project config cannot enable it.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "attachment": {
      "description": "File attachment settings",
      "type": "object",
      "properties": {
        "image": {
          "type": "object",
          "properties": {
            "auto_resize": {
              "description": "Automatically resize images that exceed limits before sending to the model (default: true)",
              "type": "boolean"
            },
            "max_width": {
              "description": "Maximum image width in pixels (default: 2000)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "max_height": {
              "description": "Maximum image height in pixels (default: 2000)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "max_base64_bytes": {
              "description": "Maximum image size in base64 bytes (default: 5242880 = 5MiB)",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "experimental": {
      "type": "object",
      "properties": {
        "disable_paste_summary": {
          "type": "boolean"
        },
        "batch_tool": {
          "description": "Enable the batch tool",
          "type": "boolean"
        },
        "context_recovery": {
          "description": "Enable bounded current-session evidence recovery after compaction",
          "type": "boolean"
        },
        "mcp_tool_discovery": {
          "description": "Discover MCP tool schemas on demand while keeping built-in tools eager",
          "type": "boolean"
        },
        "tail_reminders": {
          "description": "Project changing task reminders after stable request history for cache experiments",
          "type": "boolean"
        },
        "read_only_recipes": {
          "description": "Enable bounded declarative read-only tool recipes",
          "type": "boolean"
        },
        "context_tools": {
          "description": "Enable experimental context-introspection tools (context_status)",
          "type": "boolean"
        },
        "openTelemetry": {
          "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
          "type": "boolean"
        },
        "primary_tools": {
          "description": "Tools that should only be available to primary agents.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "continue_loop_on_deny": {
          "description": "Continue the agent loop when a tool call is denied",
          "type": "boolean"
        },
        "mcp_timeout": {
          "description": "Timeout in milliseconds for model context protocol (MCP) requests",
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "autonomous_escalate_low_confidence": {
          "description": "When autonomous mode auto-answers a clarification question with low confidence, escalate to the user instead of guessing. Default: true.",
          "type": "boolean"
        },
        "autonomous_strict_permission": {
          "description": "When autonomous mode encounters a permission whose risk class is unknown, prompt instead of auto-approving. Default: true. Set false only to preserve legacy compatibility.",
          "type": "boolean"
        },
        "permission_idle_once": {
          "description": "ADR-138: narrow exception to the interactive-only permission contract. Only fires while running unattended (autonomous) with the sandbox off (full-access). Each session's oldest pending ask gets 15 seconds; queued asks get a fresh countdown when promoted. Live mode changes cancel ineligible countdowns. The ask carries autoOnceAt so clients can render the countdown; any human reply cancels the deadline.",
          "type": "object",
          "properties": {
            "enabled": {
              "description": "Idle 'Allow once': auto-reply once after a countdown for allowlisted interactive permissions. Default: true; the autonomous + full-access posture is the opt-in. Set false to disable.",
              "type": "boolean"
            },
            "timeout_ms": {
              "description": "Deprecated: retained for config compatibility. Allow Once countdowns are fixed at 15000 ms.",
              "type": "integer",
              "minimum": 5000,
              "maximum": 300000
            },
            "permissions": {
              "description": "Permissions that may auto-reply once. Default: every pending permission, including requireInteractive. Requires autonomous mode with full-access; WebMCP additionally requires its corresponding bridge to be connected.",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "autonomous_caps": {
          "description": "Override the default autonomous-mode blast-radius caps. Any field omitted falls back to the constant default.",
          "type": "object",
          "properties": {
            "steps": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "files": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "lines": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "blockedPaths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "linesExemptPaths": {
              "description": "Glob patterns whose writes count toward the file cap but not the line cap.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "perTool": {
              "description": "Per-tool call-count caps. 0 or negative disables the cap for that tool. Tools not listed are unrestricted at the per-tool layer.",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            }
          },
          "additionalProperties": false
        },
        "planner_architect_model": {
          "description": "Provider/model id used for plan generation and replanning when set; defaults to the executor model.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "quality": {
      "type": "object",
      "properties": {
        "critic_enabled": {
          "description": "Run the autonomous-mode diff critic at every phase boundary. Default: false.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "modes": {
      "description": "Execution modes: local, cloud, hybrid placement, multi-provider council, and arena ensemble (ADR-049).",
      "type": "object",
      "properties": {
        "default": {
          "description": "Default execution mode. When unset: hybrid if local AX Engine is available, else cloud. Arena/council are typically invoked via tools rather than as the global default.",
          "type": "string",
          "enum": ["local", "cloud", "hybrid", "arena", "council"]
        },
        "hybrid": {
          "description": "Hybrid local/cloud placement policy",
          "type": "object",
          "properties": {
            "preferLocalWhenAvailable": {
              "description": "Prefer local placement when AX Engine (or configured local) is available. Default: true.",
              "type": "boolean"
            },
            "escalateOnHighComplexity": {
              "description": "Route high-complexity work to cloud when hybrid is active. Default: true.",
              "type": "boolean"
            },
            "localProviderID": {
              "description": "Provider id treated as local for hybrid placement. Default: ax-engine.",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "council": {
          "description": "Multi-provider council (advisory review / design) settings",
          "type": "object",
          "properties": {
            "enabled": {
              "description": "Allow the council multi-provider advisory tool. Default: true.",
              "type": "boolean"
            },
            "maxMembers": {
              "description": "Maximum council members per invocation (default: 3, hard max: 6).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "timeoutMs": {
              "description": "Per-member timeout in ms for council fan-out (default: 180000; reasoning models receive reasoningTimeoutScale times this budget).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "reasoningTimeoutScale": {
              "description": "Timeout multiplier applied to members whose model declares reasoning capability (default: 3). Raise when slow reasoning members (e.g. DeepSeek V4 Pro on large contexts) time out.",
              "type": "number",
              "minimum": 1,
              "maximum": 10
            },
            "memberTimeoutMs": {
              "description": "Absolute per-member timeout overrides in ms, keyed by \"providerID\" or \"providerID/modelID\". Takes precedence over timeoutMs and reasoningTimeoutScale for matching members.",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "debateRounds": {
              "description": "Optional multi-round anonymous debate rounds (default: 0; Phase 3+).",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "chairman": {
              "description": "Append one blinded chairman synthesis call after aggregation (default: false). Deterministic tiering remains the primary output; the chairman receives anonymized findings only.",
              "type": "boolean"
            },
            "adaptive": {
              "description": "Adaptive fan-out (default: false): start council with two members and expand one at a time up to maxMembers while coverage is below quorum or dissent is material. Expansion triggers are harness-tunable constants.",
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "arena": {
          "description": "Arena best-of-N implementation comparison settings",
          "type": "object",
          "properties": {
            "enabled": {
              "description": "Enable arena multi-contestant mode tools. Default: false; opt in per project.",
              "type": "boolean"
            },
            "maxContestants": {
              "description": "Maximum arena contestants (default: 3, hard max: 5).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "timeoutMs": {
              "description": "Per-member timeout in ms for arena fan-out (falls back to council timeout, then 60000).",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "reasoningTimeoutScale": {
              "description": "Timeout multiplier applied to contestants whose model declares reasoning capability (falls back to modes.council.reasoningTimeoutScale, then 3).",
              "type": "number",
              "minimum": 1,
              "maximum": 10
            },
            "memberTimeoutMs": {
              "description": "Absolute per-contestant timeout overrides in ms, keyed by \"providerID\" or \"providerID/modelID\" (falls back to modes.council.memberTimeoutMs). Exact model keys win over provider-wide keys.",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "judge": {
              "description": "Run one blinded rubric judge call to rank plan-mode proposals (default: true). The judge scores requirement coverage, feasibility, verification plan, and risk evidence; self-assessed risk remains display-only.",
              "type": "boolean"
            },
            "strategy": {
              "description": "Ranking strategy for arena candidates. verify_first is the recommended default (never pure popularity).",
              "type": "string",
              "enum": ["verify_first", "diversity", "hybrid_score"]
            }
          },
          "additionalProperties": false
        },
        "budget": {
          "description": "Ensemble cost budget controls",
          "type": "object",
          "properties": {
            "maxEstimatedUsd": {
              "description": "Maximum estimated USD for an ensemble fan-out (fail-closed when exceeded).",
              "type": "number",
              "minimum": 0
            },
            "estimatedUsdPerMember": {
              "description": "Rough USD cost per council/arena member call used with maxEstimatedUsd to cap fan-out size.",
              "type": "number",
              "minimum": 0
            }
          },
          "additionalProperties": false
        },
        "ensembleLedger": {
          "description": "Append per-generation records to the local ensemble call ledger (default: true). Local JSONL with SHA-256 prompt hashes only — no prompt bodies, no egress; operational debug data, not AX Telemetry.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "wiki": {
      "description": "Native source-backed AX Wiki. Complements structural ax-code index; does not replace code_intelligence.",
      "type": "object",
      "properties": {
        "auto": {
          "description": "Maintain Wiki in the background after interactive project idle. Default: true; false disables automatic maintenance.",
          "type": "boolean"
        },
        "enabled": {
          "description": "When true (default), inject <repo_wiki> system protocol if the wiki directory exists. Set false to suppress.",
          "type": "boolean"
        },
        "dir": {
          "description": "AX Wiki directory relative to project root. Default: .ax-wiki.",
          "type": "string"
        },
        "model": {
          "description": "Model used for wiki compilation as provider/model. Defaults to the AX Code model.",
          "type": "string"
        },
        "autoInjectAgents": {
          "description": "Allow wiki ensure-agents / init --wiki to rewrite AX-WIKI marker blocks. Default: true.",
          "type": "boolean"
        },
        "touchClaudeMd": {
          "description": "When ensuring markers, also update CLAUDE.md if it already exists. Default: true.",
          "type": "boolean"
        },
        "include": {
          "description": "Optional source glob allowlist for AX Wiki discovery.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "exclude": {
          "description": "Additional source globs excluded from AX Wiki discovery.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "maxPages": {
          "description": "Maximum generated page count. Default: 12.",
          "type": "integer",
          "minimum": 3,
          "maximum": 40
        },
        "generationConcurrency": {
          "description": "Maximum simultaneous Wiki page calls. Default: 2 for cloud models, 1 for local and CLI models.",
          "type": "integer",
          "minimum": 1,
          "maximum": 2
        },
        "maxSourcesPerPage": {
          "description": "Maximum evidence files selected per page.",
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        },
        "maxSourceBytes": {
          "description": "Maximum bytes read from one source file.",
          "type": "integer",
          "minimum": 1024,
          "maximum": 9007199254740991
        },
        "maxPageSourceBytes": {
          "description": "Maximum combined source evidence bytes per page.",
          "type": "integer",
          "minimum": 4096,
          "maximum": 9007199254740991
        },
        "instructions": {
          "description": "Additional maintainer instructions applied during wiki compilation.",
          "type": "string"
        },
        "pages": {
          "description": "Optional explicit wiki page plan; must include quickstart.md.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "purpose": {
                "type": "string"
              },
              "selectors": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["path", "title", "purpose", "selectors"],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "image_generation": {
      "description": "Image generation provider configuration",
      "type": "object",
      "properties": {
        "provider": {
          "description": "Image generation provider. Defaults to openai if OPENAI_API_KEY is set.",
          "type": "string",
          "enum": ["openai", "stability", "custom"]
        },
        "options": {
          "type": "object",
          "properties": {
            "apiKey": {
              "description": "API key for the image generation provider.",
              "type": "string"
            },
            "baseURL": {
              "description": "Custom base URL for the provider API.",
              "type": "string"
            },
            "model": {
              "description": "Model to use (e.g. gpt-image-2, stable-diffusion-xl).",
              "type": "string"
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "ref": "Config",
  "allowComments": true,
  "allowTrailingCommas": true
}
