pub fn dispatch_event(
conn: &Connection,
event: &str,
memory_id: &str,
namespace: &str,
agent_id: Option<&str>,
db_path: &Path,
)Expand description
Fire an event to all matching subscribers. Each dispatch runs in
its own OS thread and does NOT block the caller. Errors are logged
and counted in the DB via failure_count.
Caller owns the connection. Dispatch threads re-open the connection
as needed to update counters (cheap — SQLite connections are
process-shared via WAL).
P5 (G9): convenience wrapper for the historical no-details case
(used by memory_store). New event types should call
dispatch_event_with_details and pass the matching
*EventDetails struct serialised to JSON.