/** * cross-pass-edge-static-scan-support — the finding-free primitives that back * `cross-pass-edge-merger.ts`. * * Hoisted verbatim by the wave-5 file-size split * (rid 2026-10-01-wave5-w5-2-slice-scan). Nothing in this module *decides* * anything: the static-detection regexes, the import-specifier resolver, the * edge-shape builder and the merger's public contracts are data and pure * lookups. The detection pipeline that reads them (`merge`, * `detectStaticEdges`, `runLlmFallback`) stays in the parent, and the parent * re-exports these types so `./cross-pass-edge-merger.js` remains the public * import path. */ import type { CrossPassEdge, LlmConfidence, PassNumber } from './slice-topology-types.js'; import type { LlmRunner } from '../audit/audit-goal-service.js'; export interface MergeResult { readonly edges: readonly CrossPassEdge[]; readonly llmCalls: readonly LlmCallTrace[]; } export interface MergeOptions { readonly projectRoot: string; readonly llmRunner?: LlmRunner; readonly cacheDir?: string; readonly maxLlmCalls?: number; } /** * Full LLM-call trace captured by `runLlmFallback` for every arbitrator call. * Mirrors v2 `LlmArbitration` minus the non-null `tokens` contract; the * orchestrator coalesces a possible `null` `tokens` to a zeroed pair. */ export interface LlmCallTrace { readonly callId: string; readonly promptHash: string; readonly input: string; readonly output: string; readonly confidence: LlmConfidence; readonly tokens: { readonly input: number; readonly output: number; } | null; } /** `import type { Foo } from '../upper/...'` and `import type * as Foo from '...'` */ declare const TYPE_IMPORT_RE: RegExp; /** `export { Bar } from '...'` / `export * from '...'` / `export type { Bar } from '...'`. */ declare const RE_EXPORT_RE: RegExp; /** Any `from '...'` — used only for the fixture-shares rule (test files). */ declare const ANY_FROM_RE: RegExp; export { ANY_FROM_RE, RE_EXPORT_RE, TYPE_IMPORT_RE }; interface EdgeFields { readonly fromPass: PassNumber; readonly toPass: PassNumber; readonly fromSliceId: string; readonly toSliceId: string; readonly kind: CrossPassEdge['kind']; readonly confidence: CrossPassEdge['confidence']; readonly evidence: string; readonly arbitratedBy: string | null; } declare function buildEdge(fields: EdgeFields): CrossPassEdge; export { buildEdge }; /** * Resolve an import specifier relative to the importing file. Tries common * TypeScript extensions and returns the first candidate that exists on disk; * if none exist (e.g. the file is virtual / generated), falls back to the * `.ts` form so the caller can still match against its own index. */ declare function resolveImport(fromFile: string, spec: string): string; declare function isTestFile(filePath: string): boolean; export { isTestFile, resolveImport };