openclaw-lark-multi-agent 1.0.18 → 1.0.19

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.
@@ -213,11 +213,18 @@ export class OpenClawClient {
213
213
  // Tool calls in assistant messages — skip, using agent item events instead
214
214
  // (session.message toolCall events are batched, not real-time)
215
215
  }
216
- // Agent assistant streams — verbose mode should expose intermediate text,
217
- // while normal mode only surfaces the final result via collectReply.
216
+ // Agent assistant streams — verbose mode buffers intermediate text and
217
+ // flushes it only on a real boundary (for example, before a tool starts).
218
+ // This keeps a single assistant preface together instead of leaking it
219
+ // as multiple debounce-sized Feishu messages.
218
220
  if (frame.event === "agent" && (frame.payload?.stream === "assistant" || frame.payload?.stream === "chatDelta")) {
219
221
  this.handleVerboseAssistantStream(frame.payload);
220
222
  }
223
+ if (frame.event === "agent" && frame.payload?.stream === "lifecycle" && frame.payload?.data?.phase === "end") {
224
+ const rawKey = frame.payload.sessionKey || "";
225
+ this.flushVerboseAssistantState(rawKey);
226
+ this.clearVerboseAssistantState(rawKey);
227
+ }
221
228
  // Agent item / command output events — real-time tool tracking for verbose mode.
222
229
  if (frame.event === "agent" && frame.payload?.stream === "item") {
223
230
  const data = frame.payload.data || {};
@@ -382,15 +389,9 @@ export class OpenClawClient {
382
389
  this.verboseAssistantLatest.set(key, text);
383
390
  this.verboseAssistantLastTouched.set(key, now);
384
391
  this.pruneVerboseCaches(now);
385
- const existing = this.verboseAssistantTimers.get(key);
386
- if (existing)
387
- clearTimeout(existing);
388
- this.verboseAssistantTimers.set(key, setTimeout(() => {
389
- this.verboseAssistantTimers.delete(key);
390
- if (!this.isVerboseTranscriptEnabled(rawKey))
391
- return;
392
+ if (text.length >= 3000) {
392
393
  this.flushVerboseAssistantState(rawKey);
393
- }, 800));
394
+ }
394
395
  }
395
396
  handleProactiveSessionMessage(rawKey, msg) {
396
397
  const shortKey = rawKey.replace(/^agent:[^:]+:/, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-lark-multi-agent",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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": {