open-agents-ai 0.187.246 → 0.187.248

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 CHANGED
@@ -270300,6 +270300,13 @@ ${body}`;
270300
270300
  const window2 = recentToolCalls.slice(-repetitionWindow);
270301
270301
  const uniqueKeys = new Set(window2.map((tc) => `${tc.name}:${tc.argsKey}`));
270302
270302
  const ratio = 1 - uniqueKeys.size / window2.length;
270303
+ if (ratio > 0.4 && this._littlemanToolOutcomes.length >= 3) {
270304
+ const recentOutcomes = this._littlemanToolOutcomes.slice(-6);
270305
+ const uniquePreviews = new Set(recentOutcomes.map((o2) => o2.preview.slice(0, 40)));
270306
+ if (uniquePreviews.size >= 3) {
270307
+ return Math.max(0, ratio - 0.4);
270308
+ }
270309
+ }
270303
270310
  return ratio;
270304
270311
  }
270305
270312
  /**
@@ -271057,7 +271064,7 @@ ${memoryLines.join("\n")}`
271057
271064
  }
271058
271065
  const toolStart = performance.now();
271059
271066
  toolCallCount++;
271060
- const argsKey = Object.entries(tc.arguments ?? {}).sort(([a2], [b]) => a2.localeCompare(b)).map(([k, v]) => `${k}=${typeof v === "string" ? v.slice(0, 80) : JSON.stringify(v)}`).join(",");
271067
+ const argsKey = Object.entries(tc.arguments ?? {}).sort(([a2], [b]) => a2.localeCompare(b)).map(([k, v]) => `${k}=${typeof v === "string" ? v.slice(0, 160) : JSON.stringify(v).slice(0, 160)}`).join(",");
271061
271068
  toolCallLog.push({ name: tc.name, argsKey, turn, timestampMs: Date.now() });
271062
271069
  const budgetRemaining = toolCallBudget.get(tc.name);
271063
271070
  if (budgetRemaining !== void 0) {
@@ -327005,6 +327012,7 @@ function createTaskCompleteTool(modelTier) {
327005
327012
  error: `task_complete BLOCKED — ${incomplete.length} todo item(s) still incomplete. You must either:
327006
327013
  1. Continue working on the remaining items, OR
327007
327014
  2. If they're actually done, call todo_write with status='completed' for each one, THEN call task_complete again.
327015
+ 3. If you are in an interactive session (call, chat, monitoring), RESUME THE LOOP — do not stall.
327008
327016
 
327009
327017
  Incomplete items:
327010
327018
  ${incompleteList}${more}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.246",
3
+ "version": "0.187.248",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -64,6 +64,14 @@ For tasks requiring 3+ tool calls — plan before acting:
64
64
  7. For multi-file changes: read all relevant files first, plan the change order (dependencies before dependents), then execute in order.
65
65
  8. COMPLETE: Call task_complete when ALL steps are verified done
66
66
 
67
+ ## Interactive / Long-Running Sessions
68
+
69
+ For ongoing interactions (phone calls, live chat, polling, monitoring, streaming):
70
+ - These are LOOPS — do NOT call task_complete until the remote side signals the session ended (e.g. "ended", "disconnected", "closed", error, hangup). The user expects you to keep going.
71
+ - When the other party asks you to look something up or perform an action: acknowledge first ("One moment, let me check"), then research, then deliver the answer. Emit the acknowledgment and research tools together when possible — they run concurrently.
72
+ - If task_complete is blocked or rejected, RESUME the interaction loop immediately. Do not stall or give up.
73
+ - Each turn of a conversation is NOT a separate task. One session = one task. Keep looping until termination signal.
74
+
67
75
  ## Document Generation Strategy
68
76
 
69
77
  For long documents (reports, SOWs, proposals, contracts, plans):
@@ -37,7 +37,11 @@ Rules:
37
37
 
38
38
  When working with tool results, write down any important information you might need later in your response, as older tool results may be cleared to save context space.
39
39
 
40
- Real-time interactions (phone calls, live chat): When a caller asks you to look something up, ALWAYS acknowledge first, THEN research. Send multiple tool calls in one response when possible — they run concurrently. Example: emit shell(say "Let me look that up") AND web_search("query") together. The ack reaches the caller while the search runs.
40
+ Interactive loops (phone calls, live chat, polling, monitoring):
41
+ - These are ONGOING — do NOT call task_complete until the remote side signals completion (e.g. "ended", "disconnected", "closed", exit code). If the user said "keep going" or "until I stop", that means LOOP until the session ends.
42
+ - When the other party asks you to look something up: acknowledge FIRST ("let me check"), THEN research, THEN deliver the answer. Send multiple tool calls in one response when possible — they run concurrently.
43
+ - If task_complete is blocked or fails, do NOT stall — resume the interaction loop immediately. The block means you have more work to do.
44
+ - Each turn of a conversation is NOT a separate task. One conversation = one task. Keep looping.
41
45
 
42
46
  Calculations — EXECUTE, never guess:
43
47
  - For ANY math with 2+ operations: use `repl_exec(code="print(847.50 * 0.15)")` or `shell`. Python is exact. In-head arithmetic is not.