import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { AgentChildQuestionRequest, AgentChildQuestionResponse } from "../agents/types.js"; import type { ResolvedFabricAction } from "../core/action-registry.js"; import type { FabricQuestionRenderers } from "../fabric-state.js"; import { type DecisionRaiseInput, type DecisionRecord, type DecisionStore } from "./store.js"; export declare const DEFAULT_HEADLESS_APPROVAL_TIMEOUT_MS = 300000; /** Raise a decision and wait for it; an aborted wait cancels the decision. */ export declare const raiseAndWait: (store: DecisionStore, input: DecisionRaiseInput, raisedBy: Partial, signal: AbortSignal | undefined, onRaised?: (id: string) => void) => Promise; /** * No-UI approval: a user-held "approval" decision with approve/deny options. * Only an explicit approve answer allows the call; deny, cancel, and expiry deny. */ export declare const requestHeadlessApproval: (store: DecisionStore, action: Pick, options?: { reason?: string; timeoutMs?: number; signal?: AbortSignal; }) => Promise; /** * Cancel the routed child questions that an earlier process with this store's * identity raised and left open: a resident host that died while a durable run * waited. The wait and the reporter that would deliver an answer died with that * process, so the decision could only mislead; the runner asks again through * the current host. Call it before this process routes any question. Records * `via: "restart"`. */ export declare const cancelOrphanedChildQuestions: (store: DecisionStore) => Promise; /** * Answer one routed child dialog: through the parent's interactive UI when it * has one, otherwise through a root-held decision. Missing UI and store, a * malformed request, or any failure cancels the child's dialog. A host with no * UI at all (the resident host) omits `context` and only ever raises a decision. * * A held request (`request.hold`, set by the manager for a holdQuestions run) * always becomes a root-held decision with the store's longest deadline * (MAX_DECISION_DEADLINE_MS, 30 days), even with a UI, so a * blocking dialog never stalls the session: the UI is only told the decision is * waiting. It stays open until answered, until the run settles, or until the * deadline passes and the child's question is cancelled. Without a * decision store it falls back to the UI dialog, with no timeout. * * `renderers` is passed only when `ui.questionRenderers` is on and an * extension registered one. Then a question that would use the UI dialog is * recorded as a root-held decision first, so a renderer and Fabric's own * dialog show the same record; see askRecorded. Without `renderers` the UI * path does not touch the store. */ export declare const routeChildQuestion: (request: AgentChildQuestionRequest, deps: { context?: Pick; store?: DecisionStore; renderers?: FabricQuestionRenderers; }) => Promise; //# sourceMappingURL=host.d.ts.map