import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { FabricQuestionRenderSurfaceV1 } from "../protocol.js"; import type { FabricQuestionRenderers } from "../fabric-state.js"; import type { DecisionRecord, DecisionStore } from "./store.js"; export type DecisionBy = { answeredBy: string; via: string; }; /** The OS user at this terminal, recorded as `answeredBy` for TUI answers. */ export declare const terminalOperator: () => string; export interface DecisionWatch { /** Aborts when the decision leaves `open` or the outer signal aborts. */ signal: AbortSignal; /** The settled record once the store reports one. */ current(): DecisionRecord | undefined; stop(): void; } /** Watch one decision so a dialog showing it closes when it settles elsewhere. */ export declare const watchDecision: (store: DecisionStore, id: string, outer?: AbortSignal) => DecisionWatch; export type RenderOutcome = { kind: "fallback"; } | { kind: "dismissed"; } | { kind: "aborted"; } | { kind: "settled"; record: DecisionRecord; }; /** * Offer one open decision to each renderer in registration order until one * answers. Resolves `fallback` when every renderer declines or one fails, so * the caller shows its own dialog. */ export declare const renderDecision: (options: { renderers: FabricQuestionRenderers; surface: FabricQuestionRenderSurfaceV1; ui: ExtensionContext["ui"]; store: DecisionStore; record: DecisionRecord; watch: DecisionWatch; by: DecisionBy; }) => Promise; //# sourceMappingURL=render.d.ts.map