import type { IndexingOutcome } from '../contracts/indexing.js'; import { type GenerationPolicy } from '../contracts/generation-policy.js'; import { type DiscoveryExclusion } from '../shared/discovery-safety.js'; export declare const FileType: { readonly CODE: "code"; readonly DOCUMENT: "document"; readonly PAPER: "paper"; readonly IMAGE: "image"; readonly AUDIO: "audio"; readonly VIDEO: "video"; }; export type FileTypeValue = (typeof FileType)[keyof typeof FileType]; export interface DetectOptions { followSymlinks?: boolean; /** Restrict discovery to these absolute paths after Madar's own filters. */ includedFiles?: ReadonlySet; } export interface DetectResult { files: Record; total_files: number; total_words: number; needs_graph: boolean; warning: string | null; /** @deprecated Prefer the structured `exclusions` collection. */ skipped_sensitive: string[]; exclusions: DiscoveryExclusion[]; indexing_outcomes?: IndexingOutcome[]; madarignore_patterns: number; } export declare const CODE_EXTENSIONS: Set; export declare const DOC_EXTENSIONS: Set; export declare const PAPER_EXTENSIONS: Set; export declare const IMAGE_EXTENSIONS: Set; export declare const AUDIO_EXTENSIONS: Set; export declare const VIDEO_EXTENSIONS: Set; export declare const OFFICE_EXTENSIONS: Set; export declare const UNSUPPORTED_SOURCE_EXTENSIONS: Set; export declare const DEFAULT_MANIFEST_PATH = "out/manifest.json"; export declare const MANIFEST_METADATA_KEY = "__madar_meta__"; export interface ManifestMetadata { total_words?: number; generation_policy?: GenerationPolicy; } export interface ManifestSnapshot { document: Record; failedPaths: string[]; } export declare function _looksLikePaper(path: string): boolean; export declare function classifyFile(path: string): FileTypeValue | null; export declare function countWords(path: string): number; export declare function _loadMadarignore(root: string): string[]; export declare function _isIgnored(path: string, root: string, patterns: string[]): boolean; export declare function detect(root: string, options?: DetectOptions): DetectResult; export declare function loadManifest(manifestPath?: string): Record; export declare function loadManifestMetadata(manifestPath?: string): ManifestMetadata; export declare function createManifestSnapshot(files: Record, metadata?: ManifestMetadata): ManifestSnapshot; export declare function writeManifestSnapshot(snapshot: ManifestSnapshot, manifestPath?: string): void; export declare function saveManifest(files: Record, manifestPath?: string, metadata?: ManifestMetadata): string[]; export declare function detectIncremental(root: string, manifestPath?: string, options?: DetectOptions): DetectResult & { incremental: true; new_files: Record; unchanged_files: Record; new_total: number; deleted_files: string[]; };