openclaw-lark-multi-agent 1.8.14 → 1.8.15

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.
@@ -1,6 +1,12 @@
1
1
  import { BotConfig } from "./config.js";
2
2
  import { OpenClawClient } from "./openclaw-client.js";
3
3
  import { MessageStore } from "./message-store.js";
4
+ /** Observation deadline, never a claim that the underlying SDK was cancelled. */
5
+ export declare class SendDeadlineError extends Error {
6
+ readonly chatId: string;
7
+ readonly limit: number;
8
+ constructor(chatId: string, limit: number);
9
+ }
4
10
  /**
5
11
  * Manages a single Feishu bot instance.
6
12
  *
@@ -47,18 +53,21 @@ export declare class FeishuBot {
47
53
  * fails restore their durable fallback. Fired in processQueueInner's
48
54
  * failure arms; dropped at each new batch top and on queue exit. */
49
55
  private runFailureObservers;
50
- /** Steered messages admitted into the CURRENT batch (per chat). Flipped to
51
- * DONE when that batch completes successfully; cleared (unflipped) when the
52
- * batch scope ends any other way. */
56
+ /** Ephemeral batch-scoped acceptance bookkeeping, not commitment evidence.
57
+ * Ending the batch only drops these handles; durable insertion custody stays
58
+ * accepted and must not inherit the root's DONE. */
53
59
  private admittedSteerAcks;
54
- /** Identity token of the CURRENT queue owner per chat. Steer acks carry
55
- * the token of the batch that admitted them; a completion path only flips
56
- * acks of its OWN batch, so a superseded inner can never DONE a newer
57
- * batch's steered inputs (2026-10-16 audit B9). */
60
+ /** Identity token of the CURRENT queue owner per chat. Acceptance bookkeeping
61
+ * carries its batch token so late old cleanup never takes a newer batch's
62
+ * handles (2026-10-16 audit B9); neither token proves input commitment. */
58
63
  private queueRunTokens;
59
64
  /** Go / Go-Checker supervision controller (per-bot instance). */
60
65
  private readonly goDeliveryReceipts;
61
66
  private readonly goReceiptApis;
67
+ private readonly sendEffectLeases;
68
+ /** A deadline releases the chat queue, NOT this exact operation's ownership. */
69
+ private readonly inFlightDeliveryWork;
70
+ private assertSendEffectLease;
62
71
  private installGoReceiptCapture;
63
72
  private goController;
64
73
  /** Per-chat durable outbox retry timer. */
@@ -82,6 +91,7 @@ export declare class FeishuBot {
82
91
  private adminOpenId;
83
92
  private locale;
84
93
  private configPath?;
94
+ private queuedPresentations;
85
95
  private static allBots;
86
96
  /** Chats where this bot app has actually received an event in this process. */
87
97
  private static seenBotChats;
@@ -125,6 +135,7 @@ export declare class FeishuBot {
125
135
  /** CAS includes the actual batch, not merely the queue Promise, and excludes
126
136
  * local admission/RPC windows even if the host briefly reports idle. */
127
137
  private reconcileDispatchCustody;
138
+ private presentation;
128
139
  private stopGeneration;
129
140
  private reactionChecks;
130
141
  private receiptReaction;
@@ -258,6 +269,12 @@ export declare class FeishuBot {
258
269
  * No host proactive-send assumption, no fake platform receipt. */
259
270
  private deliverGoExecutorResult;
260
271
  private insertionNoticeCurrent;
272
+ private deliveryDeadlineReason;
273
+ /** Durable local obligation, separate from the platform retry budget. */
274
+ private retainLocalDelivery;
275
+ private isDeliverySettlementRevoked;
276
+ /** Also runs for a late accepted SDK receipt, without replaying the final. */
277
+ private settleConfirmedDelivery;
261
278
  private dispatchPendingDeliveries;
262
279
  private hasFreeModeBot;
263
280
  private mentionedBotNames;
@@ -277,6 +294,9 @@ export declare class FeishuBot {
277
294
  private buildLiveStatusCard;
278
295
  /** Minimal escaping so activity text does not break card markdown. */
279
296
  private escapeCardText;
297
+ /** Keep receipt ownership below sendOrdered's Promise.race. Nothing here
298
+ * changes business-message/outbox ordering or retries. */
299
+ private liveStatusCallbacks;
280
300
  private sendLiveStatusCard;
281
301
  private replyLiveStatusCard;
282
302
  private patchLiveStatusCard;
@@ -358,8 +378,10 @@ export declare class FeishuBot {
358
378
  * The chain must never wedge: a single hung Feishu call used to block every
359
379
  * later send in that chat forever (live-status patches fire per tool event),
360
380
  * which froze cards and stranded /stop confirmations. Each link is therefore
361
- * raced against a deadline, so a stuck send is abandoned and ordering resumes.
362
- * Prefer a larger OPENCLAW_LARK_MULTI_AGENT_SEND_TIMEOUT_MS on slow links.
381
+ * raced against an observation deadline. The queue advances, but an already
382
+ * attempted SDK request is NOT cancelled and can settle late. Its outbox keeps
383
+ * custody; the expired lease forbids any subsequent new SDK effect. This is
384
+ * not a strict platform-order guarantee for uncancellable in-flight requests.
363
385
  */
364
386
  private sendOrdered;
365
387
  /** One send link: resolve with fn(), or reject at the deadline so the chain advances. */