@botbotgo/agent-harness 0.0.344 → 0.0.345

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.
@@ -176,6 +176,34 @@ export async function streamChatMessage(input) {
176
176
  }
177
177
  stderrWriteChain = enqueueChatWrite(input.stderr, input.stderrStream, stderrWriteChain, message);
178
178
  };
179
+ const emitProgressCommentary = (rawText, agentId) => {
180
+ const lines = rawText.split("\n").filter((line) => line.length > 0);
181
+ if (lines.length === 0) {
182
+ return;
183
+ }
184
+ const now = Date.now();
185
+ const linePrefix = `[${formatPerfClock(now)} +${formatElapsed(now)}]${formatAgentProgressLabel(agentId || latestAgentId)}`;
186
+ const serializedLines = lines
187
+ .map((line) => {
188
+ const signature = `${agentId || latestAgentId}|${line}`;
189
+ if (renderedTodoTransitionLines.has(signature)) {
190
+ return null;
191
+ }
192
+ renderedTodoTransitionLines.add(signature);
193
+ return `${linePrefix} ${line}\n`;
194
+ })
195
+ .filter((line) => line !== null);
196
+ if (serializedLines.length === 0) {
197
+ return;
198
+ }
199
+ if (input.requestEvents && input.liveRequestTree && !suppressRequestTreeRendering && lastRenderedRequestTree) {
200
+ liveRequestAnnotations.push(...serializedLines);
201
+ clearLiveRequestTree();
202
+ drawLiveRequestTree();
203
+ return;
204
+ }
205
+ writeChatStderr(serializedLines.join(""));
206
+ };
179
207
  const clearIdleProgressTimer = () => {
180
208
  if (idleProgressTimer) {
181
209
  clearTimeout(idleProgressTimer);
@@ -247,10 +275,11 @@ export async function streamChatMessage(input) {
247
275
  continue;
248
276
  }
249
277
  const text = `TODO ${label}: ${todo.content}.`;
250
- if (renderedTodoTransitionLines.has(text)) {
278
+ const signature = `${snapshot.agentId || latestAgentId || ""}|${text}`;
279
+ if (renderedTodoTransitionLines.has(signature)) {
251
280
  continue;
252
281
  }
253
- renderedTodoTransitionLines.add(text);
282
+ renderedTodoTransitionLines.add(signature);
254
283
  lines.push(`[${formatPerfClock(Date.now())} +${formatElapsed(Date.now())}]${formatAgentProgressLabel(snapshot.agentId)} ${text}\n`);
255
284
  }
256
285
  previousTodoStatuses = nextStatuses;
@@ -354,17 +383,7 @@ export async function streamChatMessage(input) {
354
383
  if (wroteContent || wroteRenderableBlocks) {
355
384
  return;
356
385
  }
357
- if (renderedTodoTransitionLines.has(delta.text)) {
358
- return;
359
- }
360
- const progressLine = `[${formatPerfClock(Date.now())} +${formatElapsed(Date.now())}]${formatAgentProgressLabel(delta.agentId)} ${delta.text}\n`;
361
- if (input.requestEvents && input.liveRequestTree && !suppressRequestTreeRendering && lastRenderedRequestTree) {
362
- liveRequestAnnotations.push(progressLine);
363
- clearLiveRequestTree();
364
- drawLiveRequestTree();
365
- return;
366
- }
367
- writeChatStderr(progressLine);
386
+ emitProgressCommentary(delta.text, delta.agentId);
368
387
  }
369
388
  },
370
389
  });
@@ -1,2 +1,2 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.344";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.345";
2
2
  export declare const AGENT_HARNESS_RELEASE_DATE = "2026-04-24";
@@ -1,2 +1,2 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.344";
1
+ export const AGENT_HARNESS_VERSION = "0.0.345";
2
2
  export const AGENT_HARNESS_RELEASE_DATE = "2026-04-24";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.344",
3
+ "version": "0.0.345",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",