simulatecraft.core.events¶
simulatecraft.core.events
¶
Typed event schemas and the central pub/sub EventBus.
Every observability concern (terminal viewer, JSONL logger, websocket broadcaster) subscribes here. Environments and agents never know they are being watched: with zero subscribers everything still works.
HumanChat
¶
Bases: Event
Inbound: a human sent a message, optionally targeting one agent.
HumanControl
¶
Bases: Event
Inbound: viewer control commands (pause/resume/step/stop/reset).
EventBus
¶
Ordered pub/sub with isolated subscriber errors and an inbound queue.
Source code in src/simulatecraft/core/events.py
publish_inbound
¶
Queue an inbound event AND mirror it onto the outbound bus for viewers.