/** * CLI Analyze Command * Code analysis, diff classification, heuristic (regex-based) analysis, and change risk assessment * * Features: * - Heuristic (regex-based) analysis — no AST/tree-sitter integration ships here * - Symbol extraction (functions, classes, variables, types) * - Decision-point counting (cyclomatic approximation) * - Diff classification and risk assessment * * github.com/monoes/monomind */ import type { Command } from '../types.js'; /** * Maximum number of files scanned per invocation, for the directory-mode * subcommands below. When a directory contains more files than this, only * the first FILE_SCAN_CAP are analyzed — callers must surface that fact * rather than truncating silently. */ export declare const FILE_SCAN_CAP = 100; /** * Print a notice when the file-scan cap was hit, so results are never * presented as if the whole directory was analyzed. */ export declare function reportFileCap(totalFiles: number): void; /** * Write analysis output to a file, constraining the path to the current working * directory to prevent path traversal attacks via --output /etc/cron.d/x or * similar. Throws if the resolved path escapes cwd. */ export declare function safeWriteOutputFile(outputFile: string, data: string): Promise; /** * Helper: Scan directory for source files */ export declare function scanSourceFiles(dir: string, maxDepth?: number): Promise; /** * Heuristic (regex-based) analysis. There is no AST/tree-sitter parser * behind this — it pattern-matches common function/class/import shapes and * will miss or misparse anything unusual. Line ranges are computed via * brace-depth matching, not real parsing. */ export declare function fallbackAnalyze(code: string, filePath: string): { filePath: string; language: string; functions: { name: string; startLine: number; endLine: number; }[]; classes: { name: string; startLine: number; endLine: number; }[]; imports: string[]; exports: string[]; complexity: { cyclomatic: number; cognitive: number; loc: number; commentDensity: number; }; }; export declare const analyzeCommand: Command; export default analyzeCommand; //# sourceMappingURL=analyze.d.ts.map