import { normalizeMessageContent } from "./messages.js";
/**
 * Build a safe derived path for replay/analysis without rewriting durable
 * session entries. Only lax message entries whose content is null are cloned.
 */
export function normalizeDerivedSessionEntries(entries) {
    return entries.map((entry) => {
        if (entry.type !== "message")
            return entry;
        const message = normalizeMessageContent(entry.message);
        return message === entry.message ? entry : { ...entry, message };
    });
}
//# sourceMappingURL=session-entry-normalization.js.map