import type { Logger } from "@tylerbu/cli-api"; import { type Operation } from "effection"; import { type ExcludedPolicyFileMap } from "./context.js"; import { type PolicyHandlerPerfStats } from "./perf.js"; import type { PolicyFixResult, PolicyHandlerResult, PolicyInstance, PolicyInstanceId, PolicyName } from "./policy.js"; /** * Result of running a single policy on a single file. * @alpha */ export interface PolicyFileResult { file: string; policy: PolicyName; /** Stable identity of the configured policy instance */ policyId: PolicyInstanceId; /** The raw result from the policy handler */ outcome: PolicyHandlerResult; /** Set when a standalone resolver was attempted (legacy resolver path) */ resolution?: PolicyFixResult; } /** * Aggregated results from a full policy run. * @alpha */ export interface PolicyRunResults { results: PolicyFileResult[]; perfStats: PolicyHandlerPerfStats; } /** * Options for configuring a {@link PolicyRunner}. * @alpha */ export interface PolicyRunnerOptions { policies: PolicyInstance[]; excludeFromAll: RegExp[]; excludePoliciesForFiles: ExcludedPolicyFileMap; gitRoot: string; resolve: boolean; logger?: Pick; } /** * Runs configured policies against files and collects results. * @alpha */ export declare class PolicyRunner { private readonly policies; private readonly excludeFromAll; private readonly excludePoliciesForFiles; private readonly gitRoot; private readonly resolve; private readonly logger; constructor(options: PolicyRunnerOptions); run(filePaths: string[]): Operation; private checkOrExcludeFile; private routeToPolicies; private runPolicyOnFile; private isPolicyExcluded; private executePolicyHandler; private attemptResolution; } //# sourceMappingURL=runner.d.ts.map