@pwngh/economy-lab
    Preparing search index...

    Function createWorker

    • Build the worker over an open Ports bag and the economy its inbox job submits through. defaults binds the steady-state feeds, dispatcher, and limit; a sweep request overrides any of them per run. The dispatcher falls back to the bag's own, so an env-selected transport relays without restating. start drives the loop through the bag's Scheduler when one is present, else a built-in interval timer.

      Parameters

      Returns Worker

      const worker = createWorker(ports, economy, { dispatcher });
      const stop = worker.start(30_000); // full pass every 30s
      const run = await worker.sweep({ only: ['relay'] }); // targeted manual pass
      const failed = SWEEP_NAMES.filter((name) => !run.batch[name].ok);
      stop();

      Background worker for the sweep cycle, ordering, and isolation model.