open-agents-ai 0.31.8 → 0.32.0

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11403,7 +11403,7 @@ Rules:
11403
11403
  pause() {
11404
11404
  if (!this._paused) {
11405
11405
  this._paused = true;
11406
- this.emit({ type: "compaction", content: "Task paused by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
11406
+ this.emit({ type: "status", content: "Task paused by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
11407
11407
  }
11408
11408
  }
11409
11409
  /**
@@ -11412,7 +11412,7 @@ Rules:
11412
11412
  resume() {
11413
11413
  if (this._paused) {
11414
11414
  this._paused = false;
11415
- this.emit({ type: "compaction", content: "Task resumed by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
11415
+ this.emit({ type: "status", content: "Task resumed by user.", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
11416
11416
  if (this._pauseResolve) {
11417
11417
  this._pauseResolve();
11418
11418
  this._pauseResolve = null;
@@ -11435,7 +11435,7 @@ Rules:
11435
11435
  requestCompaction(strategy = "default") {
11436
11436
  this._pendingCompaction = strategy;
11437
11437
  this.emit({
11438
- type: "compaction",
11438
+ type: "status",
11439
11439
  content: `Manual compaction requested (strategy: ${strategy})`,
11440
11440
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
11441
11441
  });
@@ -11554,7 +11554,7 @@ TASK: ${task}` : task }
11554
11554
  const elapsed = now - start;
11555
11555
  const repetitionScore = this.detectRepetition(toolCallLog);
11556
11556
  this.emit({
11557
- type: "compaction",
11557
+ type: "status",
11558
11558
  content: `Health check #${selfEvalCount} (${(elapsed / 6e4).toFixed(1)}m elapsed) \u2014 assessing progress`,
11559
11559
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
11560
11560
  });
@@ -11815,7 +11815,7 @@ ${result.output.length > maxLen ? this.foldOutput(result.output, maxLen) : resul
11815
11815
  bruteForceCycle++;
11816
11816
  const totalTurns = messages.filter((m) => m.role === "assistant").length;
11817
11817
  this.emit({
11818
- type: "compaction",
11818
+ type: "status",
11819
11819
  content: `Re-engaging \u2014 cycle ${bruteForceCycle} (${totalTurns} turns, ${toolCallCount} tool calls so far)`,
11820
11820
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
11821
11821
  });
@@ -11857,7 +11857,7 @@ You have ${this.options.maxTurns} more turns. Continue making progress. Call tas
11857
11857
  const elapsed = bfNow - start;
11858
11858
  const repetitionScore = this.detectRepetition(toolCallLog);
11859
11859
  this.emit({
11860
- type: "compaction",
11860
+ type: "status",
11861
11861
  content: `Health check #${selfEvalCount} (${(elapsed / 6e4).toFixed(1)}m elapsed) \u2014 assessing progress`,
11862
11862
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
11863
11863
  });
@@ -12861,8 +12861,8 @@ ${transcript}`
12861
12861
  ];
12862
12862
  try {
12863
12863
  this.emit({
12864
- type: "compaction",
12865
- content: "Generating structured summary via LLM...",
12864
+ type: "status",
12865
+ content: "Compacting context \u2014 generating structured summary via LLM...",
12866
12866
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
12867
12867
  });
12868
12868
  const response = await this.backend.chatCompletion({
@@ -12924,7 +12924,7 @@ ${transcript}`
12924
12924
  return null;
12925
12925
  const delay = baseDelayMs * Math.pow(2, attempt - 1);
12926
12926
  this.emit({
12927
- type: "compaction",
12927
+ type: "status",
12928
12928
  content: `Backend error \u2014 retrying in ${(delay / 1e3).toFixed(0)}s (attempt ${attempt}/${maxRetries})`,
12929
12929
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
12930
12930
  });
@@ -12934,7 +12934,7 @@ ${transcript}`
12934
12934
  try {
12935
12935
  const response = this.options.streamEnabled && this.hasStreamingSupport() ? await this.streamingRequest(chatRequest, turn) : await this.backend.chatCompletion(chatRequest);
12936
12936
  this.emit({
12937
- type: "compaction",
12937
+ type: "status",
12938
12938
  content: `Backend recovered on attempt ${attempt}`,
12939
12939
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
12940
12940
  });
@@ -17833,6 +17833,7 @@ async function handleUpdate(subcommand, ctx) {
17833
17833
  process.stdout.write(` ${c2.green("\u2714")} Installed v${info.latestVersion}. Reloading...
17834
17834
 
17835
17835
  `);
17836
+ ctx.contextSave?.();
17836
17837
  const hadActiveTask = ctx.savePendingTaskState?.() ?? false;
17837
17838
  const resumeFlag = hadActiveTask ? "1" : "update-only";
17838
17839
  const { execPath, argv } = process;
@@ -22390,6 +22391,9 @@ ${entry.fullContent}`
22390
22391
  case "compaction":
22391
22392
  contentWrite(() => renderWarning(`Context compacted: ${event.content}`));
22392
22393
  break;
22394
+ case "status":
22395
+ contentWrite(() => renderInfo(event.content ?? ""));
22396
+ break;
22393
22397
  case "error":
22394
22398
  contentWrite(() => renderError(event.content ?? "Unknown error"));
22395
22399
  break;
@@ -23119,7 +23123,10 @@ async function startInteractive(config, repoPath) {
23119
23123
  const pendingTask = loadPendingTask(repoRoot);
23120
23124
  if (pendingTask) {
23121
23125
  setTimeout(() => {
23126
+ const sessionCtx = buildContextRestorePrompt(repoRoot);
23122
23127
  const resumeContext = [
23128
+ sessionCtx ? `[SESSION CONTEXT RESTORED]
23129
+ ${sessionCtx}` : "",
23123
23130
  `[RESUMED AFTER UPDATE] Original task: ${pendingTask.prompt}`,
23124
23131
  pendingTask.progressSummary ? `Progress so far: ${pendingTask.progressSummary}` : "",
23125
23132
  pendingTask.filesModified.length > 0 ? `Files modified before update: ${pendingTask.filesModified.join(", ")}` : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.31.8",
3
+ "version": "0.32.0",
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",