/**
 * Pre-execution write detection for COM-backed execute_code Python code.
 *
 * Scans the code string for patterns that indicate write operations —
 * both our wrapped API (Workbook/Worksheet methods) and raw COM property
 * assignments / method calls. If no write pattern matches, the code is
 * read-only and can skip the approval prompt.
 *
 * The analyzer is intentionally conservative: a false positive (flagging a
 * read as a write) just shows an unnecessary approval prompt, while a false
 * negative (missing a write) would skip approval for a destructive operation.
 * This means comments or string literals containing write patterns will
 * trigger approval — that's fine.
 */
import type { ExcelApprovalOperation } from './approval-payload.js';
/** Exported for the sync test to verify against Python source. */
export declare const COM_WRAPPED_API_WRITE_OPS: string[];
interface CodeAnalysis {
    isReadOnly: boolean;
    /** First matched pattern label (for logging/debugging), or null if read-only. */
    matchedPattern: string | null;
    alwaysRequireApproval: boolean;
    dangerousOperations: ExcelApprovalOperation[];
}
/**
 * Analyze COM-backed execute_code Python for write operations.
 *
 * Returns `{ isReadOnly: true }` when the code contains no detectable
 * writes and can be executed without an approval prompt.
 */
export declare function analyzeComWriteCode(code: string): CodeAnalysis;
export {};
//# sourceMappingURL=write-analyzer.d.ts.map