openclaw-lark-multi-agent 1.0.15 → 1.0.16

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.
@@ -84,6 +84,7 @@ export declare class FeishuBot {
84
84
  private isAllMention;
85
85
  private isAllMentionItem;
86
86
  private mentionedBotName;
87
+ private escapeRegExp;
87
88
  private resolveBotName;
88
89
  private resolveHumanName;
89
90
  private cleanMentions;
@@ -1000,10 +1000,19 @@ export class FeishuBot {
1000
1000
  ];
1001
1001
  if (exactNames.includes(raw))
1002
1002
  return bot.config.name;
1003
+ // Generic display-name fallback: many deployments name bots like
1004
+ // "光子 (Claude)" or "万万(GPT)". Match only when the parenthesized
1005
+ // suffix is exactly the configured bot name, avoiding loose substring
1006
+ // matches that caused shared-prefix bots to steal each other's mentions.
1007
+ if (new RegExp(`^[^()()]+[((]${this.escapeRegExp(botName)}[))]$`, "i").test(raw))
1008
+ return bot.config.name;
1003
1009
  }
1004
1010
  }
1005
1011
  return null;
1006
1012
  }
1013
+ escapeRegExp(value) {
1014
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1015
+ }
1007
1016
  resolveBotName(sender) {
1008
1017
  const openId = sender?.sender_id?.open_id;
1009
1018
  if (openId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-lark-multi-agent",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Multi-bot Lark/Feishu bridge for OpenClaw, with per-bot model routing and isolated sessions",
5
5
  "type": "module",
6
6
  "scripts": {