/**
 * Bundled fd/rg binary resolution and staging.
 *
 * Bobbit ships fd and rg via per-platform optional npm sub-packages
 * (`@bobbit/binaries-<platform>-<arch>`) so agents always have them locally
 * with zero network calls at install or runtime.
 *
 * Resolution order (memoized per gateway lifetime):
 *   1. Bundled sub-package matching {process.platform, process.arch}.
 *   2. PATH fallback (`fd`, `fdfind`, `rg`) — confirmed by `<bin> --version`.
 *   3. null. Caller logs a clear warning naming what was attempted.
 *
 * Staging: `stageBundledBinaries()` copies/symlinks the resolved binaries into
 * pi-coding-agent's `getBinDir()` (`<agentDir>/bin`) at gateway boot so pi's
 * own `getToolPath()` finds them transparently — no changes inside pi, no
 * changes to per-agent spawn code, no Docker plumbing.
 *
 * See docs/releasing.md for how the sub-packages are built and published.
 */
/** What kind of resolution happened. */
export type BinarySource = "bundled" | "path" | "missing";
export interface BinaryResolution {
    source: BinarySource;
    path: string | null;
    /** Name of the sub-package we looked for (for error reporting). */
    expectedPackage: string;
    /** PATH candidates we probed (for error reporting). */
    pathProbes: string[];
}
/**
 * Return the sub-package name we'd ship for the current platform/arch, or
 * null if this is a tuple we deliberately don't ship a binary for.
 */
export declare function expectedBinaryPackage(plat?: NodeJS.Platform, arch?: NodeJS.Architecture): string | null;
/** Absolute path to bundled or PATH-resolved `fd`, or null. Memoized. */
export declare function getFdPath(): string | null;
/** Absolute path to bundled or PATH-resolved `rg`, or null. Memoized. */
export declare function getRgPath(): string | null;
/** Full resolution detail for diagnostics. Memoized. */
export declare function getFdResolution(): BinaryResolution;
export declare function getRgResolution(): BinaryResolution;
/** Test-only: clear the memoized cache so a fresh probe runs next call. */
export declare function _resetBinaryCacheForTests(): void;
export interface StagingResult {
    fd: BinaryResolution;
    rg: BinaryResolution;
    /** Directory we staged into, or null if staging was skipped. */
    binDir: string | null;
}
/**
 * Stage the resolved bundled binaries into `<agentDir>/bin` so pi-coding-agent
 * finds them via its existing `getToolPath()` lookup. Idempotent: existing
 * symlinks/files matching the bundled location are left alone.
 *
 * Only stages binaries whose `source === "bundled"`. PATH binaries are already
 * discoverable by pi via `commandExists()`, and staging them would duplicate
 * what's already on PATH.
 *
 * Failures emit a single clear warning but never throw — gateway boot continues.
 */
export declare function stageBundledBinaries(agentDir: string): Promise<StagingResult>;
//# sourceMappingURL=binaries.d.ts.map