/** * APIClaw Confirmation System * For actions that cost money or have side effects * * Flow: * 1. Agent calls action → gets preview + token * 2. Agent shows preview to user * 3. User confirms → agent calls confirm with token * 4. APIClaw executes the actual action */ export interface PendingAction { token: string; provider: string; action: string; params: Record; preview: Record; createdAt: number; expiresAt: number; userId?: string; } export declare const CONFIRMATION_REQUIRED: Record; /** * Check if an action requires confirmation (hardcoded list only) * For dynamic providers, use requiresConfirmationAsync */ export declare function requiresConfirmation(provider: string, action: string): boolean; /** * Check if a dynamic provider action requires confirmation * This is imported dynamically to avoid circular deps */ export declare function requiresConfirmationAsync(provider: string, action: string): Promise<{ required: boolean; estimatedCost?: string; isDynamic?: boolean; }>; /** * Generate a confirmation token and store the pending action */ export declare function createPendingAction(provider: string, action: string, params: Record, preview: Record, userId?: string): PendingAction; /** * Get a pending action by token (and validate it) */ export declare function getPendingAction(token: string): PendingAction | null; /** * Consume a pending action (use it and remove from store) */ export declare function consumePendingAction(token: string): PendingAction | null; /** * Generate a human-readable preview for an action */ export declare function generatePreview(provider: string, action: string, params: Record): Record; /** * Validate params before creating preview * Returns { valid: true } or { valid: false, errors: [...] } */ export declare function validateParams(provider: string, action: string, params: Record): { valid: boolean; errors?: string[]; }; //# sourceMappingURL=confirmation.d.ts.map