/** * LLM security analyzer for the accuracy benchmark. * * Runs the LLM layer (Anthropic, optionally OpenAI for cross-model * consensus) over a code sample and returns structured findings in the * same shape the eval harness matches against ground truth. This lets * the benchmark measure the *full pipeline*, not just the deterministic * scanners — and it's where the logic/semantic classes (auth-bypass, * RLS, deserialization) the scanners miss should get caught. * * Providers are loaded via dynamic import so neither SDK is a hard * runtime dependency (openai is only needed for consensus). * * @module eval/llm-analyzer */ import type { ActualFinding } from "./types.js"; export type LlmProvider = "anthropic" | "openai"; /** Whether a given provider can run (API key present). */ export declare function providerAvailable(provider: LlmProvider): boolean; /** Analyze a single file with one provider. */ export declare function analyzeCode(file: string, code: string, provider: LlmProvider): Promise; /** * Two findings agree if they name the same file, the same category, and a * line within tolerance. Category is the part after the `:` * prefix in ruleId, so cross-provider findings compare correctly. */ export declare function findingsAgree(a: ActualFinding, b: ActualFinding): boolean; /** The findings from `primary` that at least one `other` finding agrees with. */ export declare function consensusOf(primary: ActualFinding[], other: ActualFinding[]): ActualFinding[]; /** * Cross-model consensus: run both providers and keep findings both agree * on (same file, category, and line within tolerance). Trades recall for * confidence — every kept finding has two-model corroboration. That's the * value proposition of multi-model consensus for certification. */ export declare function analyzeWithConsensus(file: string, code: string): Promise<{ consensus: ActualFinding[]; byProvider: Record; }>; //# sourceMappingURL=llm-analyzer.d.ts.map