open-agents-ai 0.187.294 → 0.187.296
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 +46 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -269988,6 +269988,14 @@ ${graphSummary}`,
|
|
|
269988
269988
|
tokenEstimate: Math.ceil(planSkeleton.length / 4)
|
|
269989
269989
|
});
|
|
269990
269990
|
}
|
|
269991
|
+
const todosCompact = this.buildIncompleteTodosSection();
|
|
269992
|
+
if (todosCompact) {
|
|
269993
|
+
sections.push({
|
|
269994
|
+
label: "c_todos",
|
|
269995
|
+
content: todosCompact,
|
|
269996
|
+
tokenEstimate: Math.ceil(todosCompact.length / 4)
|
|
269997
|
+
});
|
|
269998
|
+
}
|
|
269991
269999
|
const assembled = sections.map((s2) => s2.content).join("");
|
|
269992
270000
|
const totalTokenEstimate = sections.reduce((sum, s2) => sum + s2.tokenEstimate, 0);
|
|
269993
270001
|
return {
|
|
@@ -270055,6 +270063,8 @@ ${graphSummary}`,
|
|
|
270055
270063
|
*/
|
|
270056
270064
|
buildTodoCompletionGuard(openItems) {
|
|
270057
270065
|
const list = openItems.slice(0, 20).map((t2, i2) => `${i2 + 1}. [${t2.status}] ${t2.content}`).join("\n");
|
|
270066
|
+
const full = this.readSessionTodos() || [];
|
|
270067
|
+
const fullJson = JSON.stringify({ todos: full }, null, 2);
|
|
270058
270068
|
return `[TODO COMPLETION REQUIRED]
|
|
270059
270069
|
You attempted to call task_complete, but the session checklist still has ${openItems.length} open item(s).
|
|
270060
270070
|
Before finishing, do ALL of the following:
|
|
@@ -270063,9 +270073,12 @@ Before finishing, do ALL of the following:
|
|
|
270063
270073
|
3) After all items are truly implemented, call todo_write to mark every item as "completed".
|
|
270064
270074
|
4) ONLY AFTER updating the todo list, call task_complete with a concise final summary.
|
|
270065
270075
|
|
|
270066
|
-
|
|
270076
|
+
Open items (incomplete only):
|
|
270067
270077
|
${list}
|
|
270068
270078
|
|
|
270079
|
+
Your NEXT RESPONSE MUST be a tool call. Use this JSON SEED (FULL list from disk) and update ONLY the items you verified as completed:
|
|
270080
|
+
todo_write(${fullJson})
|
|
270081
|
+
|
|
270069
270082
|
Respond with a short verification section in this shape (example):
|
|
270070
270083
|
- verify: [{ name: "<exact item text>", completed: true|false, evidence: "<objective proof>" }, ...]
|
|
270071
270084
|
- next: "what you will do next OR the exact todo_write(...) call to update statuses"
|
|
@@ -270134,6 +270147,34 @@ Do NOT call task_complete until all items are marked completed via todo_write.`;
|
|
|
270134
270147
|
${body}
|
|
270135
270148
|
</plan-state>` : `
|
|
270136
270149
|
|
|
270150
|
+
${body}`;
|
|
270151
|
+
}
|
|
270152
|
+
/**
|
|
270153
|
+
* Build a compact, authoritative list of INCOMPLETE todos from the
|
|
270154
|
+
* session todo file. Injected every turn for recency so the model
|
|
270155
|
+
* never needs to reconstruct the list and accidentally targets the
|
|
270156
|
+
* wrong item (e.g., re-marking the first instead of the last).
|
|
270157
|
+
*
|
|
270158
|
+
* Only includes items with status != completed. Capped to 12 lines.
|
|
270159
|
+
*/
|
|
270160
|
+
buildIncompleteTodosSection() {
|
|
270161
|
+
const todos = this.readSessionTodos();
|
|
270162
|
+
if (!todos || todos.length === 0)
|
|
270163
|
+
return "";
|
|
270164
|
+
const incomplete = todos.filter((t2) => t2.status !== "completed");
|
|
270165
|
+
if (incomplete.length === 0)
|
|
270166
|
+
return "";
|
|
270167
|
+
const lines = incomplete.slice(0, 12).map((t2, i2) => `${i2 + 1}. [${t2.status}] ${t2.content}`);
|
|
270168
|
+
const tier = this.options.modelTier ?? "large";
|
|
270169
|
+
const useXml = tier === "small" || tier === "medium";
|
|
270170
|
+
const body = lines.join("\n");
|
|
270171
|
+
return useXml ? `
|
|
270172
|
+
|
|
270173
|
+
<todo-incomplete>
|
|
270174
|
+
${body}
|
|
270175
|
+
</todo-incomplete>` : `
|
|
270176
|
+
|
|
270177
|
+
[INCOMPLETE TODOS]
|
|
270137
270178
|
${body}`;
|
|
270138
270179
|
}
|
|
270139
270180
|
// -------------------------------------------------------------------------
|
|
@@ -330814,9 +330855,10 @@ ${entry.fullContent}`
|
|
|
330814
330855
|
case "debug_littleman":
|
|
330815
330856
|
if (event.littlemanAction) {
|
|
330816
330857
|
const lm = event.littlemanAction;
|
|
330817
|
-
|
|
330818
|
-
|
|
330819
|
-
|
|
330858
|
+
if (lm.intervention) {
|
|
330859
|
+
const simple = `⚠ ${lm.intervention}`;
|
|
330860
|
+
contentWrite(() => renderInfo2(simple));
|
|
330861
|
+
}
|
|
330820
330862
|
if (lm.details) {
|
|
330821
330863
|
littlemanBuffer.push(lm.details);
|
|
330822
330864
|
if (littlemanBuffer.length > 50) littlemanBuffer.splice(0, littlemanBuffer.length - 50);
|
package/package.json
CHANGED