@gorlitzer-labs/seldon 0.1.10 → 0.1.11
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/bin/seldon.js +43 -6
- package/package.json +1 -1
package/bin/seldon.js
CHANGED
|
@@ -379,14 +379,51 @@ function down() {
|
|
|
379
379
|
console.log(stopped.length ? C.green("stopped: ") + stopped.join(", ") : C.dim("nothing was running."));
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
+
// Version of a globally-installed node package, across pnpm / npm / bun roots.
|
|
383
|
+
function npmGlobalVersion(pkg) {
|
|
384
|
+
const roots = [];
|
|
385
|
+
for (const c of ["pnpm root -g", "npm root -g"]) {
|
|
386
|
+
try { roots.push(execSync(c, { stdio: ["ignore", "pipe", "ignore"] }).toString().trim()); } catch {}
|
|
387
|
+
}
|
|
388
|
+
roots.push(path.join(process.env.HOME, ".bun/install/global/node_modules"));
|
|
389
|
+
for (const r of roots) {
|
|
390
|
+
try { const pj = path.join(r, pkg, "package.json"); if (fs.existsSync(pj)) return JSON.parse(fs.readFileSync(pj, "utf8")).version; } catch {}
|
|
391
|
+
}
|
|
392
|
+
return "";
|
|
393
|
+
}
|
|
394
|
+
function bifrostVersion() {
|
|
395
|
+
for (const p of [path.join(process.env.HOME, "bin", "bifrost"), path.join(process.env.HOME, ".local/bin/bifrost")]) {
|
|
396
|
+
try { if (fs.existsSync(p)) { const mm = fs.readFileSync(p, "utf8").match(/BIFROST_VERSION=["']?([\d.]+)/); return mm ? mm[1] : "installed"; } } catch {}
|
|
397
|
+
}
|
|
398
|
+
return "";
|
|
399
|
+
}
|
|
400
|
+
function moduleInstalled(m) {
|
|
401
|
+
if (m.method === "python") return demerzelInstalled();
|
|
402
|
+
if (m.method === "shell") return has(m.bin) || fs.existsSync(path.join(process.env.HOME, "bin", m.bin)) || fs.existsSync(path.join(process.env.HOME, ".local/bin", m.bin));
|
|
403
|
+
return has(m.bin);
|
|
404
|
+
}
|
|
405
|
+
|
|
382
406
|
function statusCmd() {
|
|
383
|
-
console.log(C.bold("\
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
|
|
407
|
+
console.log(C.bold("\n seldon — stack status\n"));
|
|
408
|
+
for (const m of MODULES) {
|
|
409
|
+
const inst = moduleInstalled(m);
|
|
410
|
+
const dot = inst ? C.green("●") : C.dim("○");
|
|
411
|
+
let detail;
|
|
412
|
+
if (!inst) detail = platformOk(m) ? C.dim(`not installed ${C.dim("· seldon install " + m.id)}`) : C.dim("not supported on this machine");
|
|
413
|
+
else if (m.method === "npm") detail = C.dim("v" + (npmGlobalVersion(m.pkg) || "?"));
|
|
414
|
+
else if (m.id === "bifrost") detail = C.dim("v" + (bifrostVersion() || "?"));
|
|
415
|
+
else if (m.id === "demerzel") detail = demerzelModelsReady() ? C.dim("venv + models ✓") : C.gold("venv ok · models not fetched (seldon up)");
|
|
416
|
+
else detail = C.dim("installed");
|
|
417
|
+
|
|
418
|
+
// service state for the two daemons
|
|
419
|
+
let svc = "";
|
|
420
|
+
if (m.id === "factory") { const p = daemonUp("factory-watch"); svc = p ? " " + C.green("supervisor up") + C.dim(` (pid ${p})`) : " " + C.dim("supervisor down"); }
|
|
421
|
+
if (m.id === "demerzel" && inst) { const p = daemonUp("demerzel"); svc = p ? " " + C.green("voice up") + " " + C.cyan("http://localhost:8770") : " " + C.dim("voice down"); }
|
|
422
|
+
|
|
423
|
+
console.log(` ${dot} ${C.bold(m.id.padEnd(11))} ${detail}${svc}`);
|
|
388
424
|
}
|
|
389
|
-
console.log(C.dim(`\n
|
|
425
|
+
if (demerzelInstalled()) console.log(C.dim(`\n demerzel LLM: ${process.env.DEMERZEL_LLM || "mlx-community/Qwen3.6-35B-A3B-4bit (default)"}`));
|
|
426
|
+
console.log(C.dim(`\n start: seldon up · stop: seldon down · logs: ${RUN_DIR}/\n`));
|
|
390
427
|
}
|
|
391
428
|
|
|
392
429
|
// ---- the checklist TUI ------------------------------------------------------
|