/**
 * muffled-gate-scanner — test helper that greps consumer source for
 * gate + measurement anti-patterns and fails with file:line locations.
 *
 * Named pattern lives at starter-foundry's `.evolve/patterns/muffled-gate.md`;
 * same shape applies to every consumer (a gate that should fail loud
 * returns silent success; a metric that should emit a real number
 * reports noise/empty).
 *
 * Usage (in a consumer project's test file):
 *
 *   import { scanForMuffledGates, DEFAULT_FINDERS } from '@tangle-network/agent-eval'
 *
 *   test('no muffled gates in eval surface', () => {
 *     const findings = scanForMuffledGates({
 *       repoRoot: process.cwd(),
 *       scanFiles: ['src/eval/scaffold.ts', 'scripts/promote.mjs'],
 *       finders: DEFAULT_FINDERS,
 *     })
 *     if (findings.length) assert.fail(formatFindings(findings))
 *   })
 *
 * Customize by passing your own `finders` — each finder is
 * `(file, text) => Finding[]` and runs per-file.
 *
 * Escape hatch: any line containing `muffle-ok:` is excluded from all
 * finders, letting consumers opt a legitimate fallback out explicitly.
 */
export interface MuffledFinding {
    file: string;
    line: number;
    lineText: string;
    pattern: string;
}
export type MuffledFinder = (file: string, text: string) => MuffledFinding[];
export interface ScanOptions {
    /** Absolute path to the repo root. */
    repoRoot: string;
    /** Explicit file list (paths relative to repoRoot) for context-specific finders. */
    scanFiles: string[];
    /**
     * Auto-derived scan: walk these dirs for files matching importGlob + the
     * string `importsContain` and run the universal finders on them. Pattern
     * from starter-foundry H4 (research/decisions/001) — catches new files
     * with agent-eval import that would otherwise escape context-specific
     * scan lists.
     */
    autoDerive?: {
        roots: string[];
        extensions: RegExp;
        importsContain: string;
        universalFinders: MuffledFinder[];
    };
    /** Per-file finders (context-specific patterns). */
    finders: MuffledFinder[];
}
/**
 * Default finder: `command || true` in a testCommand/setupCommand/cmd/command
 * string. Swallows exit codes.
 */
export declare const findFallbackToPass: MuffledFinder;
/**
 * `testCommand: 'true'` literal silent-pass — an unknown-language dispatch
 * arm that returns a no-op instead of throwing.
 */
export declare const findLiteralTruePass: MuffledFinder;
/**
 * `new SubprocessSandboxDriver({ cwd: ... })` — constructor arg silently
 * dropped in agent-eval <0.7.1. 0.7.1+ honors as fallback, but the form
 * still invites confusion; prefer `new SubprocessSandboxDriver()` with
 * cwd in the per-call HarnessConfig.
 */
export declare const findConstructorCwdDropped: MuffledFinder;
/**
 * `if (!expected) return true` — matcher auto-passes when ground truth is
 * absent. Inflates accuracy metrics for scenarios without expectations.
 */
export declare const findAutoMatchNoExpectation: MuffledFinder;
/**
 * `if (p.skipped) return true` — skip-counts-as-pass in quality scorers.
 * Use three-valued `true | false | 'skipped'` return + explicit partial
 * credit instead.
 */
export declare const findSkipCountsAsPass: MuffledFinder;
/**
 * The canonical default bundle. Callers can import these individually,
 * replace them, or append custom finders for project-specific patterns.
 */
export declare const DEFAULT_FINDERS: MuffledFinder[];
/** Finders that should run on EVERY file with the target import, not just SCAN_FILES. */
export declare const UNIVERSAL_FINDERS: MuffledFinder[];
/**
 * Run all finders against the configured files. Returns a flat list of
 * findings. Callers format + assert as they prefer.
 */
export declare function scanForMuffledGates(opts: ScanOptions): MuffledFinding[];
/**
 * Format findings into a single assert.fail-ready message. Each finding
 * carries file:line + pattern name + the offending line.
 */
export declare function formatFindings(findings: MuffledFinding[]): string;
//# sourceMappingURL=muffled-gate-scanner.d.ts.map