/** * Shared candidate-bounded LLM pass for the analysis agents (zero-day hunter, * logic-flaw detector, exploit-chain analyzer). * * The heuristic pass in each agent flags candidates first; only those candidates * (already narrowed to security-relevant/flagged inputs) are sent to the model, * so cost scales with *signal*, not repo size. Requires ANTHROPIC_API_KEY — * without it the pass reports `ran: false` and the caller falls back to pure * heuristics, labelling the result honestly ("no LLM claimed when none ran"). * * @module agents/llm-pass */ /** * Default model for the code-analysis agents (logic-flaw, zero-day, exploit-chain). * Env-overridable so the model can be advanced (e.g. to a newer Sonnet or, for an * Enterprise tier, Opus) without a code change. Defaults to the current Sonnet — * strong reasoning for bounded per-file analysis while protecting Pro-tier margin. */ export declare const DEFAULT_ANALYSIS_MODEL: string; /** A unit of work sent to the model — pre-narrowed by the caller's heuristics. */ export interface LlmCandidate { /** Label for logging/ids (a file path, or a synthetic name like ""). */ file: string; /** The prompt-ready content for this candidate. */ content: string; } export interface LlmPassResult { findings: T[]; tokensUsed: number; /** The model that ran, or "pattern-only" when the LLM did not run. */ model: string; /** True only when the LLM actually ran (API key present and candidates exist). */ ran: boolean; } /** * Run a bounded LLM pass over pre-filtered candidates. Each candidate is one * `messages.create` call; the model is expected to return a JSON array, each * element mapped to a finding via `mapItem` (return null to drop an element). * Per-candidate failures are logged and skipped, never fatal. */ export declare function runCandidateLlmPass(opts: { candidates: LlmCandidate[]; /** Hard cap on candidates sent — the cost guardrail. */ cap: number; model: string; maxTokens?: number; /** Short label for logs / parse errors, e.g. "zero-day-hunter". */ label: string; buildPrompt: (candidate: LlmCandidate) => string; mapItem: (raw: Record, file: string, index: number) => T | null; }): Promise>; //# sourceMappingURL=llm-pass.d.ts.map