/** * Human-in-the-Loop Pattern - AI → Human escalation */ import { AsyncFunction, Logger } from "../types/common"; import { TimeoutFallback, EscalationRule, HumanReview, HumanInTheLoopOptions, HumanInTheLoopResult, CommonEscalationRules } from "../types/human-in-the-loop"; export { CommonEscalationRules }; /** * Internal options (without execute and input) */ interface HumanInTheLoopInternalOptions { escalationRules?: EscalationRule[]; reviewTimeout?: number; requestHumanReview: (review: HumanReview) => Promise; onEscalate?: (review: HumanReview) => void; onReviewComplete?: (review: HumanReview) => void; logger?: Logger; timeoutFallback?: TimeoutFallback; } /** * Human-in-the-Loop - Enables AI → Human escalation (internal class) */ export declare class HumanInTheLoop { private readonly aiFn; private readonly options; private reviews; private reviewCounter; constructor(aiFn: AsyncFunction, options: HumanInTheLoopInternalOptions); /** * Execute AI function with possible escalation */ execute(input: TInput): Promise; /** * Check escalation rules */ private checkEscalationRules; /** * Create a review */ private createReview; /** * Request human review with timeout */ private requestReview; /** * Get all reviews */ getReviews(): HumanReview[]; /** * Get review by ID */ getReview(id: string): HumanReview | undefined; /** * Get pending reviews */ getPendingReviews(): HumanReview[]; } /** * Human-in-the-Loop Pattern with single parameter API */ export declare function humanInTheLoop(options: HumanInTheLoopOptions): Promise>; //# sourceMappingURL=human-in-the-loop.d.ts.map