import * as path from "node:path";
/**
 * Compute the bunfs package root from the compiled binary's `import.meta.dir`
 * (or any stand-in supplied by tests). Bun 1.3 reports the bunfs mount root
 * (`/$bunfs/root` or `<drive>:\~BUN\root`) for imported modules as well as the
 * entrypoint, so the normal path is `<root>/packages`.
 *
 * The suffix branch preserves correctness if a future Bun release switches to
 * module-specific `import.meta.dir` values inside compiled binaries, matching
 * the source layout:
 * `<bunfs>/packages/coding-agent/src/extensibility/plugins`.
 *
 * Exported for tests; production callers use `BUNFS_PACKAGE_ROOT` below.
 */
export declare function __computeBunfsPackageRoot(metaDir: string, pathImpl?: typeof path): string;
/**
 * Compute the package root for the npm prebuilt `dist/cli.js` bundle.
 *
 * `bundle-dist.ts` defines `process.env.PI_BUNDLED="true"`; after bundling,
 * `import.meta.dir` points at `<package>/dist`. Do not resolve the package via
 * bare `@pk-nerdsaver-ai/pi-coding-agent` here: from a global install Bun can pick an
 * older cache entry, recreating mixed-runtime plugin loading.
 */
export declare function __computeBundledSelfPackageRoot(metaDir: string, pathImpl?: typeof path): string;
/**
 * Drop overrides whose targets are missing on disk so they can fall through to
 * the canonical-resolution path. Exported for the test seam in #2168.
 *
 * `pathExistsSync` defaults to `fs.existsSync`; the tests inject a stub to
 * simulate the missing-entrypoint failure mode without touching the real FS.
 */
export declare function __validateLegacyPiPackageRootOverrides(candidates: Record<string, string>, pathExistsSync?: (p: string) => boolean): Record<string, string>;
/**
 * Load a legacy Pi extension module from its real on-disk location.
 *
 * The extension runs in place, so its `import.meta.url` is the real source file
 * and `__dirname`-relative `readFileSync` asset loads (HTML/CSS bundled next to
 * the entry) resolve exactly as they do under the original Pi runtime — no
 * temp-directory mirroring and no asset copying. An `onLoad` hook scoped to the
 * entry's source graph rewrites only host-resolved compatibility imports in the
 * extension's own source; everything else resolves natively.
 */
export declare function loadLegacyPiModule(resolvedPath: string): Promise<unknown>;
export declare function installLegacyPiSpecifierShim(): void;
/** Test seam: clears the memoized canonical specifier resolutions. */
export declare function __resetLegacyPiResolutionCache(): void;
