How events work in Noodle
mainEvents are the mechanism Noodle uses to track history and ingest information from external systems. The scheduler uses these events as context (not as direct commands) to decide how to react to the state of the world.
Noodle emits internal events automatically (e.g., stage completion, merge conflicts) and allows you to inject custom events from external tools like CI pipelines, deployment scripts, or monitoring systems.
When you emit an event, it is appended to .noodle/loop-events.ndjson. During the next build, these events appear in the recent_events array of the mise, which the scheduler reads to inform its decision-making process.