UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

25 lines (24 loc) • 1.01 kB
import { i as isStandaloneRuntimeExecutable } from "./cli-invocation-ZSPsKRWa.mjs"; import { t as isBunRuntime } from "./runtime-binary-QwVVJ9cA.mjs"; //#region src/commands/daemon-runtime.ts const DEFAULT_GATEWAY_DAEMON_RUNTIME = "node"; const GATEWAY_DAEMON_RUNTIME_OPTIONS = [{ value: "node", label: "Node", hint: "Primary and recommended runtime for managed services." }, { value: "bun", label: "Bun 1.4.4+", hint: "Requires Bun 1.4.4 or newer with WAL-reset-safe node:sqlite." }]; function isGatewayDaemonRuntime(e) { return e === "bun" || e === "node" || e === "standalone"; } /** Detects the runtime selected by an installed daemon command. */ function resolveGatewayDaemonRuntime(e) { const t = e?.[0] ?? ""; if (isStandaloneRuntimeExecutable(t)) return "standalone"; return isBunRuntime(t) ? "bun" : DEFAULT_GATEWAY_DAEMON_RUNTIME; } //#endregion export { resolveGatewayDaemonRuntime as i, GATEWAY_DAEMON_RUNTIME_OPTIONS as n, isGatewayDaemonRuntime as r, DEFAULT_GATEWAY_DAEMON_RUNTIME as t };