import type { CandidateFile, EvidenceAtom, RetrievalQuery } from "@oscharko-dev/keiko-contracts/connected-context";
import { type WorkspaceFs } from "./fs.js";
import type { WorkspaceInfo } from "./types.js";
export interface SearchScope {
    readonly workspace: WorkspaceInfo;
    readonly scopeId: string;
    readonly relativePaths: readonly string[];
}
export interface SearchLimits {
    readonly maxFilesScanned: number;
    readonly maxMatchesReturned: number;
    readonly maxBytesPerFileScanned: number;
    readonly elapsedMsMax: number;
}
export declare const DEFAULT_SEARCH_LIMITS: SearchLimits;
export interface SearchResult {
    readonly atoms: readonly EvidenceAtom[];
    readonly candidates: readonly CandidateFile[];
    readonly filesScanned: number;
    readonly elapsedMs: number;
    readonly truncated: boolean;
}
export interface ReadExcerptRequest {
    readonly scopePath: string;
    readonly startLine: number;
    readonly endLine: number;
    readonly maxBytes: number;
}
export interface ReadExcerptResult {
    readonly atom: EvidenceAtom;
    readonly content: string;
    readonly truncated: boolean;
}
interface FacadeDeps {
    readonly fs?: WorkspaceFs;
    readonly nowMs?: () => number;
}
export declare function searchText(scope: SearchScope, query: RetrievalQuery, limits?: SearchLimits, deps?: FacadeDeps): Promise<SearchResult>;
export declare function findFiles(scope: SearchScope, query: RetrievalQuery, limits?: SearchLimits, deps?: FacadeDeps): Promise<SearchResult>;
export declare function readExcerpt(scope: SearchScope, request: ReadExcerptRequest, deps?: FacadeDeps): Promise<ReadExcerptResult>;
export {};
//# sourceMappingURL=repoSearch.d.ts.map