/** * A one-line context header prepended to a HUMAN prompt before it reaches the * TUI: the platform it came from, the time, and who sent it (when we know — * Telegram tells us, the web usually doesn't). The agent SEES it (useful * context — nothing else told it who is talking, or that a message arrived at * 3am), but the transcript display STRIPS it, the same way a cron mark is * hidden. Difference with the cron/agent marks: those hide the WHOLE message * (it is machine-written); here only the header line goes, the message stays. * * Not added for the terminal view (raw keystrokes bypass the prompt handler) * nor for cron/agent prompts (already marked, and not "someone speaking"). * * The header is wrapped in ⟦ ⟧ (U+27E6/U+27E7 — rare in ordinary typing) and * always carries a " · " separator, so the strip almost never fires on a line a * user actually wrote. Same strict, opens-the-message rule as the other marks. */ export declare const META_OPEN = "\u27E6"; export declare const META_CLOSE = "\u27E7"; /** "2026-08-25 14:30" in the given IANA zone (machine zone when omitted). */ export declare function formatWhen(at: Date, timeZone?: string): string; /** Build the header line: ⟦platform · time [· who]⟧. */ export declare function promptMetaHeader(platform: string, at: Date, who?: string, timeZone?: string): string; /** Does this text already open with a context header? (idempotence + strip.) */ export declare function hasPromptMeta(text: string): boolean; /** * Parse a leading context header into its fields, or null if there is none. * `who` is often empty (the web usually sends no sender name; Telegram does). * The name is taken as everything past the time, so a name that itself contains * " · " survives. Lets a replayed history restore who spoke — otherwise a * Telegram message came back as the generic "pilot", its sender lost with the * stripped header. */ export declare function parsePromptMeta(text: string): { platform: string; who: string; } | null; /** Prepend the header as its own first line. Idempotent. */ export declare function markPromptMeta(text: string, header: string): string; /** Remove a leading context header (and only that line); a plain message is * returned untouched. */ export declare function stripPromptMeta(text: string): string;