import type { ViteUserConfig } from "vitest/config";
/** Vite UserConfig augmented with Vitest's `test` property */
type UserConfig = ViteUserConfig;
/**
 * Vitest coverage threshold shape — flat metrics without the `global` wrapper
 * that Jest uses. Projects store thresholds in the Jest-compatible format
 * (with `global` key) for portability; factories map to this shape internally.
 */
export interface VitestThresholds {
    readonly statements?: number;
    readonly branches?: number;
    readonly functions?: number;
    readonly lines?: number;
}
/**
 * Portable threshold format shared with Jest configs.
 * Projects use this in their threshold JSON files so the same file
 * works with both Jest (Expo/CDK) and Vitest (TypeScript/NestJS).
 */
export interface PortableThresholds {
    readonly global?: {
        readonly statements?: number;
        readonly branches?: number;
        readonly functions?: number;
        readonly lines?: number;
    };
    readonly [path: string]: unknown;
}
/**
 * Default coverage thresholds used when not specified in project config.
 * Projects can override via vitest.thresholds.json.
 */
export declare const defaultThresholds: PortableThresholds;
/**
 * Default patterns to exclude from coverage collection.
 * Common across all stacks — stack-specific configs extend this list.
 *
 * Unlike Jest's `!`-prefixed negation patterns in `collectCoverageFrom`,
 * Vitest uses separate `include`/`exclude` arrays without `!` prefixes.
 */
export declare const defaultCoverageExclusions: readonly string[];
/**
 * Default patterns to exclude from test discovery across all stacks.
 *
 * The `.claude/worktrees/` exclusion is intentionally NOT baked in here —
 * it is cwd-conditional and supplied by {@link worktreeExclusions} so that
 * a vitest run launched from INSIDE a worktree can still discover its own
 * tests. Stack factories spread `worktreeExclusions()` alongside this list.
 */
export declare const defaultTestExclusions: readonly string[];
/**
 * Returns the worktree exclusion globs a stack config should add to skip
 * test files / coverage that live inside an agent worktree.
 *
 * Lisa manages scratch worktrees for subagents under TWO roots —
 * `.claude/worktrees/` and a bare `.worktrees/` — and both must be covered.
 * Omitting the second one let sibling worktrees dominate test discovery from
 * the primary checkout (one host project measured 13,821 of 14,277 collected
 * files coming from other branches' worktrees), so the local suite reported
 * other agents' in-flight failures instead of this checkout's.
 *
 * When vitest runs from the primary checkout, tests inside those worktrees
 * should be skipped — each worktree has its own vitest run. When vitest runs
 * from INSIDE a worktree (the project root *is* the worktree), the same globs
 * match every path under root and vitest finds zero tests. This returns the
 * globs only when the current working directory is outside a worktree, so each
 * stack factory can spread them into its `exclude` arrays without hand-rolling
 * the conditional. Mirrors jest's `worktreeTestPathIgnorePatterns()`.
 * @returns The worktree exclude globs, or an empty array when already inside a worktree.
 */
export declare function worktreeExclusions(): readonly string[];
/**
 * Setup files that bound and reclaim the suite's temporary directories.
 *
 * Every stack factory spreads this. Without it, each fixture's
 * `mkdtemp(os.tmpdir())` lands directly in the shared platform temp root, which
 * is never emptied while the machine is up and which no in-process cleanup can
 * protect once the runner is killed.
 * @returns Absolute paths to spread into `test.setupFiles`.
 * @see {@link module:configs/vitest/scratch} for the measurements behind this
 */
export declare function scratchSetupFiles(): readonly string[];
/**
 * Global setup that reclaims residue before a run and audits the namespace after it.
 * @returns Absolute paths to spread into `test.globalSetup`.
 */
export declare function scratchGlobalSetup(): readonly string[];
/**
 * Maps portable threshold format (with `global` wrapper) to Vitest's
 * flat threshold format. Projects store thresholds in the portable
 * format so the same JSON file works for both Jest and Vitest stacks.
 * @param thresholds - Portable thresholds with `global` wrapper
 * @returns Flat Vitest thresholds object
 */
export declare const mapThresholds: (thresholds: PortableThresholds) => VitestThresholds;
/**
 * Merges project-specific threshold overrides into default thresholds.
 * Allows projects to selectively raise or lower coverage requirements
 * via vitest.thresholds.json without replacing the entire threshold object.
 *
 * Uses the portable format (with `global` wrapper) for compatibility
 * with both Jest and Vitest threshold JSON files.
 * @param defaults - Base thresholds from the stack config
 * @param overrides - Project-specific overrides from vitest.thresholds.json
 * @returns Merged thresholds with overrides taking precedence
 */
export declare const mergeThresholds: (defaults: PortableThresholds, overrides: PortableThresholds) => PortableThresholds;
/**
 * Deep merges the `test` key of multiple Vitest UserConfig objects.
 * Arrays are concatenated and deduplicated. Nested objects (like
 * `coverage`) are shallow-merged. Scalar values from later configs
 * take precedence.
 * @param configs - Vitest UserConfig objects to merge in order of precedence
 * @returns Single merged UserConfig
 */
export declare const mergeVitestConfigs: (...configs: UserConfig[]) => UserConfig;
export {};
//# sourceMappingURL=base.d.ts.map