@vrs-soft/wecom-aibot-mcp 2.3.0 → 2.3.1

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.
Files changed (2) hide show
  1. package/dist/client.js +4 -1
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -547,9 +547,12 @@ class WecomClient extends EventEmitter {
547
547
  // 清理过期消息
548
548
  cleanupMessages(maxAgeMs = 300000) {
549
549
  const cutoff = Date.now() - maxAgeMs;
550
+ // 未解决的审批保留 15 分钟,防止用户在超时前点击时记录已被清理导致按钮失效
551
+ const pendingCutoff = Date.now() - 15 * 60 * 1000;
550
552
  this.messages = this.messages.filter(m => m.timestamp > cutoff);
551
553
  this.approvals.forEach((a, k) => {
552
- if (a.timestamp < cutoff)
554
+ const threshold = a.resolved ? cutoff : pendingCutoff;
555
+ if (a.timestamp < threshold)
553
556
  this.approvals.delete(k);
554
557
  });
555
558
  // 清理过期的待发送消息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrs-soft/wecom-aibot-mcp",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "企业微信智能机器人 MCP 服务 - Claude Code 审批通道",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",