/** * Path filtering utilities with glob pattern matching. * Based on patterns from mcp-obsidian for safe path filtering. */ /** * Configuration for PathFilter. */ export interface PathFilterConfig { /** Patterns to ignore (glob patterns like '.obsidian/**', 'node_modules/**') */ ignoredPatterns?: string[]; /** Allowed file extensions (e.g., ['.md', '.markdown', '.txt']) */ allowedExtensions?: string[]; } /** * Path filter with glob pattern matching. * Filters out system files, hidden directories, and restricts to allowed extensions. */ export declare class PathFilter { private ignoredPatterns; private allowedExtensions; constructor(config?: PathFilterConfig); /** * Simple glob pattern matching. * Converts glob patterns to regex for matching. * * @param pattern - Glob pattern (e.g., "STAR_STAR/*.md", ".obsidian/STAR_STAR") * @param path - Path to test * @returns true if path matches pattern */ private simpleGlobMatch; /** * Check if a path is allowed (not filtered out). * * @param path - Path to check (relative to vault root) * @returns true if path is allowed */ isAllowed(path: string): boolean; /** * Check if a path is a file (has a file extension). * * @param path - Path to check * @returns true if path appears to be a file */ private isFile; /** * Filter an array of paths, returning only allowed paths. * * @param paths - Array of paths to filter * @returns Array of allowed paths */ filterPaths(paths: string[]): string[]; } //# sourceMappingURL=pathfilter.d.ts.map