Dream Loop Orchestrator
Composes ConsolidationPasses into a repeatable consolidation cycle — the "dream loop".
Each cycle fetches the ACTIVE snapshot for a context once, runs every registered pass over it in registration order, aggregates what all passes want to save into a single write, and returns a DreamLoopReport. Passes are pure; only the orchestrator writes to the repository.
There are two ways to trigger a cycle:
consolidate is threshold-gated and returns
nullwhen not enough has changed.consolidateNow always runs regardless of how much has changed.
val orchestrator = DefaultDreamLoopOrchestrator.withRepository(repository)
.withPass(sessionConsolidationPass)
.withPass(abstractionPass)
.withPass(contradictionResolutionPass)
.withPass(decaySweepPass)
// Scheduled / threshold-gated: may return null if little has changed.
val maybeReport = orchestrator.consolidate(contextId)
// Always runs.
val report = orchestrator.consolidateNow(contextId)Inheritors
Functions
Run a consolidation cycle only if enough has changed since the last cycle.
Run a consolidation cycle unconditionally, regardless of how much has changed.
Run all maintenance stages for the given context.
Add a pass and return a new orchestrator with it appended. Registration order is execution order.