style: format daemon runtime changes
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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" {
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user