export interface ParsedError { type: 'script_error' | 'runtime_error' | 'parse_error' | 'null_reference' | 'type_error' | 'headless_limitation' | 'unknown'; message: string; file?: string; line?: number; function?: string; suggestion: string; /** 出错行附近源码片段(带行号,出错行标 ">")。仅当 options.projectPath 提供且 file 为 res:// 时填充。 */ snippet?: string; } export interface ParsedWarning { message: string; file?: string; line?: number; } export interface AnalysisResult { hasErrors: boolean; errors: ParsedError[]; warnings: ParsedWarning[]; prints: string[]; suggestions: string[]; summary: string; } /** Options for analyzeOutput — callers can supply project context for better classification. */ export interface AnalyzeOptions { /** Autoload singleton names from project.godot [autoload] section. * Errors referencing these names are reclassified as headless_limitation. */ autoloadNames?: string[]; /** Global class_name names from .godot/global_script_class_cache.cfg (S3, 2026-06-23). * Errors referencing these are reclassified as headless_limitation — headless can't * resolve cross-file class_name, producing the same "Identifier X not found" false * positive as autoload. */ classNames?: string[]; /** 项目根路径。提供后对 res:// 错误文件读取源码片段附加到 ParsedError.snippet。 */ projectPath?: string; /** snippet 上下文行数(出错行前后各 N 行),默认 3。 */ snippetLines?: number; } export declare function analyzeOutput(output: string[], options?: AnalyzeOptions): AnalysisResult;