@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/runner.js
CHANGED
|
@@ -950,12 +950,18 @@ var AgentRunner = class {
|
|
|
950
950
|
}
|
|
951
951
|
if (productiveCallCount === 0 && toolsCalled.size > 0 && iters < MAX_TOOL_ITERS) {
|
|
952
952
|
iters++;
|
|
953
|
+
if (messages.length > 0 && messages[messages.length - 1].role === "assistant") {
|
|
954
|
+
messages.pop();
|
|
955
|
+
}
|
|
953
956
|
messages.push({
|
|
954
957
|
role: "user",
|
|
955
|
-
content:
|
|
958
|
+
content: `You read data but did NOT call write_file. This is a TASK FAILURE unless you act now.
|
|
959
|
+
Task: ${target.title}
|
|
960
|
+
Required output path (from task description): ${target.description.match(/path[:\s]+([^\s\n,]+\.json)/i)?.[1] ?? "see task description"}
|
|
961
|
+
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.`
|
|
956
962
|
});
|
|
957
963
|
const reResp = await provider.complete(
|
|
958
|
-
{ messages, maxTokens: 8192, temperature: 0
|
|
964
|
+
{ messages, maxTokens: 8192, temperature: 0, tools: activeTools },
|
|
959
965
|
identity.llmModel
|
|
960
966
|
);
|
|
961
967
|
aggUsage = {
|