117 lines
6.6 KiB
JSON
117 lines
6.6 KiB
JSON
|
|
{
|
|||
|
|
"id": "com.yuxi.channels.dingtalk",
|
|||
|
|
"name": "钉钉",
|
|||
|
|
"version": "1.0.0",
|
|||
|
|
"channel_type": "dingtalk",
|
|||
|
|
"icon": "message-square",
|
|||
|
|
"entry_module": "yuxi.channels.plugins.dingtalk.entry",
|
|||
|
|
"provides": ["dingtalk"],
|
|||
|
|
"lifecycle": ["init", "start", "stop", "pause", "resume", "unload", "reconfigure", "fail"],
|
|||
|
|
"compatibility": {
|
|||
|
|
"min_host_version": "1.0.0",
|
|||
|
|
"dingtalk_api_version": "v2",
|
|||
|
|
"stream_protocol": "websocket"
|
|||
|
|
},
|
|||
|
|
"failure_policy": "degrade",
|
|||
|
|
"depends": [],
|
|||
|
|
"critical": false,
|
|||
|
|
"requires_dm_pairing": true,
|
|||
|
|
"requires_outbound_delivery": true,
|
|||
|
|
"credential_strategy": {
|
|||
|
|
"type": "hybrid",
|
|||
|
|
"acquire_method": "manual",
|
|||
|
|
"required_fields": ["client_id", "client_secret", "robot_code"],
|
|||
|
|
"optional_fields": ["sign_secret"],
|
|||
|
|
"supports_rotation": false,
|
|||
|
|
"supports_revocation": false
|
|||
|
|
},
|
|||
|
|
"max_message_length": 5000,
|
|||
|
|
"supports_credential_cloning": false,
|
|||
|
|
"transport_mode": "stream",
|
|||
|
|
"capabilities": {
|
|||
|
|
"rich_message": true,
|
|||
|
|
"streaming": true,
|
|||
|
|
"typing_indicator": false,
|
|||
|
|
"message_edit": false,
|
|||
|
|
"message_recall": true,
|
|||
|
|
"supports_reaction": false,
|
|||
|
|
"supports_pin": false,
|
|||
|
|
"supports_card_update": true,
|
|||
|
|
"supports_card_update_streaming": true,
|
|||
|
|
"supports_image_inbound": true,
|
|||
|
|
"supports_video_inbound": false,
|
|||
|
|
"supports_image_outbound": true,
|
|||
|
|
"supports_video_outbound": false,
|
|||
|
|
"mention": true,
|
|||
|
|
"command": true,
|
|||
|
|
"directory": true,
|
|||
|
|
"doctor": true,
|
|||
|
|
"whitelist": true,
|
|||
|
|
"wizard": true,
|
|||
|
|
"tools": false,
|
|||
|
|
"status": true,
|
|||
|
|
"probeable": true,
|
|||
|
|
"identity_resolver": true,
|
|||
|
|
"lifecycle": true,
|
|||
|
|
"supports_qr_login": false,
|
|||
|
|
"agent_collaboration": false
|
|||
|
|
},
|
|||
|
|
"capability_requirements": [
|
|||
|
|
["supports_image_inbound", ["client_id", "client_secret"]],
|
|||
|
|
["supports_image_outbound", ["client_id", "client_secret", "robot_code"]],
|
|||
|
|
["supports_card_update", ["client_id", "client_secret", "robot_code"]],
|
|||
|
|
["supports_card_update_streaming", ["client_id", "client_secret", "robot_code"]],
|
|||
|
|
["rich_message", ["client_id", "client_secret", "robot_code"]],
|
|||
|
|
["streaming", ["client_id", "client_secret", "robot_code"]],
|
|||
|
|
["mention", ["client_id", "client_secret"]],
|
|||
|
|
["directory", ["client_id", "client_secret"]],
|
|||
|
|
["lifecycle", []],
|
|||
|
|
["probeable", []],
|
|||
|
|
["status", []]
|
|||
|
|
],
|
|||
|
|
"resource_quota": {
|
|||
|
|
"max_cpu": "20.0",
|
|||
|
|
"max_memory": "256MB",
|
|||
|
|
"max_connections": 50,
|
|||
|
|
"max_calls_per_sec": 20
|
|||
|
|
},
|
|||
|
|
"accessible_ports": [
|
|||
|
|
"ConfigPort",
|
|||
|
|
"LoggerPort",
|
|||
|
|
"PersistencePort",
|
|||
|
|
"CachePort",
|
|||
|
|
"TracerPort",
|
|||
|
|
"ConversationPort",
|
|||
|
|
"IdentityResolverPort"
|
|||
|
|
],
|
|||
|
|
"injectable_pipelines": ["inbound", "outbound"],
|
|||
|
|
"config_schema": [
|
|||
|
|
{"key": "client_id", "type": "string", "required": true, "default": null, "hot_reloadable": false, "scope": "account", "constraints": {"pattern": "^ding[a-zA-Z0-9]+$"}},
|
|||
|
|
{"key": "client_secret", "type": "string", "required": true, "default": null, "hot_reloadable": false, "sensitive": true, "scope": "account", "constraints": {}},
|
|||
|
|
{"key": "robot_code", "type": "string", "required": true, "default": null, "hot_reloadable": false, "scope": "account", "constraints": {}},
|
|||
|
|
{"key": "event_mode", "type": "enum", "required": false, "default": "stream", "hot_reloadable": false, "scope": "channel", "constraints": {"values": ["stream", "http"]}},
|
|||
|
|
{"key": "webhook_url", "type": "string", "required": false, "default": null, "hot_reloadable": true, "scope": "channel", "constraints": {"pattern": "^https://"}},
|
|||
|
|
{"key": "sign_secret", "type": "string", "required": false, "default": null, "hot_reloadable": true, "sensitive": true, "scope": "channel", "constraints": {}},
|
|||
|
|
{"key": "bot_name", "type": "string", "required": false, "default": "ForcePilot", "hot_reloadable": true, "scope": "channel", "constraints": {}},
|
|||
|
|
{"key": "group_session_scope", "type": "enum", "required": false, "default": "group_sender", "hot_reloadable": true, "scope": "channel", "constraints": {"values": ["group", "group_sender"]}},
|
|||
|
|
{"key": "enable_streaming", "type": "boolean", "required": false, "default": true, "hot_reloadable": true, "scope": "channel", "constraints": {}},
|
|||
|
|
{"key": "streaming_strategy", "type": "enum", "required": false, "default": "delayed", "hot_reloadable": true, "scope": "channel", "constraints": {"values": ["fast", "delayed"]}},
|
|||
|
|
{"key": "token_cache_ttl", "type": "integer", "required": false, "default": 7200, "hot_reloadable": true, "scope": "channel", "constraints": {"min": 60, "max": 7200}},
|
|||
|
|
{"key": "user_cache_ttl", "type": "integer", "required": false, "default": 1800, "hot_reloadable": true, "scope": "channel", "constraints": {"min": 60, "max": 3600}},
|
|||
|
|
{"key": "api_base_url", "type": "string", "required": false, "default": "https://api.dingtalk.com", "hot_reloadable": true, "scope": "channel", "constraints": {}},
|
|||
|
|
{"key": "stream_endpoint_path", "type": "string", "required": false, "default": "/v1.0/gateway/connections/open", "hot_reloadable": true, "scope": "channel", "constraints": {}, "description": "钉钉 Stream 端点 API 路径,与 api_base_url 组合获取长连接接入点"},
|
|||
|
|
{"key": "request_timeout_ms", "type": "integer", "required": false, "default": 30000, "hot_reloadable": true, "scope": "channel", "constraints": {"min": 5000, "max": 60000}},
|
|||
|
|
{"key": "max_retries", "type": "integer", "required": false, "default": 3, "hot_reloadable": true, "scope": "channel", "constraints": {"min": 0, "max": 5}},
|
|||
|
|
{"key": "identity_cache_ttl_sec", "type": "integer", "required": false, "default": 60, "hot_reloadable": true, "scope": "channel", "constraints": {"min": 30, "max": 600}}
|
|||
|
|
],
|
|||
|
|
"env_vars": [
|
|||
|
|
{"name": "DINGTALK_CLIENT_ID", "description": "钉钉应用 Client ID(原 AppKey)", "required": true, "default": null, "sensitive": false},
|
|||
|
|
{"name": "DINGTALK_CLIENT_SECRET", "description": "钉钉应用 Client Secret(原 AppSecret)", "required": true, "default": null, "sensitive": true},
|
|||
|
|
{"name": "DINGTALK_ROBOT_CODE", "description": "机器人 RobotCode", "required": true, "default": null, "sensitive": false},
|
|||
|
|
{"name": "DINGTALK_EVENT_MODE", "description": "事件接收模式(stream/http)", "required": false, "default": "stream", "sensitive": false},
|
|||
|
|
{"name": "DINGTALK_WEBHOOK_URL", "description": "HTTP 模式回调地址", "required": false, "default": null, "sensitive": false},
|
|||
|
|
{"name": "DINGTALK_SIGN_SECRET", "description": "HTTP 模式签名密钥", "required": false, "default": null, "sensitive": true},
|
|||
|
|
{"name": "DINGTALK_BOT_NAME", "description": "机器人显示名称", "required": false, "default": "ForcePilot", "sensitive": false}
|
|||
|
|
]
|
|||
|
|
}
|