/** * Test-file discovery and AC-reference scanning (FR2). * * Own walker + glob translator instead of `fs.globSync`: stdlib glob * semantics are release-dependent while the Node floor is 22.13; the pinned * semantics here are enforced by this module's tests (NFR1, design DD2). * * Pinned semantics (design Data Flow 4): * - `**` matches zero or more path segments * - `*` / `?` match within a segment, never a leading dot * - dot-files and dot-directories are never traversed * - exclusions (node_modules, .git, dist, build, .aidlc) prune before * descent at any depth, regardless of glob source (AC-6/AC-7, DD4) * - symlinks are never followed (AC-8, NFR3) * - emitted paths are posix-separated and project-root-relative (design F7) * * Requirements: traceability-ids/AC-5..AC-8, AC-24, AC-25 */ import type { AcReference } from './types.js'; /** D1 default test globs. */ export declare const DEFAULT_TEST_GLOBS: string[]; /** Scan caps (NFR2, AC-8). */ export declare const MAX_SCANNED_FILES = 10000; /** * Translate one glob into a RegExp over posix relative paths, or null when * the pattern uses unsupported syntax (braces, extglobs, character classes). */ export declare function translateGlob(pattern: string): RegExp | null; /** * Validate configured globs (AC-7): absolute or `..`-containing patterns and * unsupported syntax are rejected with a warning naming the glob. */ export declare function validateGlobs(patterns: string[]): { matchers: RegExp[]; warnings: string[]; }; export interface DiscoveryResult { /** Posix-separated project-root-relative paths, sorted. */ files: string[]; warnings: string[]; } /** * Discover test files by glob against the project root. * * @param projectRoot - Directory containing `.aidlc/`. * @param globs - Effective glob list (defaults or config). */ export declare function discoverTestFiles(projectRoot: string, globs: string[]): DiscoveryResult; export interface ScanResult { refs: AcReference[]; warnings: string[]; } /** Scan one file's content for AC reference tokens (qualified, then bare). */ export declare function scanContent(content: string, path: string): AcReference[]; /** * Scan discovered files, skipping unreadable/oversize/binary files with a * warning (AC-8). Never throws. */ export declare function scanFiles(projectRoot: string, files: string[]): ScanResult; /** Convert a native relative path to the canonical posix form (design F7). */ export declare function toPosix(relPath: string): string; //# sourceMappingURL=scanner.d.ts.map