@botbotgo/agent-harness 0.0.384 → 0.0.386
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.386";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-01";
|
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.386";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-01";
|
|
@@ -50,8 +50,14 @@ function isDelegationOnlyBinding(binding) {
|
|
|
50
50
|
function hasTaskDelegationEvidence(executedToolResults) {
|
|
51
51
|
return executedToolResults.some((item) => item.toolName === "task");
|
|
52
52
|
}
|
|
53
|
+
function isPlanToolName(toolName) {
|
|
54
|
+
return toolName === "write_todos"
|
|
55
|
+
|| toolName === "read_todos"
|
|
56
|
+
|| toolName === "tool_call_write_todos"
|
|
57
|
+
|| toolName === "tool_call_read_todos";
|
|
58
|
+
}
|
|
53
59
|
function hasPlanToolEvidence(executedToolResults) {
|
|
54
|
-
return executedToolResults.some((item) => item.toolName
|
|
60
|
+
return executedToolResults.some((item) => isPlanToolName(item.toolName));
|
|
55
61
|
}
|
|
56
62
|
function hasIncompleteTodos(value) {
|
|
57
63
|
if (!Array.isArray(value)) {
|
|
@@ -61,11 +61,17 @@ function hasIncompletePlanStateInExecutedToolResults(executedToolResults) {
|
|
|
61
61
|
}
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
|
+
function isPlanToolName(toolName) {
|
|
65
|
+
return toolName === "write_todos"
|
|
66
|
+
|| toolName === "read_todos"
|
|
67
|
+
|| toolName === "tool_call_write_todos"
|
|
68
|
+
|| toolName === "tool_call_read_todos";
|
|
69
|
+
}
|
|
64
70
|
function hasNonTodoToolEvidence(executedToolResults) {
|
|
65
|
-
return executedToolResults.some((item) => item.toolName
|
|
71
|
+
return executedToolResults.some((item) => !isPlanToolName(item.toolName));
|
|
66
72
|
}
|
|
67
73
|
function hasSuccessfulNonTodoToolEvidence(executedToolResults) {
|
|
68
|
-
return executedToolResults.some((item) => item.isError !== true && item.toolName
|
|
74
|
+
return executedToolResults.some((item) => item.isError !== true && !isPlanToolName(item.toolName));
|
|
69
75
|
}
|
|
70
76
|
function hasSuccessfulTaskToolEvidence(executedToolResults) {
|
|
71
77
|
return executedToolResults.some((item) => item.isError !== true && item.toolName === "task");
|
|
@@ -459,11 +465,11 @@ export async function* streamRuntimeExecution(options) {
|
|
|
459
465
|
state: projectionState,
|
|
460
466
|
});
|
|
461
467
|
const eventContainsNonTodoToolResult = projectedChunks.some((chunk) => chunk.kind === "tool-result"
|
|
462
|
-
&& chunk.toolName
|
|
468
|
+
&& !isPlanToolName(chunk.toolName)
|
|
463
469
|
&& !(chunk.isError === true && isRetrySafeInvalidToolSelectionError(chunk.output)));
|
|
464
470
|
const eventContainsNonRetrySafeChunk = projectedChunks.some((chunk) => chunk.kind !== "upstream-event"
|
|
465
471
|
&& chunk.kind !== "content"
|
|
466
|
-
&& !(chunk.kind === "tool-result" && chunk.toolName
|
|
472
|
+
&& !(chunk.kind === "tool-result" && isPlanToolName(chunk.toolName))
|
|
467
473
|
&& !(chunk.kind === "tool-result" && chunk.isError === true && isRetrySafeInvalidToolSelectionError(chunk.output)));
|
|
468
474
|
for (const chunk of projectedChunks) {
|
|
469
475
|
if (chunk.kind === "tool-result" && chunk.isError === true && isRetrySafeInvalidToolSelectionError(chunk.output)) {
|
|
@@ -36,8 +36,13 @@ function hasDelegatedExecutionToolEvidence(result) {
|
|
|
36
36
|
? result.metadata.executedToolResults
|
|
37
37
|
: [];
|
|
38
38
|
return executedToolResults.some((toolResult) => (toolResult.isError !== true
|
|
39
|
-
&& toolResult.toolName
|
|
40
|
-
|
|
39
|
+
&& !isPlanToolName(toolResult.toolName)));
|
|
40
|
+
}
|
|
41
|
+
function isPlanToolName(toolName) {
|
|
42
|
+
return toolName === "write_todos"
|
|
43
|
+
|| toolName === "read_todos"
|
|
44
|
+
|| toolName === "tool_call_write_todos"
|
|
45
|
+
|| toolName === "tool_call_read_todos";
|
|
41
46
|
}
|
|
42
47
|
function shouldUseConfigurableDeepAgentAssembly(binding) {
|
|
43
48
|
return getBindingExecutionKind(binding) === "deepagent";
|
|
@@ -195,7 +200,7 @@ function isDelegationOnlyDeepAgentBinding(binding) {
|
|
|
195
200
|
function hasDelegatedPlanEvidence(result) {
|
|
196
201
|
const toolResults = result?.metadata?.executedToolResults;
|
|
197
202
|
return Array.isArray(toolResults)
|
|
198
|
-
&& toolResults.some((item) => item.toolName
|
|
203
|
+
&& toolResults.some((item) => isPlanToolName(item.toolName));
|
|
199
204
|
}
|
|
200
205
|
const DELEGATED_PLAN_EVIDENCE_RETRY_INSTRUCTION = [
|
|
201
206
|
"The delegated task requires visible TODO planning evidence.",
|
|
@@ -217,12 +222,10 @@ function selectDelegatedToolResultsForVisibleProgress(result) {
|
|
|
217
222
|
? result.metadata.executedToolResults
|
|
218
223
|
: [];
|
|
219
224
|
const hasSuccessfulExecutionEvidence = executedToolResults.some((toolResult) => (toolResult.isError !== true
|
|
220
|
-
&& toolResult.toolName
|
|
221
|
-
&& toolResult.toolName !== "read_todos"));
|
|
225
|
+
&& !isPlanToolName(toolResult.toolName)));
|
|
222
226
|
return hasSuccessfulExecutionEvidence
|
|
223
227
|
? executedToolResults.filter((toolResult) => (toolResult.isError !== true
|
|
224
|
-
&& toolResult.toolName
|
|
225
|
-
&& toolResult.toolName !== "read_todos"))
|
|
228
|
+
&& !isPlanToolName(toolResult.toolName)))
|
|
226
229
|
: executedToolResults;
|
|
227
230
|
}
|
|
228
231
|
export class AgentRuntimeAdapter {
|
|
@@ -1142,7 +1145,7 @@ export class AgentRuntimeAdapter {
|
|
|
1142
1145
|
const toolEvidence = uniqueToolNames.length > 0 ? uniqueToolNames.join(", ") : "none";
|
|
1143
1146
|
const fallbackTodoTrace = [
|
|
1144
1147
|
`1) TODO observed: delegated to ${delegatedSubagentType}.`,
|
|
1145
|
-
uniqueToolNames.
|
|
1148
|
+
uniqueToolNames.some((toolName) => isPlanToolName(toolName))
|
|
1146
1149
|
? "2) TODO evidence: delegated specialist invoked write_todos."
|
|
1147
1150
|
: "2) TODO evidence missing: delegated specialist did not expose write_todos in returned metadata.",
|
|
1148
1151
|
state === "failed"
|