{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "http": {
            "type": "object", "additionalProperties": true,
            "description": "HTTP, Console, REST/RPC/SSE, and Webhook Host.",
            "x-descriptionZh": "HTTP、Console、REST/RPC/SSE 与 Webhook Host。",
            "properties": {
                "readiness": {
                    "type": "object", "additionalProperties": false,
                    "description": "Required runtime components for /pub/ready; no external network probes.",
                    "x-descriptionZh": "/pub/ready 要求就绪的运行时组件；不执行外部网络探测。",
                    "properties": {
                        "database": {
                            "type": "boolean", "default": true,
                            "description": "Require an initialized Database Host (not a live database query).",
                            "x-descriptionZh": "要求 Database Host 已初始化（不执行实时数据库查询）。"
                        },
                        "endpoints": {
                            "type": "array", "uniqueItems": true,
                            "description": "Required Endpoint admission slots, selected by exact plugin owner and stable slot name.",
                            "x-descriptionZh": "必须开放入站的 Endpoint，按插件 owner 与稳定槽名精确选择。",
                            "items": {
                                "type": "object", "additionalProperties": false, "required": ["owner", "name"],
                                "properties": {
                                    "owner": { "type": "string", "pattern": "^root(?:/[a-z0-9][a-z0-9-]*)*$" },
                                    "name": { "type": "string", "minLength": 1, "pattern": "^[^\\u0000]+$" }
                                }
                            }
                        },
                        "agents": {
                            "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 },
                            "description": "Required configured Agent bindings; does not verify model credentials or provider reachability.",
                            "x-descriptionZh": "必须存在的 Agent binding；不验证模型凭据或 Provider 网络可用性。"
                        }
                    }
                }
            }
        },
        "database": { "type": "object", "additionalProperties": true, "description": "Database Host and dialect connection options.", "x-descriptionZh": "Database Host 与方言连接参数。" },
        "ai": {
            "type": "object",
            "additionalProperties": true,
            "description": "Providers, Agents, sessions, memory, tools, and execution security.",
            "x-descriptionZh": "Provider、Agent、会话、记忆、工具与执行安全策略。",
            "properties": {
                "workroom": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Process-owned Workroom control-plane policy; Projects remain in the persistent Catalog.",
                    "x-descriptionZh": "进程持有的 Workroom 控制面策略；Project 仍由持久化 Catalog 管理。",
                    "properties": {
                        "trustedPackPublishers": {
                            "type": "array",
                            "items": { "type": "string", "minLength": 1 },
                            "uniqueItems": true,
                            "description": "Authenticated Console principal ids allowed to publish shared Capability Packs.",
                            "x-descriptionZh": "允许发布共享 Capability Pack 的 Console 认证 principalId。"
                        },
                        "disclosure": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Explicit P12 model processor contracts for Workroom disclosure bootstrap.",
                            "x-descriptionZh": "Workroom 披露初始化使用的显式 P12 模型处理方契约。",
                            "properties": {
                                "tenantId": { "type": "string", "minLength": 1 },
                                "modelProviders": {
                                    "type": "object",
                                    "additionalProperties": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "required": ["endpoint", "processingRegions", "maxConfidentiality", "external", "noTraining", "loggingMode", "maximumRetentionSeconds", "allowsRedisclosure", "supportsDeletion"],
                                        "properties": {
                                            "endpoint": { "type": "string", "minLength": 1 },
                                            "owner": { "type": "string", "minLength": 1 },
                                            "trustDomain": { "type": "string", "minLength": 1 },
                                            "processingRegions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
                                            "maxConfidentiality": { "type": "string", "enum": ["public", "project_internal", "confidential", "restricted"] },
                                            "external": { "type": "boolean" },
                                            "noTraining": { "type": "boolean" },
                                            "loggingMode": { "type": "string", "enum": ["disabled", "metadata_only", "full"] },
                                            "maximumRetentionSeconds": { "type": "integer", "minimum": 1 },
                                            "allowsRedisclosure": { "type": "boolean" },
                                            "supportsDeletion": { "type": "boolean" }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "agent": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Agent execution, queueing, tool, and model policies.",
                    "x-descriptionZh": "Agent 执行、排队、工具与模型策略。",
                    "properties": {
                        "inboundQueue": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Inbound turn queue policy.",
                            "x-descriptionZh": "入站回合排队策略。",
                            "properties": {
                                "groupMode": {
                                    "type": "string",
                                    "enum": ["supersede", "fifo"],
                                    "description": "Replace an older queued group turn, or process all turns in arrival order.",
                                    "x-descriptionZh": "覆盖较早的群聊排队回合，或按到达顺序处理全部回合。"
                                }
                            }
                        },
                        "execSecurity": {
                            "type": "string",
                            "enum": ["deny", "allowlist", "full"],
                            "description": "Shell command security boundary.",
                            "x-descriptionZh": "Shell 命令安全边界。"
                        },
                        "execPreset": {
                            "type": "string",
                            "enum": ["readonly", "network", "development", "custom"],
                            "description": "Command allowlist preset used outside full mode.",
                            "x-descriptionZh": "非 full 模式使用的命令白名单预设。"
                        },
                        "execApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for main Agent commands.", "x-descriptionZh": "主 Agent 命令的审批策略。" },
                        "subagentExecApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for sub-Agent commands.", "x-descriptionZh": "子 Agent 命令的审批策略。" },
                        "workerExecApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for worker commands.", "x-descriptionZh": "Worker 命令的审批策略。" },
                        "taskExecApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for task commands.", "x-descriptionZh": "Task 命令的审批策略。" },
                        "toolExecution": {
                            "type": "string",
                            "enum": ["parallel", "sequential", "tiered"],
                            "description": "How tool calls in one model step are scheduled.",
                            "x-descriptionZh": "同一模型步骤中的工具调用调度方式。"
                        },
                        "modelSizeHint": {
                            "type": "string",
                            "enum": ["", "small", "medium", "large"],
                            "description": "Optional model-size hint; an empty string clears the hint.",
                            "x-descriptionZh": "可选模型尺寸提示；空字符串表示清除提示。"
                        },
                        "promptCacheRetention": {
                            "type": "string",
                            "enum": ["in_memory", "24h"],
                            "description": "Provider prompt-cache retention policy.",
                            "x-descriptionZh": "Provider Prompt Cache 保留策略。"
                        },
                        "steeringMode": {
                            "type": "string",
                            "enum": ["one-at-a-time", "all"],
                            "description": "Process steering messages one at a time or drain all pending messages together.",
                            "x-descriptionZh": "逐条处理 Steering 消息，或一次取出全部待处理消息。"
                        },
                        "followUpMode": {
                            "type": "string",
                            "enum": ["one-at-a-time", "all"],
                            "description": "Process follow-up messages one at a time or drain all pending messages together.",
                            "x-descriptionZh": "逐条处理 Follow-up 消息，或一次取出全部待处理消息。"
                        },
                        "outputSchema": {
                            "anyOf": [
                                { "type": "boolean" },
                                { "type": "string", "enum": ["segments"] },
                                { "type": "object" }
                            ],
                            "description": "Structured final-output mode: false for text, true or segments for canonical message segments, or a custom JSON Schema object.",
                            "x-descriptionZh": "结构化最终输出：false 表示文本，true 或 segments 表示规范消息段，也可传入自定义 JSON Schema 对象。"
                        },
                        "schedule": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Unattended Schedule execution policy.",
                            "x-descriptionZh": "无人值守 Schedule 执行策略。",
                            "properties": {
                                "security": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "description": "Schedule command security policy.",
                                    "x-descriptionZh": "Schedule 命令安全策略。",
                                    "properties": {
                                        "execPreset": {
                                            "type": "string",
                                            "enum": ["readonly", "network"],
                                            "description": "Schedule Jobs may use only the read-only or network preset.",
                                            "x-descriptionZh": "Schedule Job 只能使用只读或网络预设。"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "mcp": { "type": "object", "additionalProperties": true, "description": "Expose Bot tools through an MCP Server.", "x-descriptionZh": "把 Bot 工具公开为 MCP Server。" },
        "a2a": { "type": "object", "additionalProperties": true, "description": "A2A Agent Card, remote execution, and Workroom callbacks.", "x-descriptionZh": "A2A Agent Card、远程执行与 Workroom 回调。" },
        "speech": { "type": "object", "additionalProperties": true, "description": "Speech-to-text and text-to-speech Host.", "x-descriptionZh": "语音识别与语音合成 Host。" },
        "htmlRenderer": {
            "type": "object",
            "additionalProperties": true,
            "description": "HTML and image rendering options backed by Shotium.",
            "x-descriptionZh": "基于 Shotium 的 HTML/图片渲染参数。",
            "properties": {
                "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Default layout width in CSS pixels.", "x-descriptionZh": "默认排版宽度（CSS 像素）。" },
                "defaultWidth": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Legacy alias of width.", "x-descriptionZh": "width 的旧别名。" },
                "viewport": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Default viewport for Shotium rendering.",
                    "x-descriptionZh": "Shotium 渲染默认视窗。",
                    "properties": {
                        "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Viewport width in CSS pixels.", "x-descriptionZh": "视窗宽度（CSS 像素）。" },
                        "height": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Viewport height in CSS pixels.", "x-descriptionZh": "视窗高度（CSS 像素）。" }
                    }
                },
                "backgroundColor": { "type": "string", "description": "Fragment background color.", "x-descriptionZh": "HTML 片段背景色。" },
                "defaultBackgroundColor": { "type": "string", "description": "Legacy alias of backgroundColor.", "x-descriptionZh": "backgroundColor 的旧别名。" },
                "scale": { "type": "number", "minimum": 0.01, "maximum": 8, "description": "Device scale factor.", "x-descriptionZh": "设备像素比。" },
                "type": { "type": "string", "enum": ["png", "jpeg", "webp"], "description": "Default raster output format.", "x-descriptionZh": "默认位图输出格式。" },
                "quality": { "type": "number", "minimum": 1, "maximum": 100, "description": "Quality for jpeg/webp output.", "x-descriptionZh": "jpeg/webp 输出质量。" },
                "timeout": { "type": "number", "minimum": 1, "maximum": 600000, "description": "Navigation timeout in milliseconds.", "x-descriptionZh": "导航超时（毫秒）。" },
                "waitUntil": { "type": "string", "enum": ["load", "networkidle"], "description": "Navigation wait strategy.", "x-descriptionZh": "导航等待策略。" },
                "fontFamily": { "type": "string", "description": "Default font-family for fragments.", "x-descriptionZh": "HTML 片段默认字体栈。" },
                "maxImageHeight": { "type": "number", "minimum": 0, "maximum": 100000, "description": "Split overly tall PNGs above this height; 0 disables splitting.", "x-descriptionZh": "超过该高度时切分 PNG；0 表示不切分。" },
                "sliceCompression": { "type": "number", "minimum": 0, "maximum": 9, "description": "Compression level used when splitting PNGs.", "x-descriptionZh": "PNG 切片时使用的压缩级别。" },
                "allowFileAccess": { "type": "boolean", "description": "Allow local file subresources.", "x-descriptionZh": "允许访问本地文件子资源。" },
                "takeOverHtmlSegments": { "type": "boolean", "description": "Take over html/markdown rich-segment image rendering.", "x-descriptionZh": "接管 html/markdown 富媒体段转图。" },
                "cacheDir": { "type": "string", "description": "HTTP cache directory; use off to disable.", "x-descriptionZh": "HTTP 缓存目录；off 表示关闭。" },
                "cacheMaxBytes": { "type": "number", "minimum": 0, "description": "Maximum HTTP cache size in bytes.", "x-descriptionZh": "HTTP 缓存最大字节数。" },
                "userAgent": { "type": "string", "description": "Custom user agent string.", "x-descriptionZh": "自定义 User-Agent。" },
                "idleTimeoutMs": { "type": "number", "minimum": 0, "maximum": 86400000, "description": "Daemon idle-exit timeout in milliseconds.", "x-descriptionZh": "daemon 空闲退出超时（毫秒）。" },
                "logStats": { "type": "boolean", "description": "Log render timing statistics.", "x-descriptionZh": "记录渲染耗时统计。" },
                "mode": { "type": "string", "enum": ["inprocess", "daemon"], "description": "Whether Shotium runs in-process or as a daemon.", "x-descriptionZh": "Shotium 在进程内运行还是以 daemon 运行。" },
                "aiTextAsImage": {
                    "anyOf": [
                        { "type": "boolean" },
                        {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Convert plain text output to an image before send.",
                            "x-descriptionZh": "发送前将纯文本输出转成图片。",
                            "properties": {
                                "enabled": { "type": "boolean", "description": "Enable text-to-image conversion.", "x-descriptionZh": "启用文本转图片。" },
                                "onlyAdapters": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true, "description": "Only apply to these adapter names.", "x-descriptionZh": "仅对这些适配器名称生效。" },
                                "minLength": { "type": "number", "minimum": 1, "description": "Minimum plain-text length to trigger conversion; defaults to 1 at runtime.", "x-descriptionZh": "触发转换的最小纯文本长度；运行时默认为 1。" },
                                "maxLength": { "type": "number", "minimum": 1, "description": "Maximum plain-text length to convert; defaults to 12000 at runtime.", "x-descriptionZh": "允许转换的最大纯文本长度；运行时默认为 12000。" },
                                "skipIfRich": { "type": "boolean", "description": "Skip when content already contains rich segments; defaults to true at runtime.", "x-descriptionZh": "内容已包含富媒体段时跳过；运行时默认为 true。" },
                                "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Image width in CSS pixels.", "x-descriptionZh": "图片宽度（CSS 像素）。" },
                                "height": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Image height in CSS pixels.", "x-descriptionZh": "图片高度（CSS 像素）。" },
                                "backgroundColor": { "type": "string", "description": "Image background color.", "x-descriptionZh": "图片背景色。" },
                                "fontSize": { "type": "number", "minimum": 1, "description": "Font size in CSS pixels.", "x-descriptionZh": "字体大小（CSS 像素）。" },
                                "color": { "type": "string", "description": "Text color.", "x-descriptionZh": "文字颜色。" },
                                "padding": { "type": "number", "minimum": 0, "description": "Image padding in CSS pixels.", "x-descriptionZh": "图片内边距（CSS 像素）。" },
                                "scale": { "type": "number", "minimum": 0.01, "maximum": 8, "description": "Device scale factor.", "x-descriptionZh": "设备像素比。" },
                                "fileName": { "type": "string", "minLength": 1, "description": "Image file name.", "x-descriptionZh": "图片文件名。" }
                            }
                        }
                    ],
                    "description": "Optional plain-text to image conversion before send.",
                    "x-descriptionZh": "发送前可选的纯文本转图片。"
                }
            }
        },
        "assistant": { "type": "object", "additionalProperties": true, "description": "Scheduled jobs, event ingress, and failure notifications.", "x-descriptionZh": "调度任务、事件入口和失败通知。" },
        "log_level": { "type": ["string", "number"], "description": "Runtime log level.", "x-descriptionZh": "Runtime 日志级别。" },
        "plugin": { "type": "object", "description": "Root Plugin configuration; replaced by its project schema during composition.", "x-descriptionZh": "Root Plugin 配置；组合时由项目 Schema 替换。" }
    }
}
