@botbotgo/agent-harness 0.0.451 → 0.0.452
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.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.452";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
package/dist/package-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.452";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
|
@@ -5,7 +5,7 @@ import { createAgent, humanInTheLoopMiddleware, todoListMiddleware } from "langc
|
|
|
5
5
|
import { sanitizeVisibleText, tryParseJson, wrapResolvedModel, } from "./parsing/output-parsing.js";
|
|
6
6
|
import { salvageJsonToolCalls } from "./parsing/output-tool-args.js";
|
|
7
7
|
import { extractMessageText } from "../utils/message-content.js";
|
|
8
|
-
import { AGENT_INTERRUPT_SENTINEL_PREFIX, buildDeepAgentCreateParams,
|
|
8
|
+
import { AGENT_INTERRUPT_SENTINEL_PREFIX, buildDeepAgentCreateParams, buildDeepAgentSystemPromptWithCapabilityCatalog, buildLangChainCreateParams, DEFAULT_DEEPAGENT_RECURSION_LIMIT, materializeModelExposedBuiltinMiddlewareTools, resolveLangChainInvocationConfig, resolveRunnableCheckpointer, resolveRunnableInterruptOn, shouldAttachDeepAgentBackend, shouldAttachDeepAgentCheckpointer, shouldAttachDeepAgentStore, } from "./agent-runtime-assembly.js";
|
|
9
9
|
import { resolveDeepAgentSkillSourcePaths, resolveDeepAgentSkillSourceRootPaths, } from "./adapter/compat/deepagent-compat.js";
|
|
10
10
|
import { EXECUTION_WITH_TOOL_EVIDENCE_RETRY_INSTRUCTION } from "./prompts/runtime-prompts.js";
|
|
11
11
|
import { buildToolNameMapping, } from "./adapter/tool/tool-name-mapping.js";
|
|
@@ -921,7 +921,7 @@ export class AgentRuntimeAdapter {
|
|
|
921
921
|
: undefined;
|
|
922
922
|
return createDeepAgent({
|
|
923
923
|
model: input.resolvedModel,
|
|
924
|
-
systemPrompt:
|
|
924
|
+
systemPrompt: buildDeepAgentSystemPromptWithCapabilityCatalog({
|
|
925
925
|
systemPrompt: getBindingSystemPrompt(binding),
|
|
926
926
|
subagents: input.resolvedSubagents,
|
|
927
927
|
skills: input.resolvedSkills,
|
|
@@ -984,7 +984,7 @@ export class AgentRuntimeAdapter {
|
|
|
984
984
|
: undefined;
|
|
985
985
|
return createAgent({
|
|
986
986
|
model: input.resolvedModel,
|
|
987
|
-
systemPrompt:
|
|
987
|
+
systemPrompt: buildDeepAgentSystemPromptWithCapabilityCatalog({
|
|
988
988
|
systemPrompt: getBindingSystemPrompt(binding),
|
|
989
989
|
subagents: input.resolvedSubagents,
|
|
990
990
|
skills: input.resolvedSkills,
|
|
@@ -9,7 +9,7 @@ export declare function materializeModelExposedBuiltinMiddlewareTools(input: {
|
|
|
9
9
|
modelExposed?: boolean | string[];
|
|
10
10
|
}): unknown[];
|
|
11
11
|
export declare function buildRuntimeTemporalContext(now?: Date): string;
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function buildDeepAgentSystemPromptWithCapabilityCatalog(input: {
|
|
13
13
|
systemPrompt?: unknown;
|
|
14
14
|
subagents: Array<Pick<UpstreamSubagentConfig, "name" | "description"> | Pick<CompiledAsyncSubAgent, "name" | "description">>;
|
|
15
15
|
skills?: string[];
|
|
@@ -18,7 +18,8 @@ export declare function buildDeepAgentSystemPromptWithCapabilityHierarchy(input:
|
|
|
18
18
|
description?: string;
|
|
19
19
|
}>;
|
|
20
20
|
}): unknown;
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const buildDeepAgentSystemPromptWithCapabilityHierarchy: typeof buildDeepAgentSystemPromptWithCapabilityCatalog;
|
|
22
|
+
export declare const buildDeepAgentSystemPromptWithSubagentCatalog: typeof buildDeepAgentSystemPromptWithCapabilityCatalog;
|
|
22
23
|
export declare function resolveRunnableCheckpointer(options: RuntimeAdapterOptions, binding: CompiledAgentBinding): unknown;
|
|
23
24
|
export declare function resolveRunnableInterruptOn(binding: CompiledAgentBinding): Record<string, {
|
|
24
25
|
allowedDecisions: import("./adapter/tool/interrupt-policy.js").InterruptDecision[];
|
|
@@ -68,31 +68,23 @@ function appendRuntimeTemporalContext(systemPrompt) {
|
|
|
68
68
|
.filter((part) => typeof part === "string" && part.length > 0)
|
|
69
69
|
.join("\n\n");
|
|
70
70
|
}
|
|
71
|
-
export function
|
|
71
|
+
export function buildDeepAgentSystemPromptWithCapabilityCatalog(input) {
|
|
72
72
|
const basePrompt = typeof input.systemPrompt === "string" ? input.systemPrompt : undefined;
|
|
73
73
|
const skills = buildSkillCatalog(input.skills ?? []);
|
|
74
74
|
const tools = input.tools ?? [];
|
|
75
|
-
const hasNoConfiguredCapabilities = input.subagents.length === 0 && skills.length === 0 && tools.length === 0;
|
|
76
|
-
const isDelegationOnly = input.subagents.length > 0 && skills.length === 0 && tools.length === 0;
|
|
77
75
|
const catalogPrompt = [
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"3. Use raw tools as execution primitives for the selected agent or skill, or when no listed skill applies.",
|
|
82
|
-
"Keep each selection inside the selected capability's described responsibility boundary.",
|
|
83
|
-
"If no listed subagent, skill, or tool can responsibly handle the request, do not invent a path. Return a terminal response with status \"refused\" and explain the missing capability.",
|
|
84
|
-
"If a selected capability cannot complete after using its available tools, return a terminal response with status \"blocked\" or \"failed\" and include the blocker evidence.",
|
|
76
|
+
"Runtime capability catalog:",
|
|
77
|
+
"The runtime has configured the following available subagents, skills, and raw tools for this agent.",
|
|
78
|
+
"Use the configured capability descriptions and upstream DeepAgents tool semantics to decide how to proceed.",
|
|
85
79
|
...(input.subagents.length > 0
|
|
86
80
|
? [
|
|
87
81
|
"",
|
|
88
82
|
"Available subagents for task delegation:",
|
|
89
83
|
...input.subagents.map(formatCapabilityLine),
|
|
90
|
-
"",
|
|
91
|
-
"When using the task tool, set subagent_type to exactly one of the listed subagent names. Do not create, translate, alias, or modify subagent names.",
|
|
92
84
|
]
|
|
93
85
|
: [
|
|
94
86
|
"",
|
|
95
|
-
"
|
|
87
|
+
"Available subagents for task delegation: none.",
|
|
96
88
|
]),
|
|
97
89
|
...(skills.length > 0
|
|
98
90
|
? [
|
|
@@ -113,33 +105,13 @@ export function buildDeepAgentSystemPromptWithCapabilityHierarchy(input) {
|
|
|
113
105
|
: [
|
|
114
106
|
"",
|
|
115
107
|
"Raw tools available to this agent: none.",
|
|
116
|
-
"Do not mention, offer, or claim any raw tool that is not listed here.",
|
|
117
108
|
]),
|
|
118
|
-
...(hasNoConfiguredCapabilities
|
|
119
|
-
? [
|
|
120
|
-
"",
|
|
121
|
-
"No-capability terminal rule:",
|
|
122
|
-
"This agent currently has no configured subagents, skills, or raw tools.",
|
|
123
|
-
"For requests that require execution, retrieval, live data, workspace inspection, or external evidence, return a direct refusal based on the missing configured capability.",
|
|
124
|
-
"Do not propose a tool-based next step, do not name any unlisted tool, and do not ask the user for links so this agent can fetch them.",
|
|
125
|
-
"The only valid next step is for the workspace owner to attach an appropriate subagent, skill, or tool and retry.",
|
|
126
|
-
]
|
|
127
|
-
: []),
|
|
128
|
-
...(isDelegationOnly
|
|
129
|
-
? [
|
|
130
|
-
"",
|
|
131
|
-
"Delegation-only mode:",
|
|
132
|
-
"This agent has specialist subagents but no direct execution skills or raw tools.",
|
|
133
|
-
"For any request that fits a listed subagent, the first assistant response must be a task tool call only.",
|
|
134
|
-
"Do not write a natural-language promise such as saying you will use a subagent. Actually call the task tool.",
|
|
135
|
-
"If no listed subagent fits, return a final refusal instead of answering locally.",
|
|
136
|
-
]
|
|
137
|
-
: []),
|
|
138
109
|
"",
|
|
139
110
|
].join("\n");
|
|
140
111
|
return appendRuntimeTemporalContext([basePrompt, catalogPrompt].filter((part) => typeof part === "string" && part.length > 0).join("\n\n"));
|
|
141
112
|
}
|
|
142
|
-
export const
|
|
113
|
+
export const buildDeepAgentSystemPromptWithCapabilityHierarchy = buildDeepAgentSystemPromptWithCapabilityCatalog;
|
|
114
|
+
export const buildDeepAgentSystemPromptWithSubagentCatalog = buildDeepAgentSystemPromptWithCapabilityCatalog;
|
|
143
115
|
export function resolveRunnableCheckpointer(options, binding) {
|
|
144
116
|
return options.checkpointerResolver ? options.checkpointerResolver(binding) : new MemorySaver();
|
|
145
117
|
}
|