open-agents-ai 0.185.19 → 0.185.20
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 +54 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48548,7 +48548,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
48548
48548
|
renderWarning(`Gateway stop: ${err instanceof Error ? err.message : String(err)}`);
|
|
48549
48549
|
}
|
|
48550
48550
|
}
|
|
48551
|
-
const orphanPids = findPidsByPattern("cloudflared
|
|
48551
|
+
const orphanPids = findPidsByPattern(process.platform === "win32" ? "cloudflared" : "cloudflared tunnel");
|
|
48552
48552
|
let orphansKilled = 0;
|
|
48553
48553
|
for (const pid of orphanPids) {
|
|
48554
48554
|
if (killPid(pid))
|
|
@@ -48612,7 +48612,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
48612
48612
|
const existingGateway = ctx.getExposeGateway?.();
|
|
48613
48613
|
const managedPid = existingGateway?._cloudflaredPid || null;
|
|
48614
48614
|
if (!existingGateway?.isActive) {
|
|
48615
|
-
const staleOrphans2 = findPidsByPattern("cloudflared
|
|
48615
|
+
const staleOrphans2 = findPidsByPattern(process.platform === "win32" ? "cloudflared" : "cloudflared tunnel").filter((p) => p !== managedPid);
|
|
48616
48616
|
let cleanedUp = 0;
|
|
48617
48617
|
for (const pid of staleOrphans2) {
|
|
48618
48618
|
if (killPid(pid))
|
|
@@ -48625,7 +48625,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
48625
48625
|
}
|
|
48626
48626
|
const tunnelAlreadyActive = existingGateway?.isActive && existingGateway?.tunnelUrl;
|
|
48627
48627
|
const p2pAlreadyActive = ctx.isExposeActive?.() && !existingGateway?.tunnelUrl;
|
|
48628
|
-
const staleOrphans = findPidsByPattern("cloudflared
|
|
48628
|
+
const staleOrphans = findPidsByPattern(process.platform === "win32" ? "cloudflared" : "cloudflared tunnel");
|
|
48629
48629
|
for (const pid of staleOrphans)
|
|
48630
48630
|
killPid(pid);
|
|
48631
48631
|
if (config.transport.cloudflared && ctx.exposeStart) {
|
|
@@ -51558,6 +51558,37 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
51558
51558
|
installOverlay.dismiss();
|
|
51559
51559
|
await new Promise((r) => setTimeout(r, 200));
|
|
51560
51560
|
ctx.contextSave?.();
|
|
51561
|
+
try {
|
|
51562
|
+
const { join: pjoin } = await import("node:path");
|
|
51563
|
+
const { existsSync: ex, readFileSync: rf } = await import("node:fs");
|
|
51564
|
+
const { homedir: hd } = await import("node:os");
|
|
51565
|
+
const nexusPid = pjoin(ctx.repoRoot ?? process.cwd(), ".oa", "nexus", "daemon.pid");
|
|
51566
|
+
if (ex(nexusPid)) {
|
|
51567
|
+
const pid = parseInt(rf(nexusPid, "utf8").trim(), 10);
|
|
51568
|
+
if (pid > 0) {
|
|
51569
|
+
try {
|
|
51570
|
+
if (process.platform === "win32")
|
|
51571
|
+
nodeExecSync(`taskkill /F /PID ${pid}`, { timeout: 3e3, stdio: "ignore" });
|
|
51572
|
+
else
|
|
51573
|
+
process.kill(pid, "SIGTERM");
|
|
51574
|
+
} catch {
|
|
51575
|
+
}
|
|
51576
|
+
}
|
|
51577
|
+
}
|
|
51578
|
+
const cfPids = findPidsByPattern(process.platform === "win32" ? "cloudflared" : "cloudflared tunnel");
|
|
51579
|
+
for (const pid of cfPids)
|
|
51580
|
+
killPid(pid);
|
|
51581
|
+
const voiceDir2 = pjoin(hd(), ".open-agents", "voice");
|
|
51582
|
+
for (const pf of ["luxtts-daemon.pid", "piper-daemon.pid"]) {
|
|
51583
|
+
const fp = pjoin(voiceDir2, pf);
|
|
51584
|
+
if (ex(fp)) {
|
|
51585
|
+
const pid = parseInt(rf(fp, "utf8").trim(), 10);
|
|
51586
|
+
if (pid > 0)
|
|
51587
|
+
killPid(pid);
|
|
51588
|
+
}
|
|
51589
|
+
}
|
|
51590
|
+
} catch {
|
|
51591
|
+
}
|
|
51561
51592
|
process.exit(120);
|
|
51562
51593
|
}
|
|
51563
51594
|
async function switchModel(query, ctx, local = false) {
|
|
@@ -66171,6 +66202,26 @@ async function startInteractive(config, repoPath) {
|
|
|
66171
66202
|
await new Promise((r) => setTimeout(r, 50));
|
|
66172
66203
|
process.stdin.pause();
|
|
66173
66204
|
}
|
|
66205
|
+
if (isResumed) {
|
|
66206
|
+
try {
|
|
66207
|
+
const nexusDir = join70(repoRoot, ".oa", "nexus");
|
|
66208
|
+
const pidFile = join70(nexusDir, "daemon.pid");
|
|
66209
|
+
if (existsSync53(pidFile)) {
|
|
66210
|
+
const pid = parseInt(readFileSync42(pidFile, "utf8").trim(), 10);
|
|
66211
|
+
if (pid > 0) {
|
|
66212
|
+
try {
|
|
66213
|
+
if (process.platform === "win32") {
|
|
66214
|
+
execSync33(`taskkill /F /PID ${pid}`, { timeout: 5e3, stdio: "ignore" });
|
|
66215
|
+
} else {
|
|
66216
|
+
process.kill(pid, "SIGTERM");
|
|
66217
|
+
}
|
|
66218
|
+
} catch {
|
|
66219
|
+
}
|
|
66220
|
+
}
|
|
66221
|
+
}
|
|
66222
|
+
} catch {
|
|
66223
|
+
}
|
|
66224
|
+
}
|
|
66174
66225
|
initOaDirectory(repoRoot);
|
|
66175
66226
|
const savedSettings = resolveSettings(repoRoot);
|
|
66176
66227
|
let restoredSessionContext = null;
|
package/package.json
CHANGED