@botbotgo/agent-harness 0.0.98 → 0.0.100

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.
Files changed (64) hide show
  1. package/README.md +5 -4
  2. package/README.zh.md +4 -0
  3. package/dist/benchmark/upstream-runtime-ab-benchmark.d.ts +1 -1
  4. package/dist/benchmark/upstream-runtime-ab-benchmark.js +1 -2
  5. package/dist/contracts/core.d.ts +2 -2
  6. package/dist/contracts/runtime.d.ts +1 -5
  7. package/dist/package-version.d.ts +1 -1
  8. package/dist/package-version.js +1 -1
  9. package/dist/runtime/adapter/deepagent-runnable-config.d.ts +30 -0
  10. package/dist/runtime/adapter/deepagent-runnable-config.js +22 -0
  11. package/dist/runtime/adapter/index.d.ts +0 -2
  12. package/dist/runtime/adapter/index.js +0 -2
  13. package/dist/runtime/adapter/invocation-result.d.ts +13 -0
  14. package/dist/runtime/adapter/invocation-result.js +40 -0
  15. package/dist/runtime/adapter/langchain-runnable-config.d.ts +25 -0
  16. package/dist/runtime/adapter/langchain-runnable-config.js +19 -0
  17. package/dist/runtime/adapter/local-tool-invocation.d.ts +23 -0
  18. package/dist/runtime/adapter/local-tool-invocation.js +64 -0
  19. package/dist/runtime/adapter/runtime-adapter-support.d.ts +18 -0
  20. package/dist/runtime/adapter/runtime-adapter-support.js +54 -0
  21. package/dist/runtime/adapter/stream-event-projection.d.ts +19 -0
  22. package/dist/runtime/adapter/stream-event-projection.js +79 -0
  23. package/dist/runtime/adapter/stream-text-consumption.d.ts +4 -0
  24. package/dist/runtime/adapter/stream-text-consumption.js +18 -0
  25. package/dist/runtime/adapter/tool/builtin-middleware-tools.d.ts +64 -0
  26. package/dist/runtime/adapter/tool/builtin-middleware-tools.js +144 -0
  27. package/dist/runtime/adapter/tool/tool-replay.d.ts +18 -0
  28. package/dist/runtime/adapter/tool/tool-replay.js +26 -0
  29. package/dist/runtime/agent-runtime-adapter.d.ts +1 -42
  30. package/dist/runtime/agent-runtime-adapter.js +94 -1425
  31. package/dist/runtime/harness/run/helpers.js +2 -8
  32. package/dist/runtime/harness/run/routing.d.ts +1 -3
  33. package/dist/runtime/harness/run/routing.js +2 -25
  34. package/dist/runtime/harness/run/run-lifecycle.d.ts +0 -11
  35. package/dist/runtime/harness/run/run-lifecycle.js +7 -50
  36. package/dist/runtime/harness/runtime-defaults.d.ts +4 -0
  37. package/dist/runtime/harness/runtime-defaults.js +39 -0
  38. package/dist/runtime/harness/system/inventory.js +2 -1
  39. package/dist/runtime/harness/system/skill-requirements.d.ts +1 -0
  40. package/dist/runtime/harness.d.ts +3 -7
  41. package/dist/runtime/harness.js +56 -69
  42. package/dist/runtime/index.d.ts +1 -12
  43. package/dist/runtime/index.js +1 -12
  44. package/dist/runtime/support/compiled-binding.d.ts +0 -2
  45. package/dist/runtime/support/compiled-binding.js +3 -22
  46. package/dist/runtime/support/harness-support.d.ts +0 -11
  47. package/dist/runtime/support/harness-support.js +1 -44
  48. package/dist/runtime/support/index.d.ts +1 -1
  49. package/dist/runtime/support/index.js +1 -1
  50. package/dist/workspace/agent-binding-compiler.js +9 -93
  51. package/dist/workspace/index.d.ts +0 -5
  52. package/dist/workspace/index.js +0 -5
  53. package/dist/workspace/object-loader.js +4 -21
  54. package/dist/workspace/support/agent-capabilities.js +2 -2
  55. package/dist/workspace/support/workspace-ref-utils.d.ts +0 -2
  56. package/dist/workspace/support/workspace-ref-utils.js +0 -17
  57. package/dist/workspace/validate.js +1 -1
  58. package/package.json +1 -1
  59. package/dist/config/workflows/langgraph-workflows.yaml +0 -570
  60. package/dist/config/workflows/runtime-profiles.yaml +0 -94
  61. package/dist/runtime/adapter/langgraph/presets.d.ts +0 -25
  62. package/dist/runtime/adapter/langgraph/presets.js +0 -165
  63. package/dist/runtime/adapter/langgraph/profiles.d.ts +0 -6
  64. package/dist/runtime/adapter/langgraph/profiles.js +0 -206
