/**
 * Whether a just-finished run should be checked for stranded work: only
 * writable modes can leave commits (plan is read-only), and only non-interactive
 * runs need the warning (an interactive user sees their own shell). Centralizes
 * the gate so every exit path in the run command applies it identically.
 */
export declare function shouldWarnUnpushed(mode: string, interactive: boolean): boolean;
export interface UnpushedState {
    /** cwd is inside a git work tree. */
    isRepo: boolean;
    /** current branch, or null when detached / not a repo. */
    branch: string | null;
    /** the branch has an upstream tracking ref configured. */
    hasUpstream: boolean;
    /** commits reachable from HEAD but not from any remote-tracking ref. */
    unpushed: {
        sha: string;
        subject: string;
    }[];
}
/**
 * Inspect `cwd` for commits on the current branch that have not reached any
 * remote. Uses `git log --not --remotes` so it is correct even when the branch
 * has no upstream set: commits already present on some `origin/*` ref are NOT
 * reported (no false positive), and a never-pushed branch reports all its
 * commits. Returns an inert result — never throws — for a non-repo cwd, a
 * detached HEAD, or a repo with no remotes (nothing to push to).
 */
export declare function getUnpushedState(cwd: string): Promise<UnpushedState>;
/**
 * Render the warning for an unpushed state, or null when there is nothing to
 * warn about. Split out from the printer so it is directly testable.
 */
export declare function formatUnpushedWarning(state: UnpushedState, cwd: string): string | null;
/**
 * If the just-finished run left committed-but-unpushed work in `cwd`, print a
 * loud stderr warning with the exact push / PR commands. Non-fatal by contract:
 * any failure is swallowed so it can never break a run's exit path.
 */
export declare function warnUnpushedWork(cwd: string): Promise<void>;
