Add runtime detection and unified mcp and probe CLI commands

This commit is contained in:
gitea committed 2026-08-25 13:49:00 +08:00
1 parent 551fb9177f
commit b109f3f49f
8 files changed
+118 -19

No files matched your search

+5 -6
View File
@@ -1,19 +1,18 @@
#!/usr/bin/env bun
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { runCli } from "./cli/runner.js";
import { isCompiledBinary, resolveAppRoot, resolveDefaultLauncher } from "./core/runtime.js";
const entryFile = fileURLToPath(import.meta.url);
const appRoot = dirname(dirname(entryFile));
const isCompiled = isCompiledBinary();
const appRoot = resolveAppRoot(entryFile, isCompiled);
const launcher = resolveDefaultLauncher(entryFile, isCompiled);
const result = await runCli(Bun.argv.slice(2), {
appRoot,
entryFile,
launcher: {
command: process.execPath,
args: [entryFile]
}
launcher
});
if (result.stdout) process.stdout.write(result.stdout);