open-agents-ai 0.187.249 → 0.187.251
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 +31 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -270566,6 +270566,34 @@ TASK: ${task}` : task;
|
|
|
270566
270566
|
});
|
|
270567
270567
|
nextSelfEval = now + selfEvalInterval;
|
|
270568
270568
|
}
|
|
270569
|
+
const turnsRemaining = this.options.maxTurns - turn;
|
|
270570
|
+
if (turnsRemaining <= 3 && turnsRemaining > 0 && this._littlemanToolOutcomes.length >= 2) {
|
|
270571
|
+
const recentOutcomes = this._littlemanToolOutcomes.slice(-6);
|
|
270572
|
+
const recentSuccesses = recentOutcomes.filter((o2) => o2.succeeded).length;
|
|
270573
|
+
const uniqueResults = new Set(recentOutcomes.map((o2) => o2.preview.slice(0, 40))).size;
|
|
270574
|
+
const isActive = recentSuccesses >= 2 && uniqueResults >= 2;
|
|
270575
|
+
if (isActive) {
|
|
270576
|
+
const extension2 = 30;
|
|
270577
|
+
this.options.maxTurns += extension2;
|
|
270578
|
+
this.emit({
|
|
270579
|
+
type: "status",
|
|
270580
|
+
content: `Littleman triage: activity detected (${recentSuccesses} recent successes, ${uniqueResults} unique results) — extending turn limit by ${extension2} (now ${this.options.maxTurns})`,
|
|
270581
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
270582
|
+
});
|
|
270583
|
+
this.emit({
|
|
270584
|
+
type: "debug_littleman",
|
|
270585
|
+
turn,
|
|
270586
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
270587
|
+
content: `Timeout triage: EXTENDED by ${extension2} turns (active session detected)`,
|
|
270588
|
+
littlemanAction: {
|
|
270589
|
+
detection: "none",
|
|
270590
|
+
recentSuccesses,
|
|
270591
|
+
recentFailures: recentOutcomes.length - recentSuccesses,
|
|
270592
|
+
intervention: `Extended maxTurns to ${this.options.maxTurns}`
|
|
270593
|
+
}
|
|
270594
|
+
});
|
|
270595
|
+
}
|
|
270596
|
+
}
|
|
270569
270597
|
while (this.pendingUserMessages.length > 0) {
|
|
270570
270598
|
const userMsg = this.pendingUserMessages.shift();
|
|
270571
270599
|
const imagePattern = /\[IMAGE_BASE64:([^:]+):([^\]]+)\]/;
|
|
@@ -327012,8 +327040,8 @@ function createTaskCompleteTool(modelTier) {
|
|
|
327012
327040
|
if (_interactiveSessionActive) {
|
|
327013
327041
|
return {
|
|
327014
327042
|
success: false,
|
|
327015
|
-
output:
|
|
327016
|
-
error: `task_complete BLOCKED — interactive session still active. ${_interactiveSessionReason} You MUST continue the interaction loop until the session ends. Do NOT call task_complete until you receive a termination signal (e.g. "ended", "disconnected", "closed", SESSION_ACTIVE=false).
|
|
327043
|
+
output: `SESSION STILL ACTIVE. Call your next interaction tool NOW. Do NOT produce text — call a tool immediately to continue the session.`,
|
|
327044
|
+
error: `task_complete BLOCKED — interactive session still active. ${_interactiveSessionReason} You MUST continue the interaction loop until the session ends. Do NOT call task_complete until you receive a termination signal (e.g. "ended", "disconnected", "closed", SESSION_ACTIVE=false). YOUR NEXT ACTION: call the listening/polling tool to continue the session.`
|
|
327017
327045
|
};
|
|
327018
327046
|
}
|
|
327019
327047
|
try {
|
|
@@ -327033,7 +327061,7 @@ function createTaskCompleteTool(modelTier) {
|
|
|
327033
327061
|
error: `task_complete BLOCKED — ${incomplete.length} todo item(s) still incomplete. You must either:
|
|
327034
327062
|
1. Continue working on the remaining items, OR
|
|
327035
327063
|
2. If they're actually done, call todo_write with status='completed' for each one, THEN call task_complete again.
|
|
327036
|
-
3. If you are in an interactive session (call, chat, monitoring), RESUME THE LOOP —
|
|
327064
|
+
3. If you are in an interactive session (call, chat, monitoring), RESUME THE LOOP — call your next interaction tool NOW.
|
|
327037
327065
|
|
|
327038
327066
|
Incomplete items:
|
|
327039
327067
|
${incompleteList}${more}`
|
package/package.json
CHANGED