@botbotgo/agent-harness 0.0.433 → 0.0.435

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.433";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.435";
2
2
  export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
@@ -1,2 +1,2 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.433";
1
+ export const AGENT_HARNESS_VERSION = "0.0.435";
2
2
  export const AGENT_HARNESS_RELEASE_DATE = "2026-05-03";
@@ -196,6 +196,16 @@ function terminalToolErrorRecoveryInstruction(terminalText) {
196
196
  function requiresPlanEvidence(binding) {
197
197
  return binding.harnessRuntime.executionContract?.requiresPlan === true;
198
198
  }
199
+ function escapeRegExp(value) {
200
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
201
+ }
202
+ function textExplicitlyNamesTool(text, toolName) {
203
+ const trimmedToolName = toolName.trim();
204
+ if (trimmedToolName.length === 0) {
205
+ return false;
206
+ }
207
+ return new RegExp(`(?:^|[^\\p{L}\\p{N}_-])${escapeRegExp(trimmedToolName)}(?:$|[^\\p{L}\\p{N}_-])`, "iu").test(text);
208
+ }
199
209
  function resolveCommittedTodoEvidenceTool(executedToolResults, primaryTools) {
200
210
  const availableTools = primaryTools
201
211
  .filter((tool) => typeof tool.name === "string" && tool.name.length > 0 && !isPlanToolName(tool.name));
@@ -225,8 +235,8 @@ function resolveCommittedTodoEvidenceTool(executedToolResults, primaryTools) {
225
235
  item.title,
226
236
  item.name,
227
237
  item.text,
228
- ].filter((value) => typeof value === "string").join(" ").toLowerCase();
229
- const matched = availableTools.map((tool) => tool.name).filter((toolName) => content.includes(toolName.toLowerCase()));
238
+ ].filter((value) => typeof value === "string").join(" ");
239
+ const matched = availableTools.map((tool) => tool.name).filter((toolName) => textExplicitlyNamesTool(content, toolName));
230
240
  if (matched.length === 1) {
231
241
  return {
232
242
  name: matched[0],
@@ -227,6 +227,17 @@ function buildEvidenceToolArgs(tool, taskText, evidenceText = taskText) {
227
227
  }
228
228
  return args;
229
229
  }
230
+ function escapeRegExp(value) {
231
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
232
+ }
233
+ function textExplicitlyNamesTool(text, toolName) {
234
+ const name = toolName.trim();
235
+ if (!name) {
236
+ return false;
237
+ }
238
+ const pattern = new RegExp(`(?:^|[^\\p{L}\\p{N}_-])${escapeRegExp(name)}(?:$|[^\\p{L}\\p{N}_-])`, "iu");
239
+ return pattern.test(text);
240
+ }
230
241
  function resolveCommittedEvidenceTools(input) {
231
242
  const availableTools = readResolvedEvidenceTools(input.resolvedTools)
232
243
  .filter((tool) => tool.name !== "write_todos" && tool.name !== "read_todos" && typeof tool.invoke === "function");
@@ -234,10 +245,9 @@ function resolveCommittedEvidenceTools(input) {
234
245
  return [];
235
246
  }
236
247
  const stateText = `${input.taskText}\n${stringifyTaskState(readMessages(input.result))}`;
237
- const selectionText = stateText.toLowerCase();
238
248
  const selected = [];
239
249
  for (const tool of availableTools) {
240
- if (!selectionText.includes(tool.name.toLowerCase())) {
250
+ if (!textExplicitlyNamesTool(stateText, tool.name)) {
241
251
  continue;
242
252
  }
243
253
  selected.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.433",
3
+ "version": "0.0.435",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",