/**
* Message formatter — converts stored messages into compact XML for the Claude prompt.
*
* Format:
*
* Hello
* Hi there
*
*
* Message body is NOT XML-escaped (preserves original formatting: tables, code blocks, etc.).
* Only attribute values are escaped.
*/
import type { StoredMessage } from '../types.js';
import type { StoredImage } from '../db/images.js';
/** Escape XML special characters in attribute values. */
export declare function escapeXml(s: string): string;
/** Format an ISO timestamp to a short local time string. */
export declare function formatLocalTime(iso: string, timezone: string): string;
/**
* Format an array of stored messages into compact XML.
*
* @param messages - Messages sorted by timestamp ascending
* @param timezone - IANA timezone string (e.g. "Asia/Shanghai")
* @param imageMap - Optional map of message_id → StoredImage[] for image annotations
* @returns XML string ready to embed in a prompt
*/
export declare function formatMessages(messages: StoredMessage[], timezone: string, imageMap?: Map): string;