@botbotgo/agent-harness 0.0.457 → 0.0.459
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.459";
|
|
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.459";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
|
@@ -25,12 +25,6 @@ export { buildAuthOmittingFetch, normalizeOpenAICompatibleInit } from "./adapter
|
|
|
25
25
|
export { buildToolNameMapping, createModelFacingToolNameCandidates, createModelFacingToolNameLookupCandidates, resolveModelFacingToolName, sanitizeToolNameForModel, } from "./adapter/tool/tool-name-mapping.js";
|
|
26
26
|
export { computeRemainingTimeoutMs, isRetryableProviderError, resolveBindingTimeout, resolveProviderRetryPolicy, resolveStreamIdleTimeout, resolveTimeoutMs, } from "./adapter/resilience.js";
|
|
27
27
|
import { getBindingAdapterKind, getBindingBuiltinToolsConfig, getBindingDeepAgentSubagents, getBindingExecutionParams, getBindingExecutionKind, getBindingFilesystemConfig, getBindingMemorySources, getBindingPrimaryModel, getBindingSkills, getBindingSubagents, getBindingToolCount, getBindingPrimaryTools, getBindingSystemPrompt, isDeepAgentBinding, isLangChainBinding, } from "./support/compiled-binding.js";
|
|
28
|
-
class DelegatedExecutionNoToolEvidenceError extends Error {
|
|
29
|
-
constructor(agentId) {
|
|
30
|
-
super(`Delegated agent ${agentId} lacked non-planning tool evidence.`);
|
|
31
|
-
this.name = "DelegatedExecutionNoToolEvidenceError";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
28
|
function hasDelegatedExecutionToolEvidence(result) {
|
|
35
29
|
const executedToolResults = Array.isArray(result.metadata?.executedToolResults)
|
|
36
30
|
? result.metadata.executedToolResults
|
|
@@ -691,30 +685,15 @@ export class AgentRuntimeAdapter {
|
|
|
691
685
|
const childSessionId = `${sessionId}:delegated:${resolvedSubagent.name}`;
|
|
692
686
|
const childRequestId = `${requestId}:delegated:${resolvedSubagent.name}:${Date.now().toString(36)}`;
|
|
693
687
|
try {
|
|
694
|
-
const
|
|
688
|
+
const result = await this.invoke(targetBinding, requestText, childSessionId, childRequestId, undefined, [], {
|
|
695
689
|
...(typeof config?.context === "object" && config.context ? { context: config.context } : {}),
|
|
696
|
-
};
|
|
697
|
-
const runDelegatedRequest = (text, requestSuffix = "") => this.invoke(targetBinding, text, childSessionId, `${childRequestId}${requestSuffix}`, undefined, [], invokeOptions);
|
|
698
|
-
let result = await runDelegatedRequest(requestText);
|
|
699
|
-
const targetRequiresExecutionToolEvidence = getBindingPrimaryTools(targetBinding).length > 0;
|
|
700
|
-
if (targetRequiresExecutionToolEvidence && !hasRequiredDelegatedExecutionToolEvidence(result)) {
|
|
701
|
-
result = await runDelegatedRequest([
|
|
702
|
-
requestText,
|
|
703
|
-
EXECUTION_WITH_TOOL_EVIDENCE_RETRY_INSTRUCTION,
|
|
704
|
-
].filter(Boolean).join("\n\n"), ":tool-evidence-retry");
|
|
705
|
-
if (!hasRequiredDelegatedExecutionToolEvidence(result)) {
|
|
706
|
-
throw new DelegatedExecutionNoToolEvidenceError(targetBinding.agent.id);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
690
|
+
});
|
|
709
691
|
return wrapRequestResultAsSubagentResponse({
|
|
710
692
|
output: result.output,
|
|
711
693
|
structuredResponse: result.structuredResponse,
|
|
712
694
|
});
|
|
713
695
|
}
|
|
714
696
|
catch (error) {
|
|
715
|
-
if (error instanceof DelegatedExecutionNoToolEvidenceError) {
|
|
716
|
-
throw new Error(buildDelegatedExecutionEvidenceBlocker(targetBinding.agent.id, getBindingPrimaryTools(targetBinding).map((tool) => tool.name)));
|
|
717
|
-
}
|
|
718
697
|
const message = error instanceof Error && error.message.trim().length > 0
|
|
719
698
|
? error.message.trim()
|
|
720
699
|
: "delegated execution failed";
|
|
@@ -152,9 +152,7 @@ export function resolveExecutionWithoutToolEvidenceTextInstruction(request, assi
|
|
|
152
152
|
if (!normalizedText || !hasUnfinishedExecution) {
|
|
153
153
|
return null;
|
|
154
154
|
}
|
|
155
|
-
return hasExecutionEvidence
|
|
156
|
-
? REQUIRED_EXECUTION_CONTINUATION_INSTRUCTION
|
|
157
|
-
: EXECUTION_WITH_TOOL_EVIDENCE_RETRY_INSTRUCTION;
|
|
155
|
+
return hasExecutionEvidence ? REQUIRED_EXECUTION_CONTINUATION_INSTRUCTION : null;
|
|
158
156
|
}
|
|
159
157
|
export function resolveToolCallRecoveryInstruction(error) {
|
|
160
158
|
if (isRepairableWriteTodosEmptyFailure(error))
|