open-agents-ai 0.185.50 → 0.185.51
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 +86 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62405,6 +62405,8 @@ var init_status_bar = __esm({
|
|
|
62405
62405
|
/** Whether agent is actively processing (braille animation) */
|
|
62406
62406
|
_processing = false;
|
|
62407
62407
|
_brailleSpinner = new BrailleSpinner();
|
|
62408
|
+
/** Slow refresh timer for monitoring bar when braille spinner is off */
|
|
62409
|
+
_monitorTimer = null;
|
|
62408
62410
|
/** Current dynamic footer height (min 5: buffer + topSep + 1 input line + bottomSep + metrics) */
|
|
62409
62411
|
_currentFooterHeight = 3;
|
|
62410
62412
|
// input(1) + braille(1) + metrics(1)
|
|
@@ -62482,6 +62484,10 @@ var init_status_bar = __esm({
|
|
|
62482
62484
|
return;
|
|
62483
62485
|
this._processing = active;
|
|
62484
62486
|
if (active) {
|
|
62487
|
+
if (this._monitorTimer) {
|
|
62488
|
+
clearInterval(this._monitorTimer);
|
|
62489
|
+
this._monitorTimer = null;
|
|
62490
|
+
}
|
|
62485
62491
|
this._brailleSpinner.setMetrics({ isStreaming: true });
|
|
62486
62492
|
this._brailleSpinner.start(() => {
|
|
62487
62493
|
if (this.active)
|
|
@@ -62492,8 +62498,42 @@ var init_status_bar = __esm({
|
|
|
62492
62498
|
this._brailleSpinner.stop();
|
|
62493
62499
|
if (this.active)
|
|
62494
62500
|
this.renderBufferLine();
|
|
62501
|
+
this.ensureMonitorTimer();
|
|
62495
62502
|
}
|
|
62496
62503
|
}
|
|
62504
|
+
/**
|
|
62505
|
+
* Ensure the monitoring timer is running when the registry has entries
|
|
62506
|
+
* and the braille spinner is not active. Refreshes the buffer line
|
|
62507
|
+
* every 2 seconds so status dots update (running → stopped, etc.).
|
|
62508
|
+
*/
|
|
62509
|
+
ensureMonitorTimer() {
|
|
62510
|
+
if (this._monitorTimer)
|
|
62511
|
+
return;
|
|
62512
|
+
if (!registry.hasEntries)
|
|
62513
|
+
return;
|
|
62514
|
+
if (this._brailleSpinner.isRunning)
|
|
62515
|
+
return;
|
|
62516
|
+
this._monitorTimer = setInterval(() => {
|
|
62517
|
+
if (!this.active)
|
|
62518
|
+
return;
|
|
62519
|
+
if (this._brailleSpinner.isRunning) {
|
|
62520
|
+
if (this._monitorTimer) {
|
|
62521
|
+
clearInterval(this._monitorTimer);
|
|
62522
|
+
this._monitorTimer = null;
|
|
62523
|
+
}
|
|
62524
|
+
return;
|
|
62525
|
+
}
|
|
62526
|
+
if (!registry.hasEntries) {
|
|
62527
|
+
if (this._monitorTimer) {
|
|
62528
|
+
clearInterval(this._monitorTimer);
|
|
62529
|
+
this._monitorTimer = null;
|
|
62530
|
+
}
|
|
62531
|
+
this.renderBufferLine();
|
|
62532
|
+
return;
|
|
62533
|
+
}
|
|
62534
|
+
this.renderBufferLine();
|
|
62535
|
+
}, 2e3);
|
|
62536
|
+
}
|
|
62497
62537
|
/**
|
|
62498
62538
|
* Set the active tool for the braille spinner animation.
|
|
62499
62539
|
* Changes the spinner's color theme and wave speed to reflect the tool category.
|
|
@@ -68267,10 +68307,27 @@ async function startInteractive(config, repoPath) {
|
|
|
68267
68307
|
banner.onAfterRender = () => statusBar.renderHeaderButtons();
|
|
68268
68308
|
if (_fullSubAgentToolRef) {
|
|
68269
68309
|
_fullSubAgentToolRef.setCallbacks({
|
|
68270
|
-
onViewRegister: (id, label, type) =>
|
|
68310
|
+
onViewRegister: (id, label, type) => {
|
|
68311
|
+
statusBar.registerAgentView(id, label, type);
|
|
68312
|
+
registry.registerAgent({
|
|
68313
|
+
id,
|
|
68314
|
+
type: type === "full" ? "task" : "research",
|
|
68315
|
+
startedAt: Date.now(),
|
|
68316
|
+
status: "active",
|
|
68317
|
+
turns: 0,
|
|
68318
|
+
toolCalls: 0
|
|
68319
|
+
});
|
|
68320
|
+
},
|
|
68271
68321
|
onViewWrite: (id, text) => statusBar.writeToAgentView(id, text),
|
|
68272
|
-
onViewStatus: (id, status) =>
|
|
68322
|
+
onViewStatus: (id, status) => {
|
|
68323
|
+
statusBar.updateAgentViewStatus(id, status);
|
|
68324
|
+
const agent = registry.subAgents.get(id);
|
|
68325
|
+
if (agent) {
|
|
68326
|
+
agent.status = status === "running" ? "active" : status === "completed" ? "completed" : status === "failed" ? "error" : "idle";
|
|
68327
|
+
}
|
|
68328
|
+
},
|
|
68273
68329
|
onComplete: (id, task, exitCode, output) => {
|
|
68330
|
+
registry.unregisterAgent(id);
|
|
68274
68331
|
const summary = output.split("\n").filter((l) => l.trim()).slice(-5).join("\n");
|
|
68275
68332
|
const status = exitCode === 0 ? "COMPLETED" : "FAILED";
|
|
68276
68333
|
_activeRunnerRef?.injectUserMessage(`[Full sub-agent ${id} ${status}]
|
|
@@ -70500,6 +70557,33 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
70500
70557
|
} else {
|
|
70501
70558
|
setupReady = true;
|
|
70502
70559
|
}
|
|
70560
|
+
try {
|
|
70561
|
+
const { isPersonaPlexRunning: isPersonaPlexRunning2 } = await Promise.resolve().then(() => (init_personaplex(), personaplex_exports));
|
|
70562
|
+
if (isPersonaPlexRunning2()) {
|
|
70563
|
+
const ppPidFile = join71(homedir19(), ".open-agents", "voice", "personaplex", "daemon.pid");
|
|
70564
|
+
const ppPortFile = join71(homedir19(), ".open-agents", "voice", "personaplex", "daemon.port");
|
|
70565
|
+
if (existsSync54(ppPidFile)) {
|
|
70566
|
+
const ppPid = parseInt(readFileSync43(ppPidFile, "utf8").trim(), 10);
|
|
70567
|
+
const ppPort = existsSync54(ppPortFile) ? parseInt(readFileSync43(ppPortFile, "utf8").trim(), 10) : void 0;
|
|
70568
|
+
if (ppPid > 0 && !registry.daemons.has("PersonaPlex")) {
|
|
70569
|
+
registry.register({ name: "PersonaPlex", pid: ppPid, port: ppPort, startedAt: Date.now(), status: "running" });
|
|
70570
|
+
}
|
|
70571
|
+
}
|
|
70572
|
+
}
|
|
70573
|
+
const nexusPidFile = join71(repoRoot, ".oa", "nexus", "daemon.pid");
|
|
70574
|
+
if (existsSync54(nexusPidFile)) {
|
|
70575
|
+
const nPid = parseInt(readFileSync43(nexusPidFile, "utf8").trim(), 10);
|
|
70576
|
+
if (nPid > 0 && !registry.daemons.has("Nexus")) {
|
|
70577
|
+
try {
|
|
70578
|
+
process.kill(nPid, 0);
|
|
70579
|
+
registry.register({ name: "Nexus", pid: nPid, startedAt: Date.now(), status: "running" });
|
|
70580
|
+
} catch {
|
|
70581
|
+
}
|
|
70582
|
+
}
|
|
70583
|
+
}
|
|
70584
|
+
} catch {
|
|
70585
|
+
}
|
|
70586
|
+
statusBar.ensureMonitorTimer();
|
|
70503
70587
|
showPrompt();
|
|
70504
70588
|
if (!isResumed) {
|
|
70505
70589
|
const savedCtx = loadSessionContext(repoRoot);
|
package/package.json
CHANGED