ForcePilot/backend/package/yuxi/channels/plugins/wechat_mp/manifest.json
Kris feee2e1166 refactor(wechat-mp): 重构微信公众号插件适配纯Webhook模式
1.  将transport_mode改为pull以通过manifest校验,实际仅使用Webhook接收消息
2.  统一处理XML payload兼容raw_body包装格式
3.  重构配置读取逻辑,使用CHANNEL_TARGET常量替换硬编码target
4.  移除冗余的webhook_url配置诊断项,更新文档说明
5.  优化代码格式与导入顺序
2026-07-09 04:20:04 +08:00

111 lines
6.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"id": "com.yuxi.channels.wechat_mp",
"name": "微信公众号",
"version": "1.0.0",
"channel_type": "wechat_mp",
"icon": "message-circle",
"entry_module": "yuxi.channels.plugins.wechat_mp.entry",
"provides": ["wechat_mp"],
"lifecycle": ["init", "start", "stop", "pause", "resume", "unload", "reconfigure", "fail"],
"compatibility": {
"min_host_version": "1.0.0",
"wechat_mp_api_version": "v1"
},
"failure_policy": "degrade",
"depends": [],
"critical": false,
"requires_dm_pairing": true,
"requires_outbound_delivery": true,
"credential_strategy": {
"type": "static",
"acquire_method": "manual",
"required_fields": ["app_id", "app_secret"],
"optional_fields": ["token", "encoding_aes_key"],
"supports_rotation": false,
"supports_revocation": false
},
"max_message_length": 2048,
"supports_credential_cloning": false,
"transport_mode": "pull",
"capabilities": {
"rich_message": true,
"streaming": false,
"typing_indicator": false,
"message_edit": false,
"message_recall": false,
"supports_reaction": false,
"supports_pin": false,
"supports_card_update": false,
"supports_card_update_streaming": false,
"supports_image_inbound": true,
"supports_video_inbound": true,
"supports_image_outbound": true,
"supports_video_outbound": true,
"mention": false,
"command": false,
"directory": true,
"doctor": true,
"whitelist": true,
"wizard": true,
"tools": false,
"status": true,
"probeable": true,
"identity_resolver": false,
"lifecycle": true,
"supports_qr_login": false,
"agent_collaboration": false
},
"capability_requirements": [
["supports_image_inbound", ["app_id", "app_secret"]],
["supports_video_inbound", ["app_id", "app_secret"]],
["supports_image_outbound", ["app_id", "app_secret"]],
["supports_video_outbound", ["app_id", "app_secret"]],
["rich_message", ["app_id", "app_secret"]],
["directory", ["app_id", "app_secret"]],
["doctor", ["app_id", "app_secret"]],
["whitelist", []],
["wizard", []],
["status", []],
["probeable", ["app_id", "app_secret"]],
["lifecycle", []]
],
"resource_quota": {
"max_cpu": "15.0",
"max_memory": "128MB",
"max_connections": 20,
"max_calls_per_sec": 10
},
"accessible_ports": [
"ConfigPort",
"LoggerPort",
"PersistencePort",
"CachePort",
"TracerPort",
"ConversationPort"
],
"injectable_pipelines": ["inbound", "outbound"],
"config_schema": [
{"key": "app_id", "type": "string", "required": true, "default": null, "hot_reloadable": false, "sensitive": false, "scope": "account", "constraints": {"pattern": "^wx[a-zA-Z0-9]{16}$"}, "title": "公众号 AppID", "description": "微信公众号 AppID"},
{"key": "app_secret", "type": "string", "required": true, "default": null, "hot_reloadable": false, "sensitive": true, "scope": "account", "constraints": {}, "title": "公众号 AppSecret", "description": "微信公众号 AppSecret"},
{"key": "token", "type": "string", "required": true, "default": null, "hot_reloadable": true, "sensitive": false, "scope": "account", "constraints": {}, "title": "Webhook 签名校验令牌", "description": "微信公众号 Webhook 签名校验 Token"},
{"key": "encoding_aes_key", "type": "string", "required": false, "default": null, "hot_reloadable": true, "sensitive": true, "scope": "account", "constraints": {"length": 43}, "title": "消息加解密密钥", "description": "EncodingAESKey43 位,兼容/安全模式必填)"},
{"key": "encrypt_mode", "type": "string", "required": true, "default": "plaintext", "hot_reloadable": false, "sensitive": false, "scope": "channel", "constraints": {"values": ["plaintext", "compatible", "safe"]}, "title": "消息加解密模式", "description": "明文/兼容/安全三种模式"},
{"key": "api_base_url", "type": "string", "required": false, "default": "https://api.weixin.qq.com", "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {}, "title": "微信 API 基础域名", "description": "微信 API 基础域名"},
{"key": "http_timeout_ms", "type": "integer", "required": false, "default": 30000, "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {"min": 5000, "max": 60000}, "title": "HTTP 客户端超时", "description": "HTTP 客户端超时(毫秒)"},
{"key": "token_refresh_interval_s", "type": "integer", "required": false, "default": 7000, "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {"min": 3600, "max": 7200}, "title": "access_token 刷新间隔", "description": "access_token 刷新间隔(秒,默认 7000 早于 7200 有效期)"},
{"key": "max_message_length", "type": "integer", "required": false, "default": 2048, "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {"min": 500, "max": 2048}, "title": "最大消息长度", "description": "单条消息最大长度(字节)"},
{"key": "media_cache_ttl_s", "type": "integer", "required": false, "default": 259200, "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {"min": 3600, "max": 259200}, "title": "media_id 缓存 TTL", "description": "media_id 缓存 TTL3 天)"},
{"key": "enable_customer_service", "type": "bool", "required": false, "default": true, "hot_reloadable": true, "sensitive": false, "scope": "channel", "constraints": {}, "title": "启用客服消息", "description": "是否启用客服消息48h 窗口)"}
],
"env_vars": [
{"name": "WECHAT_MP_APP_ID", "description": "公众号 AppID", "required": false, "default": null, "sensitive": false},
{"name": "WECHAT_MP_APP_SECRET", "description": "公众号 AppSecret", "required": false, "default": null, "sensitive": true},
{"name": "WECHAT_MP_TOKEN", "description": "Webhook 签名校验令牌", "required": false, "default": null, "sensitive": false},
{"name": "WECHAT_MP_ENCODING_AES_KEY", "description": "消息加解密密钥43 位)", "required": false, "default": null, "sensitive": true},
{"name": "WECHAT_MP_ENCRYPT_MODE", "description": "消息加解密模式plaintext/compatible/safe", "required": false, "default": "plaintext", "sensitive": false},
{"name": "WECHAT_MP_API_BASE_URL", "description": "微信 API 基础域名", "required": false, "default": "https://api.weixin.qq.com", "sensitive": false},
{"name": "WECHAT_MP_HTTP_TIMEOUT_MS", "description": "HTTP 客户端超时(毫秒)", "required": false, "default": "30000", "sensitive": false},
{"name": "WECHAT_MP_TOKEN_REFRESH_INTERVAL_S", "description": "access_token 刷新间隔(秒)", "required": false, "default": "7000", "sensitive": false}
]
}