import { type BrowserName } from '../fetch/browser-probe.js'; import type { WarmupReporter } from './tui/reporter.js'; import { type LocalModelTier } from '../integrations/cloud/llm/local-tier.js'; /** * Build the surfaced error for a failed browser install. A timeout is the most * common slow/restricted-network failure, so it gets an explicit, actionable * message (retry / mirror) instead of the half-drawn progress bar it left in the * captured streams. Otherwise: merge BOTH streams — a real download error can * land on stdout, which the old `stderr || stdout` dropped whenever the npx * banner filled stderr — strip the npx-global banner, and fall back to the exit * code when nothing else was printed. */ export declare function sanitizeBrowserInstallError(stdout: string, stderr: string, code: number, timedOut?: boolean): string; export declare function installBrowser(browser: BrowserName): Promise<{ ok: boolean; error?: string; }>; export interface WarmupResult { playwright: 'ok' | 'failed'; playwrightError?: string; searxng: 'ready' | 'bootstrapped' | 'failed' | 'no_python' | 'no_venv' | 'skipped'; searxngError?: string; reranker?: 'ok' | 'failed'; rerankerError?: string; firefox?: 'ok' | 'failed'; firefoxError?: string; webkit?: 'ok' | 'failed'; webkitError?: string; embeddings?: 'ok' | 'failed'; embeddingsError?: string; } /** * Map the internal WarmupResult to the machine-facing --json shape, renaming the * implementation-library keys to capability names (`playwright` → `browserEngine`, * `searxng` → `searchSidecar`) so the JSON contract carries no library names — * the same rule the OpenAPI surface enforces. The internal type keeps its field * names; the rename happens only at this serialization boundary. Optional fields * are copied through unchanged. */ export declare function warmupResultToJson(result: WarmupResult): Record; /** * Format the opt-in local-model tier (`WIGOLO_LOCAL_LLM`) summary line for * warmup. Pure so the branching is asserted without a live server. warmup does * not install models — it only reports the resolved state. Component names * (local model server / model name) are allowed in warmup output. */ export declare function formatLocalLlmWarmupLine(state: { localLlm: string; tier: LocalModelTier | null; }): string; export declare function wipeSearxngState(dataDir: string, reporter?: WarmupReporter): void; export declare function installEmbeddings(reporter?: WarmupReporter): Promise>; export declare function runWarmup(flags?: string[], reporter?: WarmupReporter): Promise; //# sourceMappingURL=warmup.d.ts.map