import { detect, ensureManaged } from "./deps.js";
import { ensurePlaywrightChromium, ensureTtsVenv, ttsVenvDir, ttsVenvReady, venvBinPath } from "./python-env.js";
import { collectorVenvDir, collectorVenvReady, ensureCollectorVenv } from "./collector-env.js";
/** Sink for human-readable output — injected so tests can capture instead of
 *  writing to the real stdout. */
export type Reporter = (line: string) => void;
/** D1 (PRD-0009 E2E): whether the Remotion render entry resolves — either a
 *  pre-built bundle dir (AUTOVIRAL_REMOTION_BUNDLE, packaged app) or the
 *  web/src source checkout (sibling of dist/, dev + repo daemon). Without one
 *  of these, render/export/snapshot fail 100% — doctor used to say "Core
 *  dependencies OK" while every render job died on a webpack ENOENT. */
export interface RemotionEntryProbe {
    ready: boolean;
    via: "bundle" | "source" | null;
    /** The path that resolved (ready) or the path we looked for (missing). */
    path: string;
}
/** Dependencies injected for tests — defaults are the REAL src/infra modules so
 *  production wiring needs no arguments. */
export interface DoctorDeps {
    detect: typeof detect;
    ttsVenvReady: typeof ttsVenvReady;
    ttsVenvDir: typeof ttsVenvDir;
    venvBinPath: typeof venvBinPath;
    /** Whether a core bare-name binary resolves on $PATH (only consulted at the
     *  "path" tier). Injected so a missing-ffmpeg case is unit-testable. */
    binaryOnPath: (name: string) => boolean;
    chromiumCached: () => boolean;
    resolveClaude: () => string | null;
    /** Whether the managed Douyin-collector venv (f2 + browser_cookie3) is
     *  provisioned. Injected so the present/missing report is unit-testable. */
    collectorVenvReady: typeof collectorVenvReady;
    collectorVenvDir: typeof collectorVenvDir;
    /** D1: Remotion render-entry probe (bundle env or web/src sibling). Injected
     *  so the missing-entry → exit-1 case is unit-testable. */
    remotionEntry: () => RemotionEntryProbe;
    out: Reporter;
}
/**
 * Print a dependency-readiness table for ffmpeg/ffprobe (the core render chain),
 * the TTS venv (edge-tts + stable-ts), playwright chromium, and the claude CLI,
 * each with where it resolves and how to fix a gap.
 *
 * Returns exit code 1 IFF a CORE dependency (ffmpeg/ffprobe) is unspawnable —
 * i.e. it resolved only to a bare PATH name that isn't actually on $PATH. A
 * missing TTS/playwright/claude is a WARNING (degrades a feature, not the core
 * chain) and does NOT change the exit code; `autoviral setup` (or first-use lazy
 * install) handles those.
 */
export declare function runDoctor(deps?: Partial<DoctorDeps>): Promise<number>;
export interface SetupOpts {
    /** Install playwright chromium (~150MB) now instead of lazy-on-first-use. */
    heavy?: boolean;
}
/** Dependencies injected for tests — defaults call the REAL provisioners. */
export interface SetupDeps {
    ensureManaged: typeof ensureManaged;
    ensureTtsVenv: typeof ensureTtsVenv;
    /** Provisions the managed Douyin-collector venv (f2 + browser_cookie3). */
    ensureCollectorVenv: typeof ensureCollectorVenv;
    ensurePlaywrightChromium: typeof ensurePlaywrightChromium;
    /** Post-install readiness probe for the core binaries (mirrors runDoctor). */
    detect: typeof detect;
    binaryOnPath: (name: string) => boolean;
    out: Reporter;
}
/**
 * Install the missing pieces with streamed progress:
 *   1. ensureManaged() copies the vendored ffmpeg/ffprobe into ~/.autoviral/bin;
 *   2. ensureTtsVenv() provisions the TTS python venv (edge-tts + stable-ts);
 *   3. ensureCollectorVenv() provisions the Douyin-collector venv (f2 +
 *      browser_cookie3);
 *   4. playwright chromium — lazy by default (just a note), or ensurePlaywright-
 *      Chromium() now with `--heavy`.
 *
 * Returns exit code 1 ONLY when the CORE step (ffmpeg/ffprobe) leaves the
 * binaries unspawnable; a TTS / collector / playwright failure is reported but
 * doesn't fail the whole setup (those degrade a feature, not the core render
 * chain). Mirrors the bridge CLI's setup exit-code semantics.
 */
export declare function runSetup(opts?: SetupOpts, deps?: Partial<SetupDeps>): Promise<number>;
//# sourceMappingURL=dep-doctor.d.ts.map