Events and Recovery
Raw event listener
createInMemoryOrchestratorStore can receive each raw workflow event as it is appended:
appendEvent invokes the callback. If the callback throws, the append rejects and the run follows core's event-hook failure behavior.
The in-memory store keeps at most 100 snapshots and 5,000 events by default. Pass maxSnapshots or maxEvents to tune retention, or Infinity to disable a cap.
Recovery
createOrchestrator can recover a managed run from a stored snapshot when waitForRun, cancelRun, or cancelTask receives a run ID that is no longer active in memory:
Recovery uses the core runner's snapshot recovery. If you omit interruptedTasks, core uses the workflow's recovery config and falls back to "manual".
Limitations
- Workers execute one task job, not a full workflow.
- Workers use core's
TaskRegistryfor real task handlers. - The host orchestrator uses core's
createRunnerfor DAG state. worker/threadprovides local process isolation, not a hostile-code security sandbox.- Persistence is interface-ready; alpha includes only the in-memory store.