@botbotgo/agent-harness 0.0.370 → 0.0.371
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.371";
|
|
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.371";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-04-30";
|
|
@@ -12,6 +12,13 @@ export class ExecutionReconciliationError extends Error {
|
|
|
12
12
|
this.name = "ExecutionReconciliationError";
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
const CLOSE_REQUIRED_PLAN_RECOVERY_INSTRUCTION = [
|
|
16
|
+
"The current required todo board still has unfinished work.",
|
|
17
|
+
"Do not broaden the investigation, restart planning, or ask the user what to do next.",
|
|
18
|
+
"Use the existing tool evidence already available in this run.",
|
|
19
|
+
"Your next action must be write_todos: update every remaining pending or in_progress item to completed if evidence was gathered, or failed if it cannot be completed with the available tools.",
|
|
20
|
+
"After that write_todos call, provide the final answer required by the agent response format.",
|
|
21
|
+
].join("\n");
|
|
15
22
|
function toVisibleContent(value) {
|
|
16
23
|
const extracted = extractVisibleOutput(value);
|
|
17
24
|
return extracted ? sanitizeVisibleText(extracted) : "";
|
|
@@ -528,10 +535,15 @@ export async function* streamRuntimeExecution(options) {
|
|
|
528
535
|
const streamedExecutionEvidence = buildExecutionRecoveryEvidence({ projectionState });
|
|
529
536
|
const streamedDelegatedRecoveryInstruction = resolveDelegatedExecutionRecoveryInstruction(streamedExecutionEvidence);
|
|
530
537
|
const streamedDelegationOnlyRecoveryInstruction = resolveDelegationOnlyRecoveryInstruction(options.binding, streamedExecutionEvidence);
|
|
538
|
+
const streamedIncompletePlanRecoveryInstruction = requiresPlanEvidence(options.binding) && streamedExecutionEvidence.hasIncompletePlanState
|
|
539
|
+
? CLOSE_REQUIRED_PLAN_RECOVERY_INSTRUCTION
|
|
540
|
+
: null;
|
|
531
541
|
const delegatedExecutionRecoveryInstruction = !emittedUnsafeStreamSideEffects || streamedDelegatedRecoveryInstruction
|
|
532
542
|
? streamedDelegatedRecoveryInstruction
|
|
533
543
|
: null;
|
|
534
|
-
if (hasUnresolvedExecution(streamedExecutionEvidence)
|
|
544
|
+
if (hasUnresolvedExecution(streamedExecutionEvidence)
|
|
545
|
+
&& !delegatedExecutionRecoveryInstruction
|
|
546
|
+
&& !streamedIncompletePlanRecoveryInstruction) {
|
|
535
547
|
throw createUnresolvedExecutionError(streamedExecutionEvidence);
|
|
536
548
|
}
|
|
537
549
|
const executionWithoutToolEvidenceInstruction = projectionState.emittedOutput
|
|
@@ -557,6 +569,7 @@ export async function* streamRuntimeExecution(options) {
|
|
|
557
569
|
const retryInstruction = !emittedUnsafeStreamSideEffects && sawRetrySafeInvalidToolSelectionError
|
|
558
570
|
? INVALID_TOOL_SELECTION_RECOVERY_INSTRUCTION
|
|
559
571
|
: delegatedExecutionRecoveryInstruction
|
|
572
|
+
?? streamedIncompletePlanRecoveryInstruction
|
|
560
573
|
?? streamedRuntimeFailureRecoveryInstruction
|
|
561
574
|
?? missingPlanRecoveryInstruction
|
|
562
575
|
?? streamedDelegationOnlyRecoveryInstruction
|
|
@@ -776,7 +789,11 @@ export async function* streamRuntimeExecution(options) {
|
|
|
776
789
|
})
|
|
777
790
|
: null;
|
|
778
791
|
const invokeFallbackDelegationOnlyRecoveryInstruction = resolveDelegationOnlyRecoveryInstruction(options.binding, invokeExecutionEvidence);
|
|
779
|
-
const
|
|
792
|
+
const invokeFallbackIncompletePlanRecoveryInstruction = requiresPlanEvidence(options.binding) && invokeExecutionEvidence.hasIncompletePlanState
|
|
793
|
+
? CLOSE_REQUIRED_PLAN_RECOVERY_INSTRUCTION
|
|
794
|
+
: null;
|
|
795
|
+
const effectiveInvokeFallbackRecoveryInstruction = invokeFallbackIncompletePlanRecoveryInstruction
|
|
796
|
+
?? invokeFallbackMissingPlanRecoveryInstruction
|
|
780
797
|
?? invokeFallbackDelegationOnlyRecoveryInstruction
|
|
781
798
|
?? invokeFallbackRecoveryInstruction;
|
|
782
799
|
if (effectiveInvokeFallbackRecoveryInstruction) {
|