export function normalizeAgentSessionRows(sessions) {
    const raw = sessions?.sessions ?? sessions;
    if (Array.isArray(raw))
        return raw;
    if (raw && typeof raw === 'object') {
        return Object.entries(raw).map(([id, row]) => {
            if (row && typeof row === 'object')
                return { id, ...row };
            return { id, status: String(row ?? '') };
        });
    }
    return [];
}
//# sourceMappingURL=agent-session-rows.js.map