Skip to content

rulvar API reference


rulvar API reference / @rulvar/cli / CreateWorkerOptions

Interface: CreateWorkerOptions

Defined in: packages/cli/src/worker.ts:56

Properties

PropertyTypeDescriptionDefined in
argsFor?(meta) => unknownThe OQ-21 interim channel: original in-process run arguments are not journaled in v1, so the host re-supplies them per run. Absent means args resume as undefined (fully replayed prefixes never notice).packages/cli/src/worker.ts:80
concurrency?numberAppendix A: leased runs per worker process; default 1.packages/cli/src/worker.ts:64
extraDerivers?KeyDeriver[]DEF-6 window extension, in lockstep with the engine assembly.packages/cli/src/worker.ts:82
onError?(runId, error) => voidObservability hook for per-run failures; never throws into the loop.packages/cli/src/worker.ts:84
owner?stringLease owner id; defaults to a per-process identity.packages/cli/src/worker.ts:66
pollMs?numberIdle sweep cadence for start(); default 1000 ms.packages/cli/src/worker.ts:74
retention?(meta) => booleanOpt-in retention (OQ-20 executed at M8-T04): evaluated during sweeps over SETTLED runs (terminal meta); a true verdict applies engine.deleteRun under a briefly held lease. Absent means everything persists indefinitely.packages/cli/src/worker.ts:91
storeLeasableStoreThe LeasableStore to lease runs from; MUST be the same journal the engine writes (Engine.stores.journal), or the fencing epoch would protect a store nobody appends to. Verified at start.packages/cli/src/worker.ts:62
ttlMs?numberThe store's lease ttl; the worker renews at ttl/3 (the normative bound). Default: the Appendix A reference 60000 ms. MUST match the store's configured ttl.packages/cli/src/worker.ts:72