export interface ReviewOutcome { /** True when the reviewer accepted the output. */ approved: boolean; /** Why it was rejected, to be fed back into the re-run. */ reason?: string; } export interface ReviewableTask { name?: string; humanInput?: boolean; humanReviewPrompt?: string; } /** * Minimal contract the review needs from an approval manager: a * `requestApproval` that resolves to a boolean verdict. Typing it explicitly * (rather than `Function`) stops a manager whose `requestApproval` resolves to * a truthy non-boolean — e.g. `{ approved: false }` — from being read as an * approval, which would silently turn a denial into a pass. */ export interface ReviewApprovalManager { requestApproval: (options: { toolName: string; input: unknown; reason?: string; timeout?: number; }) => Promise; } /** * Ask a person to approve `output`. * * Returns `{ approved: true }` untouched when the task did not ask for review, * so callers need no branch of their own. */ export declare function reviewTaskOutput(task: ReviewableTask, output: unknown, options?: { approvalManager?: ReviewApprovalManager; timeout?: number; }): Promise;