open-agents-ai 0.187.331 → 0.187.333
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 +39 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -277869,19 +277869,18 @@ function ensureEmbedDeps() {
|
|
|
277869
277869
|
log22 += mk.stdout + mk.stderr;
|
|
277870
277870
|
}
|
|
277871
277871
|
const pip = process.platform === "win32" ? join68(venv, "Scripts", "pip.exe") : join68(venv, "bin", "pip");
|
|
277872
|
-
const
|
|
277873
|
-
|
|
277874
|
-
|
|
277875
|
-
"
|
|
277876
|
-
"torchaudio",
|
|
277877
|
-
"Pillow",
|
|
277878
|
-
"speechbrain",
|
|
277872
|
+
const up = spawnSync5(pip, ["install", "--upgrade", "pip", "setuptools", "wheel"], { encoding: "utf8", timeout: 3e5 });
|
|
277873
|
+
log22 += up.stdout + up.stderr;
|
|
277874
|
+
const asrPkgs = [
|
|
277875
|
+
"numpy==1.26.4",
|
|
277879
277876
|
"soundfile",
|
|
277880
|
-
"openai-whisper"
|
|
277877
|
+
"openai-whisper",
|
|
277878
|
+
// Embedding helpers used elsewhere (kept lightweight compared to full torch stack)
|
|
277879
|
+
"Pillow"
|
|
277881
277880
|
];
|
|
277882
|
-
const ins = spawnSync5(pip, ["install", "--upgrade", ...
|
|
277881
|
+
const ins = spawnSync5(pip, ["install", "--upgrade", ...asrPkgs], { encoding: "utf8", timeout: 9e5 });
|
|
277883
277882
|
log22 += ins.stdout + ins.stderr;
|
|
277884
|
-
const ok2 = ins.status === 0;
|
|
277883
|
+
const ok2 = ins.status === 0 && up.status === 0;
|
|
277885
277884
|
return { ok: ok2, log: log22 };
|
|
277886
277885
|
}
|
|
277887
277886
|
function runEmbedImage(input) {
|
|
@@ -299566,6 +299565,36 @@ sleep 1
|
|
|
299566
299565
|
}
|
|
299567
299566
|
} catch {
|
|
299568
299567
|
}
|
|
299568
|
+
try {
|
|
299569
|
+
const id = String(task.id || "");
|
|
299570
|
+
const dir = (task.file || "").split("/").slice(0, -1).join("/") || task.file;
|
|
299571
|
+
const escId = id.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
299572
|
+
const escDir = dir.replace(/['"\\]/g, "\\$&");
|
|
299573
|
+
const script = [
|
|
299574
|
+
// Disable both naming schemes if present
|
|
299575
|
+
`systemctl disable --now "oa-${escId}.timer" 2>/dev/null || true`,
|
|
299576
|
+
`systemctl disable --now "oa-${escId}.service" 2>/dev/null || true`,
|
|
299577
|
+
`systemctl disable --now "oa-sched-${escId}.timer" 2>/dev/null || true`,
|
|
299578
|
+
`systemctl disable --now "oa-sched-${escId}.service" 2>/dev/null || true`,
|
|
299579
|
+
// Remove root cron OA markers for this id
|
|
299580
|
+
`crontab -l 2>/dev/null | sed '/OPEN-AGENTS-SCHEDULED:${escId}/d' | crontab - || true`,
|
|
299581
|
+
// Kill lingering processes broadly
|
|
299582
|
+
`pkill -f 'OPEN-AGENTS-SCHEDULED|oa-sched-|open-agents-ai|/bin/oa|nexus-daemon|ollama' || true`,
|
|
299583
|
+
`sleep 1`,
|
|
299584
|
+
`pkill -9 -f 'OPEN-AGENTS-SCHEDULED|oa-sched-|open-agents-ai|/bin/oa|nexus-daemon|ollama' || true`
|
|
299585
|
+
].join("; ");
|
|
299586
|
+
await runSudoScript(ctx3, script);
|
|
299587
|
+
try {
|
|
299588
|
+
const dir2 = (task.file || "").split("/").slice(0, -1).join("/") || task.file;
|
|
299589
|
+
const r22 = await doFetch("/v1/scheduled/kill", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ pattern: dir2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") }) });
|
|
299590
|
+
const j2 = await r22.json();
|
|
299591
|
+
const rem2 = Array.isArray(j2.procs_after) ? j2.procs_after.length : 0;
|
|
299592
|
+
if (rem2 > 0) renderWarning2(`Remaining after sudo cleanup: ${rem2}`);
|
|
299593
|
+
else renderInfo2("No remaining matched processes after sudo cleanup.");
|
|
299594
|
+
} catch {
|
|
299595
|
+
}
|
|
299596
|
+
} catch {
|
|
299597
|
+
}
|
|
299569
299598
|
done(true);
|
|
299570
299599
|
} else {
|
|
299571
299600
|
renderWarning2(`Failed to delete ${task.id}`);
|
package/package.json
CHANGED