import { type AuthorizationChallenge } from "#harness/authorization.js"; import type { HarnessSession, HarnessToolLookup, StepInput } from "#harness/types.js"; import type { InputRequest } from "#shared/input.js"; interface ApprovalDeliveryResult { readonly challenges: readonly AuthorizationChallenge[]; readonly feedback: readonly string[]; readonly kind: "continue" | "continue-coordination" | "authorization-required" | "responses-completed" | "park"; readonly session: HarnessSession; readonly stepInput?: StepInput; } /** * Advances approval state by one durable phase. * * | State | Input | Transition | * | --- | --- | --- | * | pending request | Approve or Cancel | create responder-bound candidate | * | pending candidate | coordinator pass | run current authorizer | * | pending candidate | allowed | settle with its decision; competitors go stale | * | pending candidate | rejected/error/expiry | append terminal history | * | pending candidate | authorization required | persist private challenge | * | authorization required | matching callback | re-run current authorizer | * | settled request | any later response | no state change | * * Delivery ingestion returns before authorizer work so candidate creation * commits before long-running policy execution. Candidate results also * commit before lifecycle events are projected by the next stack layer. */ export declare function coordinateApprovalDelivery(input: { readonly now?: number; readonly session: HarnessSession; readonly stepInput?: StepInput; readonly tools: HarnessToolLookup; readonly prepareTools?: (request: InputRequest) => Promise; }): Promise; export {};