@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/supervisor.js
CHANGED
|
@@ -1188,12 +1188,18 @@ var AgentRunner = class {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
if (productiveCallCount === 0 && toolsCalled.size > 0 && iters < MAX_TOOL_ITERS) {
|
|
1190
1190
|
iters++;
|
|
1191
|
+
if (messages.length > 0 && messages[messages.length - 1].role === "assistant") {
|
|
1192
|
+
messages.pop();
|
|
1193
|
+
}
|
|
1191
1194
|
messages.push({
|
|
1192
1195
|
role: "user",
|
|
1193
|
-
content:
|
|
1196
|
+
content: `You read data but did NOT call write_file. This is a TASK FAILURE unless you act now.
|
|
1197
|
+
Task: ${target.title}
|
|
1198
|
+
Required output path (from task description): ${target.description.match(/path[:\s]+([^\s\n,]+\.json)/i)?.[1] ?? "see task description"}
|
|
1199
|
+
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.`
|
|
1194
1200
|
});
|
|
1195
1201
|
const reResp = await provider.complete(
|
|
1196
|
-
{ messages, maxTokens: 8192, temperature: 0
|
|
1202
|
+
{ messages, maxTokens: 8192, temperature: 0, tools: activeTools },
|
|
1197
1203
|
identity.llmModel
|
|
1198
1204
|
);
|
|
1199
1205
|
aggUsage = {
|