import { Result } from "better-result";
import { type ComputeConfigInvalidError, type LoadedComputeConfig } from "./normalize.ts";
export declare const COMPUTE_CONFIG_FILENAME = "prisma.compute.ts";
export declare const COMPUTE_CONFIG_JSON_FILENAME = "prisma.compute.json";
export declare const COMPUTE_CONFIG_FILENAMES: readonly ["prisma.compute.ts", "prisma.compute.mts", "prisma.compute.js", "prisma.compute.mjs", "prisma.compute.cjs", "prisma.compute.json"];
declare const ComputeConfigAmbiguousError_base: import("better-result").TaggedErrorClass<"ComputeConfigAmbiguousError", {
    message: string;
    configPaths: string[];
}>;
export declare class ComputeConfigAmbiguousError extends ComputeConfigAmbiguousError_base {
    constructor(configPaths: string[]);
}
declare const ComputeConfigLoadError_base: import("better-result").TaggedErrorClass<"ComputeConfigLoadError", {
    message: string;
    cause: unknown;
    configPath: string;
}>;
export declare class ComputeConfigLoadError extends ComputeConfigLoadError_base {
    constructor(configPath: string, cause: unknown);
}
export type ComputeConfigError = ComputeConfigAmbiguousError | ComputeConfigLoadError | ComputeConfigInvalidError;
/**
 * Compute config files present in one directory, in filename priority order.
 */
export declare function findComputeConfigCandidates(directory: string, signal?: AbortSignal): Promise<string[]>;
/**
 * Locates the nearest directory holding a compute config file, searching from
 * `cwd` up to the source root. This is location-only discovery — the config
 * is not loaded or validated — so it is safe to run in hot paths.
 * Returns null when no config exists inside the repository boundary.
 */
export declare function findComputeConfigDir(cwd: string, signal?: AbortSignal): Promise<string | null>;
/**
 * Loads the nearest compute config, searching from `cwd` up to the source
 * root (repository or workspace boundary). Without such a boundary only
 * `cwd` itself is checked, so discovery never escapes into unrelated
 * directories.
 */
export declare function loadComputeConfig(cwd: string, options?: {
    signal?: AbortSignal;
    /**
     * Module path the config-helper import specifiers alias to. Defaults to
     * this SDK's own config module; pass a path when the consumer ships its
     * own copy of the contract (e.g. a bundled CLI).
     */
    configModuleAlias?: string;
}): Promise<Result<LoadedComputeConfig | null, ComputeConfigError>>;
export {};
//# sourceMappingURL=load.d.ts.map