import { type EnsureTtsVenvOptions } from "./python-env.js";
export { PythonMissingError } from "./python-env.js";
/** The managed collector venv root, e.g. <dataDir>/collector-venv. Honours
 *  AUTOVIRAL_DATA_DIR via dataDir, so tests stay isolated. */
export declare function collectorVenvDir(): string;
/** Platform-correct path to a console-script inside the venv (venv layout
 *  differs on Windows: Scripts/<name>.exe vs bin/<name>). */
export declare function collectorVenvBinPath(name: string): string;
/** Absolute path to the collector venv's Python interpreter — the collector
 *  subprocess (S5) must run under the SAME interpreter pip installed f2 +
 *  browser_cookie3 into. Falls back to bare "python3" when the venv hasn't been
 *  provisioned yet, so a caller that skips ensureCollectorVenv() still degrades
 *  to the host interpreter rather than crashing on an absent path. */
export declare function collectorVenvPythonPath(): string;
/** True once the venv has BOTH managed deps — the f2 console-script AND the
 *  browser_cookie3 package — i.e. a previous ensureCollectorVenv() fully
 *  provisioned it. Pure read; safe to call anywhere (doctor relies on this).
 *
 *  WHY BOTH (same trap python-env.ts hit for edge-tts/stable-ts): a venv created
 *  by an f2-only path would have f2 but not browser_cookie3. If readiness probed
 *  f2 alone, ensureCollectorVenv() would short-circuit "already provisioned" and
 *  the cookie-read path would fail forever. Gating on both deps forces
 *  ensureCollectorVenv() to re-run the (idempotent, --upgrade) pip step and
 *  back-fill the missing dep. */
export declare function collectorVenvReady(): boolean;
/**
 * Idempotently provision <dataDir>/collector-venv with f2 + browser_cookie3.
 *
 * Steps (each skipped when already satisfied):
 *   1. if f2 AND browser_cookie3 are both already present → no-op (idempotent).
 *      NB readiness requires BOTH deps, so an f2-only venv does NOT short-circuit
 *      here — it falls through to the pip step and back-fills browser_cookie3.
 *   2. verify python3 is runnable; if not → throw PythonMissingError with a
 *      copy-paste-able install hint (we cannot bundle a system Python here).
 *   3. `python3 -m venv <dataDir>/collector-venv` (skipped if its python exists).
 *   4. `<venv>/bin/python -m pip install --upgrade f2 browser_cookie3` — RUN
 *      whenever browser_cookie3 isn't importable under the venv interpreter
 *      (probed via `import browser_cookie3`), even if f2 already exists.
 *      --upgrade makes the re-run safe + idempotent on already-satisfied deps.
 *
 * Best-effort: a pip failure throws (so the caller can surface a real error)
 * but creation NEVER runs twice concurrently — a burst of refresh calls shares
 * one in-flight promise. Returns once the venv is ready (or throws).
 *
 * LAZY by contract: callers invoke this right before the first collector use (or
 * via `autoviral setup`), not at daemon boot — `python3 -m venv` + a pip
 * download can take many seconds and must never block the server starting.
 */
export declare function ensureCollectorVenv(opts?: EnsureTtsVenvOptions): Promise<void>;
/** Clear the in-flight guard so idempotency / concurrency tests can re-run under
 *  a freshly mutated env / filesystem. */
export declare function _resetCollectorEnvForTests(): void;
//# sourceMappingURL=collector-env.d.ts.map