agent.libx.js 0.93.20 → 0.93.22
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/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3752,6 +3752,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
3752
3752
|
this.turnDispatched = false;
|
|
3753
3753
|
this.turnBriefs.clear();
|
|
3754
3754
|
this.spokeThisTurn = false;
|
|
3755
|
+
this.voice.options.toolChoice = void 0;
|
|
3755
3756
|
}
|
|
3756
3757
|
/** preToolUse guard on the reflex: once it has dispatched this turn, a dispatch is "said my piece,
|
|
3757
3758
|
* now wait for the push" (CC's Task model). Block the temptations — TaskStatus polling and identical
|
|
@@ -4064,6 +4065,7 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
4064
4065
|
run: async ({ brief, label }) => {
|
|
4065
4066
|
this.turnDispatched = true;
|
|
4066
4067
|
this.turnBriefs.add(String(brief ?? ""));
|
|
4068
|
+
this.voice.options.toolChoice = "none";
|
|
4067
4069
|
const id = await this.dispatch(String(brief ?? ""), "act", label ? String(label) : void 0);
|
|
4068
4070
|
return `Acting on task ${id}. Acknowledge briefly; the result will arrive as a [task ${id} completed] event.`;
|
|
4069
4071
|
}
|
|
@@ -4084,6 +4086,7 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
4084
4086
|
run: async ({ brief, label }) => {
|
|
4085
4087
|
this.turnDispatched = true;
|
|
4086
4088
|
this.turnBriefs.add(String(brief ?? ""));
|
|
4089
|
+
this.voice.options.toolChoice = "none";
|
|
4087
4090
|
const id = await this.dispatch(String(brief ?? ""), "think", label ? String(label) : void 0);
|
|
4088
4091
|
return `Thinking on task ${id}. Acknowledge briefly; the result will arrive as a [task ${id} completed] event.`;
|
|
4089
4092
|
}
|
|
@@ -4127,7 +4130,12 @@ Another agent just implemented the above. Independently check the CURRENT state
|
|
|
4127
4130
|
case "capabilities": {
|
|
4128
4131
|
const actTools = this.options.actOptions?.tools ?? [];
|
|
4129
4132
|
const names = actTools.map((t) => t.name);
|
|
4130
|
-
|
|
4133
|
+
if (!names.length)
|
|
4134
|
+
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.";
|
|
4135
|
+
const webish = names.some((n) => /WebFetch|browser/i.test(n));
|
|
4136
|
+
const hasSearch = names.some((n) => /search/i.test(n) && !/WebFetch/i.test(n));
|
|
4137
|
+
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.` : "";
|
|
4138
|
+
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
4139
|
}
|
|
4132
4140
|
case "time":
|
|
4133
4141
|
return (/* @__PURE__ */ new Date()).toString();
|