/** * The wrapper that makes "every use is recorded" structural rather than a rule (ADR-0077). * * A caller cannot reach a `Decider` directly through this layer's public surface: it asks an `Advisor`, and asking * always produces an `advice` record — including when the answer was "no advice", which is the case a reviewer most * needs to see, because an advisor that silently stops answering would otherwise look exactly like one nobody used. * * **What is recorded, and what is not.** The record names the purpose, the decider, the question keys, the answers * and how long it took. It does NOT contain the state. A caller composes that state from its own context, which can * include task text, file contents and a repository's private material; the ledger has never stored a task * (ADR-0021) and an advisor must not become the way it starts. The question keys are the caller's own constants, * so they name the decision without describing the situation. */ import type { Advice, AdviceRequest, Decider } from "./decider.ts"; /** Two seconds. An advisor is on the path of a decision a human is waiting for; it is not worth more than that. */ export declare const DEFAULT_ADVICE_TIMEOUT_MS = 2000; export interface AdviceRecord { /** Which decision this advice was for, from the caller's own closed list. */ purpose: string; decider: string; /** Question keys only — never the state, and never a question's free text. */ questions: string[]; answered: boolean; durationMs: number; /** Present only when advice came back. */ answers?: Readonly>; model?: string; /** * Why there is no advice. `declined` means the advisor answered with nothing; `error` means it could not be * reached or its response was unrecognised; `cancelled` means the CALLER went away, which is not the advisor's * failure and must not read as one. */ outcome: "answered" | "disabled" | "timeout" | "error" | "declined" | "cancelled"; } export interface Advisor { ask(purpose: string, request: AdviceRequest, signal?: AbortSignal): Promise; } export declare function createAdvisor(input: { decider: Decider; /** Where the record goes. Injected so this layer does no I/O and governance does not import it. */ record: (entry: AdviceRecord) => void | Promise; timeoutMs?: number; /** Absent or false means the null decider is used whatever `decider` says. */ enabled?: boolean; }): Advisor; //# sourceMappingURL=advisor.d.ts.map