open-agents-ai 0.187.83 → 0.187.85

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 +98 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -278593,6 +278593,25 @@ var init_status_bar = __esm({
278593
278593
  _streamStartTime = 0;
278594
278594
  /** Current package version (shown in metrics row, rightmost) */
278595
278595
  _version = "";
278596
+ // ── Voice & Nexus status (for header panel display) ─────────────────
278597
+ _voiceActive = false;
278598
+ _voiceModelId = "";
278599
+ /** "disconnected" | "connecting" | "connected" */
278600
+ _nexusStatus = "disconnected";
278601
+ /** Update voice status for header display */
278602
+ setVoiceStatus(active, modelId) {
278603
+ this._voiceActive = active;
278604
+ if (modelId !== void 0)
278605
+ this._voiceModelId = modelId;
278606
+ if (this.active)
278607
+ this.refreshHeaderContent();
278608
+ }
278609
+ /** Update nexus connection status for header display */
278610
+ setNexusStatus(status) {
278611
+ this._nexusStatus = status;
278612
+ if (this.active)
278613
+ this.refreshHeaderContent();
278614
+ }
278596
278615
  // ── Header Panel System ──────────────────────────────────────────────
278597
278616
  // Extensible dual-state (N-state) header: the content row inside the
278598
278617
  // ╭│╰ box cycles between registered panels via arrow buttons.
@@ -279180,19 +279199,36 @@ var init_status_bar = __esm({
279180
279199
  this.scrollRegionTop = scrollRegionTop ?? 1;
279181
279200
  this.active = true;
279182
279201
  if (this._headerPanels.length === 0) {
279202
+ const allBtns = [
279203
+ { cmd: "help", label: " help " },
279204
+ { cmd: "voice", label: " voice " },
279205
+ { cmd: "model", label: " model " },
279206
+ { cmd: "cohere", label: " cohere " }
279207
+ ];
279183
279208
  this.registerHeaderPanel("main", (innerW) => {
279184
279209
  const verText = ` OA v${this._version}`;
279185
- const btnLabels = [" help ", " voice ", " model ", " cohere "];
279186
- const btnText = btnLabels.join(" ");
279187
- const gap = Math.max(1, innerW - verText.length - btnText.length - 4);
279210
+ let usedW = verText.length + 5;
279211
+ const fittingBtns = [];
279212
+ const overflowBtns = [];
279213
+ for (const btn of allBtns) {
279214
+ const btnW = btn.label.length + 1;
279215
+ if (usedW + btnW <= innerW) {
279216
+ fittingBtns.push(btn);
279217
+ usedW += btnW;
279218
+ } else {
279219
+ overflowBtns.push(btn);
279220
+ }
279221
+ }
279222
+ this._overflowBtns = overflowBtns;
279223
+ const gap = Math.max(1, innerW - usedW + 1);
279188
279224
  let out = `\x1B[1;38;5;${TEXT_PRIMARY}m${verText}`;
279189
279225
  out += `\x1B[38;5;${TEXT_DIM}m${" ".repeat(gap)}`;
279190
- for (const btn of btnLabels) {
279191
- out += `\x1B]8;;oa-cmd:${btn.trim()}\x07\x1B[38;5;${TEXT_DIM}m${btn}\x1B]8;;\x07 `;
279226
+ for (const btn of fittingBtns) {
279227
+ out += `\x1B]8;;oa-cmd:${btn.cmd}\x07\x1B[38;5;${TEXT_DIM}m${btn.label}\x1B]8;;\x07 `;
279192
279228
  }
279193
279229
  return out;
279194
279230
  });
279195
- this.registerHeaderPanel("systems", (_innerW) => {
279231
+ this.registerHeaderPanel("systems", (innerW) => {
279196
279232
  let out = "";
279197
279233
  if (this._agentViews.size > 1) {
279198
279234
  for (const view of this._agentViews.values()) {
@@ -279207,8 +279243,19 @@ var init_status_bar = __esm({
279207
279243
  out += `\x1B[38;5;${TEXT_DIM}m no sub-agents `;
279208
279244
  }
279209
279245
  out += `\x1B[38;5;${TEXT_DIM}m\u2502 `;
279210
- out += `\x1B]8;;oa-cmd:voice\x07\x1B[38;5;${TEXT_DIM}m voice \x1B]8;;\x07 `;
279211
- out += `\x1B]8;;oa-cmd:nexus\x07\x1B[38;5;${TEXT_DIM}m nexus \x1B]8;;\x07`;
279246
+ const voiceIcon = this._voiceActive ? `\x1B[38;5;82m\u25CF` : `\x1B[38;5;${TEXT_DIM}m\u25CB`;
279247
+ const voiceLabel = this._voiceActive ? ` ${this._voiceModelId || "voice"} ` : " voice ";
279248
+ out += `\x1B]8;;oa-cmd:voice\x07${voiceIcon}\x1B[38;5;${this._voiceActive ? 82 : TEXT_DIM}m${voiceLabel}\x1B]8;;\x07 `;
279249
+ const nexusColor = this._nexusStatus === "connected" ? 82 : this._nexusStatus === "connecting" ? 208 : 196;
279250
+ const nexusDot = this._nexusStatus === "connected" ? "\u25CF" : this._nexusStatus === "connecting" ? "\u25CF" : "\u25CB";
279251
+ out += `\x1B]8;;oa-cmd:nexus\x07\x1B[38;5;${nexusColor}m${nexusDot}\x1B[38;5;${TEXT_DIM}m nexus \x1B]8;;\x07`;
279252
+ const overflow = this._overflowBtns;
279253
+ if (overflow && overflow.length > 0) {
279254
+ out += `\x1B[38;5;${TEXT_DIM}m\u2502 `;
279255
+ for (const btn of overflow) {
279256
+ out += `\x1B]8;;oa-cmd:${btn.cmd}\x07\x1B[38;5;${TEXT_DIM}m${btn.label}\x1B]8;;\x07 `;
279257
+ }
279258
+ }
279212
279259
  return out;
279213
279260
  });
279214
279261
  }
@@ -281028,6 +281075,7 @@ function tuiSelect(opts) {
281028
281075
  enterOverlay();
281029
281076
  overlayWrite(`\x1B[?1049h${tuiBgSeq()}\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h`);
281030
281077
  let listRowOffset = 0;
281078
+ let backBtnHovered = false;
281031
281079
  function clampScroll(displayList) {
281032
281080
  const cursorPos = displayList.indexOf(cursor);
281033
281081
  if (cursorPos < 0)
@@ -281048,7 +281096,10 @@ function tuiSelect(opts) {
281048
281096
  }
281049
281097
  overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
281050
281098
  const lines = [];
281051
- lines.push("");
281099
+ const backLabel = hasBreadcrumbs ? "\u2190 back" : "\u2190 close";
281100
+ const backHighlighted = backBtnHovered;
281101
+ const backStyle = backHighlighted ? `\x1B[7m\x1B[38;5;245m ${backLabel} \x1B[0m${tuiBgSeq()}` : `${selectColors.dim(` ${backLabel} `)}`;
281102
+ lines.push(backStyle);
281052
281103
  if (hasBreadcrumbs) {
281053
281104
  const trail = opts.breadcrumbs.map((b) => selectColors.dim(b)).join(selectColors.dim(" \u203A "));
281054
281105
  lines.push(`
@@ -281158,6 +281209,24 @@ ${tuiBgSeq()}`);
281158
281209
  const mCol = parseInt(mouseM[2]);
281159
281210
  const mRow = parseInt(mouseM[3]);
281160
281211
  const suffix = mouseM[4];
281212
+ if (btn === 0 && suffix === "M" && mRow === 1 && mCol <= 9) {
281213
+ if (filter2) {
281214
+ filter2 = "";
281215
+ updateFilter();
281216
+ const valid = findSelectable(cursor, 1);
281217
+ if (valid >= 0)
281218
+ cursor = valid;
281219
+ scrollOffset = 0;
281220
+ render();
281221
+ } else if (hasBreadcrumbs) {
281222
+ cleanup();
281223
+ resolve39({ confirmed: false, key: "__back__", index: cursor });
281224
+ } else {
281225
+ cleanup();
281226
+ resolve39({ confirmed: false, key: null, index: cursor });
281227
+ }
281228
+ return;
281229
+ }
281161
281230
  if (btn === 0 && suffix === "M") {
281162
281231
  const listIdx = mRow - listRowOffset - 1;
281163
281232
  if (listIdx >= 0 && listIdx < maxVisible) {
@@ -281196,6 +281265,17 @@ ${tuiBgSeq()}`);
281196
281265
  }
281197
281266
  }
281198
281267
  }
281268
+ if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M" && mRow === 1 && mCol <= 9) {
281269
+ if (!backBtnHovered) {
281270
+ backBtnHovered = true;
281271
+ render();
281272
+ }
281273
+ continue;
281274
+ }
281275
+ if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M" && backBtnHovered && (mRow !== 1 || mCol > 9)) {
281276
+ backBtnHovered = false;
281277
+ render();
281278
+ }
281199
281279
  if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M") {
281200
281280
  const listIdx = mRow - listRowOffset - 1;
281201
281281
  if (listIdx >= 0 && listIdx < maxVisible) {
@@ -309289,6 +309369,7 @@ ${opts.systemPromptAddition}` : `Working directory: ${repoRoot}`;
309289
309369
  voiceEngine.luxttsCloneRef = savedSettings.voiceCloneRef;
309290
309370
  }
309291
309371
  voiceEngine.toggle().then((msg) => {
309372
+ statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
309292
309373
  if (statusBar?.isActive && !statusBar.isStreaming) {
309293
309374
  statusBar.beginContentWrite();
309294
309375
  renderInfo(msg);
@@ -309818,13 +309899,16 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
309818
309899
  }
309819
309900
  };
309820
309901
  const _tryNexusConnect = async (attempt) => {
309902
+ statusBar.setNexusStatus("connecting");
309821
309903
  try {
309822
309904
  const r2 = await autoNexus.execute({ action: "connect" });
309823
309905
  const out = r2.output || String(r2);
309824
309906
  if (out.includes("Connected") || out.includes("Already connected")) {
309907
+ statusBar.setNexusStatus("connected");
309825
309908
  writeContent(() => renderInfo("Nexus P2P network connected."));
309826
309909
  _registerNexusDaemon();
309827
309910
  } else if (out.includes("failed") || out.includes("Error")) {
309911
+ statusBar.setNexusStatus("disconnected");
309828
309912
  if (attempt < 2) {
309829
309913
  await new Promise((r3) => setTimeout(r3, 5e3));
309830
309914
  return _tryNexusConnect(attempt + 1);
@@ -309836,13 +309920,16 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
309836
309920
  const sr = await autoNexus.execute({ action: "status" });
309837
309921
  const so = sr.output || String(sr);
309838
309922
  if (/Connected:\s*true/i.test(so)) {
309923
+ statusBar.setNexusStatus("connected");
309839
309924
  writeContent(() => renderInfo("Nexus P2P network connected."));
309840
309925
  _registerNexusDaemon();
309841
309926
  return;
309842
309927
  }
309843
309928
  }
309929
+ statusBar.setNexusStatus("disconnected");
309844
309930
  }
309845
309931
  } catch {
309932
+ statusBar.setNexusStatus("disconnected");
309846
309933
  }
309847
309934
  };
309848
309935
  _tryNexusConnect(1);
@@ -310277,6 +310364,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
310277
310364
  },
310278
310365
  async voiceToggle() {
310279
310366
  const msg = await voiceEngine.toggle();
310367
+ statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
310280
310368
  if (telegramBridge) {
310281
310369
  telegramBridge.voiceEnabled = voiceEngine.enabled;
310282
310370
  if (voiceEngine.enabled && voiceEngine.ready) {
@@ -310745,6 +310833,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
310745
310833
  if (!voiceEngine.enabled || !voiceEngine.ready) {
310746
310834
  writeContent(() => renderInfo("Auto-enabling voice for call session..."));
310747
310835
  const voiceMsg = await voiceEngine.toggle();
310836
+ statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
310748
310837
  writeContent(() => renderInfo(voiceMsg));
310749
310838
  }
310750
310839
  if (!adminSessionKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.83",
3
+ "version": "0.187.85",
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",