import type { RecipeStore } from "./store.js"; import type { ActionRecipe } from "./types.js"; export type LintSeverity = "error" | "warn" | "info"; export interface LintIssue { recipe: string; severity: LintSeverity; /** Short identifier — stable across versions for scripting. */ rule: LintRule; /** Human-readable message. */ message: string; /** Step index (0-based) when the lint targets a specific step. */ stepIndex?: number; } export type LintRule = "empty-steps" | "missing-expect-after" | "click-at-without-viewport-hint" | "empty-preconditions" | "verified-without-postconditions" | "long-raw-wait" | "adjacent-duplicate-wait" | "missing-required-recipe" | "requires-cycle" | "hardcoded-credentials"; export interface LintOptions { /** * When provided, enables cross-recipe lints (missing `requires`, * cycle detection). Pass the store you'd resolve the chain against. */ store?: RecipeStore; /** * Pre-computed set of names known to the store. Pass when linting a * batch (`lintStore`) to avoid re-listing the store inside every * recipe — `store.list()` deep-clones every entry, so without this * the cost is O(N²) deep-clones. */ knownNames?: ReadonlySet; /** * Wait threshold (ms) above which raw `wait` steps emit a `long-raw-wait`. * Default: 2000ms. */ longWaitThresholdMs?: number; } export interface LintReport { readonly issues: ReadonlyArray; readonly errorCount: number; readonly warnCount: number; readonly infoCount: number; } export declare function lintRecipe(recipe: ActionRecipe, opts?: LintOptions): LintIssue[]; export declare function lintStore(store: RecipeStore, opts?: LintOptions): LintReport; export declare function summarise(issues: LintIssue[]): LintReport; //# sourceMappingURL=lint.d.ts.map