/** * Orchestrator that ties trigger policy + budget + provider together. * The crawler calls `consultAdvisor` once per chaos action attempt; the * policy decides whether to actually invoke the model. Soft failures — * provider returning null, throwing, timing out, returning an * out-of-range index — all collapse to a null suggestion so the caller * can fall back to its heuristic without branching on every failure * mode. */ import { AdvisorBudget } from "./budget.js"; import { type TriggerDecision, type TriggerPolicy, type TriggerState } from "./trigger.js"; import type { ActionAdvisor, AdvisorCandidate, AdvisorSuggestion } from "./types.js"; export interface ConsultDeps { state: TriggerState; policy: TriggerPolicy; budget: AdvisorBudget; provider: ActionAdvisor; url: string; candidates: AdvisorCandidate[]; screenshotSupplier: () => Promise; timeoutMs: number; } export type ConsultOutcome = "consulted" | "skipped" | "soft_fail" | "out_of_range" | "timeout" | "threw"; export interface ConsultResult { suggestion: AdvisorSuggestion | null; decision: TriggerDecision; outcome: ConsultOutcome; durationMs?: number; } export declare function consultAdvisor(deps: ConsultDeps): Promise; //# sourceMappingURL=consult.d.ts.map