pig/obs/emit

Event emission utilities.

Provides functions to emit SessionEvents to the dispatcher. This module bridges events.gleam and dispatcher.gleam to avoid circular imports.

Values

pub fn to_dispatcher(
  dispatcher_subject: process.Subject(
    dispatcher.DispatcherMessage,
  ),
  event: events.SessionEvent,
) -> Nil

Send a SessionEvent to the dispatcher actor. Takes the dispatcher Subject directly — only what it needs. This is the primary way for the core agent code to emit observability events through the dispatcher to all registered consumers (session writer, terminal, etc.).

✨ Search Document