@botbotgo/agent-harness 0.0.458 → 0.0.460

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.458";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.460";
2
2
  export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
@@ -1,2 +1,2 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.458";
1
+ export const AGENT_HARNESS_VERSION = "0.0.460";
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 invokeOptions = {
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";
@@ -1245,7 +1224,6 @@ export class AgentRuntimeAdapter {
1245
1224
  };
1246
1225
  }
1247
1226
  }
1248
- const targetRequiresExecutionToolEvidence = getBindingPrimaryTools(selectedBinding).length > 0;
1249
1227
  if (selectedBinding.harnessRuntime.executionContract?.requiresPlan === true
1250
1228
  && !hasDelegatedPlanEvidence(delegatedResult)) {
1251
1229
  try {
@@ -1265,32 +1243,6 @@ export class AgentRuntimeAdapter {
1265
1243
  };
1266
1244
  }
1267
1245
  }
1268
- if (targetRequiresExecutionToolEvidence && !hasRequiredDelegatedExecutionToolEvidence(delegatedResult)) {
1269
- try {
1270
- delegatedResult = await runDelegatedRequest([
1271
- requestText,
1272
- EXECUTION_WITH_TOOL_EVIDENCE_RETRY_INSTRUCTION,
1273
- ].filter(Boolean).join("\n\n"), ":tool-evidence-retry", selectedBinding.harnessRuntime.executionContract?.requiresPlan === true
1274
- ? {
1275
- suppressInitialRequiredPlanInstruction: true,
1276
- externalPlanEvidence: hasDelegatedPlanEvidence(delegatedResult),
1277
- }
1278
- : {});
1279
- }
1280
- catch (error) {
1281
- const output = error instanceof Error ? error.message : String(error);
1282
- return {
1283
- toolOutput: output,
1284
- delegatedSubagentType: subagentType,
1285
- delegatedResult: {
1286
- ...delegatedResult,
1287
- state: "failed",
1288
- output,
1289
- finalMessageText: output,
1290
- },
1291
- };
1292
- }
1293
- }
1294
1246
  if (selectedBinding.harnessRuntime.executionContract?.requiresPlan === true
1295
1247
  && !hasDelegatedPlanEvidence(delegatedResult)) {
1296
1248
  const output = buildDelegatedPlanEvidenceBlocker(selectedBinding.agent.id);
@@ -1305,19 +1257,6 @@ export class AgentRuntimeAdapter {
1305
1257
  },
1306
1258
  };
1307
1259
  }
1308
- if (targetRequiresExecutionToolEvidence && !hasRequiredDelegatedExecutionToolEvidence(delegatedResult)) {
1309
- const output = buildDelegatedExecutionEvidenceBlocker(selectedBinding.agent.id, getBindingPrimaryTools(selectedBinding).map((tool) => tool.name));
1310
- return {
1311
- toolOutput: output,
1312
- delegatedSubagentType: subagentType,
1313
- delegatedResult: {
1314
- ...delegatedResult,
1315
- state: "failed",
1316
- output,
1317
- finalMessageText: output,
1318
- },
1319
- };
1320
- }
1321
1260
  return {
1322
1261
  toolOutput: resolveDelegatedResultOutput(delegatedResult),
1323
1262
  delegatedSubagentType: subagentType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.458",
3
+ "version": "0.0.460",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",