{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "socketMode": { "type": "boolean", "default": true, "description": "Prefer Socket Mode (default). Set false for HTTP Events via httpHostToken." }, "webhookPath": { "type": "string", "default": "/slack/events" }, "clientPingTimeout": { "type": "number", "default": 15000, "description": "Socket Mode client ping timeout (ms)" }, "endpoints": { "type": "array", "minItems": 1, "description": "多账号:一个插件实例挂多个 endpoint。每项与顶层字段同构(id 必填,其余覆盖顶层)", "items": { "type": "object", "additionalProperties": false, "properties": { "token": { "type": "string", "description": "Bot User OAuth Token (xoxb-...)" }, "signingSecret": { "type": "string", "description": "Required for HTTP Events API (socketMode: false)" }, "appToken": { "type": "string", "description": "App-Level Token (xapp-...) for Socket Mode" }, "socketMode": { "type": "boolean" }, "webhookPath": { "type": "string" }, "clientPingTimeout": { "type": "number" }, "commandPrefix": { "type": "string" }, "id": { "type": "string", "description": "Slack bot name" }, "streamProxy": { "type": "object", "additionalProperties": false, "properties": { "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, "serverName": { "type": "string", "minLength": 1, "pattern": "^[^\\s/:@?#]+$" } }, "required": [ "port", "serverName" ], "description": "Socket故障验收:WSS固定loopback TCP,API仍标准TLS直连", "x-i18n": { "en": { "description": "Socket fault-injection tests: pin WSS TCP to loopback while API requests retain direct standard TLS." } } }, "webApiProxy": { "type": "object", "additionalProperties": false, "properties": { "port": { "type": "integer", "minimum": 1, "maximum": 65535 } }, "required": [ "port" ], "description": "出站JSON Web API专用故障代理:仅slack.com:443,固定loopbackTCP,保留SNI和证书校验,与Socket代理独立;上传域名不适用", "x-i18n": { "en": { "description": "Fault proxy for outbound JSON Web APIs only: pin slack.com:443 TCP to loopback while preserving SNI and certificate validation. Independent of the Socket proxy; does not apply to upload hosts." } } }, "streaming": { "type": "boolean", "description": "Use native streaming replies when the target supports them." }, "streamingIntervalMs": { "type": "integer", "minimum": 0, "description": "Reply stream update interval in milliseconds." }, "nickname": { "type": [ "string", "null" ], "description": "账号昵称兜底", "x-i18n": { "en": { "description": "Fallback account nickname" } } }, "profile": { "$ref": "#/$defs/selfProfileFallback", "description": "账号资料兜底", "x-i18n": { "en": { "description": "Fallback account profile" } } } }, "required": [ "id", "token" ] }, "x-i18n": { "en": { "description": "Multiple accounts: mount multiple endpoints in one plugin instance. Each entry uses the top-level fields; id is required and other fields override defaults." } } }, "commandPrefix": { "type": "string", "default": "", "description": "命令前缀(默认 '' 无前缀,任意文本按命令匹配;如 '/' 要求 / 开头)。endpoints[i] 可逐项覆盖", "x-i18n": { "en": { "description": "Command prefix. The default empty string allows unprefixed commands; '/' requires a leading slash. Each endpoints[i] can override it." } } }, "streaming": { "type": "boolean", "default": true, "description": "Use native streaming replies when the target supports them." }, "streamingIntervalMs": { "type": "integer", "minimum": 0, "description": "Reply stream update interval in milliseconds.", "default": 1000 }, "nickname": { "type": [ "string", "null" ], "description": "账号昵称兜底", "x-i18n": { "en": { "description": "Fallback account nickname" } } }, "profile": { "$ref": "#/$defs/selfProfileFallback", "description": "账号资料兜底", "x-i18n": { "en": { "description": "Fallback account profile" } } } }, "required": [ "endpoints" ], "$defs": { "selfProfileFallback": { "type": "object", "additionalProperties": false, "properties": { "gender": { "type": [ "string", "null" ], "enum": [ "male", "female", "other", "unknown", null ] }, "age": { "type": [ "integer", "null" ], "minimum": 0 }, "birthday": { "type": [ "string", "null" ], "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$" }, "signature": { "type": [ "string", "null" ] }, "avatar": { "type": [ "string", "null" ], "pattern": "^(https?://[^\\s/?#]+(?:[/?#].*)?|)$" }, "interests": { "type": [ "array", "null" ], "items": { "type": "string" } }, "bio": { "type": [ "string", "null" ] } } } } }