emit

suspend fun emit(taskId: String, state: TaskState)

Emits a new state for the given task ID. Terminal states are automatically persisted to the EventStore if installed. Safe to call from any coroutine context.