import type { IndexFiles } from "../indexer/index-files.js"; import type { IndexCode } from "../indexer/index-code.js"; import type { IndexGraph } from "../indexer/index-graph.js"; export interface HealthDimension { name: string; grade: string; score: number; detail: string; } export interface HealthScore { grade: string; numericScore: number; dimensions: HealthDimension[]; } export interface SecurityIssue { file: string; line: number; pattern: string; severity: "critical" | "high" | "medium" | "low"; snippet: string; } export interface AuditAnalysis { healthScore: HealthScore; securityIssues: SecurityIssue[]; circularDeps: string[][]; } export declare function scanSecurity(indexer: IndexFiles & IndexCode & IndexGraph): SecurityIssue[]; export declare function isVendoredPath(path: string): boolean; export declare function detectCycles(files: Array<{ id: number; path: string; }>, edges: Array<{ source_file_id: number; target_file_id: number; }>): string[][]; /** * Methods decorated with these are framework entry points — invoked at * runtime, not via static calls. Three patterns covered: * * 1. PascalCase TS/JS framework decorators (NestJS, TypeORM, MikroORM, * Angular, GraphQL resolvers, etc.) — the original set. * 2. Python attribute-access decorators: `@app.get(...)`, `@router.post(...)`, * `@bp.route(...)`, `@self.exception_handler(...)`. FastAPI/Flask/ * Starlette routing is exclusively this shape — without coverage, * every route method scored as orphan. Surfaced by the 2026-05-12 * bench rerun where sverklo P5 fastapi was 0.00/5. * 3. Python validator/lifecycle decorators: `@validator`, `@root_validator`, * `@field_validator`, `@model_validator`, `@computed_field` (Pydantic), * `@pytest.fixture` (pytest), `@click.command` (Click CLI). * * Each pattern requires the decorator at start-of-line (with optional * leading whitespace) to avoid matching the same identifier mid-expression. */ export declare const DECORATOR_ENTRY_POINT: RegExp; export declare function analyzeCodebase(indexer: IndexFiles & IndexCode & IndexGraph): AuditAnalysis;