style: format daemon runtime changes

This commit is contained in:
Peter Steinberger
2026-01-06 23:29:38 +01:00
parent 4e6fcd1678
commit 8d50d08936
6 changed files with 23 additions and 22 deletions

View File

@@ -35,6 +35,11 @@ import {
isRemoteEnvironment, isRemoteEnvironment,
loginAntigravityVpsAware, loginAntigravityVpsAware,
} from "./antigravity-oauth.js"; } from "./antigravity-oauth.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { healthCommand } from "./health.js"; import { healthCommand } from "./health.js";
import { import {
applyAuthProfileConfig, applyAuthProfileConfig,
@@ -59,11 +64,6 @@ import {
import { setupProviders } from "./onboard-providers.js"; import { setupProviders } from "./onboard-providers.js";
import { promptRemoteGatewayConfig } from "./onboard-remote.js"; import { promptRemoteGatewayConfig } from "./onboard-remote.js";
import { setupSkills } from "./onboard-skills.js"; import { setupSkills } from "./onboard-skills.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { import {
applyOpenAICodexModelDefault, applyOpenAICodexModelDefault,
OPENAI_CODEX_DEFAULT_MODEL, OPENAI_CODEX_DEFAULT_MODEL,

View File

@@ -10,8 +10,7 @@ export const GATEWAY_DAEMON_RUNTIME_OPTIONS: Array<{
{ {
value: "node", value: "node",
label: "Node (recommended)", label: "Node (recommended)",
hint: hint: "Required for WhatsApp (Baileys WebSocket + Bun can corrupt memory on reconnect)",
"Required for WhatsApp (Baileys WebSocket + Bun can corrupt memory on reconnect)",
}, },
{ {
value: "bun", value: "bun",

View File

@@ -34,6 +34,11 @@ import { defaultRuntime } from "../runtime.js";
import { readTelegramAllowFromStore } from "../telegram/pairing-store.js"; import { readTelegramAllowFromStore } from "../telegram/pairing-store.js";
import { resolveTelegramToken } from "../telegram/token.js"; import { resolveTelegramToken } from "../telegram/token.js";
import { normalizeE164, resolveUserPath, sleep } from "../utils.js"; import { normalizeE164, resolveUserPath, sleep } from "../utils.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { import {
detectLegacyStateMigrations, detectLegacyStateMigrations,
runLegacyStateMigrations, runLegacyStateMigrations,
@@ -45,11 +50,6 @@ import {
guardCancel, guardCancel,
printWizardHeader, printWizardHeader,
} from "./onboard-helpers.js"; } from "./onboard-helpers.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { ensureSystemdUserLingerInteractive } from "./systemd-linger.js"; import { ensureSystemdUserLingerInteractive } from "./systemd-linger.js";
function resolveMode(cfg: ClawdbotConfig): "local" | "remote" { function resolveMode(cfg: ClawdbotConfig): "local" | "remote" {

View File

@@ -13,6 +13,10 @@ import { resolveGatewayService } from "../daemon/service.js";
import type { RuntimeEnv } from "../runtime.js"; import type { RuntimeEnv } from "../runtime.js";
import { defaultRuntime } from "../runtime.js"; import { defaultRuntime } from "../runtime.js";
import { resolveUserPath, sleep } from "../utils.js"; import { resolveUserPath, sleep } from "../utils.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
isGatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { healthCommand } from "./health.js"; import { healthCommand } from "./health.js";
import { import {
applyAuthProfileConfig, applyAuthProfileConfig,
@@ -30,10 +34,6 @@ import type {
OnboardMode, OnboardMode,
OnboardOptions, OnboardOptions,
} from "./onboard-types.js"; } from "./onboard-types.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
isGatewayDaemonRuntime,
} from "./daemon-runtime.js";
import { ensureSystemdUserLingerNonInteractive } from "./systemd-linger.js"; import { ensureSystemdUserLingerNonInteractive } from "./systemd-linger.js";
export async function runNonInteractiveOnboarding( export async function runNonInteractiveOnboarding(

View File

@@ -166,7 +166,9 @@ export async function resolveGatewayProgramArguments(params: {
const repoRoot = resolveRepoRootForDev(); const repoRoot = resolveRepoRootForDev();
const devCliPath = path.join(repoRoot, "src", "index.ts"); const devCliPath = path.join(repoRoot, "src", "index.ts");
await fs.access(devCliPath); await fs.access(devCliPath);
const bunPath = isBunRuntime(execPath) ? execPath : await resolveBunPath(); const bunPath = isBunRuntime(execPath)
? execPath
: await resolveBunPath();
return { return {
programArguments: [bunPath, devCliPath, ...gatewayArgs], programArguments: [bunPath, devCliPath, ...gatewayArgs],
workingDirectory: repoRoot, workingDirectory: repoRoot,

View File

@@ -21,6 +21,11 @@ import {
isRemoteEnvironment, isRemoteEnvironment,
loginAntigravityVpsAware, loginAntigravityVpsAware,
} from "../commands/antigravity-oauth.js"; } from "../commands/antigravity-oauth.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "../commands/daemon-runtime.js";
import { healthCommand } from "../commands/health.js"; import { healthCommand } from "../commands/health.js";
import { import {
applyAuthProfileConfig, applyAuthProfileConfig,
@@ -52,11 +57,6 @@ import type {
OnboardOptions, OnboardOptions,
ResetScope, ResetScope,
} from "../commands/onboard-types.js"; } from "../commands/onboard-types.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "../commands/daemon-runtime.js";
import { import {
applyOpenAICodexModelDefault, applyOpenAICodexModelDefault,
OPENAI_CODEX_DEFAULT_MODEL, OPENAI_CODEX_DEFAULT_MODEL,