export type PresenceState = "mobile" | "office"; export type PresenceSource = "hook" | "cli"; export interface PresenceRecord { state: PresenceState; updated_at: string; source: PresenceSource; } export interface PresenceRead { state: PresenceState; updated_at: string | null; source: PresenceSource | null; is_default: boolean; } export declare function presenceFilePath(): string; export declare function readPresence(): PresenceRead; export declare function writePresence(state: PresenceState, source: PresenceSource): PresenceRecord; export declare function clearPresence(): boolean; /** * Strip fenced code blocks and `>`-quoted lines from the prompt before * scanning for quote characters. Pasted code or quoted prose with smart * quotes is the most common contamination vector; it shouldn't influence * presence inference. Inline code spans are intentionally left as-is. */ export declare function preprocessForDetection(prompt: string): string; /** * Apply the detection rules to a prompt. Returns the inferred state, or null * if the prompt carries no actionable signal (mixed quotes, no quotes + not * short-trailing-space, etc.), in which case the caller should preserve * current state. * * Rule order (first match wins): * 1. Both curly AND straight present -> null (mixed) * 2. Curly only -> mobile * 3. Straight only -> office * 4. <100 chars and ends with space -> mobile * 5. Otherwise -> null */ export declare function detectFromPrompt(prompt: string): PresenceState | null; export interface DetectResult { changed: boolean; before: PresenceState; after: PresenceState; detected: PresenceState | null; } export declare function applyDetection(prompt: string): DetectResult; export declare function ageSeconds(updated_at: string | null): number | null; export declare function formatAge(seconds: number | null): string; //# sourceMappingURL=presence.d.ts.map