@wecom/wecom-openclaw-plugin 1.0.10 → 1.0.12-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1572,9 +1572,10 @@ async function cleanupAccount(accountId) {
1572
1572
  * @throws 响应错误码非 0 或缺少 url 字段时抛出错误
1573
1573
  */
1574
1574
  async function fetchMcpConfig(wsClient) {
1575
+ const biz_type = "doc";
1575
1576
  const reqId = generateReqId("mcp_config");
1576
1577
  // 通过 reply 方法发送自定义命令
1577
- const response = await withTimeout(wsClient.reply({ headers: { req_id: reqId } }, { biz_type: "doc" }, MCP_GET_CONFIG_CMD), MCP_CONFIG_FETCH_TIMEOUT_MS, `MCP config fetch timed out after ${MCP_CONFIG_FETCH_TIMEOUT_MS}ms`);
1578
+ const response = await withTimeout(wsClient.reply({ headers: { req_id: reqId } }, { biz_type }, MCP_GET_CONFIG_CMD), MCP_CONFIG_FETCH_TIMEOUT_MS, `MCP config fetch timed out after ${MCP_CONFIG_FETCH_TIMEOUT_MS}ms`);
1578
1579
  // 校验响应错误码
1579
1580
  if (response.errcode && response.errcode !== 0) {
1580
1581
  throw new Error(`MCP config request failed: errcode=${response.errcode}, errmsg=${response.errmsg ?? "unknown"}`);
@@ -1585,8 +1586,9 @@ async function fetchMcpConfig(wsClient) {
1585
1586
  throw new Error("MCP config response missing required 'url' field");
1586
1587
  }
1587
1588
  return {
1589
+ biz_type,
1588
1590
  url: body.url,
1589
- type: 'doc',
1591
+ type: body.type,
1590
1592
  is_authed: body.is_authed,
1591
1593
  };
1592
1594
  }
@@ -1651,7 +1653,7 @@ async function saveMcpConfigToPluginJson(config, runtime) {
1651
1653
  pluginJson.mcpConfig = {};
1652
1654
  }
1653
1655
  // 使用 type 作为键存储配置
1654
- const typeKey = config.type || 'default';
1656
+ const typeKey = config.biz_type || 'default';
1655
1657
  pluginJson.mcpConfig[typeKey] = {
1656
1658
  type: config.type,
1657
1659
  url: config.url,
@@ -2750,7 +2752,7 @@ const wecomPlugin = {
2750
2752
  };
2751
2753
 
2752
2754
  const plugin = {
2753
- id: "wecom",
2755
+ id: "wecom-openclaw-plugin",
2754
2756
  name: "企业微信",
2755
2757
  description: "企业微信 OpenClaw 插件",
2756
2758
  configSchema: emptyPluginConfigSchema(),