/** * A session's visual identity: the name it carries before anyone names it, and * the palette slot its chip is filled with. * * Both are pure functions of the session id, which means they need no storage of * their own: the id is already in the session header, so a resumed session comes * back wearing the same slug and the same colour, and a fork — which mints a new * id — gets its own identity instead of quietly wearing its parent's. What *is* * stored is an override: `/name` and `/color` write to the session's * `session_info` entry, and those win over everything here (see * SessionManager.getDisplayName / getSessionColorSlot). * * This module is deliberately theme-free. It deals in slot *numbers*; mapping a * slot onto a colour token is the theme's job, so `core/` never has to reach into * a mode's rendering code. */ /** Number of colour slots a session can land in. Matches the theme's identity palette. */ export declare const SESSION_COLOR_SLOTS = 6; /** The auto-assigned name for a session: a memorable two-word slug, e.g. `amber-harbor`. */ export declare function sessionSlugFor(sessionId: string): string; /** The auto-assigned colour slot for a session, in `1…SESSION_COLOR_SLOTS`. */ export declare function sessionColorSlotFor(sessionId: string): number; /** Whether `slot` is one a session can actually be assigned. */ export declare function isSessionColorSlot(slot: number): boolean; /** The canonical slot names, in slot order. For usage lines and pickers. */ export declare const SESSION_COLOR_NAME_LIST: readonly string[]; /** What to call `slot` when reporting it back, or undefined if it is not a slot. */ export declare function sessionColorName(slot: number): string | undefined; /** * The slot an argument to `/color` asks for: a number (`4`), a name * (`magenta`), or an initial (`m`). Case and surrounding space do not matter. * Undefined when it names no slot at all. */ export declare function parseSessionColorSlot(input: string): number | undefined; /** * The slot one step away from `current`, wrapping at both ends. * * The keyboard cycle needs this rather than a picker because picking a colour is * usually a two-second decision made while looking at four terminals: step until * the chip stops looking like its neighbour's, then stop. Wrapping means the * cycle has no dead end to back out of, and a session sitting on a slot no theme * defines — or on nothing at all — starts from the first one rather than * refusing to move. */ export declare function cycleSessionColorSlot(current: number, direction: "forward" | "backward"): number; //# sourceMappingURL=session-identity.d.ts.map