@botbotgo/agent-harness 0.0.448 → 0.0.449

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.448";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.449";
2
2
  export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
@@ -1,2 +1,2 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.448";
1
+ export const AGENT_HARNESS_VERSION = "0.0.449";
2
2
  export const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
@@ -47,6 +47,7 @@ export declare class AgentRuntimeAdapter {
47
47
  private createLangChainRunnable;
48
48
  private createRunnable;
49
49
  private createDeepAgentRunnable;
50
+ private createUpstreamDeepAgentRunnable;
50
51
  private createConfigurableDeepAgentRunnable;
51
52
  private buildRunnableCacheKey;
52
53
  create(binding: CompiledAgentBinding, options?: {
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { createHash } from "node:crypto";
3
- import { createAsyncSubAgentMiddleware, createFilesystemMiddleware, createMemoryMiddleware, createPatchToolCallsMiddleware, createSkillsMiddleware, createSummarizationMiddleware, createSubAgentMiddleware, FilesystemBackend, StateBackend, } from "deepagents";
3
+ import { createAsyncSubAgentMiddleware, createDeepAgent, createFilesystemMiddleware, createMemoryMiddleware, createPatchToolCallsMiddleware, createSkillsMiddleware, createSummarizationMiddleware, createSubAgentMiddleware, FilesystemBackend, StateBackend, } from "deepagents";
4
4
  import { createAgent, humanInTheLoopMiddleware, todoListMiddleware } from "langchain";
5
5
  import { sanitizeVisibleText, tryParseJson, wrapResolvedModel, } from "./parsing/output-parsing.js";
6
6
  import { salvageJsonToolCalls } from "./parsing/output-tool-args.js";
@@ -154,6 +154,10 @@ function readConfiguredToolName(value) {
154
154
  function shouldUseConfigurableDeepAgentAssembly(binding) {
155
155
  return getBindingExecutionKind(binding) === "deepagent";
156
156
  }
157
+ function canUseUpstreamCreateDeepAgentAssembly(binding) {
158
+ const builtinTools = getBindingBuiltinToolsConfig(binding);
159
+ return builtinTools?.todos !== false && builtinTools?.filesystem !== false;
160
+ }
157
161
  function readModelText(value) {
158
162
  if (typeof value === "string") {
159
163
  return value.trim();
@@ -890,7 +894,7 @@ export class AgentRuntimeAdapter {
890
894
  }) : undefined))
891
895
  : undefined;
892
896
  if (shouldUseConfigurableDeepAgentAssembly(binding)) {
893
- return this.createConfigurableDeepAgentRunnable(binding, {
897
+ const assemblyInput = {
894
898
  resolvedModel,
895
899
  resolvedTools: modelTools,
896
900
  resolvedMiddleware,
@@ -900,10 +904,43 @@ export class AgentRuntimeAdapter {
900
904
  resolvedStore,
901
905
  resolvedBackend,
902
906
  resolvedSkills,
903
- });
907
+ };
908
+ return canUseUpstreamCreateDeepAgentAssembly(binding)
909
+ ? this.createUpstreamDeepAgentRunnable(binding, assemblyInput)
910
+ : this.createConfigurableDeepAgentRunnable(binding, assemblyInput);
904
911
  }
905
912
  throw new Error(`Agent ${binding.agent.id} has no supported deepagent assembly path`);
906
913
  }
914
+ createUpstreamDeepAgentRunnable(binding, input) {
915
+ const executionParams = getBindingExecutionParams(binding);
916
+ const responseFormat = getBindingExecutionKind(binding) === "deepagent"
917
+ ? (executionParams && "responseFormat" in executionParams ? executionParams.responseFormat : undefined)
918
+ : undefined;
919
+ const contextSchema = getBindingExecutionKind(binding) === "deepagent"
920
+ ? (executionParams && "contextSchema" in executionParams ? executionParams.contextSchema : undefined)
921
+ : undefined;
922
+ return createDeepAgent({
923
+ model: input.resolvedModel,
924
+ systemPrompt: buildDeepAgentSystemPromptWithCapabilityHierarchy({
925
+ systemPrompt: getBindingSystemPrompt(binding),
926
+ subagents: input.resolvedSubagents,
927
+ skills: input.resolvedSkills,
928
+ tools: getBindingPrimaryTools(binding),
929
+ }),
930
+ tools: input.resolvedTools,
931
+ middleware: input.resolvedMiddleware,
932
+ subagents: input.resolvedSubagents,
933
+ ...(responseFormat !== undefined ? { responseFormat: responseFormat } : {}),
934
+ ...(contextSchema !== undefined ? { contextSchema: contextSchema } : {}),
935
+ ...(input.resolvedCheckpointer !== undefined ? { checkpointer: input.resolvedCheckpointer } : {}),
936
+ ...(input.resolvedStore !== undefined ? { store: input.resolvedStore } : {}),
937
+ ...(input.resolvedBackend !== undefined ? { backend: input.resolvedBackend } : {}),
938
+ ...(input.resolvedInterruptOn !== undefined ? { interruptOn: input.resolvedInterruptOn } : {}),
939
+ name: binding.agent.id,
940
+ memory: getBindingMemorySources(binding),
941
+ skills: input.resolvedSkills,
942
+ });
943
+ }
907
944
  createConfigurableDeepAgentRunnable(binding, input) {
908
945
  const builtinTools = getBindingBuiltinToolsConfig(binding) ?? {};
909
946
  const backend = (input.resolvedBackend ?? new StateBackend({}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.448",
3
+ "version": "0.0.449",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",