recentEventsForPlugins

open suspend fun recentEventsForPlugins(pluginIds: Set<String>, limit: Int): List<StoredEvent>

Cross-session counterpart of recentEventsForSession: the newest bounded rows across every retained session, restricted to pluginIds. pluginIds is required and non-empty -- unlike the session-scoped read, there is no cheap, generic way for this interface to enumerate "every session" on its own, so an unfiltered cross-session scan is intentionally not exposed here (it would reproduce the exact crowding-out problem this method exists to avoid).

Finding a crash from a run that has already ended -- its process is gone and a different session is now current -- is the reason this exists: nothing durable ties "which session" to "the crash a developer is looking for" except the plugin id.

A store without a real cross-session index (most test doubles) may leave this at its default, which returns an empty list; RoomEventStore is the one production override, backed by a single indexed plugin_id IN (...) query.