Replace fixed session_count_* columns with a sparse session_counts JSONB object so new session types require no schema changes. Convert retained and unrolled-up activity, warning on backlogs spanning more than 24 hours. Update batching, queries, and rollups while preserving existing API shapes and compatibility with older agents. Add migration, query, and batcher coverage.