@botbotgo/agent-harness 0.0.372 → 0.0.373
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,2 +1,2 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.373";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-04-30";
|
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.373";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-04-30";
|
|
@@ -287,6 +287,20 @@ function updateDelegationState(state, event, countConfiguredToolsForAgentId) {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
+
function extractTodoToolStart(event) {
|
|
291
|
+
if (typeof event !== "object" || event === null) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
const typed = event;
|
|
295
|
+
const eventName = typeof typed.event === "string" ? typed.event : "";
|
|
296
|
+
const runType = typeof typed.run_type === "string" ? typed.run_type : "";
|
|
297
|
+
const toolName = typeof typed.name === "string" ? typed.name : "";
|
|
298
|
+
const isToolStart = eventName === "on_tool_start" || (eventName === "on_chain_start" && runType === "tool");
|
|
299
|
+
if (!isToolStart || (toolName !== "write_todos" && toolName !== "read_todos")) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
return { toolName, input: unwrapPossibleToolInput(typed.data?.input) };
|
|
303
|
+
}
|
|
290
304
|
export function projectRuntimeStreamEvent(params) {
|
|
291
305
|
const { event, allowVisibleStreamDeltas, includeStateStreamOutput, rootAgentId, countConfiguredToolsForAgentId, toolNameMapping, primaryTools, state, } = params;
|
|
292
306
|
const chunks = [{
|
|
@@ -341,6 +355,17 @@ export function projectRuntimeStreamEvent(params) {
|
|
|
341
355
|
}
|
|
342
356
|
}
|
|
343
357
|
const toolResult = extractToolResult(event);
|
|
358
|
+
const todoToolStart = toolResult ? null : extractTodoToolStart(event);
|
|
359
|
+
if (todoToolStart) {
|
|
360
|
+
state.emittedToolResult = true;
|
|
361
|
+
state.emittedSuccessfulToolResult = true;
|
|
362
|
+
chunks.push({
|
|
363
|
+
kind: "tool-result",
|
|
364
|
+
toolName: resolveModelFacingToolName(todoToolStart.toolName, toolNameMapping, primaryTools),
|
|
365
|
+
output: todoToolStart.input,
|
|
366
|
+
isError: false,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
344
369
|
if (toolResult) {
|
|
345
370
|
const isTodoTool = toolResult.toolName === "write_todos" || toolResult.toolName === "read_todos";
|
|
346
371
|
const salvagedTaskErrorFindings = toolResult.toolName === "task"
|