agent.libx.js 0.93.19 → 0.93.21

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/dist/index.js CHANGED
@@ -4127,7 +4127,12 @@ Another agent just implemented the above. Independently check the CURRENT state
4127
4127
  case "capabilities": {
4128
4128
  const actTools = this.options.actOptions?.tools ?? [];
4129
4129
  const names = actTools.map((t) => t.name);
4130
- return names.length ? `Tools your background worker (Act) can actually use: ${names.join(", ")}. If an ability is NOT represented in that list, you do NOT have it \u2014 say so honestly.` : "Your worker uses Act's default local toolset (reading/editing files, running shell commands). No extra tools (e.g. web/internet) are configured; if a request is not a basic file or shell operation, assume you can't do it and say so.";
4130
+ if (!names.length)
4131
+ return "Your worker uses Act's default local toolset (reading/editing files, running shell commands). No extra tools (e.g. web/internet) are configured; if a request is not a basic file or shell operation, assume you can't do it and say so.";
4132
+ const webish = names.some((n) => /WebFetch|browser/i.test(n));
4133
+ const hasSearch = names.some((n) => /search/i.test(n) && !/WebFetch/i.test(n));
4134
+ const webNote = webish && !hasSearch ? ` NOTE: WebFetch / browser tools act on a SPECIFIC URL you are given \u2014 they are NOT a search engine. You CANNOT search the web, Google a topic, or look up arbitrary/live info. If asked to "search the web", say plainly you can't \u2014 you can only fetch or open a URL they provide.` : "";
4135
+ return `Tools your background worker (Act) can actually use: ${names.join(", ")}. Read each name literally and match the request to a SPECIFIC tool; if none fits, you do NOT have that ability \u2014 say so honestly.` + webNote;
4131
4136
  }
4132
4137
  case "time":
4133
4138
  return (/* @__PURE__ */ new Date()).toString();