/** * The attended human-input loop. Questionnaire collection and workflow-defined interactions converge * here, outside the engine. */ import type { RunEvent, RunResult, WorkflowSource } from "../../engine/types.ts"; import type { Questionnaire } from "../../flow/questionnaire.ts"; import type { ActiveRuns } from "../active-runs.ts"; import { type ProgressSink } from "../progress-sink.ts"; import type { RunStore } from "../types.ts"; import { type CommandCtx, type StartAgent } from "./context.ts"; export interface PendingAsk { readonly kind: "questionnaire"; readonly path: string; readonly questionnaire: Questionnaire; } export interface PendingInteraction { readonly kind: "interaction"; readonly path: string; readonly request: unknown; readonly violation?: string; } export type PendingHumanInput = PendingAsk | PendingInteraction; /** * Render and resolve human-input blocks until the run settles or the user dismisses one. * * Rendering is intentionally outside `runTracked`: a blocked run owns no active execution while a * dialog/editor is open. Responses always target the exact path whose input * was displayed, including when several concurrent steps are blocked. */ export declare function handleAttendedInput(ctx: CommandCtx, store: RunStore, activeRuns: ActiveRuns, workflowName: string, workflowSource: WorkflowSource, startAgent: StartAgent, runId: string, initialInput: PendingHumanInput | undefined, progress?: ProgressSink): Promise; /** The human-input block reported by one `blocked` engine result. */ export declare function humanInputOf(result: RunResult): PendingHumanInput | undefined; /** The FIFO-first human-input block currently pending in the event log. */ export declare function pendingHumanInput(events: readonly RunEvent[]): PendingHumanInput | undefined; /** Backwards-compatible questionnaire-only helpers retained for command-layer consumers. */ export declare function askOf(result: RunResult): PendingAsk | undefined; export declare function pendingAsk(events: readonly RunEvent[]): PendingAsk | undefined; //# sourceMappingURL=attended.d.ts.map