umpirix/scripts/cli.mjs

168 lines
5.7 KiB
JavaScript
Raw Permalink Normal View History

#!/usr/bin/env node
/**
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
* `umpirix` — the self-host CLI (formerly `openjev`; `openjev` and
* `opentypesafe` still work as compatibility aliases, see LEGACY_ALIASES
* below).
*
* Subcommands:
* serve Start the built Node server (Nitro `node-server` output at
* `.output/server/index.mjs`). Honors PORT (default 3000) and
* HOST (default 0.0.0.0).
* laya-download Fetch Laya typed-decision weights from Hugging Face by
* delegating to `scripts/laya-download.sh` (respects
* LAYA_BACKEND / LAYA_MODEL / LAYA_DEST). All extra args and
* env pass straight through.
* classify Label text locally with the engine from src/ (no server,
* no key): stdin lines, CSV or JSONL in; table, CSV or
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
* JSONL out. See `umpirix classify --help`.
* mcp Model Context Protocol server on stdio: forwards each
* JSON-RPC message to a running server's POST /v1/mcp
* (OPENJEV_BASE_URL, default http://localhost:3000).
*
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
* This file is wired as the package `bin` under three names (`umpirix`,
* `openjev`, `opentypesafe`), so `npx umpirix <cmd>` and the Docker
* `CMD ["umpirix", "serve"]` both resolve here.
*/
import { spawn } from "node:child_process";
import { existsSync } from "node:fs";
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const HERE = dirname(fileURLToPath(import.meta.url));
const ROOT = join(HERE, "..");
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
/** Older bin names kept for compatibility; invoking through one of these prints a one-line rename notice. */
const LEGACY_ALIASES = new Set(["openjev", "opentypesafe"]);
const invokedAs = basename(process.argv[1] ?? "umpirix");
const HELP = `umpirix — self-host CLI
Usage:
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
umpirix serve Start the built Node server (.output/server/index.mjs)
umpirix laya-download [args] Download Laya weights (delegates to scripts/laya-download.sh)
umpirix classify <labels> Label text locally, no server: umpirix classify bug,feature,praise < feedback.txt
umpirix mcp MCP server on stdio, forwarding to a running server (OPENJEV_BASE_URL)
umpirix help Show this help
umpirix version Show the package version
Environment (see .env.example for the complete list):
PORT Node server port (default 3000)
HOST Node server bind host (default 0.0.0.0)
LAYA_ENGINE_URL URL of the laya-onnx / laya-mlx sidecar
OPENJEV_ENGINE_URL URL of the native C++/Rust decision engine
DATABASE_URL Postgres connection string (PGLite fallback if unset)
OPENJEV_BASE_URL Server the mcp command forwards to (default http://localhost:3000)
OPENJEV_API_KEY Optional key the mcp command sends as a Bearer token
`;
/** Run a child process, inheriting stdio, and mirror its exit code. */
function run(command, args, opts = {}) {
const child = spawn(command, args, {
stdio: "inherit",
cwd: ROOT,
env: process.env,
...opts,
});
child.on("exit", (code, signal) => {
if (signal) process.kill(process.pid, signal);
else process.exit(code ?? 0);
});
child.on("error", (err) => {
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
console.error(`[umpirix] failed to launch ${command}: ${err.message}`);
process.exit(1);
});
return child;
}
function serve() {
const entry = join(ROOT, ".output", "server", "index.mjs");
if (!existsSync(entry)) {
console.error(
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
"[umpirix] No built server found at .output/server/index.mjs.\n" +
"Build it first with the Node preset:\n" +
" NITRO_PRESET=node-server npm run build\n" +
"(the Docker image does this for you).",
);
process.exit(1);
}
// Nitro's node-server reads PORT/HOST; default to a stable, container-friendly bind.
const env = { ...process.env };
env.PORT = env.PORT ?? "3000";
env.HOST = env.HOST ?? "0.0.0.0";
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
console.log(`[umpirix] serving on http://${env.HOST}:${env.PORT}`);
run(process.execPath, [entry], { env });
}
function layaDownload(rest) {
const script = join(ROOT, "scripts", "laya-download.sh");
run("bash", [script, ...rest]);
}
function classify(rest) {
// Runs in the caller's directory so relative --file / --out paths work; the
// embedding model is looked up in this checkout unless a path is already set.
const env = { ...process.env };
env.OPENJEV_EMBED_MODEL_PATH =
env.OPENJEV_EMBED_MODEL_PATH ?? join(ROOT, "models", "embed", "gte-small");
run(
process.execPath,
[
"--experimental-strip-types",
"--disable-warning=ExperimentalWarning",
join(ROOT, "scripts", "classify.mjs"),
...rest,
],
{ cwd: process.cwd(), env },
);
}
function version() {
return import("node:fs")
.then(({ readFileSync }) =>
JSON.parse(readFileSync(join(ROOT, "package.json"), "utf8")),
)
.then((pkg) => {
console.log(pkg.version ?? "0.0.0");
});
}
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
if (LEGACY_ALIASES.has(invokedAs)) {
console.error(
`[umpirix] note: OpenJev is renamed Umpirix. The "${invokedAs}" command still works ` +
`as a compatibility alias — switch to "umpirix" when convenient.`,
);
}
const [cmd, ...rest] = process.argv.slice(2);
switch (cmd) {
case "serve":
serve();
break;
case "laya-download":
layaDownload(rest);
break;
case "classify":
classify(rest);
break;
case "mcp": {
const { runMcpStdio } = await import("./mcp-stdio.mjs");
await runMcpStdio();
break;
}
case "version":
case "--version":
case "-v":
await version();
break;
case undefined:
case "help":
case "--help":
case "-h":
console.log(HELP);
break;
default:
feat: rebrand OpenJev to Umpirix across README, CLI, SDKs and PyPI packages Owner rename (GitHub repo already caelum0x/openjev -> caelum0x/umpirix, origin updated): rebrands every user-facing surface while keeping full backward compatibility. - README.md: title, badges, clone/MCP commands, SDK table, model-family table and a new "Renamed from OpenJev" section (mirroring the existing "Renamed from opentypesafe" section) documenting every old->new mapping. Never claims Umpirix is or was made by TypeSafe; "Jev-compatible" kept only where it describes wire compatibility. - CLI (scripts/cli.mjs): primary bin is now `umpirix`; `openjev` and `opentypesafe` still work and print a one-line rename notice (detected via the invoked bin's basename). package.json's `name` is now "umpirix" and all three bin names are installed. - Site/app title: the single SITE_NAME constant (src/lib/seo/site.ts) is now "Umpirix", which cascades into every page's <title> and JSON-LD; the nav sidebar brand text (app-shell.tsx) and OG site title (og/site.json) updated too. - SDK package names: @openjev/sdk -> @umpirix/sdk, @openjev/lite -> @umpirix/lite, @openjev/ai-sdk -> @umpirix/ai-sdk (sdk/js, sdk/js-lite, sdk/ai-sdk, plus the dependent sdk/scribase-decisions package and its source re-export). All import sites, peer/dev dependency keys, jsr.json and doc comments updated to match. Verified free on npm (404) as of 2026-11-11. sdk/js (193 tests) and sdk/js-lite (99 tests) both typecheck and test clean after the rename; `npm pack --dry-run` confirmed real, correctly-named tarballs for both. - PyPI: openjev-client -> umpirix-client (sdk/python), openjev-adapters -> umpirix-adapters (adapters/python); both plain names confirmed free on PyPI (404) as of 2026-11-11. The importable module stays `openjev` / `openjev_adapters` for compatibility. Found and fixed a real regression from the distribution rename: both packages' `_version.py` read `importlib.metadata.version()` by the old hardcoded distribution name, which would have raised PackageNotFoundError post-rename — now tries the new name first, falls back through the old names. `uv sync` + `uv build` + `uvx twine check` pass clean for both under the new names (681 + 452 tests pass respectively); `adapters/python/pyproject.toml`'s `[tool.uv.sources]` key updated to match so the local editable override still resolves. No PyPI token exists on this machine, so nothing was published — exact commands are in PUBLISHING.md for whoever holds the credentials. - PUBLISHING.md: renamed package table, documented the verified-clean local builds above, and the owner-gated npm (@umpirix org doesn't exist yet, needs browser 2FA) / PyPI (token removed) bootstrap steps. - Root `npm run typecheck` / `npm test` (138 pass) / `npm run gold` (61 pass) all clean after every change above. - hackathons/geekroom-2026/demo-umpirix.mp4: the existing real narrated Bifrost demo capture (119.8s, Deepgram aura-2-asteria-en narration, -14.6 LUFS measured) copied to the name this task's submission expects, plus its real raw captures (media/raw, media/terminal) and a real SRT built from the narration's own word-level timestamps (media/demo-umpirix.srt) for caption generation. Known gap, not hidden: the capture's on-screen app UI still reads "OpenJev" (pre-rebrand, pre-redeploy) — a fresh re-record after this rebrand ships to the running app is a real follow-up, noted in plans/openjev.md. Also pushed a companion one-line copy fix to caelum0x/scribase (commit a8c2f72, not this repo): scribase.com/decisions now says "Built on Umpirix" instead of "Built on OpenJev", deployed live (verified 200, "Built on Umpirix" present). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 18:59:19 +03:00
console.error(`[umpirix] unknown command: ${cmd}\n`);
console.log(HELP);
process.exit(1);
}