feat: add gateway daemon runtime selector

This commit is contained in:
Peter Steinberger
2026-01-06 23:27:58 +01:00
parent 18c43fe462
commit 707f7918bc
17 changed files with 191 additions and 23 deletions

View File

@@ -52,6 +52,11 @@ import type {
OnboardOptions,
ResetScope,
} from "../commands/onboard-types.js";
import {
DEFAULT_GATEWAY_DAEMON_RUNTIME,
GATEWAY_DAEMON_RUNTIME_OPTIONS,
type GatewayDaemonRuntime,
} from "../commands/daemon-runtime.js";
import {
applyOpenAICodexModelDefault,
OPENAI_CODEX_DEFAULT_MODEL,
@@ -629,6 +634,11 @@ export async function runOnboardingWizard(
});
if (installDaemon) {
const daemonRuntime = (await prompter.select({
message: "Gateway daemon runtime",
options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
initialValue: opts.daemonRuntime ?? DEFAULT_GATEWAY_DAEMON_RUNTIME,
})) as GatewayDaemonRuntime;
const service = resolveGatewayService();
const loaded = await service.isLoaded({ env: process.env });
if (loaded) {
@@ -655,7 +665,11 @@ export async function runOnboardingWizard(
process.argv[1]?.includes(`${path.sep}src${path.sep}`) &&
process.argv[1]?.endsWith(".ts");
const { programArguments, workingDirectory } =
await resolveGatewayProgramArguments({ port, dev: devMode });
await resolveGatewayProgramArguments({
port,
dev: devMode,
runtime: daemonRuntime,
});
const environment: Record<string, string | undefined> = {
PATH: process.env.PATH,
CLAWDBOT_GATEWAY_TOKEN: gatewayToken,