open-agents-ai 0.186.24 → 0.186.26
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 +65 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51437,10 +51437,23 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
51437
51437
|
if (!sponsorPeerId) {
|
|
51438
51438
|
try {
|
|
51439
51439
|
const nexus = new NexusTool(projectDir);
|
|
51440
|
-
|
|
51441
|
-
|
|
51442
|
-
if (pm)
|
|
51440
|
+
let st = String(await nexus.execute({ action: "status" }) ?? "");
|
|
51441
|
+
let pm = st.match(/Peer ID:\s*(12D3KooW\S+)/i);
|
|
51442
|
+
if (pm) {
|
|
51443
51443
|
sponsorPeerId = pm[1];
|
|
51444
|
+
} else {
|
|
51445
|
+
renderInfo("Waiting for nexus daemon to connect (up to 30s)...");
|
|
51446
|
+
for (let i = 0; i < 30; i++) {
|
|
51447
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
51448
|
+
st = String(await nexus.execute({ action: "status" }) ?? "");
|
|
51449
|
+
pm = st.match(/Peer ID:\s*(12D3KooW\S+)/i);
|
|
51450
|
+
if (pm) {
|
|
51451
|
+
sponsorPeerId = pm[1];
|
|
51452
|
+
renderInfo("Nexus daemon connected.");
|
|
51453
|
+
break;
|
|
51454
|
+
}
|
|
51455
|
+
}
|
|
51456
|
+
}
|
|
51444
51457
|
} catch {
|
|
51445
51458
|
}
|
|
51446
51459
|
}
|
|
@@ -54317,6 +54330,55 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
54317
54330
|
installOverlay.dismiss();
|
|
54318
54331
|
return;
|
|
54319
54332
|
}
|
|
54333
|
+
if (primaryUpdated || depsUpdated) {
|
|
54334
|
+
installOverlay.setStatus("Cleaning stale daemon scripts...");
|
|
54335
|
+
try {
|
|
54336
|
+
const { existsSync: _fe, unlinkSync: _ul, readdirSync: _rd } = await import("node:fs");
|
|
54337
|
+
const { join: _pj } = await import("node:path");
|
|
54338
|
+
const { homedir: _hd } = await import("node:os");
|
|
54339
|
+
const daemonPaths = [
|
|
54340
|
+
_pj(_hd(), ".open-agents", ".oa", "nexus", "nexus-daemon.mjs"),
|
|
54341
|
+
_pj(process.cwd(), ".oa", "nexus", "nexus-daemon.mjs")
|
|
54342
|
+
];
|
|
54343
|
+
let cleaned = 0;
|
|
54344
|
+
for (const dp of daemonPaths) {
|
|
54345
|
+
if (_fe(dp)) {
|
|
54346
|
+
try {
|
|
54347
|
+
_ul(dp);
|
|
54348
|
+
cleaned++;
|
|
54349
|
+
} catch {
|
|
54350
|
+
}
|
|
54351
|
+
}
|
|
54352
|
+
}
|
|
54353
|
+
try {
|
|
54354
|
+
const pidPaths = [
|
|
54355
|
+
_pj(_hd(), ".open-agents", ".oa", "nexus", "daemon.pid"),
|
|
54356
|
+
_pj(process.cwd(), ".oa", "nexus", "daemon.pid")
|
|
54357
|
+
];
|
|
54358
|
+
for (const pp of pidPaths) {
|
|
54359
|
+
if (_fe(pp)) {
|
|
54360
|
+
const { readFileSync: _rf } = await import("node:fs");
|
|
54361
|
+
const pid = parseInt(_rf(pp, "utf8").trim(), 10);
|
|
54362
|
+
if (pid > 0) {
|
|
54363
|
+
try {
|
|
54364
|
+
process.kill(pid, "SIGTERM");
|
|
54365
|
+
} catch {
|
|
54366
|
+
}
|
|
54367
|
+
try {
|
|
54368
|
+
_ul(pp);
|
|
54369
|
+
} catch {
|
|
54370
|
+
}
|
|
54371
|
+
cleaned++;
|
|
54372
|
+
}
|
|
54373
|
+
}
|
|
54374
|
+
}
|
|
54375
|
+
} catch {
|
|
54376
|
+
}
|
|
54377
|
+
if (cleaned > 0)
|
|
54378
|
+
installOverlay.setStatus(`Cleaned ${cleaned} stale daemon artifact(s)`);
|
|
54379
|
+
} catch {
|
|
54380
|
+
}
|
|
54381
|
+
}
|
|
54320
54382
|
if (doRebuild) {
|
|
54321
54383
|
installOverlay.setStatus("Rebuilding native modules...");
|
|
54322
54384
|
await new Promise((resolve36) => {
|
package/package.json
CHANGED