open-agents-ai 0.30.5 → 0.30.7

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
@@ -14165,7 +14165,7 @@ function loadRecentSessions(repoRoot, limit = 5) {
14165
14165
  if (!existsSync14(historyDir))
14166
14166
  return [];
14167
14167
  try {
14168
- const files = readdirSync7(historyDir).filter((f) => f.endsWith(".json")).map((f) => {
14168
+ const files = readdirSync7(historyDir).filter((f) => f.endsWith(".json") && f !== "pending-task.json").map((f) => {
14169
14169
  const stat5 = statSync6(join21(historyDir, f));
14170
14170
  return { file: f, mtime: stat5.mtimeMs };
14171
14171
  }).sort((a, b) => b.mtime - a.mtime).slice(0, limit);
@@ -14175,7 +14175,7 @@ function loadRecentSessions(repoRoot, limit = 5) {
14175
14175
  } catch {
14176
14176
  return null;
14177
14177
  }
14178
- }).filter((s) => s !== null);
14178
+ }).filter((s) => s !== null && typeof s.startedAt === "string" && typeof s.task === "string");
14179
14179
  } catch {
14180
14180
  return [];
14181
14181
  }
@@ -16208,9 +16208,11 @@ function loadSessionHistory(repoRoot) {
16208
16208
  return "";
16209
16209
  const lines = ["Recent tasks in this project:"];
16210
16210
  for (const s of sessions) {
16211
+ if (!s.startedAt || !s.task)
16212
+ continue;
16211
16213
  const status = s.completed ? "completed" : "incomplete";
16212
16214
  const date = s.startedAt.split("T")[0];
16213
- lines.push(`- [${date}] ${s.task.slice(0, 80)} (${status}, ${s.turns} turns)`);
16215
+ lines.push(`- [${date}] ${s.task.slice(0, 80)} (${status}, ${s.turns ?? 0} turns)`);
16214
16216
  if (s.summary) {
16215
16217
  lines.push(` Summary: ${s.summary.slice(0, 120)}`);
16216
16218
  }
@@ -203,12 +203,26 @@ function doReinstall() {
203
203
  }
204
204
  console.log("");
205
205
  console.log(" ┌─────────────────────────────────────────────────┐");
206
- console.log(" │ Done! Open a new terminal, then run: oa │");
206
+ console.log(" │ Done! Launching open-agents... │");
207
207
  console.log(" └─────────────────────────────────────────────────┘");
208
208
  console.log("");
209
209
  rl.close();
210
- // Exit 1 to stop the OLD npm from continuing to install broken deps
211
- process.exit(1);
210
+
211
+ // Auto-source shell config and launch oa — no "open a new terminal" needed
212
+ var rcFile2 = shell.indexOf("zsh") !== -1 ? "~/.zshrc" : "~/.bashrc";
213
+ var relaunchCmd = 'export NVM_DIR="' + nvmDir + '" && ' +
214
+ '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && ' +
215
+ "source " + rcFile2 + " 2>/dev/null; " +
216
+ "exec oa";
217
+ try {
218
+ childProcess.execSync(shell + " -c '" + relaunchCmd + "'", {
219
+ stdio: "inherit",
220
+ env: process.env,
221
+ });
222
+ } catch (e2) {
223
+ console.log("\n If oa didn't launch, run: source " + rcFile2 + " && oa\n");
224
+ }
225
+ process.exit(0);
212
226
  });
213
227
  }
214
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.30.5",
3
+ "version": "0.30.7",
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",