@vrs-soft/wecom-aibot-mcp 3.4.1 → 3.4.2

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.
@@ -1072,6 +1072,18 @@ function registerChannelTools(server) {
1072
1072
  */
1073
1073
  export async function startChannelServer() {
1074
1074
  logChannel('Starting Channel MCP Proxy');
1075
+ // v3.4.2: 启动即装 hook 文件(幂等)。
1076
+ // 防止"已在微信模式 + npx 升级"这种场景:项目 settings.json 已经指向
1077
+ // ~/.wecom-aibot-mcp/permission-hook.mjs,但因为没人重新调 enter_headless_mode,
1078
+ // ensureHookFiles 永远不跑 → 文件不存在 → hook ENOENT 静默放行。
1079
+ // 这里每次 TUI spawn channel-server 都跑一次,确保文件永远是最新版且存在。
1080
+ try {
1081
+ ensureHookFiles();
1082
+ logChannel('Hook 文件已确保安装(启动时幂等检查)');
1083
+ }
1084
+ catch (e) {
1085
+ logChannel('ensureHookFiles 启动时失败', { error: String(e) });
1086
+ }
1075
1087
  // 创建 MCP Server
1076
1088
  mcpServer = new McpServer({
1077
1089
  name: 'wecom-aibot-channel',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrs-soft/wecom-aibot-mcp",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "企业微信智能机器人 MCP 客户端 - 连接 wecom-aibot-server daemon",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",