import type { AttachSession } from './context.js'; export type Mode = 'normal' | 'spec' | 'plan'; export declare function nextMode(current: Mode): Mode; /** Resolve the mode badge's initial state. Remote never reads the local * mode-switch `current` file for `nodeId` — always starts 'normal'. */ export declare function resolveInitialMode(cwd: string, nodeId: string, remote: boolean, readMode?: (cwd: string, nodeId: string) => Mode | undefined): Mode; /** Handle a configured mode-cycle request. Remote no-ops entirely (returns `false`, * so the caller leaves `modeState`/the badge untouched) — there is no * remote-safe mode-switch protocol, and writing the local `request.json` for a * remote node id would target the wrong (or a colliding local) node. */ export declare function requestModeSwitch(cwd: string, nodeId: string, remote: boolean, mode: Mode, writeRequest?: (cwd: string, nodeId: string, mode: Mode) => void): boolean; /** The live badge: the viewer's current mode plus the one way to change it. * Owning both here is what keeps `mode` from being a mutable the key handler * and the editor painter both reach into. */ export interface ModeBadge { /** Advance to the next mode and repaint. A REMOTE attach no-ops entirely * (there is no remote-safe mode-switch protocol), badge included. */ cycle: () => void; } /** Resolve the initial mode, paint the badge, and return the cycle verb. */ export declare function createModeBadge(ctx: Pick): ModeBadge; /** The badge chip painted for each mode: spec is blue, plan is amber, normal is * unstyled (no badge chrome when there is nothing to say). */ export declare function modeBadgeStyle(mode: Mode): (s: string) => string;