diff --git a/src/commands/onboard-interactive.ts b/src/commands/onboard-interactive.ts index 90ddd089a..a124378ff 100644 --- a/src/commands/onboard-interactive.ts +++ b/src/commands/onboard-interactive.ts @@ -20,10 +20,10 @@ import { import { GATEWAY_LAUNCH_AGENT_LABEL } from "../daemon/constants.js"; import { resolveGatewayProgramArguments } from "../daemon/program-args.js"; import { resolveGatewayService } from "../daemon/service.js"; -import { healthCommand } from "./health.js"; import type { RuntimeEnv } from "../runtime.js"; import { defaultRuntime } from "../runtime.js"; import { resolveUserPath, sleep } from "../utils.js"; +import { healthCommand } from "./health.js"; import { applyMinimaxConfig, setAnthropicApiKey, @@ -66,11 +66,15 @@ export async function runInteractiveOnboarding( let baseConfig: ClawdisConfig = snapshot.valid ? snapshot.config : {}; if (snapshot.exists) { - const title = snapshot.valid ? "Existing config detected" : "Invalid config"; + const title = snapshot.valid + ? "Existing config detected" + : "Invalid config"; note(summarizeExistingConfig(baseConfig), title); if (!snapshot.valid && snapshot.issues.length > 0) { note( - snapshot.issues.map((iss) => `- ${iss.path}: ${iss.message}`).join("\n"), + snapshot.issues + .map((iss) => `- ${iss.path}: ${iss.message}`) + .join("\n"), "Config issues", ); } @@ -94,7 +98,10 @@ export async function runInteractiveOnboarding( message: "Reset scope", options: [ { value: "config", label: "Config only" }, - { value: "config+creds+sessions", label: "Config + creds + sessions" }, + { + value: "config+creds+sessions", + label: "Config + creds + sessions", + }, { value: "full", label: "Full reset (config + creds + sessions + workspace)", @@ -285,7 +292,10 @@ export async function runInteractiveOnboarding( } if (tailscaleMode !== "off" && bind !== "loopback") { - note("Tailscale requires bind=loopback. Adjusting bind to loopback.", "Note"); + note( + "Tailscale requires bind=loopback. Adjusting bind to loopback.", + "Note", + ); bind = "loopback"; } @@ -392,7 +402,10 @@ export async function runInteractiveOnboarding( } } - if (!loaded || (loaded && (await service.isLoaded({ env: process.env })) === false)) { + if ( + !loaded || + (loaded && (await service.isLoaded({ env: process.env })) === false) + ) { const devMode = process.argv[1]?.includes(`${path.sep}src${path.sep}`) && process.argv[1]?.endsWith(".ts"); @@ -402,7 +415,9 @@ export async function runInteractiveOnboarding( PATH: process.env.PATH, CLAWDIS_GATEWAY_TOKEN: gatewayToken, CLAWDIS_LAUNCHD_LABEL: - process.platform === "darwin" ? GATEWAY_LAUNCH_AGENT_LABEL : undefined, + process.platform === "darwin" + ? GATEWAY_LAUNCH_AGENT_LABEL + : undefined, }; await service.install({ env: process.env, diff --git a/src/commands/onboard-non-interactive.ts b/src/commands/onboard-non-interactive.ts index 4d744b74f..4904655c7 100644 --- a/src/commands/onboard-non-interactive.ts +++ b/src/commands/onboard-non-interactive.ts @@ -1,17 +1,17 @@ import path from "node:path"; import { + type ClawdisConfig, CONFIG_PATH_CLAWDIS, readConfigFileSnapshot, writeConfigFile, - type ClawdisConfig, } from "../config/config.js"; import { GATEWAY_LAUNCH_AGENT_LABEL } from "../daemon/constants.js"; import { resolveGatewayProgramArguments } from "../daemon/program-args.js"; import { resolveGatewayService } from "../daemon/service.js"; -import { resolveUserPath, sleep } from "../utils.js"; import type { RuntimeEnv } from "../runtime.js"; import { defaultRuntime } from "../runtime.js"; +import { resolveUserPath, sleep } from "../utils.js"; import { healthCommand } from "./health.js"; import { applyMinimaxConfig, setAnthropicApiKey } from "./onboard-auth.js"; import { @@ -19,7 +19,11 @@ import { ensureWorkspaceAndSessions, randomToken, } from "./onboard-helpers.js"; -import type { AuthChoice, OnboardMode, OnboardOptions } from "./onboard-types.js"; +import type { + AuthChoice, + OnboardMode, + OnboardOptions, +} from "./onboard-types.js"; export async function runNonInteractiveOnboarding( opts: OnboardOptions, diff --git a/src/commands/onboard-providers.ts b/src/commands/onboard-providers.ts index 742849ee3..503007199 100644 --- a/src/commands/onboard-providers.ts +++ b/src/commands/onboard-providers.ts @@ -286,7 +286,7 @@ export async function setupProviders( note( [ - "Link device with: signal-cli link -n \"Clawdis\"", + 'Link device with: signal-cli link -n "Clawdis"', "Scan QR in Signal → Linked Devices", "Then run: clawdis gateway call providers.status --params '{\"probe\":true}'", ].join("\n"), diff --git a/src/commands/onboard-skills.ts b/src/commands/onboard-skills.ts index c8ff377ed..38a1a06f6 100644 --- a/src/commands/onboard-skills.ts +++ b/src/commands/onboard-skills.ts @@ -1,4 +1,11 @@ -import { confirm, multiselect, note, select, spinner, text } from "@clack/prompts"; +import { + confirm, + multiselect, + note, + select, + spinner, + text, +} from "@clack/prompts"; import { installSkill } from "../agents/skills-install.js"; import { buildWorkspaceSkillStatus } from "../agents/skills-status.js"; @@ -121,8 +128,8 @@ export async function setupSkills( const apiKey = String( guardCancel( await text({ - message: `Enter ${skill.primaryEnv}`, - validate: (value) => (value?.trim() ? undefined : "Required"), + message: `Enter ${skill.primaryEnv}`, + validate: (value) => (value?.trim() ? undefined : "Required"), }), runtime, ),