/** * Thin Python AST helpers via tree-sitter (no CPython shell-out). */ export interface PyFunction { name: string; line: number; decorators: string[]; firstParamType: string | null; isMethod: boolean; className?: string; } export interface PyClass { name: string; line: number; bases: string[]; methods: PyFunction[]; } export interface PyModuleAst { functions: PyFunction[]; classes: PyClass[]; } /** Parse a Python module source string into functions and classes. */ export declare function parsePythonModule(source: string): PyModuleAst; /** True when any decorator mentions frappe.whitelist. */ export declare function hasWhitelistDecorator(decorators: string[]): boolean; /** True when class extends Document (Frappe controller). */ export declare function isDocumentController(bases: string[]): boolean; /** Controller hook methods we emit as handler nodes. */ export declare function isControllerHook(name: string): boolean; /** Parse doc_events / scheduler_events handler paths from hooks.py content. */ export declare function parseHooksAssignments(source: string): { docEvents: Array<{ doctype: string; event: string; handler: string; }>; schedulerJobs: Array<{ schedule: string; handler: string; }>; };