open-agents-ai 0.184.72 → 0.184.73
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 +62 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46168,17 +46168,31 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
|
46168
46168
|
const isMac = process.platform === "darwin";
|
|
46169
46169
|
try {
|
|
46170
46170
|
const { spawnSync } = await import("node:child_process");
|
|
46171
|
+
if (process.stdout.isTTY) {
|
|
46172
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l");
|
|
46173
|
+
}
|
|
46171
46174
|
if (isMac) {
|
|
46172
46175
|
renderInfo(" macOS ARM detected \u2014 installing build deps via Homebrew...");
|
|
46173
46176
|
const brewCheck = spawnSync("which", ["brew"], { stdio: "pipe", timeout: 5e3 });
|
|
46174
46177
|
if (brewCheck.status === 0) {
|
|
46175
|
-
spawnSync("brew", ["install", "llvm", "gcc", "openblas", "libsndfile"], {
|
|
46176
|
-
stdio: "
|
|
46178
|
+
const brewResult = spawnSync("brew", ["install", "llvm", "gcc", "openblas", "libsndfile"], {
|
|
46179
|
+
stdio: "pipe",
|
|
46177
46180
|
timeout: 3e5
|
|
46178
46181
|
});
|
|
46182
|
+
if (brewResult.stdout)
|
|
46183
|
+
process.stdout.write(brewResult.stdout);
|
|
46184
|
+
if (brewResult.stderr)
|
|
46185
|
+
process.stderr.write(brewResult.stderr);
|
|
46179
46186
|
const llvmPrefix = spawnSync("brew", ["--prefix", "llvm"], { stdio: "pipe", timeout: 5e3 });
|
|
46180
46187
|
if (llvmPrefix.stdout) {
|
|
46181
|
-
|
|
46188
|
+
const prefix = llvmPrefix.stdout.toString().trim();
|
|
46189
|
+
process.env.LLVM_CONFIG = `${prefix}/bin/llvm-config`;
|
|
46190
|
+
const openblas = spawnSync("brew", ["--prefix", "openblas"], { stdio: "pipe", timeout: 5e3 });
|
|
46191
|
+
if (openblas.stdout) {
|
|
46192
|
+
const obPrefix = openblas.stdout.toString().trim();
|
|
46193
|
+
process.env.LDFLAGS = `${process.env.LDFLAGS ?? ""} -L${obPrefix}/lib`.trim();
|
|
46194
|
+
process.env.CPPFLAGS = `${process.env.CPPFLAGS ?? ""} -I${obPrefix}/include`.trim();
|
|
46195
|
+
}
|
|
46182
46196
|
}
|
|
46183
46197
|
} else {
|
|
46184
46198
|
renderWarning(" Homebrew not found. Install it: https://brew.sh");
|
|
@@ -46189,7 +46203,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
|
46189
46203
|
const sudoCheck = spawnSync("sudo", ["-v"], { stdio: "inherit", timeout: 6e4 });
|
|
46190
46204
|
if (sudoCheck.status === 0) {
|
|
46191
46205
|
renderInfo(" Installing system build dependencies (this may take a minute)...");
|
|
46192
|
-
spawnSync("sudo", [
|
|
46206
|
+
const aptResult = spawnSync("sudo", [
|
|
46193
46207
|
"apt-get",
|
|
46194
46208
|
"install",
|
|
46195
46209
|
"-y",
|
|
@@ -46200,11 +46214,18 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
|
46200
46214
|
"gfortran",
|
|
46201
46215
|
"libopenblas-dev",
|
|
46202
46216
|
"libsndfile1-dev"
|
|
46203
|
-
], { stdio: "
|
|
46217
|
+
], { stdio: "pipe", timeout: 12e4 });
|
|
46218
|
+
if (aptResult.stdout)
|
|
46219
|
+
process.stdout.write(aptResult.stdout);
|
|
46220
|
+
if (aptResult.stderr)
|
|
46221
|
+
process.stderr.write(aptResult.stderr);
|
|
46204
46222
|
} else {
|
|
46205
46223
|
renderWarning(" sudo not available \u2014 skipping system build deps. librosa/lhotse may fail to compile.");
|
|
46206
46224
|
}
|
|
46207
46225
|
}
|
|
46226
|
+
if (process.stdout.isTTY) {
|
|
46227
|
+
process.stdout.write("\x1B[?1002h\x1B[?1006h");
|
|
46228
|
+
}
|
|
46208
46229
|
} catch (err) {
|
|
46209
46230
|
renderWarning(` Could not install system build deps: ${err instanceof Error ? err.message : String(err)}`);
|
|
46210
46231
|
}
|
|
@@ -46240,8 +46261,10 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`);
|
|
|
46240
46261
|
// Non-fatal (not hard-imported by LuxTTS):
|
|
46241
46262
|
{ cmd: `${pipCmd} -m pip install --quiet piper-phonemize --find-links https://k2-fsa.github.io/icefall/piper_phonemize.html`, fatal: false, label: "piper-phonemize (optional)" },
|
|
46242
46263
|
{ cmd: `${pipCmd} -m pip install --quiet jieba pypinyin cn2an`, fatal: true, label: "Chinese text processing" },
|
|
46243
|
-
// LuxTTS itself:
|
|
46244
|
-
|
|
46264
|
+
// LuxTTS itself: use --no-deps on ARM because we installed deps individually above.
|
|
46265
|
+
// Without --no-deps, pip tries to resolve zipvoice's full dependency tree which
|
|
46266
|
+
// includes piper-phonemize — and that has no macOS ARM wheel, causing fatal failure.
|
|
46267
|
+
{ cmd: `${pipCmd} -m pip install --quiet --no-deps -e ${JSON.stringify(repoDir)}`, fatal: true, label: "LuxTTS (editable install)" }
|
|
46245
46268
|
] : [
|
|
46246
46269
|
// x86_64: all-in-one (fast, all wheels available)
|
|
46247
46270
|
{
|
|
@@ -70084,9 +70107,40 @@ async function main() {
|
|
|
70084
70107
|
}
|
|
70085
70108
|
var scriptPath = process.argv[1] ?? "";
|
|
70086
70109
|
var isMain = scriptPath.endsWith("index.js") || scriptPath.endsWith("index.ts") || scriptPath.endsWith("open-agents-bin") || scriptPath.includes("open-agents") || scriptPath.includes("/oa");
|
|
70110
|
+
function crashLog(label, err) {
|
|
70111
|
+
const msg = err instanceof Error ? err.stack ?? err.message : String(err);
|
|
70112
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
70113
|
+
const logLine = `[${timestamp}] ${label}: ${msg}
|
|
70114
|
+
`;
|
|
70115
|
+
try {
|
|
70116
|
+
const { appendFileSync: appendFileSync5, mkdirSync: mkdirSync30 } = __require("node:fs");
|
|
70117
|
+
const { join: join76 } = __require("node:path");
|
|
70118
|
+
const { homedir: homedir20 } = __require("node:os");
|
|
70119
|
+
const logDir = join76(homedir20(), ".open-agents");
|
|
70120
|
+
mkdirSync30(logDir, { recursive: true });
|
|
70121
|
+
appendFileSync5(join76(logDir, "crash.log"), logLine);
|
|
70122
|
+
} catch {
|
|
70123
|
+
}
|
|
70124
|
+
try {
|
|
70125
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?25h\x1B[?1049l\x1B[0m\n");
|
|
70126
|
+
process.stderr.write(`\x1B[31m\u2716 ${label}:\x1B[0m ${msg}
|
|
70127
|
+
`);
|
|
70128
|
+
process.stderr.write(`\x1B[2m Crash log: ~/.open-agents/crash.log\x1B[0m
|
|
70129
|
+
`);
|
|
70130
|
+
} catch {
|
|
70131
|
+
}
|
|
70132
|
+
}
|
|
70133
|
+
process.on("uncaughtException", (err) => {
|
|
70134
|
+
crashLog("Uncaught exception", err);
|
|
70135
|
+
process.exit(1);
|
|
70136
|
+
});
|
|
70137
|
+
process.on("unhandledRejection", (reason) => {
|
|
70138
|
+
crashLog("Unhandled rejection", reason);
|
|
70139
|
+
process.exit(1);
|
|
70140
|
+
});
|
|
70087
70141
|
if (isMain && !process.env.__OPEN_AGENTS_NO_AUTO_RUN) {
|
|
70088
70142
|
await main().catch((err) => {
|
|
70089
|
-
|
|
70143
|
+
crashLog("Fatal error", err);
|
|
70090
70144
|
process.exit(1);
|
|
70091
70145
|
});
|
|
70092
70146
|
}
|
package/package.json
CHANGED