/** * Drumbeat D5 — reflexive decider adapters. Mirrors the relauncher pattern: a * `ReflexiveDecider` decides what to do with a stalled finding. `loggingDecider` * is the opt-out default (always `relance` → today's behaviour). `subagentDecider` * shells out a host CLI headless and parses its verdict; ANY failure (non-zero * exit, timeout, unparseable) falls back to `relance` — never worse than today. * * The prompt is passed as a command ARGUMENT (host CLIs read the task from argv, * not stdin) with stdin closed; the agent-controlled finding fields are delimited * as untrusted data, not instructions (prompt-injection guard). */ import { type H2AReflexiveDecision } from "@sentropic/h2a"; import type { H2ADrumbeatFinding } from "./scan.js"; export interface ReflexiveDecider { decide(finding: H2ADrumbeatFinding): H2AReflexiveDecision | Promise; } /** Opt-out default: never judges, always relance (behaviour identical to pre-D5). */ export declare function loggingDecider(): ReflexiveDecider; /** Injected so tests need no real CLI. `run` returns the command's exit + stdout. */ export interface DeciderRuntime { run(command: string, prompt: string, timeoutMs: number): { status: number | null; stdout: string; }; } export interface SubagentDeciderOptions { readonly command: string; readonly runtime?: DeciderRuntime; readonly timeoutMs?: number; } export declare function subagentDecider(options: SubagentDeciderOptions): ReflexiveDecider; //# sourceMappingURL=deciders.d.ts.map