open-agents-ai 0.187.208 → 0.187.210
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 +63 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -270359,7 +270359,13 @@ ${memoryLines.join("\n")}`
|
|
|
270359
270359
|
"skill_execute",
|
|
270360
270360
|
"sub_agent",
|
|
270361
270361
|
"priority_delegate",
|
|
270362
|
-
"ask_user"
|
|
270362
|
+
"ask_user",
|
|
270363
|
+
// WO-TASK-02 — todo_write is a state-write tool. Calling it twice
|
|
270364
|
+
// with the same args is idempotent (it just re-stores the same
|
|
270365
|
+
// list) but the dedup detector was flagging it as a wasted call
|
|
270366
|
+
// and blocking the planning workflow. The agent uses todo_write
|
|
270367
|
+
// as its primary checkpoint mechanism so it MUST always execute.
|
|
270368
|
+
"todo_write"
|
|
270363
270369
|
].includes(tc.name);
|
|
270364
270370
|
const cachedResult = recentToolResults.get(toolFingerprint);
|
|
270365
270371
|
if (isReadLike && cachedResult !== void 0) {
|
|
@@ -281673,8 +281679,40 @@ function formatToolArgs(toolName, args, verbose) {
|
|
|
281673
281679
|
const count = opts ? ` (${opts.length} options)` : "";
|
|
281674
281680
|
return `${q}${c3.dim(count)}`;
|
|
281675
281681
|
}
|
|
281682
|
+
case "todo_write": {
|
|
281683
|
+
const todos = args["todos"];
|
|
281684
|
+
if (!Array.isArray(todos)) return "";
|
|
281685
|
+
const counts = { p: 0, i: 0, c: 0, b: 0 };
|
|
281686
|
+
for (const t2 of todos) {
|
|
281687
|
+
if (t2?.status === "completed") counts.c++;
|
|
281688
|
+
else if (t2?.status === "in_progress") counts.i++;
|
|
281689
|
+
else if (t2?.status === "blocked") counts.b++;
|
|
281690
|
+
else counts.p++;
|
|
281691
|
+
}
|
|
281692
|
+
const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}〇${counts.b > 0 ? ` ${counts.b}◍` : ""})`;
|
|
281693
|
+
if (verbose) {
|
|
281694
|
+
const current = todos.find((t2) => t2?.status === "in_progress");
|
|
281695
|
+
if (current?.content) {
|
|
281696
|
+
return `${summary} — ${truncStr(current.content, maxArg - summary.length - 4)}`;
|
|
281697
|
+
}
|
|
281698
|
+
}
|
|
281699
|
+
return summary;
|
|
281700
|
+
}
|
|
281701
|
+
case "todo_read":
|
|
281702
|
+
return "";
|
|
281676
281703
|
default:
|
|
281677
|
-
return Object.entries(args).map(([k, v]) =>
|
|
281704
|
+
return Object.entries(args).map(([k, v]) => {
|
|
281705
|
+
let valStr;
|
|
281706
|
+
if (v === null || v === void 0) valStr = String(v);
|
|
281707
|
+
else if (typeof v === "object") {
|
|
281708
|
+
try {
|
|
281709
|
+
valStr = JSON.stringify(v);
|
|
281710
|
+
} catch {
|
|
281711
|
+
valStr = String(v);
|
|
281712
|
+
}
|
|
281713
|
+
} else valStr = String(v);
|
|
281714
|
+
return `${k}=${truncStr(valStr, Math.max(30, maxArg / 3))}`;
|
|
281715
|
+
}).join(", ");
|
|
281678
281716
|
}
|
|
281679
281717
|
}
|
|
281680
281718
|
function truncStr(s2, max) {
|
|
@@ -290278,7 +290316,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
290278
290316
|
}
|
|
290279
290317
|
/** Number of visible content rows */
|
|
290280
290318
|
get contentHeight() {
|
|
290281
|
-
|
|
290319
|
+
const L = layout();
|
|
290320
|
+
const tasksRows = L.tasksHeight;
|
|
290321
|
+
const SPACER_ROWS = 1;
|
|
290322
|
+
return Math.max(
|
|
290323
|
+
1,
|
|
290324
|
+
termRows() - (this.scrollRegionTop - 1) - this._currentFooterHeight - tasksRows - SPACER_ROWS
|
|
290325
|
+
);
|
|
290282
290326
|
}
|
|
290283
290327
|
/** Whether user has scrolled back from live */
|
|
290284
290328
|
get isScrolledBack() {
|
|
@@ -291774,12 +291818,13 @@ ${tuiBgSeq()}`);
|
|
|
291774
291818
|
const saveFooter = lastRenderedLines;
|
|
291775
291819
|
for (let i2 = 0; i2 < saveFooter; i2++) overlayWrite("\x1B[B");
|
|
291776
291820
|
overlayWrite("\x1B[2A");
|
|
291777
|
-
overlayWrite("\x1B[2K");
|
|
291778
291821
|
const before = inputBuf.slice(0, inputCursor);
|
|
291779
291822
|
const after = inputBuf.slice(inputCursor);
|
|
291780
|
-
overlayWrite(
|
|
291781
|
-
|
|
291782
|
-
|
|
291823
|
+
overlayWrite(
|
|
291824
|
+
`\r\x1B[2K ${selectColors.cyan("›")} ${selectColors.bold(prompt)} ${before}\x1B[7m${after.charAt(0) || " "}\x1B[27m${after.slice(1)}`
|
|
291825
|
+
);
|
|
291826
|
+
overlayWrite(`
|
|
291827
|
+
\r\x1B[2K ${selectColors.dim("Enter confirm Esc cancel")}`);
|
|
291783
291828
|
overlayWrite("\n");
|
|
291784
291829
|
}
|
|
291785
291830
|
function onInputData(chunk) {
|
|
@@ -298786,18 +298831,19 @@ var init_voice = __esm({
|
|
|
298786
298831
|
});
|
|
298787
298832
|
let stdout = "";
|
|
298788
298833
|
let stderr = "";
|
|
298789
|
-
|
|
298834
|
+
const procAny = proc;
|
|
298835
|
+
procAny.stdout.on("data", (d2) => {
|
|
298790
298836
|
stdout += d2.toString();
|
|
298791
298837
|
});
|
|
298792
|
-
|
|
298838
|
+
procAny.stderr.on("data", (d2) => {
|
|
298793
298839
|
stderr += d2.toString();
|
|
298794
298840
|
});
|
|
298795
|
-
|
|
298841
|
+
procAny.on("error", reject);
|
|
298796
298842
|
const timer = setTimeout(() => {
|
|
298797
|
-
|
|
298843
|
+
procAny.kill("SIGKILL");
|
|
298798
298844
|
reject(new Error(`Timeout after ${timeoutMs}ms`));
|
|
298799
298845
|
}, timeoutMs);
|
|
298800
|
-
|
|
298846
|
+
procAny.on("close", (code8) => {
|
|
298801
298847
|
clearTimeout(timer);
|
|
298802
298848
|
if (code8 === 0) resolve39(stdout.trim());
|
|
298803
298849
|
else reject(new Error(stderr.slice(0, 300) || `Exit code ${code8}`));
|
|
@@ -312931,11 +312977,11 @@ function applyHeightChange(nextHeight) {
|
|
|
312931
312977
|
const changed = setTasksHeight(nextHeight);
|
|
312932
312978
|
if (changed) {
|
|
312933
312979
|
notifyLayoutResize();
|
|
312934
|
-
|
|
312935
|
-
|
|
312936
|
-
|
|
312937
|
-
|
|
312938
|
-
|
|
312980
|
+
}
|
|
312981
|
+
if (_onResizeChange) {
|
|
312982
|
+
try {
|
|
312983
|
+
_onResizeChange(nextHeight);
|
|
312984
|
+
} catch {
|
|
312939
312985
|
}
|
|
312940
312986
|
}
|
|
312941
312987
|
}
|
package/package.json
CHANGED