import { type BrowserAssetName } from "../runtime/browsers.js";
export { runSpecs, runViaApi, getRunner, ensureChromeAvailable, ensureContextBrowserInstalled, combinationKey, warmUpDecision, selectWarmUpTargets, getDriverCapabilities, getDefaultBrowser, isSupportedContext, resolveAutoScreenshot, };
/**
 * Stable identity for a "context combination" — the platform + browser pairing
 * that determines whether a driver session can be created. The runner memoizes
 * warm-up outcomes by this key so a combination that fails to start once isn't
 * re-attempted (with its slow driverStart backoff) for every later context.
 * headless is intentionally excluded: headed/headless are two attempts at the
 * same combination (the loop retries headless on failure), not distinct ones.
 * `webkit` is normalized to `safari` so the key matches getAvailableApps naming.
 */
declare function combinationKey(context: any): string;
/**
 * Decide whether a context combination should be attempted or skipped, given
 * its prior warm-up outcome in this run. Pure so the memoization branching is
 * unit-testable without spinning up Appium. A previously-failed combination is
 * skipped outright; everything else is attempted (and its outcome recorded by
 * the caller).
 */
declare function warmUpDecision(prev: "ok" | "failed" | undefined): "attempt" | "skip";
declare function getDriverCapabilities({ runnerDetails, name, options }: {
    runnerDetails: any;
    name: any;
    options: any;
}): any;
declare function isSupportedContext({ context, apps, platform }: {
    context: any;
    apps: any[];
    platform: any;
}): boolean;
declare function getDefaultBrowser({ runnerDetails }: {
    runnerDetails: any;
}): any;
declare function runViaApi({ resolvedTests, apiKey, config }: {
    resolvedTests: any;
    apiKey: any;
    config?: any;
}): Promise<any>;
/**
 * Orchestrates execution of resolved test specifications and returns a hierarchical run report.
 *
 * Flattens every context across all specs and tests into one job list and runs it through a
 * worker pool sized by config.concurrentRunners (default 1 = sequential). Conditionally starts
 * Appium and browser drivers, applies viewport/window sizing, handles unsafe-step policies and
 * recording, then rolls per-step, per-context, per-test, and per-spec results up in a
 * deterministic post-pass. Report order always matches input order.
 *
 * @param {Object} resolvedTests - Resolved test bundle containing configuration and specs to run.
 * @param {Object} resolvedTests.config - Runner configuration used during execution.
 * @param {Array<Object>} resolvedTests.specs - Array of spec objects to execute.
 * @returns {Object} A report object summarizing results with structure:
 *  {
 *    summary: { specs: {...}, tests: {...}, contexts: {...}, steps: {...} },
 *    specs: [ { specId, description, contentPath, result, tests: [ { testId, description, contentPath, result, contexts: [ { platform, browser, result, steps: [...] } ] } ] } ]
 *  }
 */
declare function runSpecs({ resolvedTests }: {
    resolvedTests: any;
}): Promise<any>;
/**
 * Pick which contexts warmUpContexts should warm up: one representative per
 * unique platform::browser combination among the driver-required jobs. Applies
 * the same platform default and default-browser resolution runContext uses, so
 * the combination keys it produces match the ones runContext looks up in the
 * pool. Non-driver and browserless contexts are excluded. Mutates
 * context.platform / context.browser in place — idempotent, since runContext
 * applies the identical defaults. Pure (no I/O) so the selection + de-dup +
 * normalization logic is unit-testable without Appium.
 */
declare function selectWarmUpTargets(jobs: any[], runnerDetails: any): Array<{
    context: any;
    combo: string;
}>;
declare function resolveAutoScreenshot({ config, spec, test, }: {
    config: any;
    spec: any;
    test: any;
}): boolean;
declare function runStep({ config, context, step, driver, metaValues, options, }: {
    config?: any;
    context?: any;
    step: any;
    driver: any;
    metaValues?: any;
    options?: any;
}): Promise<any>;
/**
 * Resolve the available-apps list with Chrome guaranteed present, lazy-
 * installing the browser runtime on a miss before giving up. This is the
 * runtime counterpart to the runTests pre-flight: it runs regardless of
 * DOC_DETECTIVE_AUTOINSTALL (that env var only governs the *eager* postinstall
 * download — first use should still self-provision). A provisioning failure
 * (e.g. offline) is swallowed so the caller sees the clear "not available"
 * error rather than a raw npm/network stack. Deps are injected for testing.
 *
 * @returns the available-apps array, with a chrome entry present.
 * @throws if chrome is still unavailable after a provisioning attempt.
 */
declare function ensureChromeAvailable(config: any, deps: {
    detect: (config: any) => Promise<any[]>;
    provision: (config: any) => Promise<void>;
    invalidate: (config: any) => void;
    log?: (config: any, level: string, msg: string) => void;
}): Promise<any[]>;
/**
 * On-demand, per-context browser/driver install used by the runner when a
 * context's browser isn't yet available (e.g. Firefox declared but geckodriver
 * missing). Attempts to install every asset the browser needs, memoizing the
 * outcome in `installAttempts` so a failed (or no-op) attempt isn't repeated
 * for every later context that shares the browser. Like ensureChromeAvailable,
 * this self-provisions regardless of DOC_DETECTIVE_AUTOINSTALL (that env var
 * only governs the eager postinstall). Deps are injected for testing.
 *
 * @returns "installed" when all assets installed, "failed" when an install
 *   threw, or "notInstallable" for browsers with no installable asset (safari).
 */
declare function ensureContextBrowserInstalled({ browserName, config, installAttempts, deps, }: {
    browserName: string | undefined;
    config: any;
    installAttempts: Map<string, "installed" | "failed" | "notInstallable">;
    deps: {
        ensureBrowser: (asset: BrowserAssetName, options: any) => Promise<any>;
        log?: (config: any, level: string, msg: string) => void;
    };
}): Promise<"installed" | "failed" | "notInstallable">;
declare function getRunner(options?: any): Promise<{
    runner: any;
    appium: import("node:child_process").ChildProcessWithoutNullStreams;
    cleanup: () => Promise<void>;
    runStep: typeof runStep;
}>;
//# sourceMappingURL=tests.d.ts.map