/** * Safety enforcement middleware for odoo-cli. * * Every command has a safety level: READ | WRITE | DESTRUCTIVE. * * - READ: No requirements. Safe to run anywhere. * - WRITE: Requires --confirm. Clear error if missing. * - DESTRUCTIVE: Requires --confirm. Prints a DESTRUCTIVE warning. * * The CLI enforces safety at the command level, independently of the * odoo-client safety guard (which uses a confirm callback). Here we * use a simpler model: just check if the --confirm flag is present. */ export type SafetyLevel = 'READ' | 'WRITE' | 'DESTRUCTIVE'; export interface SafetyOptions { confirm?: boolean; dryRun?: boolean; } /** * Assert that a WRITE or DESTRUCTIVE operation has --confirm. * * Throws CliUsageError (exit 1) if --confirm is missing. * In --dry-run mode, skips the check (we're not actually mutating). */ export declare function requireConfirm(level: SafetyLevel, options: SafetyOptions, commandDescription: string): void; /** * Format a dry-run message to stderr showing what WOULD be called. */ export declare function printDryRun(model: string, method: string, args: any[], kwargs?: Record): void; //# sourceMappingURL=safety.d.ts.map