import type { BotConfig } from "../config/config.js"; import type { RuntimeEnv } from "../runtime.js"; import type { NodeManagerChoice, OnboardMode, ResetScope } from "./onboard-types.js"; export declare function guardCancel(value: T | symbol, runtime: RuntimeEnv): T; export declare function summarizeExistingConfig(config: BotConfig): string; export declare function randomToken(): string; export declare function normalizeGatewayTokenInput(value: unknown): string; export declare function validateGatewayPasswordInput(value: unknown): string | undefined; export declare function printWizardHeader(runtime: RuntimeEnv): void; export declare function applyWizardMetadata(cfg: BotConfig, params: { command: string; mode: OnboardMode; }): BotConfig; type BrowserOpenSupport = { ok: boolean; reason?: string; command?: string; }; type BrowserOpenCommand = { argv: string[] | null; reason?: string; command?: string; /** * Whether the URL must be wrapped in quotes when appended to argv. * Needed for Windows `cmd /c start` where `&` splits commands. */ quoteUrl?: boolean; }; export declare function resolveBrowserOpenCommand(): Promise; export declare function detectBrowserOpenSupport(): Promise; export declare function formatControlUiSshHint(params: { port: number; basePath?: string; token?: string; }): string; export declare function openUrl(url: string): Promise; export declare function openUrlInBackground(url: string): Promise; export declare function ensureWorkspaceAndSessions(workspaceDir: string, runtime: RuntimeEnv, options?: { skipBootstrap?: boolean; agentId?: string; }): Promise; export declare function resolveNodeManagerOptions(): Array<{ value: NodeManagerChoice; label: string; }>; export declare function moveToTrash(pathname: string, runtime: RuntimeEnv): Promise; export declare function handleReset(scope: ResetScope, workspaceDir: string, runtime: RuntimeEnv): Promise; export declare function detectBinary(name: string): Promise; export declare function probeGatewayReachable(params: { url: string; token?: string; password?: string; timeoutMs?: number; }): Promise<{ ok: boolean; detail?: string; }>; export declare function waitForGatewayReachable(params: { url: string; token?: string; password?: string; /** Total time to wait before giving up. */ deadlineMs?: number; /** Per-probe timeout (each probe makes a full gateway health request). */ probeTimeoutMs?: number; /** Delay between probes. */ pollMs?: number; }): Promise<{ ok: boolean; detail?: string; }>; export declare const DEFAULT_WORKSPACE: string; export declare function resolveControlUiLinks(params: { port: number; bind?: "auto" | "lan" | "loopback" | "custom" | "tailnet"; customBindHost?: string; basePath?: string; }): { httpUrl: string; wsUrl: string; }; export {};