Loads everything review mode renders for one past session (and its prior-leg chain).
The MJ: AI Agent Sessions.ID to review.
Optionalprovider: IMetadataProviderOptional metadata provider (multi-server apps); falls back to the global default.
The assembled review, or null when the session doesn't exist / can't be read.
STATELESS loader for the call overlay's SESSION REVIEW mode: given a past
MJ: AI Agent Sessionsid, batch-loads the session row, its persisted caption turns (MJ: Conversation Detailslinked byAgentSessionID), its delegated agent runs (minus the co-agent observability run named in the session Config'scoAgentRunID), and its saved channel states — and folds them into one RealtimeSessionReview.CHAIN-AWARE: when the reviewed session carries a
LastSessionID(it RESUMED an earlier session), the loader walks the chain BACKWARDS — capped at MAX_REVIEW_LEGS legs and MAX_REVIEW_DETAILS caption rows total (oldest legs trimmed first), with a cycle guard so a corrupt A→B→A chain can never loop — and surfaces ALL legs chronologically on RealtimeSessionReview.Legs. Channel state stays the reviewed (latest) leg's only. The chain's conversation-history ARTIFACTS (junction rows on the session-stamped details) are collected onto RealtimeSessionReview.Artifacts.TOLERANT by design: any missing piece degrades to an empty collection; the loader returns
nullonly when the reviewed session row itself can't be found.