@botbotgo/agent-harness 0.0.92 → 0.0.94
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.
- package/README.md +153 -31
- package/README.zh.md +108 -28
- package/dist/benchmark/upstream-runtime-ab-benchmark.d.ts +1 -1
- package/dist/benchmark/upstream-runtime-ab-benchmark.js +2 -1
- package/dist/config/workflows/langgraph-workflows.yaml +318 -0
- package/dist/contracts/types.d.ts +8 -3
- package/dist/init-project.js +7 -7
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/runtime/agent-runtime-adapter.d.ts +49 -1
- package/dist/runtime/agent-runtime-adapter.js +1103 -50
- package/dist/runtime/harness.d.ts +2 -0
- package/dist/runtime/harness.js +55 -11
- package/dist/runtime/inventory.d.ts +1 -1
- package/dist/runtime/inventory.js +1 -1
- package/dist/runtime/langgraph-presets.d.ts +25 -0
- package/dist/runtime/langgraph-presets.js +165 -0
- package/dist/runtime/langgraph-profiles.d.ts +6 -0
- package/dist/runtime/langgraph-profiles.js +206 -0
- package/dist/runtime/policy-engine.js +0 -5
- package/dist/runtime/support/compiled-binding.d.ts +4 -1
- package/dist/runtime/support/compiled-binding.js +24 -2
- package/dist/runtime/support/harness-support.js +3 -3
- package/dist/runtime/support/runtime-entry.js +1 -1
- package/dist/workspace/agent-binding-compiler.js +111 -8
- package/dist/workspace/compile.js +1 -3
- package/dist/workspace/object-loader.js +46 -5
- package/dist/workspace/support/agent-capabilities.js +2 -2
- package/dist/workspace/support/workspace-ref-utils.d.ts +2 -1
- package/dist/workspace/support/workspace-ref-utils.js +21 -0
- package/dist/workspace/validate.js +1 -1
- package/package.json +2 -2
- /package/dist/config/{backends.yaml → catalogs/backends.yaml} +0 -0
- /package/dist/config/{embedding-models.yaml → catalogs/embedding-models.yaml} +0 -0
- /package/dist/config/{mcp.yaml → catalogs/mcp.yaml} +0 -0
- /package/dist/config/{models.yaml → catalogs/models.yaml} +0 -0
- /package/dist/config/{stores.yaml → catalogs/stores.yaml} +0 -0
- /package/dist/config/{tools.yaml → catalogs/tools.yaml} +0 -0
- /package/dist/config/{vector-stores.yaml → catalogs/vector-stores.yaml} +0 -0
- /package/dist/config/{runtime-memory.yaml → runtime/runtime-memory.yaml} +0 -0
- /package/dist/config/{workspace.yaml → runtime/workspace.yaml} +0 -0
|
@@ -3,7 +3,7 @@ import { getSkillInheritancePolicy, resolveToolTargets } from "../extensions.js"
|
|
|
3
3
|
import { compileModel, compileTool } from "./resource-compilers.js";
|
|
4
4
|
import { inferAgentCapabilities } from "./support/agent-capabilities.js";
|
|
5
5
|
import { discoverSkillPaths } from "./support/discovery.js";
|
|
6
|
-
import { compileAgentMemories, getResilienceConfig, getRuntimeDefaults, getRuntimeMemoryDefaults, getWorkspaceObject, resolvePromptValue, resolveRefId } from "./support/workspace-ref-utils.js";
|
|
6
|
+
import { compileAgentMemories, getResilienceConfig, getRuntimeDefaults, getRuntimeMemoryDefaults, getRuntimeModelDefaults, getWorkspaceObject, resolvePromptValue, resolveRefId } from "./support/workspace-ref-utils.js";
|
|
7
7
|
const WORKSPACE_BOUNDARY_GUIDANCE = "Keep repository and file exploration bounded to the current workspace root unless the user explicitly asks for broader host or filesystem access. " +
|
|
8
8
|
"Do not inspect absolute paths outside the workspace, system directories, or unrelated repos by default. " +
|
|
9
9
|
"Prefer workspace-local tools, relative paths, and the current repository checkout when analyzing code.";
|
|
@@ -150,6 +150,15 @@ function isRefConfig(value) {
|
|
|
150
150
|
}
|
|
151
151
|
return Object.keys(value).every((key) => key === "ref");
|
|
152
152
|
}
|
|
153
|
+
function mergeOpaqueConfig(base, extra) {
|
|
154
|
+
if (!base && !extra) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
...(base ?? {}),
|
|
159
|
+
...(extra ?? {}),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
153
162
|
function materializeWorkspaceObjectConfig(refs, ref, allowedKinds, ownerLabel) {
|
|
154
163
|
const object = getWorkspaceObject(refs, ref);
|
|
155
164
|
if (!object) {
|
|
@@ -232,6 +241,81 @@ function resolveRuntimeMemoryConfig(agent, refs) {
|
|
|
232
241
|
const runtimeMemoryDefaults = getRuntimeMemoryDefaults(refs);
|
|
233
242
|
return runtimeMemoryDefaults ? { config: runtimeMemoryDefaults } : undefined;
|
|
234
243
|
}
|
|
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 preset = typeof agent.langchainAgentConfig?.preset === "string" && agent.langchainAgentConfig.preset.trim()
|
|
265
|
+
? agent.langchainAgentConfig.preset.trim()
|
|
266
|
+
: typeof agent.langchainAgentConfig?.passthrough === "object" &&
|
|
267
|
+
agent.langchainAgentConfig.passthrough &&
|
|
268
|
+
typeof agent.langchainAgentConfig.passthrough.preset === "string" &&
|
|
269
|
+
agent.langchainAgentConfig.passthrough.preset.trim()
|
|
270
|
+
? agent.langchainAgentConfig.passthrough.preset.trim()
|
|
271
|
+
: undefined;
|
|
272
|
+
const workflowConfig = typeof agent.langchainAgentConfig?.workflow === "object" && agent.langchainAgentConfig.workflow
|
|
273
|
+
? agent.langchainAgentConfig.workflow
|
|
274
|
+
: typeof agent.langchainAgentConfig?.langgraph === "object" && agent.langchainAgentConfig.langgraph
|
|
275
|
+
? agent.langchainAgentConfig.langgraph
|
|
276
|
+
: typeof agent.langchainAgentConfig?.passthrough === "object" &&
|
|
277
|
+
agent.langchainAgentConfig.passthrough &&
|
|
278
|
+
typeof agent.langchainAgentConfig.passthrough.workflow === "object" &&
|
|
279
|
+
agent.langchainAgentConfig.passthrough.workflow
|
|
280
|
+
? agent.langchainAgentConfig.passthrough.workflow
|
|
281
|
+
: typeof agent.langchainAgentConfig?.passthrough === "object" &&
|
|
282
|
+
agent.langchainAgentConfig.passthrough &&
|
|
283
|
+
typeof agent.langchainAgentConfig.passthrough.langgraph === "object" &&
|
|
284
|
+
agent.langchainAgentConfig.passthrough.langgraph
|
|
285
|
+
? agent.langchainAgentConfig.passthrough.langgraph
|
|
286
|
+
: undefined;
|
|
287
|
+
if (!workflowConfig) {
|
|
288
|
+
return profile || preset ? { ...(profile ? { profile } : {}), ...(profileWith ? { with: profileWith } : {}), ...(preset ? { preset } : {}) } : undefined;
|
|
289
|
+
}
|
|
290
|
+
if (isRefConfig(workflowConfig)) {
|
|
291
|
+
return {
|
|
292
|
+
config: materializeWorkspaceObjectConfig(refs, workflowConfig.ref, ["langgraph-workflow"], `Agent ${agent.id} workflow`),
|
|
293
|
+
...(profile ? { profile } : {}),
|
|
294
|
+
...(profileWith ? { with: profileWith } : {}),
|
|
295
|
+
...(preset ? { preset } : {}),
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
return {
|
|
299
|
+
config: workflowConfig,
|
|
300
|
+
...(profile ? { profile } : {}),
|
|
301
|
+
...(profileWith ? { with: profileWith } : {}),
|
|
302
|
+
...(preset ? { preset } : {}),
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function resolveRuntimeModelRefs(agent, refs) {
|
|
306
|
+
const merged = {
|
|
307
|
+
...(getRuntimeModelDefaults(refs) ?? {}),
|
|
308
|
+
...(agent.runtimeModelRefs ?? {}),
|
|
309
|
+
};
|
|
310
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
311
|
+
}
|
|
312
|
+
function compileRuntimeModels(modelRefs, models, ownerId) {
|
|
313
|
+
if (!modelRefs) {
|
|
314
|
+
return undefined;
|
|
315
|
+
}
|
|
316
|
+
const compiled = Object.fromEntries(Object.entries(modelRefs).map(([slot, modelRef]) => [slot, requireModel(models, modelRef, ownerId)]));
|
|
317
|
+
return Object.keys(compiled).length > 0 ? compiled : undefined;
|
|
318
|
+
}
|
|
235
319
|
export function compileBinding(workspaceRoot, agent, agents, referencedSubagentIds, refs, models, tools) {
|
|
236
320
|
const internalSubagent = referencedSubagentIds.has(agent.id);
|
|
237
321
|
const runtimeDefaults = getRuntimeDefaults(refs);
|
|
@@ -243,6 +327,9 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
243
327
|
const store = resolveStoreConfig(agent, refs);
|
|
244
328
|
const checkpointer = resolveCheckpointerConfig(agent, refs);
|
|
245
329
|
const runtimeMemory = resolveRuntimeMemoryConfig(agent, refs);
|
|
330
|
+
const langGraphWorkflow = resolveLangGraphWorkflowConfig(agent, refs);
|
|
331
|
+
const runtimeModelRefs = resolveRuntimeModelRefs(agent, refs);
|
|
332
|
+
const runtimeModels = compileRuntimeModels(runtimeModelRefs, models, agent.id);
|
|
246
333
|
const runRoot = typeof agent.runRoot === "string" && agent.runRoot.trim().length > 0
|
|
247
334
|
? path.resolve(workspaceRoot, agent.runRoot)
|
|
248
335
|
: typeof runtimeDefaults?.runRoot === "string" && runtimeDefaults.runRoot.trim().length > 0
|
|
@@ -256,14 +343,19 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
256
343
|
? {
|
|
257
344
|
deepAgent: true,
|
|
258
345
|
}
|
|
259
|
-
:
|
|
260
|
-
|
|
261
|
-
|
|
346
|
+
: agent.executionMode === "langgraph"
|
|
347
|
+
? {
|
|
348
|
+
langGraph: true,
|
|
349
|
+
}
|
|
350
|
+
: {
|
|
351
|
+
langchainV1: true,
|
|
352
|
+
},
|
|
262
353
|
},
|
|
263
354
|
harnessRuntime: {
|
|
264
355
|
runRoot,
|
|
265
356
|
workspaceRoot,
|
|
266
|
-
|
|
357
|
+
...(runtimeModelRefs ? { modelRefs: runtimeModelRefs } : {}),
|
|
358
|
+
...(runtimeModels ? { models: runtimeModels } : {}),
|
|
267
359
|
capabilities: inferAgentCapabilities(agent),
|
|
268
360
|
resilience,
|
|
269
361
|
...(checkpointer ? { checkpointer: checkpointer.config } : {}),
|
|
@@ -272,6 +364,13 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
272
364
|
},
|
|
273
365
|
};
|
|
274
366
|
if (agent.executionMode !== "deepagent") {
|
|
367
|
+
const langGraphPassthrough = agent.executionMode === "langgraph"
|
|
368
|
+
? {
|
|
369
|
+
...(langGraphWorkflow?.profile ? { profile: langGraphWorkflow.profile } : {}),
|
|
370
|
+
...(langGraphWorkflow?.with ? { with: langGraphWorkflow.with } : {}),
|
|
371
|
+
...(langGraphWorkflow?.config ? { workflow: langGraphWorkflow.config } : {}),
|
|
372
|
+
}
|
|
373
|
+
: undefined;
|
|
275
374
|
const langchainAgentParams = {
|
|
276
375
|
model: compiledAgentModel,
|
|
277
376
|
tools: requireTools(tools, agent.toolRefs, agent.id),
|
|
@@ -283,9 +382,9 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
283
382
|
? { ...agent.langchainAgentConfig.filesystem }
|
|
284
383
|
: undefined,
|
|
285
384
|
middleware: compileMiddlewareConfigs(agent.langchainAgentConfig?.middleware, models, agent.id),
|
|
286
|
-
passthrough: typeof agent.langchainAgentConfig?.passthrough === "object" && agent.langchainAgentConfig.passthrough
|
|
385
|
+
passthrough: mergeOpaqueConfig(typeof agent.langchainAgentConfig?.passthrough === "object" && agent.langchainAgentConfig.passthrough
|
|
287
386
|
? { ...agent.langchainAgentConfig.passthrough }
|
|
288
|
-
: undefined,
|
|
387
|
+
: undefined, langGraphPassthrough),
|
|
289
388
|
subagents: agent.subagentRefs.map((ref) => {
|
|
290
389
|
const subagent = agents.get(resolveRefId(ref));
|
|
291
390
|
if (!subagent) {
|
|
@@ -309,8 +408,12 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
309
408
|
return {
|
|
310
409
|
...base,
|
|
311
410
|
adapter: {
|
|
312
|
-
kind: "langchain-v1",
|
|
411
|
+
kind: agent.executionMode === "langgraph" ? "langgraph" : "langchain-v1",
|
|
313
412
|
config: {
|
|
413
|
+
...(agent.executionMode === "langgraph" && langGraphWorkflow?.profile ? { profile: langGraphWorkflow.profile } : {}),
|
|
414
|
+
...(agent.executionMode === "langgraph" && langGraphWorkflow?.with ? { with: langGraphWorkflow.with } : {}),
|
|
415
|
+
...(agent.executionMode === "langgraph" && langGraphWorkflow?.preset ? { preset: langGraphWorkflow.preset } : {}),
|
|
416
|
+
...(agent.executionMode === "langgraph" && langGraphWorkflow?.config ? { workflow: langGraphWorkflow.config } : {}),
|
|
314
417
|
params: langchainAgentParams,
|
|
315
418
|
},
|
|
316
419
|
},
|
|
@@ -71,9 +71,7 @@ function compileBindings(workspaceRoot, refs, agentsList, models, tools) {
|
|
|
71
71
|
return bindings;
|
|
72
72
|
}
|
|
73
73
|
function validateRoutingTargets(refs, agentsList) {
|
|
74
|
-
const runtimeEntryAgentIds = new Set(agentsList
|
|
75
|
-
.filter((agent) => !agentsList.some((owner) => owner.subagentRefs.some((ref) => resolveRefId(ref) === agent.id)))
|
|
76
|
-
.map((agent) => agent.id));
|
|
74
|
+
const runtimeEntryAgentIds = new Set(agentsList.map((agent) => agent.id));
|
|
77
75
|
const defaultAgentId = getRoutingDefaultAgentId(refs);
|
|
78
76
|
if (defaultAgentId && !runtimeEntryAgentIds.has(defaultAgentId)) {
|
|
79
77
|
throw new Error(`Runtime routing.defaultAgentId references unknown runtime entry agent ${defaultAgentId}`);
|
|
@@ -150,6 +150,8 @@ function normalizeKind(kind) {
|
|
|
150
150
|
return "runtime";
|
|
151
151
|
case "RuntimeMemory":
|
|
152
152
|
return "runtime-memory";
|
|
153
|
+
case "LangGraphWorkflow":
|
|
154
|
+
return "langgraph-workflow";
|
|
153
155
|
case "Prompt":
|
|
154
156
|
return "prompt";
|
|
155
157
|
case "McpServer":
|
|
@@ -245,6 +247,29 @@ function readExecutionAgentConfig(item) {
|
|
|
245
247
|
function readRuntimeConfig(item) {
|
|
246
248
|
return asMutableObject(item.runtime);
|
|
247
249
|
}
|
|
250
|
+
function readRuntimeModelRefs(runtime) {
|
|
251
|
+
if (!runtime) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
const modelRefs = {
|
|
255
|
+
...(typeof runtime.routingModelRef === "string" && runtime.routingModelRef.trim()
|
|
256
|
+
? { routing: runtime.routingModelRef.trim() }
|
|
257
|
+
: {}),
|
|
258
|
+
...(typeof runtime.planningModelRef === "string" && runtime.planningModelRef.trim()
|
|
259
|
+
? { planning: runtime.planningModelRef.trim() }
|
|
260
|
+
: {}),
|
|
261
|
+
...(typeof runtime.executionModelRef === "string" && runtime.executionModelRef.trim()
|
|
262
|
+
? { execution: runtime.executionModelRef.trim() }
|
|
263
|
+
: {}),
|
|
264
|
+
...(typeof runtime.reviewModelRef === "string" && runtime.reviewModelRef.trim()
|
|
265
|
+
? { review: runtime.reviewModelRef.trim() }
|
|
266
|
+
: {}),
|
|
267
|
+
...(typeof runtime.finalModelRef === "string" && runtime.finalModelRef.trim()
|
|
268
|
+
? { final: runtime.finalModelRef.trim() }
|
|
269
|
+
: {}),
|
|
270
|
+
};
|
|
271
|
+
return Object.keys(modelRefs).length > 0 ? modelRefs : undefined;
|
|
272
|
+
}
|
|
248
273
|
function cloneConfigValue(value) {
|
|
249
274
|
if (Array.isArray(value)) {
|
|
250
275
|
return value.map((item) => cloneConfigValue(item));
|
|
@@ -301,6 +326,9 @@ function resolveExecutionBackend(item, current) {
|
|
|
301
326
|
if (backend === "langchain-v1") {
|
|
302
327
|
return "langchain-v1";
|
|
303
328
|
}
|
|
329
|
+
if (backend === "langgraph") {
|
|
330
|
+
return "langgraph";
|
|
331
|
+
}
|
|
304
332
|
if (backend === "deepagent") {
|
|
305
333
|
return "deepagent";
|
|
306
334
|
}
|
|
@@ -408,6 +436,7 @@ export function parseAgentItem(item, sourcePath) {
|
|
|
408
436
|
return {
|
|
409
437
|
id: String(item.id),
|
|
410
438
|
executionMode: executionMode,
|
|
439
|
+
runtimeModelRefs: readRuntimeModelRefs(runtime),
|
|
411
440
|
capabilities: readCapabilities(item.capabilities) ?? (executionMode === "deepagent"
|
|
412
441
|
? { delegation: true, memory: true }
|
|
413
442
|
: { delegation: true, memory: true }),
|
|
@@ -442,7 +471,9 @@ async function objectItemsFromDocument(document, sourcePath) {
|
|
|
442
471
|
? normalizeCatalogSpec(document, { defaultKind: "Tool" })
|
|
443
472
|
: catalogKind === "McpServers"
|
|
444
473
|
? normalizeCatalogSpec(document, { defaultKind: "McpServer" })
|
|
445
|
-
:
|
|
474
|
+
: catalogKind === "LangGraphWorkflows"
|
|
475
|
+
? normalizeCatalogSpec(document, { defaultKind: "LangGraphWorkflow" })
|
|
476
|
+
: [];
|
|
446
477
|
if (catalogItems.length > 0) {
|
|
447
478
|
return catalogItems;
|
|
448
479
|
}
|
|
@@ -678,12 +709,22 @@ async function readNamedYamlItems(root, filenames) {
|
|
|
678
709
|
return records;
|
|
679
710
|
}
|
|
680
711
|
async function readNamedModelItems(root) {
|
|
681
|
-
const
|
|
712
|
+
const filePaths = new Set();
|
|
682
713
|
for (const filename of MODEL_FILENAMES) {
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
|
|
714
|
+
const directPath = path.join(root, filename);
|
|
715
|
+
if (await fileExists(directPath)) {
|
|
716
|
+
filePaths.add(directPath);
|
|
686
717
|
}
|
|
718
|
+
}
|
|
719
|
+
for (const extension of [".yaml", ".yml"]) {
|
|
720
|
+
for (const filePath of await listFilesRecursive(root, extension)) {
|
|
721
|
+
if (MODEL_FILENAMES.includes(path.basename(filePath))) {
|
|
722
|
+
filePaths.add(filePath);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
const records = [];
|
|
727
|
+
for (const filePath of [...filePaths].sort()) {
|
|
687
728
|
const parsedDocuments = parseAllDocuments(await readYamlOrJson(filePath));
|
|
688
729
|
for (const parsedDocument of parsedDocuments) {
|
|
689
730
|
for (const item of await objectItemsFromDocument(parsedDocument.toJSON(), filePath)) {
|
|
@@ -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",
|
|
13
|
-
memory: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1",
|
|
12
|
+
delegation: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1" || agent.executionMode === "langgraph",
|
|
13
|
+
memory: agent.executionMode === "deepagent" || agent.executionMode === "langchain-v1" || agent.executionMode === "langgraph",
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export function inferBindingCapabilities(binding) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ParsedAgentObject, WorkspaceObject } from "../../contracts/types.js";
|
|
1
|
+
import type { ParsedAgentObject, RuntimeModelRefMap, WorkspaceObject } from "../../contracts/types.js";
|
|
2
2
|
export type RoutingRule = {
|
|
3
3
|
agentId: string;
|
|
4
4
|
equals?: string[];
|
|
@@ -34,6 +34,7 @@ export type ResilienceConfig = {
|
|
|
34
34
|
export declare function getWorkspaceObject(refs: Map<string, WorkspaceObject | ParsedAgentObject>, ref: string | undefined): WorkspaceObject | undefined;
|
|
35
35
|
export declare function getRuntimeDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): Record<string, unknown> | undefined;
|
|
36
36
|
export declare function getRuntimeMemoryDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): Record<string, unknown> | undefined;
|
|
37
|
+
export declare function getRuntimeModelDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): RuntimeModelRefMap | undefined;
|
|
37
38
|
export declare function getRecoveryConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): RecoveryConfig;
|
|
38
39
|
export declare function getConcurrencyConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): ConcurrencyConfig;
|
|
39
40
|
export declare function getResilienceConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): ResilienceConfig;
|
|
@@ -36,6 +36,27 @@ export function getRuntimeMemoryDefaults(refs) {
|
|
|
36
36
|
}
|
|
37
37
|
return runtimeMemories[0].value;
|
|
38
38
|
}
|
|
39
|
+
export function getRuntimeModelDefaults(refs) {
|
|
40
|
+
const runtimeDefaults = getRuntimeDefaults(refs);
|
|
41
|
+
const modelRefs = {
|
|
42
|
+
...(typeof runtimeDefaults?.routingModelRef === "string" && runtimeDefaults.routingModelRef.trim()
|
|
43
|
+
? { routing: runtimeDefaults.routingModelRef.trim() }
|
|
44
|
+
: {}),
|
|
45
|
+
...(typeof runtimeDefaults?.planningModelRef === "string" && runtimeDefaults.planningModelRef.trim()
|
|
46
|
+
? { planning: runtimeDefaults.planningModelRef.trim() }
|
|
47
|
+
: {}),
|
|
48
|
+
...(typeof runtimeDefaults?.executionModelRef === "string" && runtimeDefaults.executionModelRef.trim()
|
|
49
|
+
? { execution: runtimeDefaults.executionModelRef.trim() }
|
|
50
|
+
: {}),
|
|
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
|
+
};
|
|
58
|
+
return Object.keys(modelRefs).length > 0 ? modelRefs : undefined;
|
|
59
|
+
}
|
|
39
60
|
export function getRecoveryConfig(refs) {
|
|
40
61
|
const runtimeDefaults = getRuntimeDefaults(refs);
|
|
41
62
|
const recovery = typeof runtimeDefaults?.recovery === "object" && runtimeDefaults.recovery
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasAgentSystemPrompt, isDelegationCapableAgent, isMemoryCapableAgent, } from "./support/agent-capabilities.js";
|
|
2
|
-
const allowedExecutionModes = new Set(["deepagent", "langchain-v1"]);
|
|
2
|
+
const allowedExecutionModes = new Set(["deepagent", "langchain-v1", "langgraph"]);
|
|
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.
|
|
3
|
+
"version": "0.0.94",
|
|
4
4
|
"description": "Workspace runtime for multi-agent applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@10.9.2",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@langchain/community": "^1.1.24",
|
|
37
37
|
"@langchain/core": "^1.1.33",
|
|
38
38
|
"@langchain/google": "^0.1.7",
|
|
39
|
-
"@langchain/langgraph": "^1.2.
|
|
39
|
+
"@langchain/langgraph": "^1.2.6",
|
|
40
40
|
"@langchain/langgraph-checkpoint-sqlite": "^1.0.1",
|
|
41
41
|
"@langchain/ollama": "^1.2.6",
|
|
42
42
|
"@langchain/openai": "^1.1.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|