Packages
Events
@loop-engine/events
Event contracts, Zod schemas, and in-memory event bus.
Install
1npm install @loop-engine/eventsAPI reference
InMemoryEventBus
1class InMemoryEventBus {2 emit(event: LoopEvent): Promise<void>3 subscribe(handler: (event: LoopEvent) => Promise<void>): () => void4}LOOP_EVENT_TYPES
String constants for:
loop.startedloop.transition.requestedloop.transition.executedloop.transition.blockedloop.guard.failedloop.completedloop.errorloop.spawnedloop.signal.receivedloop.outcome.recorded
extractLearningSignal
1extractLearningSignal(2 completed: LoopCompletedEvent,3 history: TransitionRecord[],4 predicted?: Record<string, unknown>5): LearningSignalSchemas
LoopEventSchema and per-event schemas (for runtime validation/parsing).
Related packages
- Depends on
@loop-engine/core - Used by runtime, sdk, signals, adapters, and ui-devtools