/** * The Deno host's typed answer delivery. * * Delivery reaches a run's file the same way storage does — the SHA-256 of the * public run id beneath the authorized root — and then does the least a durable * answer can be retained with. It takes no executor lock, so a run somebody is * about to resume, or is resuming right now, can still be answered; what serializes * the write is the connection and SQLite, not lifecycle ownership. * * ## Everything is checked before anything is written * * The run has to be `suspended`, its stop reason has to name a retained * `suspension_request` event, and that event has to be the wait the caller * named. The value is then judged against the response schema that request * retained, and scanned for credentials. Only after all of that does a * transaction open — and it asks the same questions again, inside the * transaction, because everything above it was read from a snapshot somebody * else could have moved on from. * * A refusal therefore leaves the database byte-identical. Nothing here writes * on the way to saying no. */ import { type Operation } from "effection"; import type { WorkflowRunConnections } from "./connections.js"; export interface WorkflowInputDeliveryOptions { /** The directory this host keeps runs in. Absolute, as storage requires. */ readonly root: string; } /** Install typed answer delivery for the current scope and its descendants. */ export declare function useWorkflowInputDelivery(options: WorkflowInputDeliveryOptions): Operation; /** The same installation, over a registry the host already owns. */ export declare function installWorkflowInputDelivery(options: WorkflowInputDeliveryOptions, connections: WorkflowRunConnections): Operation;