Skip to content

@usine/orchestrator/local

const layer: (instanceDirectory, config, brains, options) => Layer.Layer<CursorStore | CycleBudgets | ItemProjectionReader | ItemProjectionWriter | LoopControl | RepositoryLabelProjectionReader | RepositoryLabelProjectionWriter | RunEngine | RunReader, AttemptCancellationError | CredentialUnavailableError | EnginePersistenceError | ExecutorOperationError | RunInterventionRejectedError | RunNotFoundError | RunOperationRejectedError | UnsupportedWorkerError | WorkerCapabilityError, AttemptRuntime | CredentialProvider | TriggerCondition>

The full engine composition for local Workers. Supply the roster’s brains for startup preflight and provide the credential provider, the TriggerCondition that re-checks queued Events, and the AttemptRuntime that runs each Attempt’s Pi parent in this process. The runtime is built first, so durable storage is open and its tasks resumed before the engine recovers Runs.

Parameter Type
instanceDirectory InstanceDirectory
config UsineConfig
brains ReadonlyArray<BrainSpec>
options Omit<LocalExecutorOptions, "instanceDirectory">

Layer.Layer<CursorStore | CycleBudgets | ItemProjectionReader | ItemProjectionWriter | LoopControl | RepositoryLabelProjectionReader | RepositoryLabelProjectionWriter | RunEngine | RunReader, AttemptCancellationError | CredentialUnavailableError | EnginePersistenceError | ExecutorOperationError | RunInterventionRejectedError | RunNotFoundError | RunOperationRejectedError | UnsupportedWorkerError | WorkerCapabilityError, AttemptRuntime | CredentialProvider | TriggerCondition>