import { type DeviceProfile } from './registry.js';
/**
 * Decide whether an interactive login warrants a terminfo push. Pure so the
 * gating logic is unit-testable without touching ssh or the filesystem.
 *
 * @param interactive true only for a real login (no remote command) on a human tty.
 */
export declare function shouldSyncTerminfo(params: {
    term?: string;
    shell: DeviceProfile['shell'];
    interactive: boolean;
}): boolean;
/**
 * Cache key for a device: the remote **user@host**, not just the host. terminfo
 * is compiled into the *per-user* `~/.terminfo`, so `alice@box` and `bob@box`
 * are distinct sync targets — keying on host alone would let the first user's
 * stamp suppress the second user's (never-installed) sync. Mirrors
 * {@link sshTargetFor}'s user handling; falls back to the device name when the
 * address is unresolved.
 */
export declare function terminfoHostKey(device: Pick<DeviceProfile, 'user' | 'name'>, addr: string | undefined): string;
/** True when a fresh successful-sync stamp exists for this host+TERM. */
export declare function terminfoSynced(host: string, term: string, cacheRoot?: string): boolean;
/** Record a successful sync so repeat logins skip the push. Best-effort. */
export declare function markTerminfoSynced(host: string, term: string, cacheRoot?: string): void;
/** Export the local terminfo source for a TERM, or null if it can't be produced. */
export declare function localTerminfoSource(term: string): string | null;
/**
 * Best-effort: ensure `device` has the terminfo entry for the local `$TERM`
 * before an interactive login. Never throws; returns whether a push succeeded
 * (false when skipped, already-cached, or failed). `sshArgs`/`sshEnv` are the
 * SAME host-key + auth options the real login uses, minus the interactive tty —
 * so a password-auth device resolves through the askpass shim without a second
 * human prompt.
 */
export declare function syncTerminfoToDevice(opts: {
    device: DeviceProfile;
    host: string;
    term: string | undefined;
    /** ssh argv for a non-interactive `tic -x -` exec against this device. */
    sshArgs: string[];
    /** Env overlay for that ssh (askpass wiring for password devices). */
    sshEnv: Record<string, string>;
}): boolean;
