import type { WorkspaceFileEntry } from "./WorkspaceFileLister.js";
/**
 * A workspace file that matched a search query.
 *
 * `matchStart`/`matchEnd` are code-unit offsets into `path` (a half-open
 * `[start, end)` range) for the single contiguous substring hit, so a consumer
 * can highlight exactly the matched span with `path.slice(...)`.
 */
export interface WorkspaceFileMatch {
    /** Repo-relative (git) or root-relative (local) path of the matched file. */
    readonly path: string;
    /** Inclusive start offset of the matched substring within `path`. */
    readonly matchStart: number;
    /** Exclusive end offset of the matched substring within `path`. */
    readonly matchEnd: number;
}
/**
 * Ranks a flat listing against a query, returning matched files best-first.
 *
 * - Case-insensitive substring on the full relative path.
 * - Directories and advisory `notice` entries are never matched (a defensive
 *   guard even though the shared cache already strips notices — DD-11).
 * - Empty/whitespace query returns `[]` (search shows a hint, not everything).
 *
 * Ranking, in order: a basename hit outranks a path-only hit; then an earlier
 * match offset; then a shorter path; then lexicographic path for a stable,
 * deterministic order.
 */
export declare function matchWorkspaceFiles(files: readonly WorkspaceFileEntry[], query: string): WorkspaceFileMatch[];
//# sourceMappingURL=matchWorkspaceFiles.d.ts.map