UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

34 lines (33 loc) • 974 B
import { h as resolveGatewaySystemdServiceName } from "./constants-BZisy3jr.mjs"; import { n as runCommandWithTimeout } from "./exec-runner-Br73vG-X.mjs"; import "./exec-aRIvS9s4.mjs"; import "./systemd-k-QLc2ED.mjs"; import { n as readSystemdServiceRuntime } from "./systemd-runtime-B2q1YsaF.mjs"; //#region src/cli/logs-cli.runtime.ts const DEFAULT_LOG_SUBPROCESS_TIMEOUT_MS = 1e4; const STDERR_MAX_BYTES = 65536; async function execFileUtf8Tail(e, t, n) { try { const r = await runCommandWithTimeout([e, ...t], { baseEnv: n.env, maxOutputBytes: { stdout: n.maxBytes, stderr: STDERR_MAX_BYTES }, timeoutMs: n.timeoutMs ?? DEFAULT_LOG_SUBPROCESS_TIMEOUT_MS }); return { stdout: r.stdout, code: r.code ?? 1, truncated: Boolean(r.stdoutTruncatedBytes) }; } catch { return { stdout: "", code: 1, truncated: false }; } } //#endregion export { execFileUtf8Tail, readSystemdServiceRuntime, resolveGatewaySystemdServiceName };