export type TmuxAliasState = 'not-an-alias' | 'no-server' | 'absent' | 'dead' | 'live';
/** Shape of the tmux alias the CLI mints for an agent session: `ag-<agent>-<shortid>`.
 * Delegates to the one canonical matcher beside the name parsers in active.ts. */
export declare function looksLikeTmuxAlias(selector: string): boolean;
/**
 * Classify a selector against the live tmux server. Split from the attach so the
 * decision is testable against a real tmux server without replacing the caller's
 * shell (attaching is not something a test can undo).
 */
export declare function resolveTmuxAliasState(selector: string, socket?: string): Promise<TmuxAliasState>;
/**
 * A local `ag-<agent>-<8hex>` alias names a pane on THIS box. Attach it
 * without any fleet SSH. `--device` keeps the sweep: the caller scoped
 * identity to another machine.
 */
export declare function shouldAttachLocalTmuxAliasBeforeFleet(selector: string | undefined, hosts: string[]): selector is string;
/**
 * Attach a live tmux session named exactly as the selector, without needing the
 * session index to know anything about it.
 *
 * SES-41 requires a `ag-<agent>-<8hex>` tmux alias to resolve, but the alias's
 * hex is the LAUNCH id, not the harness session id, and for a harness that
 * writes no `state/sessions/<pid>.json` record there is no mapping back to a
 * SessionMeta at all. The pane is the thing the user asked for, and its NAME is
 * sufficient to attach it — so an unattributable session is still reachable
 * instead of being a dead end that forces raw `tmux -S … attach`.
 *
 * Returns false when this is not an alias, the server/session is absent, or
 * every pane is dead — the caller then continues to normal id resolution.
 * SES-39's "re-read `pane_dead` immediately before attach" is honoured here:
 * liveness is queried at attach time, not read from a roster.
 */
export declare function attachLiveTmuxAlias(selector: string): Promise<boolean>;
export type LocalAliasBySuffix = {
    kind: 'alias';
    alias: string;
} | {
    kind: 'collision';
    aliases: string[];
} | {
    kind: 'none';
};
/**
 * Resolve a bare 8-hex selector (`agents tmux ls`'s hex column, typed without
 * the `ag-<agent>-` prefix) against LIVE local panes only. Dead panes matching
 * the suffix are excluded before the uniqueness check — a retained, exited pane
 * must never compete with (or block) a live one for the same short id.
 *
 * Exported for direct testing: `attachLocalLiveSelector` composes this with a
 * real `attachTmux()` call, which a unit test cannot safely invoke (it takes
 * over the terminal).
 */
export declare function resolveUniqueLocalLiveAliasBySuffix(shortId: string, socket?: string): Promise<LocalAliasBySuffix>;
/**
 * The full local gate (PHNX-3292 rule 1): a selector that is either a live
 * local tmux alias, or a bare 8-hex short id that names exactly one live local
 * pane, attaches immediately — zero SSH. `--device`/`hosts` scopes identity to
 * another machine and disables this gate entirely (rule 4).
 *
 * Two LIVE local panes matching the same 8-hex suffix fail closed (rule 5): a
 * collision is reported with both names rather than guessing, and the caller
 * must not fall through to fleet resolution for a selector that is genuinely
 * ambiguous ON THIS BOX.
 *
 * Returns `false` (never attached, never reported) when the selector does not
 * name a live local pane at all, so the caller can continue to session-id
 * resolution / the fleet race.
 */
export declare function attachLocalLiveSelector(selector: string | undefined, hosts: string[]): Promise<boolean>;
