@botbotgo/agent-harness 0.0.424 → 0.0.426

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.424";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.426";
2
2
  export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
@@ -1,2 +1,2 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.424";
1
+ export const AGENT_HARNESS_VERSION = "0.0.426";
2
2
  export const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
@@ -235,10 +235,7 @@ function resolveCommittedPlanEvidenceTools(primaryTools, planToolOutput) {
235
235
  const seen = new Set();
236
236
  for (const content of todoContents) {
237
237
  const todoText = content.toLowerCase();
238
- const matches = availableToolNames.filter((name) => todoText.includes(name.toLowerCase()));
239
- const selectedNames = matches.length === 1
240
- ? [matches[0]]
241
- : resolveBestScoredToolNames(availableToolNames, toolsByName, todoText);
238
+ const selectedNames = availableToolNames.filter((name) => hasExplicitToolNameReference(todoText, name));
242
239
  for (const selectedName of selectedNames) {
243
240
  if (seen.has(selectedName)) {
244
241
  continue;
@@ -255,44 +252,13 @@ function resolveCommittedPlanEvidenceTools(primaryTools, planToolOutput) {
255
252
  }
256
253
  return resolved;
257
254
  }
258
- function extractSelectionTokens(value) {
259
- const tokens = new Set();
260
- for (const match of value.matchAll(/[\p{L}\p{N}_-]+/gu)) {
261
- const token = match[0].toLowerCase();
262
- if (token.length >= 2) {
263
- tokens.add(token);
264
- }
265
- for (const part of token.split(/[_-]+/u)) {
266
- if (part.length >= 2) {
267
- tokens.add(part);
268
- }
269
- }
255
+ function hasExplicitToolNameReference(todoText, toolName) {
256
+ const normalizedToolName = toolName.trim().toLowerCase();
257
+ if (!normalizedToolName) {
258
+ return false;
270
259
  }
271
- return tokens;
272
- }
273
- function resolveBestScoredToolNames(availableToolNames, toolsByName, todoText) {
274
- const requestTokens = extractSelectionTokens(todoText);
275
- const scored = availableToolNames
276
- .map((name) => {
277
- const tool = toolsByName.get(name);
278
- const toolTokens = extractSelectionTokens(`${name} ${tool?.description ?? ""}`);
279
- const toolNameTokens = extractSelectionTokens(name);
280
- let score = 0;
281
- for (const token of requestTokens) {
282
- if (toolNameTokens.has(token)) {
283
- score += 10;
284
- continue;
285
- }
286
- if (toolTokens.has(token)) {
287
- score += token.length > 3 ? 2 : 1;
288
- }
289
- }
290
- return { name, score };
291
- })
292
- .filter((item) => item.score > 0)
293
- .sort((left, right) => right.score - left.score);
294
- const topScore = scored[0]?.score ?? 0;
295
- return topScore > 0 ? scored.filter((item) => item.score === topScore).map((item) => item.name) : [];
260
+ const escapedName = normalizedToolName.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
261
+ return new RegExp(`(?:^|[^\\p{L}\\p{N}_-])${escapedName}(?:$|[^\\p{L}\\p{N}_-])`, "iu").test(todoText);
296
262
  }
297
263
  function buildCommittedPlanEvidenceToolArgs(tool, todoText) {
298
264
  const properties = typeof tool?.modelSchema === "object" && tool.modelSchema !== null
@@ -214,10 +214,7 @@ function resolveCommittedEvidenceTools(input) {
214
214
  if (selected.length > 0) {
215
215
  return selected.slice(0, 3);
216
216
  }
217
- return availableTools.slice(0, 2).map((tool) => ({
218
- tool,
219
- args: buildEvidenceToolArgs(tool, stateText),
220
- }));
217
+ return [];
221
218
  }
222
219
  async function appendCommittedEvidenceToolResults(input) {
223
220
  const toolCalls = resolveCommittedEvidenceTools({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.424",
3
+ "version": "0.0.426",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",