export function serializeMemoryRows(rows) {
    return Array.isArray(rows) ? rows : [];
}
export function serializeMemoryAudit(audit) {
    return audit ?? { scanned: 0, quarantined: [], findings: [] };
}
export function serializeMemoryQuarantine(quarantine) {
    return Array.isArray(quarantine) ? quarantine : [];
}
export function serializeMemoryQualitySummary(summary) {
    return summary ?? {
        active: 0,
        quarantined: 0,
        workspace: 0,
        profile: 0,
        shared: 0,
        inbox: 0,
        hiddenCount: 0,
        topTags: [],
    };
}
