ForcePilot/backend/package/yuxi/channel/extensions/signal/config_schema.py
Kris 6713dc2d0d feat(channel): 添加 Signal 渠道扩展
新增 Signal 渠道扩展,支持在 Yuxi 平台中集成 Signal 加密即时通讯渠道。

包含以下功能模块:
- client: Signal 客户端封装
- daemon: signald 守护进程管理
- config_schema: 配置模式
- send: 消息发送
- accounts: 账户管理
- account_management: 账户综合管理
- access_policy: 访问策略
- identity: 身份管理
- profiles: 用户资料
- groups: 群组管理
- format: 消息格式转换
- normalize: 消息规范化
- dedupe: 消息去重
- monitor: 渠道状态监控
- probe: 健康探测
- sse_reconnect: SSE 重连机制
2026-05-21 11:41:55 +08:00

104 lines
4.2 KiB
Python

SIGNAL_CONFIG_SCHEMA = {
"type": "object",
"properties": {
"enabled": {"type": "boolean", "default": True},
"default_account": {"type": "string", "default": ""},
"account": {"type": "string", "default": ""},
"account_uuid": {"type": "string", "default": ""},
"http_host": {"type": "string", "default": "127.0.0.1"},
"http_port": {"type": "integer", "default": 8080},
"http_url": {"type": "string", "default": ""},
"cli_path": {"type": "string", "default": "signal-cli"},
"auto_start": {"type": "boolean", "default": True},
"startup_timeout_ms": {"type": "integer", "default": 30000},
"receive_mode": {"type": "string", "default": "on-start", "enum": ["on-start", "manual"]},
"ignore_attachments": {"type": "boolean", "default": False},
"ignore_stories": {"type": "boolean", "default": True},
"send_read_receipts": {"type": "boolean", "default": True},
"text_chunk_limit": {"type": "integer", "default": 4000},
"dm_policy": {
"type": "string",
"default": "pairing",
"enum": ["open", "pairing", "allowlist", "disabled"],
},
"allow_from": {
"type": "array",
"items": {"type": "string"},
"default": [],
},
"group_policy": {
"type": "string",
"default": "allowlist",
"enum": ["open", "allowlist", "disabled"],
},
"group_allow_from": {
"type": "array",
"items": {"type": "string"},
"default": [],
},
"reactions": {"type": "boolean", "default": True},
"reaction_notifications": {
"type": "string",
"default": "own",
"enum": ["off", "own", "all", "allowlist"],
},
"reaction_allowlist": {
"type": "array",
"items": {"type": "string"},
"default": [],
},
"reaction_level": {
"type": "string",
"default": "minimal",
"enum": ["off", "ack", "minimal", "extensive"],
},
"typing_notifications": {"type": "boolean", "default": False},
"group_notifications": {"type": "boolean", "default": False},
"media_max_mb": {"type": "integer", "default": 8},
"history_limit": {"type": "integer", "default": 50},
"config_writes": {"type": "boolean", "default": True},
"config_dir": {"type": "string", "default": ""},
"verbose": {"type": "boolean", "default": False},
"log_file": {"type": "string", "default": ""},
"socket_path": {"type": "string", "default": ""},
"accounts": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"account": {"type": "string"},
"account_uuid": {"type": "string"},
"http_url": {"type": "string"},
"http_host": {"type": "string"},
"http_port": {"type": "integer"},
"cli_path": {"type": "string"},
"auto_start": {"type": "boolean"},
"receive_mode": {"type": "string"},
"send_read_receipts": {"type": "boolean"},
"dm_policy": {"type": "string"},
"allow_from": {"type": "array", "items": {"type": "string"}},
"group_policy": {"type": "string"},
"group_allow_from": {"type": "array", "items": {"type": "string"}},
"media_max_mb": {"type": "integer"},
},
},
},
"groups": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"require_mention": {"type": "boolean", "default": True},
"ingest": {"type": "boolean", "default": False},
},
},
},
"actions": {
"type": "object",
"properties": {
"reactions": {"type": "boolean", "default": True},
},
},
},
}