@holoscript/holoscript-agent 2.1.1 → 2.1.2
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 +8 -2
- package/dist/index.js.map +1 -1
- package/dist/runner.js +8 -2
- package/dist/runner.js.map +1 -1
- package/dist/supervisor.js +8 -2
- package/dist/supervisor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1735,12 +1735,18 @@ var AgentRunner = class {
|
|
|
1735
1735
|
}
|
|
1736
1736
|
if (productiveCallCount === 0 && toolsCalled.size > 0 && iters < MAX_TOOL_ITERS) {
|
|
1737
1737
|
iters++;
|
|
1738
|
+
if (messages.length > 0 && messages[messages.length - 1].role === "assistant") {
|
|
1739
|
+
messages.pop();
|
|
1740
|
+
}
|
|
1738
1741
|
messages.push({
|
|
1739
1742
|
role: "user",
|
|
1740
|
-
content:
|
|
1743
|
+
content: `You read data but did NOT call write_file. This is a TASK FAILURE unless you act now.
|
|
1744
|
+
Task: ${target.title}
|
|
1745
|
+
Required output path (from task description): ${target.description.match(/path[:\s]+([^\s\n,]+\.json)/i)?.[1] ?? "see task description"}
|
|
1746
|
+
Call write_file NOW. Embed ALL data from the tool result above into the content. Do NOT output any text \u2014 your ONLY valid response is a write_file tool call.`
|
|
1741
1747
|
});
|
|
1742
1748
|
const reResp = await provider.complete(
|
|
1743
|
-
{ messages, maxTokens: 8192, temperature: 0
|
|
1749
|
+
{ messages, maxTokens: 8192, temperature: 0, tools: activeTools },
|
|
1744
1750
|
identity.llmModel
|
|
1745
1751
|
);
|
|
1746
1752
|
aggUsage = {
|