/** * Human-in-the-Loop Mode * * Steve Jobs Principle: "You've got to start with the customer experience * and work backward to the technology." * * This module provides approval gates for critical operations, * giving users control over autonomous agent actions. */ export type ApprovalLevel = 'auto' | 'critical' | 'all'; export interface ApprovalGate { id: string; action: string; description: string; risk: 'low' | 'medium' | 'high' | 'critical'; details?: Record; suggestedAction?: 'approve' | 'reject' | 'modify'; } export interface ApprovalResult { approved: boolean; modified?: Record; reason?: string; timestamp: Date; } export interface HumanInTheLoopConfig { approvalLevel: ApprovalLevel; autoApproveRisks: ('low' | 'medium')[]; notifyOnAutoApprove: boolean; timeoutSeconds: number; } /** * Human-in-the-Loop Manager */ export declare class HumanInTheLoop { private config; private history; private isInteractive; constructor(config?: Partial); /** * Check if approval is required for a given gate */ private requiresApproval; /** * Format gate details for display */ private formatGateDetails; /** * Request approval from user */ requestApproval(gate: ApprovalGate): Promise; /** * Create approval gates for common operations */ static createGate(type: 'deploy' | 'merge' | 'delete' | 'publish' | 'execute', details?: Record): ApprovalGate; /** * Get approval history */ getHistory(): Array<{ gate: ApprovalGate; result: ApprovalResult; }>; /** * Get summary of approvals */ getSummary(): { approved: number; rejected: number; total: number; }; /** * Update configuration */ setConfig(config: Partial): void; /** * Get current configuration */ getConfig(): HumanInTheLoopConfig; } /** * Quick approval helper for common use cases */ export declare function requireApproval(action: string, description: string, risk?: ApprovalGate['risk']): Promise; /** * Decorator for functions that require approval */ export declare function withApproval(action: string, description: string, risk?: ApprovalGate['risk']): Promise>(_target: unknown, _propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; //# sourceMappingURL=human-in-the-loop.d.ts.map