@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.
- package/dist/cli/chat-stream.js +32 -13
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/package.json +1 -1
package/dist/cli/chat-stream.js
CHANGED
|
@@ -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
|
-
|
|
278
|
+
const signature = `${snapshot.agentId || latestAgentId || ""}|${text}`;
|
|
279
|
+
if (renderedTodoTransitionLines.has(signature)) {
|
|
251
280
|
continue;
|
|
252
281
|
}
|
|
253
|
-
renderedTodoTransitionLines.add(
|
|
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
|
-
|
|
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.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.345";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-04-24";
|
package/dist/package-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.345";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-04-24";
|