@botbotgo/agent-harness 0.0.113 → 0.0.115

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.
@@ -146,6 +146,7 @@ export type LangChainAgentParams = {
146
146
  model: CompiledModel;
147
147
  tools: CompiledTool[];
148
148
  systemPrompt?: string;
149
+ interruptOn?: Record<string, boolean | object>;
149
150
  stateSchema?: unknown;
150
151
  responseFormat?: unknown;
151
152
  contextSchema?: unknown;
@@ -182,7 +183,7 @@ export type CompiledAgentBinding = {
182
183
  agent: ParsedAgentObject;
183
184
  adapter?: {
184
185
  kind: string;
185
- config: Record<string, unknown>;
186
+ config?: Record<string, unknown>;
186
187
  };
187
188
  langchainAgentParams?: LangChainAgentParams;
188
189
  deepAgentParams?: DeepAgentParams;
@@ -1 +1 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.112";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.114";
@@ -1 +1 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.112";
1
+ export const AGENT_HARNESS_VERSION = "0.0.114";
@@ -1,7 +1,6 @@
1
1
  import type { CompiledAgentBinding, CompiledModel, CompiledTool, DeepAgentParams, LangChainAgentParams } from "../../contracts/types.js";
2
2
  export type BindingExecutionView = {
3
3
  adapterKind: string;
4
- adapterConfig: Record<string, unknown>;
5
4
  langchainParams?: LangChainAgentParams;
6
5
  deepAgentParams?: DeepAgentParams;
7
6
  executionParams?: LangChainAgentParams | DeepAgentParams;
@@ -18,7 +17,6 @@ export type BindingExecutionView = {
18
17
  };
19
18
  export declare function getBindingExecutionView(binding: CompiledAgentBinding): BindingExecutionView;
20
19
  export declare function getBindingAdapterKind(binding: CompiledAgentBinding): string;
21
- export declare function getBindingAdapterConfig(binding: CompiledAgentBinding): Record<string, unknown>;
22
20
  export declare function getBindingLangChainParams(binding: CompiledAgentBinding): LangChainAgentParams | undefined;
23
21
  export declare function getBindingDeepAgentParams(binding: CompiledAgentBinding): DeepAgentParams | undefined;
24
22
  export declare function isLangChainBinding(binding: CompiledAgentBinding): boolean;
@@ -1,19 +1,23 @@
1
1
  import { asRecord } from "../../utils/object.js";
2
2
  const bindingExecutionViewCache = new WeakMap();
3
+ function getLegacyAdapterParams(binding) {
4
+ return asRecord(binding.adapter?.config?.params);
5
+ }
3
6
  function deriveBindingExecutionView(binding) {
4
7
  const cached = bindingExecutionViewCache.get(binding);
5
8
  if (cached) {
6
9
  return cached;
7
10
  }
8
11
  const adapterKind = binding.adapter?.kind ?? binding.agent.executionMode;
9
- const adapterConfig = binding.adapter?.config ?? {};
10
- const adapterParams = asRecord(adapterConfig.params);
11
- const langchainParams = adapterKind === "langchain-v1" && adapterParams
12
- ? adapterParams
13
- : binding.langchainAgentParams;
14
- const deepAgentParams = adapterKind === "deepagent" && adapterParams
15
- ? adapterParams
16
- : binding.deepAgentParams;
12
+ const legacyAdapterParams = getLegacyAdapterParams(binding);
13
+ const langchainParams = binding.langchainAgentParams ??
14
+ (adapterKind === "langchain-v1" && legacyAdapterParams
15
+ ? legacyAdapterParams
16
+ : undefined);
17
+ const deepAgentParams = binding.deepAgentParams ??
18
+ (adapterKind === "deepagent" && legacyAdapterParams
19
+ ? legacyAdapterParams
20
+ : undefined);
17
21
  const primaryTools = langchainParams?.tools ?? deepAgentParams?.tools ?? [];
18
22
  const middlewareConfigs = langchainParams?.middleware ?? deepAgentParams?.middleware;
19
23
  const middlewareKinds = new Set((middlewareConfigs ?? [])
@@ -21,7 +25,6 @@ function deriveBindingExecutionView(binding) {
21
25
  .filter(Boolean));
22
26
  const view = {
23
27
  adapterKind,
24
- adapterConfig,
25
28
  langchainParams,
26
29
  deepAgentParams,
27
30
  executionParams: langchainParams ?? deepAgentParams,
@@ -31,8 +34,8 @@ function deriveBindingExecutionView(binding) {
31
34
  systemPrompt: langchainParams?.systemPrompt ?? deepAgentParams?.systemPrompt,
32
35
  middlewareConfigs,
33
36
  middlewareKinds,
34
- interruptCompatibilityRules: deepAgentParams?.interruptOn ??
35
- binding.agent.langchainAgentConfig?.interruptOn,
37
+ interruptCompatibilityRules: langchainParams?.interruptOn ??
38
+ deepAgentParams?.interruptOn,
36
39
  storeConfig: deepAgentParams?.store ?? binding.harnessRuntime?.store,
37
40
  langChainSubagentSupport: (langchainParams?.subagents?.length ?? 0) > 0 ||
38
41
  langchainParams?.generalPurposeAgent === true ||
@@ -48,9 +51,6 @@ export function getBindingExecutionView(binding) {
48
51
  export function getBindingAdapterKind(binding) {
49
52
  return getBindingExecutionView(binding).adapterKind;
50
53
  }
51
- export function getBindingAdapterConfig(binding) {
52
- return getBindingExecutionView(binding).adapterConfig;
53
- }
54
54
  export function getBindingLangChainParams(binding) {
55
55
  return getBindingExecutionView(binding).langchainParams;
56
56
  }
@@ -263,16 +263,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
263
263
  : path.join(workspaceRoot, "run-data");
264
264
  const base = {
265
265
  agent,
266
- adapter: {
267
- kind: agent.executionMode,
268
- config: agent.executionMode === "deepagent"
269
- ? {
270
- deepAgent: true,
271
- }
272
- : {
273
- langchainV1: true,
274
- },
275
- },
276
266
  harnessRuntime: {
277
267
  runRoot,
278
268
  workspaceRoot,
@@ -289,6 +279,7 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
289
279
  model: execution.model,
290
280
  tools: execution.tools,
291
281
  systemPrompt: execution.systemPrompt,
282
+ interruptOn: resolveInterruptOn(agent),
292
283
  stateSchema: getAgentExecutionConfigValue(agent, "stateSchema", { executionMode: "langchain-v1" }),
293
284
  responseFormat: execution.responseFormat,
294
285
  contextSchema: execution.contextSchema,
@@ -309,12 +300,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
309
300
  };
310
301
  return {
311
302
  ...base,
312
- adapter: {
313
- kind: "langchain-v1",
314
- config: {
315
- params: langchainAgentParams,
316
- },
317
- },
318
303
  langchainAgentParams,
319
304
  };
320
305
  }
@@ -336,12 +321,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
336
321
  };
337
322
  return {
338
323
  ...base,
339
- adapter: {
340
- kind: "deepagent",
341
- config: {
342
- params: deepAgentParams,
343
- },
344
- },
345
324
  deepAgentParams,
346
325
  };
347
326
  }
@@ -8,8 +8,8 @@ function deriveAgentExecutionViews(agent) {
8
8
  const langchainConfig = asRecord(agent.langchainAgentConfig);
9
9
  const deepAgentConfig = asRecord(agent.deepAgentConfig);
10
10
  const views = {
11
- "langchain-v1": [langchainConfig, deepAgentConfig].filter((config) => config !== undefined),
12
- deepagent: [deepAgentConfig, langchainConfig].filter((config) => config !== undefined),
11
+ "langchain-v1": [langchainConfig ?? {}],
12
+ deepagent: [deepAgentConfig ?? {}],
13
13
  };
14
14
  agentExecutionViewsCache.set(agent, views);
15
15
  return views;
@@ -1,4 +1,4 @@
1
- import { hasAgentSystemPrompt, isDelegationCapableAgent, isMemoryCapableAgent, } from "./support/agent-capabilities.js";
1
+ import { isDelegationCapableAgent, isMemoryCapableAgent, } from "./support/agent-capabilities.js";
2
2
  import { getAgentExecutionConfigValue, getAgentExecutionConfigs } from "./support/agent-execution-config.js";
3
3
  const allowedExecutionModes = new Set(["deepagent", "langchain-v1"]);
4
4
  function validateCheckpointerConfig(agent) {
@@ -88,8 +88,5 @@ export function validateTopology(agents) {
88
88
  if (!isDelegationCapableAgent(agent)) {
89
89
  throw new Error(`Subagent ${agent.id} must use a delegation-capable backend`);
90
90
  }
91
- if (!hasAgentSystemPrompt(agent)) {
92
- throw new Error(`Subagent ${agent.id} requires systemPrompt`);
93
- }
94
91
  }
95
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",