openclaw-lark-multi-agent 1.2.7 → 1.2.8

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/feishu-bot.js +14 -4
  2. package/package.json +1 -1
@@ -1119,6 +1119,13 @@ export class FeishuBot {
1119
1119
  const isNativeCommandTrigger = firstIsNative;
1120
1120
  const lastHuman = mergedTriggers[mergedTriggers.length - 1];
1121
1121
  const triggerId = lastHuman.id || 0;
1122
+ // Snapshot the stop generation BEFORE the main run starts. If the user runs
1123
+ // /stop at any point during the main run, handleStopCommand bumps the epoch;
1124
+ // auto-retry compares against this baseline and skips retrying entirely. If
1125
+ // we snapshotted inside auto-retry instead, a /stop that landed during the
1126
+ // main run would already be baked into the baseline and go undetected —
1127
+ // that was the "stop then auto-retry anyway" bug.
1128
+ const runStartStopEpoch = this.stopEpoch.get(chatId) || 0;
1122
1129
  const mergedContent = mergedTriggers.map((m) => m.content).join("\n");
1123
1130
  const mergedTriggerIds = mergedTriggers.map((m) => m.id || 0).filter(Boolean);
1124
1131
  const droppedTriggerIds = droppedMergedTriggers.map((m) => m.id || 0).filter(Boolean);
@@ -1267,6 +1274,7 @@ export class FeishuBot {
1267
1274
  isNativeCommandTrigger,
1268
1275
  initialReply: reply,
1269
1276
  liveStatus,
1277
+ runStartStopEpoch,
1270
1278
  });
1271
1279
  const parsedReply = this.extractBridgeAttachments(reply);
1272
1280
  const visibleReply = parsedReply.text;
@@ -1780,10 +1788,12 @@ export class FeishuBot {
1780
1788
  if (!autoRetryEnabled() || isNativeCommandTrigger)
1781
1789
  return reply;
1782
1790
  const maxRetry = autoRetryMax();
1783
- // Snapshot the stop generation at entry. If the user runs /stop while this
1784
- // loop is in flight, handleStopCommand bumps the epoch; we detect the change
1785
- // and stop retrying immediately instead of issuing more probes.
1786
- const startStopEpoch = this.stopEpoch.get(chatId) || 0;
1791
+ // Baseline stop generation. Prefer the epoch captured before the main run
1792
+ // (runStartStopEpoch) so a /stop that landed DURING the main run is still
1793
+ // seen here; fall back to the current epoch only if the caller did not pass
1794
+ // one. If the user hit /stop at any point from the main run onward, the
1795
+ // epoch is now past the baseline and we must not auto-retry at all.
1796
+ const startStopEpoch = params.runStartStopEpoch ?? (this.stopEpoch.get(chatId) || 0);
1787
1797
  const wasStopped = () => (this.stopEpoch.get(chatId) || 0) !== startStopEpoch;
1788
1798
  for (let attempt = 1; attempt <= maxRetry; attempt++) {
1789
1799
  // /stop while we were looping: abandon retries and deliver what we have.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-lark-multi-agent",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
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": {