@botbotgo/agent-harness 0.0.118 → 0.0.119

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.
@@ -193,8 +193,21 @@ export type CompiledAgentBinding = {
193
193
  kind: string;
194
194
  config?: Record<string, unknown>;
195
195
  };
196
+ /**
197
+ * Canonical execution binding compiled from workspace YAML.
198
+ * Runtime code should prefer this field and treat backend-specific aliases
199
+ * below as compatibility shims.
200
+ */
196
201
  execution?: CompiledExecutionBinding;
202
+ /**
203
+ * Compatibility alias for older tests and callers.
204
+ * Prefer `execution.kind === "langchain-v1"` and `execution.params`.
205
+ */
197
206
  langchainAgentParams?: LangChainAgentParams;
207
+ /**
208
+ * Compatibility alias for older tests and callers.
209
+ * Prefer `execution.kind === "deepagent"` and `execution.params`.
210
+ */
198
211
  deepAgentParams?: DeepAgentParams;
199
212
  harnessRuntime: {
200
213
  runRoot: string;
@@ -1 +1 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.117";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.118";
@@ -1 +1 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.117";
1
+ export const AGENT_HARNESS_VERSION = "0.0.118";
@@ -1,12 +1,14 @@
1
1
  import { type MessageContent, type ThreadSummary, type WorkspaceBundle } from "../../../contracts/types.js";
2
2
  import type { RoutingRule } from "../../../workspace/support/workspace-ref-utils.js";
3
3
  export declare function getDefaultHostAgentId(workspace: WorkspaceBundle, preferredHostAgentId?: string): string;
4
+ export declare function getDefaultRuntimeEntryAgentId(workspace: WorkspaceBundle, preferredRuntimeEntryAgentId?: string): string;
4
5
  export declare function resolveSelectedAgentId(options: {
5
6
  workspace: WorkspaceBundle;
6
7
  input: MessageContent;
7
8
  requestedAgentId?: string;
8
9
  threadId?: string;
9
10
  preferredHostAgentId?: string;
11
+ preferredRuntimeEntryAgentId?: string;
10
12
  getThreadSummary: (threadId: string) => Promise<ThreadSummary | null>;
11
13
  }): Promise<string>;
12
14
  export declare function routeAgentId(options: {
@@ -10,8 +10,12 @@ export function getDefaultHostAgentId(workspace, preferredHostAgentId) {
10
10
  }
11
11
  return inferRoutingBindings(workspace).primaryBinding?.agent.id ?? "agent";
12
12
  }
13
+ export function getDefaultRuntimeEntryAgentId(workspace, preferredRuntimeEntryAgentId) {
14
+ return getDefaultHostAgentId(workspace, preferredRuntimeEntryAgentId);
15
+ }
13
16
  export async function resolveSelectedAgentId(options) {
14
- const { workspace, input, requestedAgentId, threadId, preferredHostAgentId, getThreadSummary } = options;
17
+ const { workspace, input, requestedAgentId, threadId, preferredHostAgentId, preferredRuntimeEntryAgentId, getThreadSummary, } = options;
18
+ const preferredEntryAgentId = preferredRuntimeEntryAgentId ?? preferredHostAgentId;
15
19
  if (!requestedAgentId || requestedAgentId === AUTO_AGENT_ID) {
16
20
  if (threadId) {
17
21
  const thread = await getThreadSummary(threadId);
@@ -20,7 +24,7 @@ export async function resolveSelectedAgentId(options) {
20
24
  return thread.agentId;
21
25
  }
22
26
  }
23
- return getDefaultHostAgentId(workspace, preferredHostAgentId);
27
+ return getDefaultRuntimeEntryAgentId(workspace, preferredEntryAgentId);
24
28
  }
25
29
  return requestedAgentId;
26
30
  }
@@ -40,5 +44,5 @@ export function routeAgentId(options) {
40
44
  if (defaultBinding) {
41
45
  return defaultBinding.agent.id;
42
46
  }
43
- return getDefaultHostAgentId(workspace, routingDefaultAgentId);
47
+ return getDefaultRuntimeEntryAgentId(workspace, routingDefaultAgentId);
44
48
  }
@@ -3,7 +3,7 @@ import { createPersistentId } from "../../../utils/id.js";
3
3
  import { normalizeMessageContent } from "../../../utils/message-content.js";
4
4
  import { buildPersistedRunRequest, normalizeRunPriority } from "./helpers.js";
5
5
  import { getRequiredWorkspaceBinding } from "../bindings.js";
6
- import { getBindingAdapterKind } from "../../support/compiled-binding.js";
6
+ import { getBindingAdapterKind, getBindingRuntimeExecutionMode } from "../../support/compiled-binding.js";
7
7
  export async function ensureThreadStarted(runtime, input) {
8
8
  const { selectedAgentId, binding, message, runRequest, existingThreadId } = input;
9
9
  const threadId = existingThreadId ?? createPersistentId();
@@ -23,7 +23,7 @@ export async function ensureThreadStarted(runtime, input) {
23
23
  runId,
24
24
  status: "running",
25
25
  createdAt,
26
- executionMode: getBindingAdapterKind(binding),
26
+ executionMode: getBindingRuntimeExecutionMode(binding),
27
27
  adapterKind: getBindingAdapterKind(binding),
28
28
  userMessage,
29
29
  runRequest,
@@ -46,7 +46,7 @@ export async function ensureThreadStarted(runtime, input) {
46
46
  threadId,
47
47
  runId,
48
48
  agentId: binding.agent.id,
49
- executionMode: getBindingAdapterKind(binding),
49
+ executionMode: getBindingRuntimeExecutionMode(binding),
50
50
  adapterKind: getBindingAdapterKind(binding),
51
51
  createdAt,
52
52
  }),
@@ -14,8 +14,8 @@ export declare class AgentHarnessRuntime {
14
14
  private readonly stores;
15
15
  private readonly embeddingModels;
16
16
  private readonly vectorStores;
17
- private readonly hostBindings;
18
- private readonly defaultHostBinding?;
17
+ private readonly runtimeEntryBindings;
18
+ private readonly defaultRuntimeEntryBinding?;
19
19
  private readonly defaultRunRootValue;
20
20
  private readonly defaultStore;
21
21
  private readonly runtimeMemoryStore;
@@ -38,7 +38,7 @@ export declare class AgentHarnessRuntime {
38
38
  private readonly backgroundEventRuntime;
39
39
  private readonly runtimeEventOperations;
40
40
  private defaultRunRoot;
41
- private getDefaultHostAgentId;
41
+ private getDefaultRuntimeEntryAgentId;
42
42
  private resolveSelectedAgentId;
43
43
  private createPrepareRunStartRuntime;
44
44
  constructor(workspace: WorkspaceBundle, runtimeAdapterOptions?: RuntimeAdapterOptions);
@@ -18,10 +18,10 @@ import { buildResumePayload as buildHarnessResumePayload, resolveApprovalRecord
18
18
  import { cancelRunOperation, executeQueuedRunOperation, resumeRun } from "./harness/run/run-operations.js";
19
19
  import { acquireRunSlot as acquireHarnessRunSlot } from "./harness/run/run-slot-acquisition.js";
20
20
  import { dropPendingRunSlot, enqueuePendingRunSlot } from "./harness/run/run-queue.js";
21
- import { getDefaultHostAgentId, resolveSelectedAgentId, routeAgentId } from "./harness/run/routing.js";
21
+ import { getDefaultRuntimeEntryAgentId, resolveSelectedAgentId, routeAgentId } from "./harness/run/routing.js";
22
22
  import { resolveStoreFromConfig, } from "./harness/run/resources.js";
23
23
  import { createToolMcpServerFromTools, serveToolsOverStdioFromHarness } from "../mcp.js";
24
- import { getBindingAdapterKind } from "./support/compiled-binding.js";
24
+ import { getBindingRuntimeExecutionMode, } from "./support/compiled-binding.js";
25
25
  import { bindingSupportsRunningReplay, getWorkspaceBinding, resolveWorkspaceAgentTools, } from "./harness/bindings.js";
26
26
  import { describeWorkspaceInventory, listAgentSkills as listWorkspaceAgentSkills, } from "./harness/system/inventory.js";
27
27
  import { createDefaultHealthSnapshot, isInventoryEnabled, isThreadMemorySyncEnabled, } from "./harness/runtime-defaults.js";
@@ -48,8 +48,8 @@ export class AgentHarnessRuntime {
48
48
  stores = new Map();
49
49
  embeddingModels = new Map();
50
50
  vectorStores = new Map();
51
- hostBindings;
52
- defaultHostBinding;
51
+ runtimeEntryBindings;
52
+ defaultRuntimeEntryBinding;
53
53
  defaultRunRootValue;
54
54
  defaultStore;
55
55
  runtimeMemoryStore;
@@ -74,8 +74,8 @@ export class AgentHarnessRuntime {
74
74
  defaultRunRoot() {
75
75
  return this.defaultRunRootValue;
76
76
  }
77
- getDefaultHostAgentId() {
78
- return getDefaultHostAgentId(this.workspace, this.routingDefaultAgentId);
77
+ getDefaultRuntimeEntryAgentId() {
78
+ return getDefaultRuntimeEntryAgentId(this.workspace, this.routingDefaultAgentId);
79
79
  }
80
80
  async resolveSelectedAgentId(input, requestedAgentId, threadId) {
81
81
  return resolveSelectedAgentId({
@@ -83,7 +83,7 @@ export class AgentHarnessRuntime {
83
83
  input,
84
84
  requestedAgentId,
85
85
  threadId,
86
- preferredHostAgentId: this.routingDefaultAgentId,
86
+ preferredRuntimeEntryAgentId: this.routingDefaultAgentId,
87
87
  getThreadSummary: (currentThreadId) => this.getSession(currentThreadId),
88
88
  });
89
89
  }
@@ -100,16 +100,16 @@ export class AgentHarnessRuntime {
100
100
  constructor(workspace, runtimeAdapterOptions = {}) {
101
101
  this.workspace = workspace;
102
102
  this.runtimeAdapterOptions = runtimeAdapterOptions;
103
- this.hostBindings = inferRoutingBindings(this.workspace).hostBindings;
104
- this.defaultHostBinding = this.hostBindings[0];
105
- this.defaultRunRootValue = this.defaultHostBinding?.harnessRuntime.runRoot ?? `${this.workspace.workspaceRoot}/run-data`;
103
+ this.runtimeEntryBindings = inferRoutingBindings(this.workspace).runtimeEntryBindings;
104
+ this.defaultRuntimeEntryBinding = this.runtimeEntryBindings[0];
105
+ this.defaultRunRootValue = this.defaultRuntimeEntryBinding?.harnessRuntime.runRoot ?? `${this.workspace.workspaceRoot}/run-data`;
106
106
  const runRoot = this.defaultRunRoot();
107
107
  this.persistence = new SqlitePersistence(runRoot);
108
- const defaultStoreConfig = this.defaultHostBinding?.harnessRuntime.store;
108
+ const defaultStoreConfig = this.defaultRuntimeEntryBinding?.harnessRuntime.store;
109
109
  this.defaultStore = resolveStoreFromConfig(this.stores, defaultStoreConfig, runRoot) ?? new FileBackedStore(`${runRoot}/store.json`);
110
- const runtimeMemoryStoreConfig = typeof this.defaultHostBinding?.harnessRuntime.runtimeMemory?.store === "object" &&
111
- this.defaultHostBinding?.harnessRuntime.runtimeMemory?.store
112
- ? this.defaultHostBinding.harnessRuntime.runtimeMemory.store
110
+ const runtimeMemoryStoreConfig = typeof this.defaultRuntimeEntryBinding?.harnessRuntime.runtimeMemory?.store === "object" &&
111
+ this.defaultRuntimeEntryBinding?.harnessRuntime.runtimeMemory?.store
112
+ ? this.defaultRuntimeEntryBinding.harnessRuntime.runtimeMemory.store
113
113
  : undefined;
114
114
  this.runtimeMemoryStore = resolveStoreFromConfig(this.stores, runtimeMemoryStoreConfig, runRoot) ?? this.defaultStore;
115
115
  this.resolvedRuntimeAdapterOptions = resolveRuntimeAdapterOptions({
@@ -438,7 +438,7 @@ export class AgentHarnessRuntime {
438
438
  agentId: activeBinding.agent.id,
439
439
  requestedAgentId: defaultRequestedAgentId(options.agentId),
440
440
  selectedAgentId: activeSelectedAgentId,
441
- executionMode: getBindingAdapterKind(activeBinding),
441
+ executionMode: getBindingRuntimeExecutionMode(activeBinding),
442
442
  }),
443
443
  });
444
444
  await runCreatedEventPromise;
@@ -1,4 +1,4 @@
1
- import type { CompiledAgentBinding, CompiledModel, CompiledSubAgent, CompiledTool, DeepAgentParams, LangChainAgentParams } from "../../contracts/types.js";
1
+ import type { CompiledAgentBinding, CompiledExecutionBinding, CompiledModel, CompiledSubAgent, CompiledTool, DeepAgentParams, LangChainAgentParams } from "../../contracts/types.js";
2
2
  export type BindingExecutionView = {
3
3
  adapterKind: string;
4
4
  langchainParams?: LangChainAgentParams;
@@ -17,6 +17,8 @@ export type BindingExecutionView = {
17
17
  };
18
18
  export declare function getBindingExecutionView(binding: CompiledAgentBinding): BindingExecutionView;
19
19
  export declare function getBindingAdapterKind(binding: CompiledAgentBinding): string;
20
+ export declare function getBindingCanonicalExecution(binding: CompiledAgentBinding): CompiledExecutionBinding | undefined;
21
+ export declare function getBindingRuntimeExecutionMode(binding: CompiledAgentBinding): string;
20
22
  export declare function getBindingLangChainParams(binding: CompiledAgentBinding): LangChainAgentParams | undefined;
21
23
  export declare function getBindingDeepAgentParams(binding: CompiledAgentBinding): DeepAgentParams | undefined;
22
24
  export declare function getBindingExecutionParams(binding: CompiledAgentBinding): LangChainAgentParams | DeepAgentParams | undefined;
@@ -3,24 +3,80 @@ const bindingExecutionViewCache = new WeakMap();
3
3
  function getLegacyAdapterParams(binding) {
4
4
  return asRecord(binding.adapter?.config?.params);
5
5
  }
6
+ function inferBindingAdapterKind(binding) {
7
+ if (binding.adapter?.kind) {
8
+ return binding.adapter.kind;
9
+ }
10
+ if (binding.execution?.kind === "langchain-v1" || binding.execution?.kind === "deepagent") {
11
+ return binding.execution.kind;
12
+ }
13
+ if (binding.langchainAgentParams) {
14
+ return "langchain-v1";
15
+ }
16
+ if (binding.deepAgentParams) {
17
+ return "deepagent";
18
+ }
19
+ return binding.agent.executionMode;
20
+ }
21
+ function normalizeBindingExecution(binding) {
22
+ const adapterKind = inferBindingAdapterKind(binding);
23
+ if (binding.execution?.kind === "langchain-v1") {
24
+ binding.langchainAgentParams ??= binding.execution.params;
25
+ return { adapterKind, execution: binding.execution };
26
+ }
27
+ if (binding.execution?.kind === "deepagent") {
28
+ binding.deepAgentParams ??= binding.execution.params;
29
+ return { adapterKind, execution: binding.execution };
30
+ }
31
+ if (adapterKind !== "langchain-v1" && adapterKind !== "deepagent") {
32
+ return { adapterKind };
33
+ }
34
+ if (binding.langchainAgentParams) {
35
+ const execution = {
36
+ kind: "langchain-v1",
37
+ params: binding.langchainAgentParams,
38
+ };
39
+ binding.execution = execution;
40
+ return { adapterKind, execution };
41
+ }
42
+ if (binding.deepAgentParams) {
43
+ const execution = {
44
+ kind: "deepagent",
45
+ params: binding.deepAgentParams,
46
+ };
47
+ binding.execution = execution;
48
+ return { adapterKind, execution };
49
+ }
50
+ const legacyAdapterParams = getLegacyAdapterParams(binding);
51
+ if (adapterKind === "langchain-v1" && legacyAdapterParams) {
52
+ const params = legacyAdapterParams;
53
+ binding.langchainAgentParams = params;
54
+ binding.execution = {
55
+ kind: "langchain-v1",
56
+ params,
57
+ };
58
+ return { adapterKind, execution: binding.execution };
59
+ }
60
+ if (adapterKind === "deepagent" && legacyAdapterParams) {
61
+ const params = legacyAdapterParams;
62
+ binding.deepAgentParams = params;
63
+ binding.execution = {
64
+ kind: "deepagent",
65
+ params,
66
+ };
67
+ return { adapterKind, execution: binding.execution };
68
+ }
69
+ return { adapterKind };
70
+ }
6
71
  function deriveBindingExecutionView(binding) {
7
72
  const cached = bindingExecutionViewCache.get(binding);
8
73
  if (cached) {
9
74
  return cached;
10
75
  }
11
- const adapterKind = binding.adapter?.kind ?? binding.agent.executionMode;
12
- const legacyAdapterParams = getLegacyAdapterParams(binding);
13
- const compiledExecution = binding.execution;
14
- const langchainParams = (compiledExecution?.kind === "langchain-v1" ? compiledExecution.params : undefined) ??
15
- binding.langchainAgentParams ??
16
- (adapterKind === "langchain-v1" && legacyAdapterParams
17
- ? legacyAdapterParams
18
- : undefined);
19
- const deepAgentParams = (compiledExecution?.kind === "deepagent" ? compiledExecution.params : undefined) ??
20
- binding.deepAgentParams ??
21
- (adapterKind === "deepagent" && legacyAdapterParams
22
- ? legacyAdapterParams
23
- : undefined);
76
+ const normalized = normalizeBindingExecution(binding);
77
+ const adapterKind = normalized.adapterKind;
78
+ const langchainParams = normalized.execution?.kind === "langchain-v1" ? normalized.execution.params : undefined;
79
+ const deepAgentParams = normalized.execution?.kind === "deepagent" ? normalized.execution.params : undefined;
24
80
  const primaryTools = langchainParams?.tools ?? deepAgentParams?.tools ?? [];
25
81
  const middlewareConfigs = langchainParams?.middleware ?? deepAgentParams?.middleware;
26
82
  const middlewareKinds = new Set((middlewareConfigs ?? [])
@@ -54,6 +110,12 @@ export function getBindingExecutionView(binding) {
54
110
  export function getBindingAdapterKind(binding) {
55
111
  return getBindingExecutionView(binding).adapterKind;
56
112
  }
113
+ export function getBindingCanonicalExecution(binding) {
114
+ return normalizeBindingExecution(binding).execution;
115
+ }
116
+ export function getBindingRuntimeExecutionMode(binding) {
117
+ return getBindingExecutionKind(binding) ?? getBindingAdapterKind(binding);
118
+ }
57
119
  export function getBindingLangChainParams(binding) {
58
120
  return getBindingExecutionView(binding).langchainParams;
59
121
  }
@@ -64,17 +126,8 @@ export function getBindingExecutionParams(binding) {
64
126
  return getBindingExecutionView(binding).executionParams;
65
127
  }
66
128
  export function getBindingExecutionKind(binding) {
67
- const execution = binding.execution;
68
- if (execution?.kind === "langchain-v1" || execution?.kind === "deepagent") {
69
- return execution.kind;
70
- }
71
- if (getBindingAdapterKind(binding) === "langchain-v1" || binding.langchainAgentParams) {
72
- return "langchain-v1";
73
- }
74
- if (getBindingAdapterKind(binding) === "deepagent" || binding.deepAgentParams) {
75
- return "deepagent";
76
- }
77
- return undefined;
129
+ const execution = getBindingCanonicalExecution(binding);
130
+ return execution?.kind;
78
131
  }
79
132
  export function withUpdatedBindingExecutionParams(binding, updater) {
80
133
  const kind = getBindingExecutionKind(binding);
@@ -139,10 +192,10 @@ export function getBindingFilesystemConfig(binding) {
139
192
  return typeof filesystem === "object" && filesystem ? filesystem : undefined;
140
193
  }
141
194
  export function isLangChainBinding(binding) {
142
- return getBindingAdapterKind(binding) === "langchain-v1" || binding.execution?.kind === "langchain-v1" || Boolean(binding.langchainAgentParams);
195
+ return getBindingExecutionKind(binding) === "langchain-v1";
143
196
  }
144
197
  export function isDeepAgentBinding(binding) {
145
- return getBindingAdapterKind(binding) === "deepagent" || binding.execution?.kind === "deepagent" || Boolean(binding.deepAgentParams);
198
+ return getBindingExecutionKind(binding) === "deepagent";
146
199
  }
147
200
  export function getBindingPrimaryTools(binding) {
148
201
  return getBindingExecutionView(binding).primaryTools;
@@ -11,5 +11,5 @@ export declare function createHarnessEvent(threadId: string, runId: string, sequ
11
11
  export declare function createPendingApproval(threadId: string, runId: string, checkpointRef: string, input: string, interruptContent?: string): InternalApprovalRecord;
12
12
  export declare function inferRoutingBindings(workspace: WorkspaceBundle): {
13
13
  primaryBinding: import("../../contracts/workspace.js").CompiledAgentBinding;
14
- hostBindings: import("../../contracts/workspace.js").CompiledAgentBinding[];
14
+ runtimeEntryBindings: import("../../contracts/workspace.js").CompiledAgentBinding[];
15
15
  };
@@ -87,9 +87,9 @@ export function createPendingApproval(threadId, runId, checkpointRef, input, int
87
87
  };
88
88
  }
89
89
  export function inferRoutingBindings(workspace) {
90
- const hostBindings = Array.from(workspace.bindings.values());
91
- const orchestrationHosts = hostBindings.filter((binding) => isDeepAgentBinding(binding));
92
- const routingHosts = orchestrationHosts.length > 0 ? orchestrationHosts : hostBindings;
93
- const primaryBinding = routingHosts.find((binding) => isDelegationCapableBinding(binding)) ?? routingHosts[0] ?? hostBindings[0];
94
- return { primaryBinding, hostBindings };
90
+ const runtimeEntryBindings = Array.from(workspace.bindings.values());
91
+ const orchestrationRuntimeEntries = runtimeEntryBindings.filter((binding) => isDeepAgentBinding(binding));
92
+ const routingEntries = orchestrationRuntimeEntries.length > 0 ? orchestrationRuntimeEntries : runtimeEntryBindings;
93
+ const primaryBinding = routingEntries.find((binding) => isDelegationCapableBinding(binding)) ?? routingEntries[0] ?? runtimeEntryBindings[0];
94
+ return { primaryBinding, runtimeEntryBindings };
95
95
  }
@@ -247,11 +247,11 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
247
247
  const resilience = getResilienceConfig(refs);
248
248
  const compiledAgentSkills = compileAgentSkills(workspaceRoot, agent);
249
249
  const compiledAgentMemory = compileAgentMemories(workspaceRoot, agent.memorySources);
250
- const execution = compileExecutionCore({
250
+ const executionCore = compileExecutionCore({
251
251
  ...agent,
252
252
  modelRef: agent.modelRef || (internalSubagent ? "model/default" : ""),
253
253
  }, models, tools);
254
- const compiledAgentModel = execution.model;
254
+ const compiledAgentModel = executionCore.model;
255
255
  const backend = resolveBackendConfig(agent, refs);
256
256
  const store = resolveStoreConfig(agent, refs);
257
257
  const checkpointer = resolveCheckpointerConfig(agent, refs);
@@ -275,61 +275,61 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
275
275
  };
276
276
  if (agent.executionMode !== "deepagent") {
277
277
  const langchainVersion = getAgentExecutionConfigValue(agent, "version", { executionMode: "langchain-v1" });
278
- const langchainAgentParams = {
279
- model: execution.model,
280
- tools: execution.tools,
281
- systemPrompt: execution.systemPrompt,
282
- interruptOn: resolveInterruptOn(agent),
283
- stateSchema: getAgentExecutionConfigValue(agent, "stateSchema", { executionMode: "langchain-v1" }),
284
- responseFormat: execution.responseFormat,
285
- contextSchema: execution.contextSchema,
286
- filesystem: getAgentExecutionObject(agent, "filesystem", { executionMode: "langchain-v1" }),
287
- middleware: execution.middleware,
288
- passthrough: execution.passthrough,
289
- subagents: compileSubagents(agent, agents, workspaceRoot, models, tools, compiledAgentSkills, compiledAgentModel),
290
- memory: compiledAgentMemory,
291
- skills: compiledAgentSkills,
292
- generalPurposeAgent: getAgentExecutionConfigValue(agent, "generalPurposeAgent", { executionMode: "langchain-v1" }),
293
- taskDescription: getAgentExecutionString(agent, "taskDescription", { executionMode: "langchain-v1" }),
294
- includeAgentName: getAgentExecutionConfigValue(agent, "includeAgentName", { executionMode: "langchain-v1" }) === "inline" ? "inline" : undefined,
295
- version: langchainVersion === "v1" || langchainVersion === "v2"
296
- ? langchainVersion
297
- : undefined,
298
- name: resolveAgentRuntimeName(agent),
299
- description: agent.description,
278
+ const executionBinding = {
279
+ kind: "langchain-v1",
280
+ params: {
281
+ model: executionCore.model,
282
+ tools: executionCore.tools,
283
+ systemPrompt: executionCore.systemPrompt,
284
+ interruptOn: resolveInterruptOn(agent),
285
+ stateSchema: getAgentExecutionConfigValue(agent, "stateSchema", { executionMode: "langchain-v1" }),
286
+ responseFormat: executionCore.responseFormat,
287
+ contextSchema: executionCore.contextSchema,
288
+ filesystem: getAgentExecutionObject(agent, "filesystem", { executionMode: "langchain-v1" }),
289
+ middleware: executionCore.middleware,
290
+ passthrough: executionCore.passthrough,
291
+ subagents: compileSubagents(agent, agents, workspaceRoot, models, tools, compiledAgentSkills, compiledAgentModel),
292
+ memory: compiledAgentMemory,
293
+ skills: compiledAgentSkills,
294
+ generalPurposeAgent: getAgentExecutionConfigValue(agent, "generalPurposeAgent", { executionMode: "langchain-v1" }),
295
+ taskDescription: getAgentExecutionString(agent, "taskDescription", { executionMode: "langchain-v1" }),
296
+ includeAgentName: getAgentExecutionConfigValue(agent, "includeAgentName", { executionMode: "langchain-v1" }) === "inline" ? "inline" : undefined,
297
+ version: langchainVersion === "v1" || langchainVersion === "v2"
298
+ ? langchainVersion
299
+ : undefined,
300
+ name: resolveAgentRuntimeName(agent),
301
+ description: agent.description,
302
+ },
300
303
  };
301
304
  return {
302
305
  ...base,
303
- execution: {
304
- kind: "langchain-v1",
305
- params: langchainAgentParams,
306
- },
307
- langchainAgentParams,
306
+ execution: executionBinding,
307
+ langchainAgentParams: executionBinding.params,
308
308
  };
309
309
  }
310
- const deepAgentParams = {
311
- model: execution.model,
312
- tools: execution.tools,
313
- systemPrompt: execution.systemPrompt,
314
- responseFormat: execution.responseFormat,
315
- contextSchema: execution.contextSchema,
316
- middleware: execution.middleware,
317
- passthrough: execution.passthrough,
318
- description: agent.description,
319
- subagents: compileSubagents(agent, agents, workspaceRoot, models, tools, compiledAgentSkills, compiledAgentModel),
320
- interruptOn: resolveInterruptOn(agent),
321
- ...(backend ? { backend: backend.config } : {}),
322
- ...(store ? { store: store.config } : {}),
323
- name: resolveAgentRuntimeName(agent),
324
- memory: compiledAgentMemory,
325
- skills: compiledAgentSkills,
310
+ const executionBinding = {
311
+ kind: "deepagent",
312
+ params: {
313
+ model: executionCore.model,
314
+ tools: executionCore.tools,
315
+ systemPrompt: executionCore.systemPrompt,
316
+ responseFormat: executionCore.responseFormat,
317
+ contextSchema: executionCore.contextSchema,
318
+ middleware: executionCore.middleware,
319
+ passthrough: executionCore.passthrough,
320
+ description: agent.description,
321
+ subagents: compileSubagents(agent, agents, workspaceRoot, models, tools, compiledAgentSkills, compiledAgentModel),
322
+ interruptOn: resolveInterruptOn(agent),
323
+ ...(backend ? { backend: backend.config } : {}),
324
+ ...(store ? { store: store.config } : {}),
325
+ name: resolveAgentRuntimeName(agent),
326
+ memory: compiledAgentMemory,
327
+ skills: compiledAgentSkills,
328
+ },
326
329
  };
327
330
  return {
328
331
  ...base,
329
- execution: {
330
- kind: "deepagent",
331
- params: deepAgentParams,
332
- },
333
- deepAgentParams,
332
+ execution: executionBinding,
333
+ deepAgentParams: executionBinding.params,
334
334
  };
335
335
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.118",
3
+ "version": "0.0.119",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",