/**
 * Resolve the path to the linked backend project, stored in
 * `.pie/config.json` under `backendProjectDir`. Prompts the user
 * interactively if not yet configured AND stdin is a TTY.
 *
 * Used by both `login` (to push credentials cross-side) and
 * `check-sync` (to spawn `pie card check-sync`).
 */
export type PieConfig = {
    backendProjectDir?: string;
    backendComponentsDir?: string;
    [key: string]: unknown;
};
export declare const configPathFor: (cwd: string) => string;
export declare const readConfig: (cwd: string) => PieConfig;
export declare const writeConfig: (cwd: string, config: PieConfig) => void;
/**
 * Resolve `backendProjectDir` for the project at `cwd`.
 *
 *   1. If config already has `backendProjectDir` and the path exists → use it.
 *   2. Else if `backendComponentsDir` is set → walk up to nearest
 *      `pyproject.toml`, persist as `backendProjectDir`, return.
 *   3. Else if TTY → prompt the user, persist, return.
 *   4. Else → return `null` (caller decides whether to error).
 */
export declare const ensureBackendDir: (cwd: string) => Promise<string | null>;
/** Merge `extra` keys into `<targetDir>/.pie/config.json`, preserving
 *  existing keys not present in `extra`. */
export declare const mergeConfig: (targetDir: string, extra: PieConfig) => void;
//# sourceMappingURL=projectLinks.d.ts.map