open-agents-ai 0.185.50 → 0.185.52

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 +113 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -41418,21 +41418,42 @@ var init_daemon_registry = __esm({
41418
41418
  d.status = "stopped";
41419
41419
  }
41420
41420
  }
41421
- /** Render the monitoring bar as an ANSI string */
41421
+ /**
41422
+ * Render the monitoring bar as an ANSI string.
41423
+ *
41424
+ * Each button is rendered with a slightly lighter grey background (236)
41425
+ * against the panel background (234), giving a subtle raised-button look
41426
+ * without bracket characters. Status dot is colored inline.
41427
+ *
41428
+ * Daemon buttons: magenta text on 236 bg
41429
+ * Call agent buttons: yellow text on 236 bg
41430
+ * Task agent buttons: cyan text on 236 bg
41431
+ */
41422
41432
  renderBar(width) {
41423
41433
  this.refresh();
41434
+ const BTN_BG = "\x1B[48;5;236m";
41435
+ const RST = "\x1B[0m";
41424
41436
  let bar = "";
41425
41437
  for (const [, d] of this.daemons) {
41426
- const dot = d.status === "running" ? "\x1B[32m\u25CF\x1B[0m" : d.status === "error" ? "\x1B[31m\u25CF\x1B[0m" : d.status === "starting" ? "\x1B[33m\u25CF\x1B[0m" : "\x1B[31m\u25CF\x1B[0m";
41427
- bar += ` \x1B[35m[${d.name} ${dot}\x1B[35m]\x1B[0m`;
41438
+ const dotColor = d.status === "running" ? "32" : (
41439
+ // green
41440
+ d.status === "error" ? "31" : (
41441
+ // red
41442
+ d.status === "starting" ? "33" : (
41443
+ // yellow
41444
+ "31"
41445
+ )
41446
+ )
41447
+ );
41448
+ bar += ` ${BTN_BG}\x1B[35m ${d.name} \x1B[${dotColor}m\u25CF\x1B[35m ${RST}`;
41428
41449
  }
41429
41450
  for (const [, a] of this.subAgents) {
41430
41451
  if (a.status === "completed")
41431
41452
  continue;
41432
- const dot = a.status === "active" ? "\x1B[32m\u25CF\x1B[0m" : "\x1B[33m\u25CF\x1B[0m";
41433
- const color = a.type === "call" ? "\x1B[33m" : "\x1B[36m";
41453
+ const dotColor = a.status === "active" ? "32" : "33";
41454
+ const fgColor = a.type === "call" ? "33" : "36";
41434
41455
  const label = `${a.type}:${a.id.length > 6 ? a.id.slice(-6) : a.id}`;
41435
- bar += ` ${color}[${label} ${dot}${color}]\x1B[0m`;
41456
+ bar += ` ${BTN_BG}\x1B[${fgColor}m ${label} \x1B[${dotColor}m\u25CF\x1B[${fgColor}m ${RST}`;
41436
41457
  }
41437
41458
  if (!bar) {
41438
41459
  return " \x1B[38;5;240m\u2800 no active daemons\x1B[0m";
@@ -62405,6 +62426,8 @@ var init_status_bar = __esm({
62405
62426
  /** Whether agent is actively processing (braille animation) */
62406
62427
  _processing = false;
62407
62428
  _brailleSpinner = new BrailleSpinner();
62429
+ /** Slow refresh timer for monitoring bar when braille spinner is off */
62430
+ _monitorTimer = null;
62408
62431
  /** Current dynamic footer height (min 5: buffer + topSep + 1 input line + bottomSep + metrics) */
62409
62432
  _currentFooterHeight = 3;
62410
62433
  // input(1) + braille(1) + metrics(1)
@@ -62482,6 +62505,10 @@ var init_status_bar = __esm({
62482
62505
  return;
62483
62506
  this._processing = active;
62484
62507
  if (active) {
62508
+ if (this._monitorTimer) {
62509
+ clearInterval(this._monitorTimer);
62510
+ this._monitorTimer = null;
62511
+ }
62485
62512
  this._brailleSpinner.setMetrics({ isStreaming: true });
62486
62513
  this._brailleSpinner.start(() => {
62487
62514
  if (this.active)
@@ -62492,8 +62519,42 @@ var init_status_bar = __esm({
62492
62519
  this._brailleSpinner.stop();
62493
62520
  if (this.active)
62494
62521
  this.renderBufferLine();
62522
+ this.ensureMonitorTimer();
62495
62523
  }
62496
62524
  }
62525
+ /**
62526
+ * Ensure the monitoring timer is running when the registry has entries
62527
+ * and the braille spinner is not active. Refreshes the buffer line
62528
+ * every 2 seconds so status dots update (running → stopped, etc.).
62529
+ */
62530
+ ensureMonitorTimer() {
62531
+ if (this._monitorTimer)
62532
+ return;
62533
+ if (!registry.hasEntries)
62534
+ return;
62535
+ if (this._brailleSpinner.isRunning)
62536
+ return;
62537
+ this._monitorTimer = setInterval(() => {
62538
+ if (!this.active)
62539
+ return;
62540
+ if (this._brailleSpinner.isRunning) {
62541
+ if (this._monitorTimer) {
62542
+ clearInterval(this._monitorTimer);
62543
+ this._monitorTimer = null;
62544
+ }
62545
+ return;
62546
+ }
62547
+ if (!registry.hasEntries) {
62548
+ if (this._monitorTimer) {
62549
+ clearInterval(this._monitorTimer);
62550
+ this._monitorTimer = null;
62551
+ }
62552
+ this.renderBufferLine();
62553
+ return;
62554
+ }
62555
+ this.renderBufferLine();
62556
+ }, 2e3);
62557
+ }
62497
62558
  /**
62498
62559
  * Set the active tool for the braille spinner animation.
62499
62560
  * Changes the spinner's color theme and wave speed to reflect the tool category.
@@ -68267,10 +68328,27 @@ async function startInteractive(config, repoPath) {
68267
68328
  banner.onAfterRender = () => statusBar.renderHeaderButtons();
68268
68329
  if (_fullSubAgentToolRef) {
68269
68330
  _fullSubAgentToolRef.setCallbacks({
68270
- onViewRegister: (id, label, type) => statusBar.registerAgentView(id, label, type),
68331
+ onViewRegister: (id, label, type) => {
68332
+ statusBar.registerAgentView(id, label, type);
68333
+ registry.registerAgent({
68334
+ id,
68335
+ type: type === "full" ? "task" : "research",
68336
+ startedAt: Date.now(),
68337
+ status: "active",
68338
+ turns: 0,
68339
+ toolCalls: 0
68340
+ });
68341
+ },
68271
68342
  onViewWrite: (id, text) => statusBar.writeToAgentView(id, text),
68272
- onViewStatus: (id, status) => statusBar.updateAgentViewStatus(id, status),
68343
+ onViewStatus: (id, status) => {
68344
+ statusBar.updateAgentViewStatus(id, status);
68345
+ const agent = registry.subAgents.get(id);
68346
+ if (agent) {
68347
+ agent.status = status === "running" ? "active" : status === "completed" ? "completed" : status === "failed" ? "error" : "idle";
68348
+ }
68349
+ },
68273
68350
  onComplete: (id, task, exitCode, output) => {
68351
+ registry.unregisterAgent(id);
68274
68352
  const summary = output.split("\n").filter((l) => l.trim()).slice(-5).join("\n");
68275
68353
  const status = exitCode === 0 ? "COMPLETED" : "FAILED";
68276
68354
  _activeRunnerRef?.injectUserMessage(`[Full sub-agent ${id} ${status}]
@@ -70500,6 +70578,33 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
70500
70578
  } else {
70501
70579
  setupReady = true;
70502
70580
  }
70581
+ try {
70582
+ const { isPersonaPlexRunning: isPersonaPlexRunning2 } = await Promise.resolve().then(() => (init_personaplex(), personaplex_exports));
70583
+ if (isPersonaPlexRunning2()) {
70584
+ const ppPidFile = join71(homedir19(), ".open-agents", "voice", "personaplex", "daemon.pid");
70585
+ const ppPortFile = join71(homedir19(), ".open-agents", "voice", "personaplex", "daemon.port");
70586
+ if (existsSync54(ppPidFile)) {
70587
+ const ppPid = parseInt(readFileSync43(ppPidFile, "utf8").trim(), 10);
70588
+ const ppPort = existsSync54(ppPortFile) ? parseInt(readFileSync43(ppPortFile, "utf8").trim(), 10) : void 0;
70589
+ if (ppPid > 0 && !registry.daemons.has("PersonaPlex")) {
70590
+ registry.register({ name: "PersonaPlex", pid: ppPid, port: ppPort, startedAt: Date.now(), status: "running" });
70591
+ }
70592
+ }
70593
+ }
70594
+ const nexusPidFile = join71(repoRoot, ".oa", "nexus", "daemon.pid");
70595
+ if (existsSync54(nexusPidFile)) {
70596
+ const nPid = parseInt(readFileSync43(nexusPidFile, "utf8").trim(), 10);
70597
+ if (nPid > 0 && !registry.daemons.has("Nexus")) {
70598
+ try {
70599
+ process.kill(nPid, 0);
70600
+ registry.register({ name: "Nexus", pid: nPid, startedAt: Date.now(), status: "running" });
70601
+ } catch {
70602
+ }
70603
+ }
70604
+ }
70605
+ } catch {
70606
+ }
70607
+ statusBar.ensureMonitorTimer();
70503
70608
  showPrompt();
70504
70609
  if (!isResumed) {
70505
70610
  const savedCtx = loadSessionContext(repoRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.50",
3
+ "version": "0.185.52",
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",