@shipplane/orchestrator
Worker orchestration layer built on @shipplane/core. The orchestrator uses the core runner for workflow state and scheduling, then dispatches each task execution to a worker.
Alpha exports in-memory and worker-thread gateways. HTTP and SSH adapters are planned for a later release and are not exported yet.
Install
Usage
Public API
Main export (@shipplane/orchestrator):
createOrchestrator({ store, workerGateway, recovery? })startRun({ workflow })waitForRun(runId)cancelRun(runId)cancelTask(runId, taskId)
createDispatchingTaskRegistry({ workflow, gateway })createInMemoryWorkerDirectory({ heartbeatTimeoutMs?, now? })createLeastActiveWorkerRouter(directory)createRoutingWorkerGateway({ directory, router, endpoints })WorkerGateway,WorkerJob,WorkerResultMessage
Subpath exports
@shipplane/orchestrator/storecreateInMemoryOrchestratorStore({ deepClone?, maxEvents?, maxSnapshots?, onEvent? })OrchestratorStore
@shipplane/orchestrator/workercreateWorkerRuntime({ workerId, handlers })runtime.run(job, context)runtime.cancel(jobId)runtime.stop()
@shipplane/orchestrator/worker/in-memorycreateInMemoryWorkerGateway()gateway.registerWorker({ workerId, handlers })
@shipplane/orchestrator/worker/threadcreateWorkerThreadGateway(worker)createPooledWorkerThreadGateway({ directory, router, workers })createWorkerThreadWorker({ workerId, handlers, port })
More
- Custom Adapter — implement
WorkerGatewayfor your own worker backend. - Worker Routing — choose among multiple workers by capability and health.
- Advanced — raw event listener, run recovery, and general notes.