import type { LoopFileFingerprint as AnchoredLoopFileFingerprint } from "./types.ts";
/**
 * Content identity of the resolved loop file. `types.ts` owns the canonical, persisted
 * fingerprint; the resolver cannot know the delivery that anchors it, so it produces the
 * same shape minus that field and the tick builder anchors it at fire time.
 */
export type LoopFileFingerprint = Omit<AnchoredLoopFileFingerprint, "anchorDeliveryId">;
export interface LoopFileResolverDeps {
    readonly cwd: string;
    readonly homeDir: string;
    readonly fs: {
        stat(path: string): Promise<{
            mtimeMs: number;
            size: number;
        }>;
        readFile(path: string): Promise<Buffer>;
        readBytes(path: string, maxBytes: number): Promise<Buffer>;
    };
    readonly path: {
        join(...paths: string[]): string;
    };
}
export type LoopFileResult = {
    readonly found: false;
} | {
    readonly found: true;
    readonly path: string;
    readonly content: string;
    readonly fingerprint: LoopFileFingerprint;
};
export declare class LoopFileError extends Error {
    readonly code: "stat_failed" | "read_failed";
    readonly path: string;
    constructor(message: string, code: "stat_failed" | "read_failed", path: string, options?: {
        cause?: unknown;
    });
}
export declare function resolveLoopFile(deps: LoopFileResolverDeps): Promise<LoopFileResult>;
export declare const nodeFs: LoopFileResolverDeps["fs"];
//# sourceMappingURL=loopfile.d.ts.map