import type { ExternalAnalyzerResults } from "audit-tools/shared"; /** * One match from `ast-grep scan --json`. The matched file is `file`; a capture * naming the edge target (e.g. a module specifier, a referenced path) is read * from `metaVariables.single..text`. Both are optional so a * partial / malformed payload degrades rather than throwing. */ interface AstGrepMatch { file?: string; ruleId?: string; metaVariables?: { single?: Record; }; } /** * Normalize `ast-grep scan --json` output into language-neutral graph edges: * one `matched-file → captured-target` edge per match whose target meta-variable * resolves to a non-empty string distinct from the matched file. ast-grep is a * structural matcher, so the target capture is whatever the operator's rule * binds (a module specifier, a referenced symbol path); endpoint resolution * against the repo path lookup happens downstream in the graph extractor. * * Degrades to an empty edge list on any malformed / missing field and never * throws; `normalizeGenericExternalEdges` dedupes + sorts for determinism. */ export declare function normalizeAstGrepJson(matches: AstGrepMatch[] | undefined, targetMetaVar?: string): ExternalAnalyzerResults; export {}; //# sourceMappingURL=astGrep.d.ts.map