@botbotgo/agent-harness 0.0.443 → 0.0.444
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.444";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
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.444";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
|
@@ -35,17 +35,23 @@ function planStateHasUnfinishedItems(planState) {
|
|
|
35
35
|
function planStateHasActiveItems(planState) {
|
|
36
36
|
return planStateHasUnfinishedItems(planState);
|
|
37
37
|
}
|
|
38
|
+
function isPlanToolName(toolName) {
|
|
39
|
+
const normalized = typeof toolName === "string" ? toolName.trim().toLowerCase().replace(/[\s-]+/gu, "_") : "";
|
|
40
|
+
return normalized === "write_todos"
|
|
41
|
+
|| normalized === "read_todos"
|
|
42
|
+
|| normalized === "tool_call_write_todos"
|
|
43
|
+
|| normalized === "tool_call_read_todos"
|
|
44
|
+
|| normalized === "call_write_todos"
|
|
45
|
+
|| normalized === "call_read_todos";
|
|
46
|
+
}
|
|
38
47
|
function isSubstantiveTerminalAssistantOutput(value) {
|
|
39
48
|
const normalized = sanitizeVisibleText(value).trim();
|
|
40
49
|
if (normalized.length < 80) {
|
|
41
50
|
return false;
|
|
42
51
|
}
|
|
43
|
-
if (/\b(?:delegated|waiting|wait for|initiated)\b/i.test(normalized) && !/\b(?:finding|summary|root cause|evidence|completed|result|issue)\b/i.test(normalized)) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
52
|
return true;
|
|
47
53
|
}
|
|
48
|
-
function inferPlanItemStatusFromTerminalAssistantOutput(value) {
|
|
54
|
+
function inferPlanItemStatusFromTerminalAssistantOutput(value, options = {}) {
|
|
49
55
|
const terminalStatus = readTerminalExecutionStatus(value);
|
|
50
56
|
if (terminalStatus) {
|
|
51
57
|
return mapTerminalStatusToPlanItemStatus(terminalStatus);
|
|
@@ -57,6 +63,9 @@ function inferPlanItemStatusFromTerminalAssistantOutput(value) {
|
|
|
57
63
|
if (normalized.startsWith("runtime_error=")) {
|
|
58
64
|
return "failed";
|
|
59
65
|
}
|
|
66
|
+
if (options.hasSuccessfulExecutionEvidence !== true) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
60
69
|
return isSubstantiveTerminalAssistantOutput(value) ? "completed" : null;
|
|
61
70
|
}
|
|
62
71
|
function mapTerminalStatusToObservedPlanItemStatus(status, sawSuccessfulToolResult) {
|
|
@@ -675,6 +684,7 @@ export async function* streamHarnessRun(options) {
|
|
|
675
684
|
let syntheticFallback;
|
|
676
685
|
const toolErrors = [];
|
|
677
686
|
let sawSuccessfulToolResult = false;
|
|
687
|
+
let sawSuccessfulExecutionToolResult = false;
|
|
678
688
|
let lastToolResultKey = null;
|
|
679
689
|
const executedToolResults = [];
|
|
680
690
|
const emittedCommentary = new Set();
|
|
@@ -873,6 +883,9 @@ export async function* streamHarnessRun(options) {
|
|
|
873
883
|
}
|
|
874
884
|
else {
|
|
875
885
|
sawSuccessfulToolResult = true;
|
|
886
|
+
if (!isPlanToolName(normalizedChunk.toolName) && normalizedChunk.toolName !== "task") {
|
|
887
|
+
sawSuccessfulExecutionToolResult = true;
|
|
888
|
+
}
|
|
876
889
|
}
|
|
877
890
|
yield {
|
|
878
891
|
type: "tool-result",
|
|
@@ -1055,12 +1068,14 @@ export async function* streamHarnessRun(options) {
|
|
|
1055
1068
|
}
|
|
1056
1069
|
currentPlanState = await refreshPlanStateFromPersistence(options, currentPlanState);
|
|
1057
1070
|
const explicitTerminalAssistantStatus = readTerminalExecutionStatus(assistantOutput);
|
|
1058
|
-
let terminalAssistantPlanItemStatus = inferPlanItemStatusFromTerminalAssistantOutput(assistantOutput
|
|
1059
|
-
|
|
1071
|
+
let terminalAssistantPlanItemStatus = inferPlanItemStatusFromTerminalAssistantOutput(assistantOutput, {
|
|
1072
|
+
hasSuccessfulExecutionEvidence: sawSuccessfulExecutionToolResult,
|
|
1073
|
+
});
|
|
1074
|
+
if (explicitTerminalAssistantStatus === "blocked" && sawSuccessfulExecutionToolResult) {
|
|
1060
1075
|
terminalAssistantPlanItemStatus = "completed";
|
|
1061
1076
|
}
|
|
1062
1077
|
if (terminalAssistantPlanItemStatus === "failed"
|
|
1063
|
-
&&
|
|
1078
|
+
&& sawSuccessfulExecutionToolResult
|
|
1064
1079
|
&& !explicitTerminalAssistantStatus
|
|
1065
1080
|
&& !sanitizeVisibleText(assistantOutput).trim().toLowerCase().startsWith("runtime_error=")
|
|
1066
1081
|
&& assistantOutput.trim()) {
|