@@ -9,26 +9,9 @@ export function getBindingAdapterKind(binding) {
9
9
  export function getBindingAdapterConfig(binding) {
10
10
  return binding.adapter?.config ?? {};
11
11
  }
12
- export function getBindingLangGraphWorkflow(binding) {
13
- const workflow = asRecord(getBindingAdapterConfig(binding).workflow);
14
- if (workflow) {
15
- return workflow;
16
- }
17
- return asRecord(asRecord(getBindingLangChainParams(binding)?.passthrough)?.workflow);
18
- }
19
- export function getBindingLangGraphPreset(binding) {
20
- const adapterPreset = getBindingAdapterConfig(binding).preset;
21
- if (typeof adapterPreset === "string" && adapterPreset.trim()) {
22
- return adapterPreset.trim();
23
- }
24
- const passthroughPreset = asRecord(getBindingLangChainParams(binding)?.passthrough)?.preset;
25
- return typeof passthroughPreset === "string" && passthroughPreset.trim()
26
- ? passthroughPreset.trim()
27
- : undefined;
28
- }
29
12
  export function getBindingLangChainParams(binding) {
30
- const adapterParams = asRecord(getBindingAdapterConfig(binding).params);
31
- if ((getBindingAdapterKind(binding) === "langchain-v1" || getBindingAdapterKind(binding) === "langgraph") && adapterParams) {
13
+ const adapterParams = getBindingAdapterConfig(binding).params;
14
+ if (getBindingAdapterKind(binding) === "langchain-v1" && typeof adapterParams === "object" && adapterParams && !Array.isArray(adapterParams)) {
32
15
  return adapterParams;
33
16
  }
34
17
  return binding.langchainAgentParams;
@@ -41,9 +24,7 @@ export function getBindingDeepAgentParams(binding) {
41
24
  return binding.deepAgentParams;
42
25
  }
43
26
  export function isLangChainBinding(binding) {
44
- return getBindingAdapterKind(binding) === "langchain-v1" ||
45
- getBindingAdapterKind(binding) === "langgraph" ||
46
- Boolean(binding.langchainAgentParams);
27
+ return getBindingAdapterKind(binding) === "langchain-v1" || Boolean(binding.langchainAgentParams);
47
28
  }
48
29
  export function isDeepAgentBinding(binding) {
49
30
  return getBindingAdapterKind(binding) === "deepagent" || Boolean(binding.deepAgentParams);
@@ -7,17 +7,6 @@ export declare function parseInterruptContent(content: string): {
7
7
  allowedDecisions?: Array<"approve" | "edit" | "reject">;
8
8
  inputPreview?: Record<string, unknown>;
9
9
  };
10
- export declare function requiresResearchRoute(normalizedInput: string): boolean;
11
- export declare function resolveDeterministicRouteIntent(normalizedInput: string): "primary" | "secondary" | "research" | undefined;
12
- export declare function heuristicRoute(input: string, primaryBinding?: {
13
- agent: {
14
- id: string;
15
- };
16
- }, secondaryBinding?: {
17
- agent: {
18
- id: string;
19
- };
20
- }): string;
21
10
  export declare function createHarnessEvent(threadId: string, runId: string, sequence: number, eventType: string, payload: Record<string, unknown>, source?: HarnessEvent["source"]): HarnessEvent;
22
11
  export declare function createPendingApproval(threadId: string, runId: string, checkpointRef: string, input: string, interruptContent?: string): InternalApprovalRecord;
23
12
  export declare function inferRoutingBindings(workspace: WorkspaceBundle): {
@@ -54,49 +54,6 @@ export function parseInterruptContent(content) {
54
54
  return {};
55
55
  }
56
56
  }
57
- export function requiresResearchRoute(normalizedInput) {
58
- return (/\b(latest|recent|today|current|news|headlines|research|compare|comparison|best options?)\b/i.test(normalizedInput) ||
59
- /(最新|最近|今天|当前|新闻|头条|研究|调研|比较|对比)/.test(normalizedInput));
60
- }
61
- export function resolveDeterministicRouteIntent(normalizedInput) {
62
- if (!normalizedInput) {
63
- return "primary";
64
- }
65
- if (requiresResearchRoute(normalizedInput)) {
66
- return "research";
67
- }
68
- if (/^(hi|hello|hey|thanks|thank you|你好|您好|谢谢)\b/.test(normalizedInput)) {
69
- return "primary";
70
- }
71
- if (normalizedInput.length > 240 ||
72
- normalizedInput.split(/\n+/).length > 3 ||
73
- /\b(create|build|implement|fix|debug|refactor|review|test|ship|release|deploy|code|bug|repo|repository|file|files|download|clone|inspect|analy[sz]e|explore)\b/i.test(normalizedInput) ||
74
- /(写代码|实现|修复|排查|调试|重构|评审|测试|发布|部署|仓库|代码|文件|下载|克隆|分析|检查|探索)/.test(normalizedInput)) {
75
- return "secondary";
76
- }
77
- if (/^(what|why|how|when|who|which|explain|summarize|总结|解释|说明|是什么|为什么|怎么|如何)\b/i.test(normalizedInput) &&
78
- normalizedInput.length < 160) {
79
- return "primary";
80
- }
81
- return undefined;
82
- }
83
- export function heuristicRoute(input, primaryBinding, secondaryBinding) {
84
- const normalized = input.trim().toLowerCase();
85
- const intent = resolveDeterministicRouteIntent(normalized);
86
- if (intent === "research") {
87
- return secondaryBinding?.agent.id ?? primaryBinding?.agent.id ?? "agent";
88
- }
89
- if (intent === "primary") {
90
- return primaryBinding?.agent.id ?? "agent";
91
- }
92
- if (intent === "secondary") {
93
- return secondaryBinding?.agent.id ?? primaryBinding?.agent.id ?? "agent";
94
- }
95
- if (!normalized) {
96
- return primaryBinding?.agent.id ?? "agent";
97
- }
98
- return secondaryBinding?.agent.id ?? primaryBinding?.agent.id ?? "agent";
99
- }
100
57
  export function createHarnessEvent(threadId, runId, sequence, eventType, payload, source = "runtime") {
101
58
  return {
102
59
  eventId: `evt-${String(sequence).padStart(6, "0")}`,
@@ -131,7 +88,7 @@ export function createPendingApproval(threadId, runId, checkpointRef, input, int
131
88
  }
132
89
  export function inferRoutingBindings(workspace) {
133
90
  const runtimeEntryBindings = Array.from(workspace.bindings.values()).filter((binding) => isRuntimeEntryBinding(binding));
134
- const orchestrationHosts = runtimeEntryBindings.filter((binding) => binding.agent.executionMode === "deepagent" || binding.agent.executionMode === "langgraph" || Boolean(binding.deepAgentParams));
91
+ const orchestrationHosts = runtimeEntryBindings.filter((binding) => binding.agent.executionMode === "deepagent" || Boolean(binding.deepAgentParams));
135
92
  const routingHosts = orchestrationHosts.length > 0 ? orchestrationHosts : runtimeEntryBindings;
136
93
  const deepAgentHosts = routingHosts.filter((binding) => binding.agent.executionMode === "deepagent" || Boolean(binding.deepAgentParams));
137
94
  const nonDeepAgentHosts = routingHosts.filter((binding) => !deepAgentHosts.includes(binding));
@@ -1,4 +1,4 @@
1
- export { createHarnessEvent, createPendingApproval, heuristicRoute, inferRoutingBindings, parseInterruptContent, renderRuntimeFailure, requiresResearchRoute, } from "./harness-support.js";
1
+ export { createHarnessEvent, createPendingApproval, inferRoutingBindings, parseInterruptContent, renderRuntimeFailure, } from "./harness-support.js";
2
2
  export { resolveCompiledEmbeddingModel, resolveCompiledEmbeddingModelRef } from "./embedding-models.js";
3
3
  export { createCheckpointerForConfig, createStoreForConfig } from "./runtime-factories.js";
4
4
  export { resolveCompiledVectorStore, resolveCompiledVectorStoreRef } from "./vector-stores.js";
@@ -1,4 +1,4 @@
1
- export { createHarnessEvent, createPendingApproval, heuristicRoute, inferRoutingBindings, parseInterruptContent, renderRuntimeFailure, requiresResearchRoute, } from "./harness-support.js";
1
+ export { createHarnessEvent, createPendingApproval, inferRoutingBindings, parseInterruptContent, renderRuntimeFailure, } from "./harness-support.js";
2
2
  export { resolveCompiledEmbeddingModel, resolveCompiledEmbeddingModelRef } from "./embedding-models.js";
3
3
  export { createCheckpointerForConfig, createStoreForConfig } from "./runtime-factories.js";
4
4
  export { resolveCompiledVectorStore, resolveCompiledVectorStoreRef } from "./vector-stores.js";
@@ -242,49 +242,6 @@ function resolveRuntimeMemoryConfig(agent, refs) {
242
242
  return runtimeMemoryDefaults ? { config: runtimeMemoryDefaults } : undefined;
243
243
  }
244
244
  function resolveLangGraphWorkflowConfig(agent, refs) {
245
- if (agent.executionMode !== "langgraph") {
246
- return undefined;
247
- }
248
- const profile = typeof agent.langchainAgentConfig?.profile === "string" && agent.langchainAgentConfig.profile.trim()
249
- ? agent.langchainAgentConfig.profile.trim()
250
- : typeof agent.langchainAgentConfig?.passthrough === "object" &&
251
- agent.langchainAgentConfig.passthrough &&
252
- typeof agent.langchainAgentConfig.passthrough.profile === "string" &&
253
- agent.langchainAgentConfig.passthrough.profile.trim()
254
- ? agent.langchainAgentConfig.passthrough.profile.trim()
255
- : undefined;
256
- const profileWith = typeof agent.langchainAgentConfig?.with === "object" && agent.langchainAgentConfig.with
257
- ? { ...agent.langchainAgentConfig.with }
258
- : typeof agent.langchainAgentConfig?.passthrough === "object" &&
259
- agent.langchainAgentConfig.passthrough &&
260
- typeof agent.langchainAgentConfig.passthrough.with === "object" &&
261
- agent.langchainAgentConfig.passthrough.with
262
- ? { ...agent.langchainAgentConfig.passthrough.with }
263
- : undefined;
264
- const workspaceProfile = profile ? getWorkspaceObject(refs, `runtime-profile/${profile}`) : undefined;
265
- if (workspaceProfile && workspaceProfile.kind !== "runtime-profile") {
266
- throw new Error(`Agent ${agent.id} profile ${profile} does not resolve to a RuntimeProfile object`);
267
- }
268
- const workspaceProfileValue = workspaceProfile?.value && typeof workspaceProfile.value === "object"
269
- ? workspaceProfile.value
270
- : undefined;
271
- const workspaceProfileDefaults = typeof workspaceProfileValue?.defaults === "object" && workspaceProfileValue.defaults
272
- ? workspaceProfileValue.defaults
273
- : undefined;
274
- const mergedProfileWith = workspaceProfileDefaults || profileWith
275
- ? {
276
- ...(workspaceProfileDefaults ?? {}),
277
- ...(profileWith ?? {}),
278
- }
279
- : undefined;
280
- const preset = typeof agent.langchainAgentConfig?.preset === "string" && agent.langchainAgentConfig.preset.trim()
281
- ? agent.langchainAgentConfig.preset.trim()
282
- : typeof agent.langchainAgentConfig?.passthrough === "object" &&
283
- agent.langchainAgentConfig.passthrough &&
284
- typeof agent.langchainAgentConfig.passthrough.preset === "string" &&
285
- agent.langchainAgentConfig.passthrough.preset.trim()
286
- ? agent.langchainAgentConfig.passthrough.preset.trim()
287
- : undefined;
288
245
  const workflowConfig = typeof agent.langchainAgentConfig?.workflow === "object" && agent.langchainAgentConfig.workflow
289
246
  ? agent.langchainAgentConfig.workflow
290
247
  : typeof agent.langchainAgentConfig?.langgraph === "object" && agent.langchainAgentConfig.langgraph
@@ -300,42 +257,16 @@ function resolveLangGraphWorkflowConfig(agent, refs) {
300
257
  agent.langchainAgentConfig.passthrough.langgraph
301
258
  ? agent.langchainAgentConfig.passthrough.langgraph
302
259
  : undefined;
303
- const profileWorkflowRef = typeof workspaceProfileValue?.workflowRef === "string" && workspaceProfileValue.workflowRef.trim()
304
- ? workspaceProfileValue.workflowRef.trim()
305
- : typeof workspaceProfileValue?.workflow === "string" && workspaceProfileValue.workflow.trim()
306
- ? workspaceProfileValue.workflow.trim()
307
- : typeof workspaceProfileValue?.workflow === "object" &&
308
- workspaceProfileValue.workflow &&
309
- typeof workspaceProfileValue.workflow.ref === "string" &&
310
- workspaceProfileValue.workflow.ref.trim()
311
- ? workspaceProfileValue.workflow.ref.trim()
312
- : undefined;
313
- const resolvedProfileWorkflowConfig = !workflowConfig && profileWorkflowRef
314
- ? materializeWorkspaceObjectConfig(refs, profileWorkflowRef, ["langgraph-workflow"], `Agent ${agent.id} profile ${profile} workflow`)
315
- : undefined;
316
260
  if (!workflowConfig) {
317
- return profile || preset || resolvedProfileWorkflowConfig
318
- ? {
319
- ...(profile ? { profile } : {}),
320
- ...(mergedProfileWith ? { with: mergedProfileWith } : {}),
321
- ...(preset ? { preset } : {}),
322
- ...(resolvedProfileWorkflowConfig ? { config: resolvedProfileWorkflowConfig } : {}),
323
- }
324
- : undefined;
261
+ return undefined;
325
262
  }
326
263
  if (isRefConfig(workflowConfig)) {
327
264
  return {
328
- config: materializeWorkspaceObjectConfig(refs, workflowConfig.ref, ["langgraph-workflow"], `Agent ${agent.id} workflow`),
329
- ...(profile ? { profile } : {}),
330
- ...(mergedProfileWith ? { with: mergedProfileWith } : {}),
331
- ...(preset ? { preset } : {}),
265
+ config: materializeWorkspaceObjectConfig(refs, workflowConfig.ref, [], `Agent ${agent.id} workflow`),
332
266
  };
333
267
  }
334
268
  return {
335
269
  config: workflowConfig,
336
- ...(profile ? { profile } : {}),
337
- ...(mergedProfileWith ? { with: mergedProfileWith } : {}),
338
- ...(preset ? { preset } : {}),
339
270
  };
340
271
  }
341
272
  function resolveRuntimeModelRefs(agent, refs) {
@@ -363,7 +294,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
363
294
  const store = resolveStoreConfig(agent, refs);
364
295
  const checkpointer = resolveCheckpointerConfig(agent, refs);
365
296
  const runtimeMemory = resolveRuntimeMemoryConfig(agent, refs);
366
- const langGraphWorkflow = resolveLangGraphWorkflowConfig(agent, refs);
367
297
  const runtimeModelRefs = resolveRuntimeModelRefs(agent, refs);
368
298
  const runtimeModels = compileRuntimeModels(runtimeModelRefs, models, agent.id);
369
299
  const runRoot = typeof agent.runRoot === "string" && agent.runRoot.trim().length > 0
@@ -379,13 +309,9 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
379
309
  ? {
380
310
  deepAgent: true,
381
311
  }
382
- : agent.executionMode === "langgraph"
383
- ? {
384
- langGraph: true,
385
- }
386
- : {
387
- langchainV1: true,
388
- },
312
+ : {
313
+ langchainV1: true,
314
+ },
389
315
  },
390
316
  harnessRuntime: {
391
317
  runRoot,
@@ -400,12 +326,8 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
400
326
  },
401
327
  };
402
328
  if (agent.executionMode !== "deepagent") {
403
- const langGraphPassthrough = agent.executionMode === "langgraph"
404
- ? {
405
- ...(langGraphWorkflow?.profile ? { profile: langGraphWorkflow.profile } : {}),
406
- ...(langGraphWorkflow?.with ? { with: langGraphWorkflow.with } : {}),
407
- ...(langGraphWorkflow?.config ? { workflow: langGraphWorkflow.config } : {}),
408
- }
329
+ const basePassthrough = typeof agent.langchainAgentConfig?.passthrough === "object" && agent.langchainAgentConfig.passthrough
330
+ ? { ...agent.langchainAgentConfig.passthrough }
409
331
  : undefined;
410
332
  const langchainAgentParams = {
411
333
  model: compiledAgentModel,
@@ -418,9 +340,7 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
418
340
  ? { ...agent.langchainAgentConfig.filesystem }
419
341
  : undefined,
420
342
  middleware: compileMiddlewareConfigs(agent.langchainAgentConfig?.middleware, models, agent.id),
421
- passthrough: mergeOpaqueConfig(typeof agent.langchainAgentConfig?.passthrough === "object" && agent.langchainAgentConfig.passthrough
422
- ? { ...agent.langchainAgentConfig.passthrough }
423
- : undefined, langGraphPassthrough),
343
+ passthrough: basePassthrough,
424
344
  subagents: agent.subagentRefs.map((ref) => {
425
345
  const subagent = agents.get(resolveRefId(ref));
426
346
  if (!subagent) {
@@ -444,12 +364,8 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
444
364
  return {
445
365
  ...base,
446
366
  adapter: {
447
- kind: agent.executionMode === "langgraph" ? "langgraph" : "langchain-v1",
367
+ kind: "langchain-v1",
448
368
  config: {
449
- ...(agent.executionMode === "langgraph" && langGraphWorkflow?.profile ? { profile: langGraphWorkflow.profile } : {}),
450
- ...(agent.executionMode === "langgraph" && langGraphWorkflow?.with ? { with: langGraphWorkflow.with } : {}),
451
- ...(agent.executionMode === "langgraph" && langGraphWorkflow?.preset ? { preset: langGraphWorkflow.preset } : {}),
452
- ...(agent.executionMode === "langgraph" && langGraphWorkflow?.config ? { workflow: langGraphWorkflow.config } : {}),
453
369
  params: langchainAgentParams,
454
370
  },
455
371
  },
@@ -1,6 +1 @@
1
- export { compileBinding, compileAgentSkills, requireTools } from "./agent-binding-compiler.js";
2
1
  export { loadWorkspace } from "./compile.js";
3
- export { loadWorkspaceObjects } from "./object-loader.js";
4
- export { compileEmbeddingModel, compileModel, compileTool, compileVectorStore, parseEmbeddingModelObject, parseModelObject, parseToolObject, parseVectorStoreObject, validateEmbeddingModelObject, validateModelObject, validateToolObject, validateVectorStoreObject, } from "./resource-compilers.js";
5
- export * from "./support/index.js";
6
- export { validateAgent, validateTopology } from "./validate.js";
@@ -1,6 +1 @@
1
- export { compileBinding, compileAgentSkills, requireTools } from "./agent-binding-compiler.js";
2
1
  export { loadWorkspace } from "./compile.js";
3
- export { loadWorkspaceObjects } from "./object-loader.js";
4
- export { compileEmbeddingModel, compileModel, compileTool, compileVectorStore, parseEmbeddingModelObject, parseModelObject, parseToolObject, parseVectorStoreObject, validateEmbeddingModelObject, validateModelObject, validateToolObject, validateVectorStoreObject, } from "./resource-compilers.js";
5
- export * from "./support/index.js";
6
- export { validateAgent, validateTopology } from "./validate.js";
@@ -150,10 +150,6 @@ function normalizeKind(kind) {
150
150
  return "runtime";
151
151
  case "RuntimeMemory":
152
152
  return "runtime-memory";
153
- case "LangGraphWorkflow":
154
- return "langgraph-workflow";
155
- case "RuntimeProfile":
156
- return "runtime-profile";
157
153
  case "Prompt":
158
154
  return "prompt";
159
155
  case "McpServer":
@@ -254,21 +250,12 @@ function readRuntimeModelRefs(runtime) {
254
250
  return undefined;
255
251
  }
256
252
  const modelRefs = {
257
- ...(typeof runtime.routingModelRef === "string" && runtime.routingModelRef.trim()
258
- ? { routing: runtime.routingModelRef.trim() }
259
- : {}),
260
253
  ...(typeof runtime.planningModelRef === "string" && runtime.planningModelRef.trim()
261
254
  ? { planning: runtime.planningModelRef.trim() }
262
255
  : {}),
263
256
  ...(typeof runtime.executionModelRef === "string" && runtime.executionModelRef.trim()
264
257
  ? { execution: runtime.executionModelRef.trim() }
265
258
  : {}),
266
- ...(typeof runtime.reviewModelRef === "string" && runtime.reviewModelRef.trim()
267
- ? { review: runtime.reviewModelRef.trim() }
268
- : {}),
269
- ...(typeof runtime.finalModelRef === "string" && runtime.finalModelRef.trim()
270
- ? { final: runtime.finalModelRef.trim() }
271
- : {}),
272
259
  };
273
260
  return Object.keys(modelRefs).length > 0 ? modelRefs : undefined;
274
261
  }
@@ -328,12 +315,12 @@ function resolveExecutionBackend(item, current) {
328
315
  if (backend === "langchain-v1") {
329
316
  return "langchain-v1";
330
317
  }
331
- if (backend === "langgraph") {
332
- return "langgraph";
333
- }
334
318
  if (backend === "deepagent") {
335
319
  return "deepagent";
336
320
  }
321
+ if (backend === "langgraph") {
322
+ throw new Error("Agent execution.backend=langgraph is no longer supported; use execution.backend=langchain-v1 or execution.backend=deepagent");
323
+ }
337
324
  return undefined;
338
325
  }
339
326
  function readExecutionSingleRef(item, key) {
@@ -473,11 +460,7 @@ async function objectItemsFromDocument(document, sourcePath) {
473
460
  ? normalizeCatalogSpec(document, { defaultKind: "Tool" })
474
461
  : catalogKind === "McpServers"
475
462
  ? normalizeCatalogSpec(document, { defaultKind: "McpServer" })
476
- : catalogKind === "LangGraphWorkflows"
477
- ? normalizeCatalogSpec(document, { defaultKind: "LangGraphWorkflow" })
478
- : catalogKind === "RuntimeProfiles"
479
- ? normalizeCatalogSpec(document, { defaultKind: "RuntimeProfile" })
480
- : [];
463
+ : [];
481
464
  if (catalogItems.length > 0) {
482
465
  return catalogItems;
483
466
  }
@@ -9,8 +9,8 @@ export function inferAgentCapabilities(agent) {
9
9
  return normalizeCapabilities(agent.capabilities);
10
10
  }
11
11
  return {
12
- delegation: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1" || agent.executionMode === "langgraph",
13
- memory: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1" || agent.executionMode === "langgraph",
12
+ delegation: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1",
13
+ memory: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1",
14
14
  };
15
15
  }
16
16
  export function inferBindingCapabilities(binding) {
@@ -38,9 +38,7 @@ export declare function getRuntimeModelDefaults(refs: Map<string, WorkspaceObjec
38
38
  export declare function getRecoveryConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): RecoveryConfig;
39
39
  export declare function getConcurrencyConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): ConcurrencyConfig;
40
40
  export declare function getResilienceConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): ResilienceConfig;
41
- export declare function getRoutingSystemPrompt(refs: Map<string, WorkspaceObject | ParsedAgentObject>): string | undefined;
42
41
  export declare function getRoutingDefaultAgentId(refs: Map<string, WorkspaceObject | ParsedAgentObject>): string | undefined;
43
- export declare function isModelRoutingEnabled(refs: Map<string, WorkspaceObject | ParsedAgentObject>): boolean;
44
42
  export declare function getRoutingRules(refs: Map<string, WorkspaceObject | ParsedAgentObject>): RoutingRule[];
45
43
  export declare function matchRoutingRule(input: string, rule: RoutingRule, options?: {
46
44
  threadId?: string;
@@ -39,21 +39,12 @@ export function getRuntimeMemoryDefaults(refs) {
39
39
  export function getRuntimeModelDefaults(refs) {
40
40
  const runtimeDefaults = getRuntimeDefaults(refs);
41
41
  const modelRefs = {
42
- ...(typeof runtimeDefaults?.routingModelRef === "string" && runtimeDefaults.routingModelRef.trim()
43
- ? { routing: runtimeDefaults.routingModelRef.trim() }
44
- : {}),
45
42
  ...(typeof runtimeDefaults?.planningModelRef === "string" && runtimeDefaults.planningModelRef.trim()
46
43
  ? { planning: runtimeDefaults.planningModelRef.trim() }
47
44
  : {}),
48
45
  ...(typeof runtimeDefaults?.executionModelRef === "string" && runtimeDefaults.executionModelRef.trim()
49
46
  ? { execution: runtimeDefaults.executionModelRef.trim() }
50
47
  : {}),
51
- ...(typeof runtimeDefaults?.reviewModelRef === "string" && runtimeDefaults.reviewModelRef.trim()
52
- ? { review: runtimeDefaults.reviewModelRef.trim() }
53
- : {}),
54
- ...(typeof runtimeDefaults?.finalModelRef === "string" && runtimeDefaults.finalModelRef.trim()
55
- ? { final: runtimeDefaults.finalModelRef.trim() }
56
- : {}),
57
48
  };
58
49
  return Object.keys(modelRefs).length > 0 ? modelRefs : undefined;
59
50
  }
@@ -145,20 +136,12 @@ export function getResilienceConfig(refs) {
145
136
  },
146
137
  };
147
138
  }
148
- export function getRoutingSystemPrompt(refs) {
149
- const routing = getRoutingObject(refs);
150
- return typeof routing?.systemPrompt === "string" && routing.systemPrompt.trim() ? routing.systemPrompt : undefined;
151
- }
152
139
  export function getRoutingDefaultAgentId(refs) {
153
140
  const routing = getRoutingObject(refs);
154
141
  return typeof routing?.defaultAgentId === "string" && routing.defaultAgentId.trim()
155
142
  ? routing.defaultAgentId.trim()
156
143
  : undefined;
157
144
  }
158
- export function isModelRoutingEnabled(refs) {
159
- const routing = getRoutingObject(refs);
160
- return routing?.modelRouting === true;
161
- }
162
145
  function toStringList(value) {
163
146
  if (typeof value === "string" && value.trim()) {
164
147
  return [value];
@@ -1,5 +1,5 @@
1
1
  import { hasAgentSystemPrompt, isDelegationCapableAgent, isMemoryCapableAgent, } from "./support/agent-capabilities.js";
2
- const allowedExecutionModes = new Set(["deepagent", "langchain-v1", "langgraph"]);
2
+ const allowedExecutionModes = new Set(["deepagent", "langchain-v1"]);
3
3
  function validateCheckpointerConfig(agent) {
4
4
  const checkpointer = (typeof agent.deepAgentConfig?.checkpointer === "object" && agent.deepAgentConfig.checkpointer) ||
5
5
  (typeof agent.deepAgentConfig?.checkpointer === "boolean" ? agent.deepAgentConfig.checkpointer : undefined) ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",