import type { IndexCacheStore } from '../../cache/index/store.ts'; import type { FindOptions } from '../../resource/base.ts'; import { PathSpec, type FileStat } from '../../types.ts'; import type { LinkView } from '../../ops/types.ts'; export interface WalkFindDeps { readdir: (spec: PathSpec, index?: IndexCacheStore) => Promise; stat: (spec: PathSpec, index?: IndexCacheStore) => Promise; links?: LinkView | null; unreadable?: string[]; } export declare function modifiedTs(modified: string | null): number | null; export declare function walkFind(path: PathSpec, deps: WalkFindDeps, options?: FindOptions, index?: IndexCacheStore): Promise; export interface SearchFindDeps { resolvePath: (accessor: A, path: PathSpec, index?: IndexCacheStore) => Promise<{ isDir: boolean; }>; stat: (accessor: A, path: PathSpec, index?: IndexCacheStore) => Promise; walk: (accessor: A, path: PathSpec, index?: IndexCacheStore, options?: { includeRoot?: boolean; maxDepth?: number | null; stripPrefix?: boolean; }) => Promise; } /** * Build `find` for a backend whose walk comes from a search index. * * The search-backed backends (chroma, dify) get the whole subtree from * one `walk` call and then filter it, where the API backends drive the * traversal themselves through `walkFind`'s `readdir`. That is the only * difference between them, so everything after the walk lives here once * rather than once per backend. Mirrors python's * `mirage/core/generic/find.py`. */ export declare function makeSearchBackedFind(deps: SearchFindDeps): (accessor: A, path: PathSpec, options?: FindOptions, index?: IndexCacheStore) => Promise; //# sourceMappingURL=find.d.ts.map