{
  "id": "wecom",
  "name": "WeCom",
  "description": "Full-featured WeCom AI Bot over WebSocket with native streaming, rich media, and agent tools",
  "version": "0.2.0",
  "kind": "channel",
  "main": "src/index.js",
  "channels": [
    "wecom"
  ],
  "engines": {
    "xopc": ">=0.0.465"
  },
  "contracts": {
    "channels": ["wecom"],
    "tools": [
      "wecom_send_message",
      "wecom_read_observed_messages",
      "wecom_connection_status"
    ]
  },
  "channelContributions": {
    "wecom": {
      "label": "WeCom",
      "description": "Full-featured WeCom AI Bot over WebSocket with native streaming, rich media, and agent tools",
      "order": 50,
      "configPath": "channels.wecom",
      "docsPath": "/channels/wecom",
      "capabilities": {
        "login": true,
        "pairing": true
      },
      "configSchema": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "botId": {
            "type": "string",
            "title": "Bot ID",
            "minLength": 1,
            "pattern": "\\S"
          },
          "secret": {
            "type": "string",
            "title": "Secret",
            "format": "password",
            "minLength": 1,
            "pattern": "\\S"
          },
          "dmPolicy": {
            "type": "string",
            "enum": [
              "pairing",
              "allowlist",
              "open",
              "disabled"
            ],
            "default": "pairing"
          },
          "allowFrom": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupPolicy": {
            "type": "string",
            "enum": [
              "allowlist",
              "open",
              "disabled"
            ],
            "default": "allowlist"
          },
          "groupAllowFrom": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groups": {
            "type": "object"
          },
          "streaming": {
            "type": "object"
          },
          "actions": {
            "type": "object"
          },
          "events": {
            "type": "object"
          },
          "accounts": {
            "type": "object"
          }
        }
      },
      "uiHints": {
        "secret": {
          "sensitive": true
        },
        "groupAllowFrom": {
          "label": "Allowed group senders"
        }
      },
      "actions": {
        "setup.start": {
          "label": "Set up by QR",
          "result": "qr"
        },
        "setup.status": {
          "label": "Setup status",
          "result": "poll"
        },
        "setup.manual": {
          "label": "Enter credentials",
          "result": "form"
        },
        "setup.cancel": {
          "label": "Cancel setup",
          "result": "ok"
        }
      },
      "i18n": {
        "zh": {
          "label": "企业微信",
          "description": "企业微信 AI 机器人全功能通道（原生流式输出、富媒体收发、工具集与多账号）",
          "uiHints": {
            "groupAllowFrom": {
              "label": "允许在群聊中触发的成员"
            }
          },
          "actions": {
            "setup.start": {
              "label": "扫码连接"
            },
            "setup.manual": {
              "label": "手动填写凭据"
            }
          }
        }
      }
    }
  }
}
