@botbotgo/agent-harness 0.0.448 → 0.0.450

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.450";
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.450";
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({}));
@@ -2,7 +2,7 @@ import path from "node:path";
2
2
  import { validateSkillMetadata } from "../runtime/skills/skill-metadata.js";
3
3
  import { getAgentExecutionConfigValue } from "./support/agent-execution-config.js";
4
4
  import { getRuntimeAgentDefaults, getWorkspaceObject, resolvePromptValue } from "./support/workspace-ref-utils.js";
5
- const FORBIDDEN_GENERAL_PURPOSE_SUBAGENT_NAME = "general-purpose";
5
+ const UPSTREAM_GENERAL_PURPOSE_SUBAGENT_NAME = "general-purpose";
6
6
  const FRAMEWORK_AGENT_TOOL_NAMES = new Set(["task"]);
7
7
  const FRAMEWORK_EXECUTION_TOOL_NAMES = new Set(["write_todos", "read_todos"]);
8
8
  const TERMINAL_STATUS_VALUES = new Set(["completed", "blocked", "failed", "refused"]);
@@ -188,17 +188,17 @@ function validateAgentContract(agent, referencedSubagentIds, tools, refs, issues
188
188
  ...agent.subagentRefs.map(resolveRefId),
189
189
  ...(agent.asyncSubagents ?? []).map((subagent) => subagent.name),
190
190
  ];
191
- if (agent.id === FORBIDDEN_GENERAL_PURPOSE_SUBAGENT_NAME) {
192
- addIssue(issues, "agent.general_purpose.forbidden", `Agent ${agent.id} uses the reserved general-purpose subagent name. Define explicit specialists with narrow responsibilities instead.`);
191
+ const isDeepAgentsGeneralPurposeSubagentOverride = agent.executionMode === "deepagent"
192
+ && isSubagent
193
+ && agent.id === UPSTREAM_GENERAL_PURPOSE_SUBAGENT_NAME;
194
+ if (agent.id === UPSTREAM_GENERAL_PURPOSE_SUBAGENT_NAME && !isDeepAgentsGeneralPurposeSubagentOverride) {
195
+ addIssue(issues, "agent.general_purpose.forbidden", `Agent ${agent.id} uses the upstream DeepAgents general-purpose subagent name outside a DeepAgents subagent override. Define a product agent with a narrow runtime boundary instead.`);
193
196
  }
194
197
  for (const asyncSubagent of agent.asyncSubagents ?? []) {
195
- if (asyncSubagent.name === FORBIDDEN_GENERAL_PURPOSE_SUBAGENT_NAME) {
196
- addIssue(issues, "agent.general_purpose.forbidden", `Agent ${agent.id} defines async subagent ${asyncSubagent.name}. Define explicit specialists with narrow responsibilities instead.`);
198
+ if (asyncSubagent.name === UPSTREAM_GENERAL_PURPOSE_SUBAGENT_NAME) {
199
+ addIssue(issues, "agent.general_purpose.forbidden", `Agent ${agent.id} defines async subagent ${asyncSubagent.name}. DeepAgents reserves that name for its inline general-purpose subagent surface.`);
197
200
  }
198
201
  }
199
- if (localSubagentNames.includes(FORBIDDEN_GENERAL_PURPOSE_SUBAGENT_NAME)) {
200
- addIssue(issues, "agent.general_purpose.forbidden", `Agent ${agent.id} references reserved subagent name ${FORBIDDEN_GENERAL_PURPOSE_SUBAGENT_NAME}. Define explicit specialists with narrow responsibilities instead.`);
201
- }
202
202
  if (hasDuplicateValues(localSubagentNames)) {
203
203
  addIssue(issues, "agent.subagent.duplicate_name", `Agent ${agent.id} exposes duplicate subagent names. Each delegated capability must have one stable owner.`);
204
204
  }
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.450",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",