import type { LlmMutatorConfig } from '../config'; import type { NodeMutator } from '../mutators/index'; import type { RunOptions, InjectionMode } from './cli-args'; import { type GatePlan } from './gate'; import { type HeuristicSelection } from './select-mutators'; /** * Partial Stryker options the driver assembles from CLI flags + the resolved * config file. Deliberately a structural subset (only the keys we set) so this * module need not import Stryker's `PartialStrykerOptions` type. `run.ts` widens * it to the real type at the `new Stryker(...)` call site. */ export interface PartialStrykerOptions { /** Forwarded `--config-file` (the resolved path), so Stryker loads the same file. */ configFile?: string; /** `mutate` globs (from `--mutate`, else the target config's own value via omission). */ mutate?: string[]; /** `--concurrency`. */ concurrency?: number; /** `--reporters`. */ reporters?: string[]; /** `--incremental` / `--no-incremental`. */ incremental?: boolean; /** `--temp-dir`. */ tempDirName?: string; /** * The target's `excludedMutations` with a bare `llm` expanded to every * `Llm` name. Set ONLY on a dynamic-LLM run whose target list names * `llm` (Stryker matches this list case-sensitively by exact name, so the * plugin must expand it before Stryker sees it); omitted otherwise so Stryker * uses the config file's own value untouched. */ excludedMutations?: string[]; } /** The complete, pure plan `run.ts` executes. */ export interface RunPlan { /** Absolute-or-relative project dir to chdir into (from {@link RunOptions}). */ projectDir: string; /** Whether to actually invoke Stryker (`--live`) or just print the plan (`--dry-run`). */ live: boolean; /** The switch-gating decision (both-off warn, dynamicLLM gating). */ gate: GatePlan; /** The heuristic selection (mutators + any unimplemented requests) for logging. */ selection: HeuristicSelection; /** * The FINAL mutators to inject. At plan time this is the heuristic selection; * the 17 dynamic-LLM mutators (`llm` wildcard + 16 categories) are appended by * `run.ts` AFTER `buildLlmMutator`, so they never reach this list at plan time. */ injectedMutators: NodeMutator[]; /** * The injection mode actually applied. `replace` (`--ours-only`) is DOWNGRADED * to `augment` when there is nothing of ours to inject — counting the deferred * dynamic-LLM mutators `run.ts` appends after this plan is built — so we never * clear Stryker's built-ins to an empty registry (which would mutate nothing). */ mode: InjectionMode; /** The partial Stryker options assembled from the flags + resolved config file. */ strykerOptions: PartialStrykerOptions; } /** * Build the complete {@link RunPlan} from parsed options + the read config. * PURE — see the module header. * * @param opts The parsed CLI run options. * @param config The already-read, fully-defaulted target config. * @param configFilePath The resolved config-file path to forward to Stryker (or * `undefined` when no config file was found). * @param targetExcludedMutations The target config's own `excludedMutations` * list (from `readTargetConfig`), or `undefined` when it has none. A bare * `llm` in it is expanded to every `Llm` on a dynamic-LLM run. */ export declare function buildRunPlan(opts: RunOptions, config: LlmMutatorConfig, configFilePath: string | undefined, targetExcludedMutations?: readonly string[]): RunPlan;