open-agents-ai 0.187.84 → 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.
- package/dist/index.js +64 -8
- 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
|
-
|
|
279186
|
-
const
|
|
279187
|
-
const
|
|
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
|
|
279191
|
-
out += `\x1B]8;;oa-cmd:${btn.
|
|
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", (
|
|
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
|
-
|
|
279211
|
-
|
|
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
|
}
|
|
@@ -309322,6 +309369,7 @@ ${opts.systemPromptAddition}` : `Working directory: ${repoRoot}`;
|
|
|
309322
309369
|
voiceEngine.luxttsCloneRef = savedSettings.voiceCloneRef;
|
|
309323
309370
|
}
|
|
309324
309371
|
voiceEngine.toggle().then((msg) => {
|
|
309372
|
+
statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
|
|
309325
309373
|
if (statusBar?.isActive && !statusBar.isStreaming) {
|
|
309326
309374
|
statusBar.beginContentWrite();
|
|
309327
309375
|
renderInfo(msg);
|
|
@@ -309851,13 +309899,16 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309851
309899
|
}
|
|
309852
309900
|
};
|
|
309853
309901
|
const _tryNexusConnect = async (attempt) => {
|
|
309902
|
+
statusBar.setNexusStatus("connecting");
|
|
309854
309903
|
try {
|
|
309855
309904
|
const r2 = await autoNexus.execute({ action: "connect" });
|
|
309856
309905
|
const out = r2.output || String(r2);
|
|
309857
309906
|
if (out.includes("Connected") || out.includes("Already connected")) {
|
|
309907
|
+
statusBar.setNexusStatus("connected");
|
|
309858
309908
|
writeContent(() => renderInfo("Nexus P2P network connected."));
|
|
309859
309909
|
_registerNexusDaemon();
|
|
309860
309910
|
} else if (out.includes("failed") || out.includes("Error")) {
|
|
309911
|
+
statusBar.setNexusStatus("disconnected");
|
|
309861
309912
|
if (attempt < 2) {
|
|
309862
309913
|
await new Promise((r3) => setTimeout(r3, 5e3));
|
|
309863
309914
|
return _tryNexusConnect(attempt + 1);
|
|
@@ -309869,13 +309920,16 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309869
309920
|
const sr = await autoNexus.execute({ action: "status" });
|
|
309870
309921
|
const so = sr.output || String(sr);
|
|
309871
309922
|
if (/Connected:\s*true/i.test(so)) {
|
|
309923
|
+
statusBar.setNexusStatus("connected");
|
|
309872
309924
|
writeContent(() => renderInfo("Nexus P2P network connected."));
|
|
309873
309925
|
_registerNexusDaemon();
|
|
309874
309926
|
return;
|
|
309875
309927
|
}
|
|
309876
309928
|
}
|
|
309929
|
+
statusBar.setNexusStatus("disconnected");
|
|
309877
309930
|
}
|
|
309878
309931
|
} catch {
|
|
309932
|
+
statusBar.setNexusStatus("disconnected");
|
|
309879
309933
|
}
|
|
309880
309934
|
};
|
|
309881
309935
|
_tryNexusConnect(1);
|
|
@@ -310310,6 +310364,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
310310
310364
|
},
|
|
310311
310365
|
async voiceToggle() {
|
|
310312
310366
|
const msg = await voiceEngine.toggle();
|
|
310367
|
+
statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
|
|
310313
310368
|
if (telegramBridge) {
|
|
310314
310369
|
telegramBridge.voiceEnabled = voiceEngine.enabled;
|
|
310315
310370
|
if (voiceEngine.enabled && voiceEngine.ready) {
|
|
@@ -310778,6 +310833,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
310778
310833
|
if (!voiceEngine.enabled || !voiceEngine.ready) {
|
|
310779
310834
|
writeContent(() => renderInfo("Auto-enabling voice for call session..."));
|
|
310780
310835
|
const voiceMsg = await voiceEngine.toggle();
|
|
310836
|
+
statusBar.setVoiceStatus(voiceEngine.enabled, voiceEngine.modelId || "");
|
|
310781
310837
|
writeContent(() => renderInfo(voiceMsg));
|
|
310782
310838
|
}
|
|
310783
310839
|
if (!adminSessionKey) {
|
package/package.json
CHANGED