@botbotgo/agent-harness 0.0.430 → 0.0.431
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.431";
|
|
2
2
|
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
|
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.431";
|
|
2
2
|
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
|
|
@@ -263,14 +263,7 @@ function wrapToolWithDedupe(resolvedTool, compiledTool) {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
function shouldConstrainWorkspacePaths(compiledTool) {
|
|
266
|
-
|
|
267
|
-
return false;
|
|
268
|
-
}
|
|
269
|
-
const normalized = `${compiledTool.name} ${compiledTool.description}`.toLowerCase();
|
|
270
|
-
if (/(web[_ .-]?search|fetch[_ .-]?url|https?:\/\/|\burl\b)/.test(normalized)) {
|
|
271
|
-
return false;
|
|
272
|
-
}
|
|
273
|
-
return /(workspace|repo|repository|sandbox|filesystem|file|directory|folder|path|memory|source[- ]control|code search|context search|rag|index|grep|glob|read|write|edit)/.test(normalized);
|
|
266
|
+
return compiledTool.type !== "mcp";
|
|
274
267
|
}
|
|
275
268
|
function guardWorkspaceBoundToolInput(input, compiledTool, binding) {
|
|
276
269
|
const workspaceRoot = binding?.harnessRuntime.workspaceRoot;
|
|
@@ -1890,7 +1890,16 @@ export class AgentRuntimeAdapter {
|
|
|
1890
1890
|
.split(/\r?\n/u)
|
|
1891
1891
|
.map((item) => item.trim())
|
|
1892
1892
|
.filter((item) => /^\d+\s*[.)、.]\s*/u.test(item));
|
|
1893
|
-
|
|
1893
|
+
const shouldRouteNumberedClauses = !explicitOwner
|
|
1894
|
+
&& explicitTasks.length === 0
|
|
1895
|
+
&& model
|
|
1896
|
+
&& numberedRequestSteps.length > 1
|
|
1897
|
+
&& (!selection
|
|
1898
|
+
|| Boolean(selection.refusedReason)
|
|
1899
|
+
|| (Array.isArray(selection.delegations)
|
|
1900
|
+
&& selection.delegations.length > 1
|
|
1901
|
+
&& selection.delegations.length < numberedRequestSteps.length));
|
|
1902
|
+
if (shouldRouteNumberedClauses || ((!selection || selection.refusedReason) && !explicitOwner && explicitTasks.length === 0 && model)) {
|
|
1894
1903
|
const routeClauses = numberedRequestSteps.length > 1 ? numberedRequestSteps : [requestText];
|
|
1895
1904
|
const routedDelegations = [];
|
|
1896
1905
|
for (const [index, clause] of routeClauses.entries()) {
|
|
@@ -1921,10 +1930,11 @@ export class AgentRuntimeAdapter {
|
|
|
1921
1930
|
}
|
|
1922
1931
|
routedDelegations.push({ subagentType: routed.subagentType, description: clause });
|
|
1923
1932
|
}
|
|
1924
|
-
|
|
1933
|
+
const existingDelegationCount = selection?.delegations?.length ?? 0;
|
|
1934
|
+
if (routedDelegations.length > 1 && routedDelegations.length > existingDelegationCount) {
|
|
1925
1935
|
selection = { delegations: routedDelegations };
|
|
1926
1936
|
}
|
|
1927
|
-
else if (routedDelegations.length === 1) {
|
|
1937
|
+
else if (routedDelegations.length === 1 && existingDelegationCount === 0) {
|
|
1928
1938
|
selection = { subagentType: routedDelegations[0].subagentType };
|
|
1929
1939
|
}
|
|
1930
1940
|
}
|