/** * diagnose.ts * * Utilities for attaching evidence to MCP tool responses. * * Design principle: on any failure or unexpected state, include the raw logs * so the agent has everything it needs to act without a follow-up call. * Classification and interpretation are left to the agent. */ /** * Read the last `lines` lines from a log file. * Returns a placeholder string if the file is missing or empty. */ export declare function readLogTail(logFile: string, lines?: number): string; /** * Scan the WHOLE log for the lines that actually indicate the failure — errors, * exceptions, driver-connection problems — so the real cause is surfaced even when * it scrolled far above the tail (e.g. a WebDriver/driver startup failure followed * by pages of report-cleanup output). Returns up to `max` deduped matching lines, * or '' if none found. Classification is left to the agent. */ export declare function extractLogErrors(logFile: string, max?: number): string; /** * Scan a file for relative import statements and check whether the * referenced .ts files exist on disk (.js extensions are resolved to .ts). * Returns only broken imports — empty array means all imports are resolvable. */ export declare function findBrokenImports(filePath: string): Array<{ importPath: string; resolvedTs: string; }>;