npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@drizzle-run/orchestration

v0.2.0

Published

Host-independent Drizzle Run request and pair orchestration

Readme

Orchestration

@drizzle-run/orchestration provides run history and comparison scheduling over an injected executor. Consumers use methods, promises and plain state. XState is an internal dependency; consumers do not install it, import actors, send machine events or inspect machine snapshots.

The package depends on core and receives its runtime through the executor contract, which both browser and Node runtimes implement.

Run controller

import { createRunController } from "@drizzle-run/orchestration/run";
import { createNodeRuntime } from "@drizzle-run/runtime/node";

const runtime = createNodeRuntime();
const runs = createRunController({ runtime });

try {
  const outcome = await runs.submit({ manifest, revision: 1, debug: false });
  console.log(outcome.result);
  console.log(runs.getState().history);
} finally {
  try {
    await runs.dispose();
  } finally {
    await runtime.dispose();
  }
}

Use createBrowserRuntime from @drizzle-run/runtime/browser in a browser. All controller operations stay the same.

  • submit(submission, options?) returns that submission's outcome. Concurrent requests reject with RunRefusedError. Execution failures resolve with a failed outcome.
  • options.signal cancels only that request. Already aborted signals reject before execution starts.
  • options.prepare can format the submission before execution. Cancellation aborts preparation.
  • cancel() requests cancellation and waits for the workflow to settle.
  • getState() returns plain state with status, progress, result, history and selectedHistoryEntry.
  • subscribe(listener) observes subsequent state changes; onSettled(listener) observes completed submissions. Both return an object with unsubscribe().
  • selectHistoryEntry(number) selects a retained run; replay({ submission, result }) displays a recorded run.
  • dispose() closes admission, cancels active work and waits for settlement. The caller still owns the runtime.

A controller retains the last 20 runs. Each execution gets a fresh guest and one fresh database. The runtime owns actual termination and cleanup evidence. The internal execution watchdog can settle a failed workflow while the runtime continues cleanup and keeps its admission slot closed.

Comparisons

import { createComparisonController } from "@drizzle-run/orchestration/comparison";

const comparison = createComparisonController({
  execution: "sequential",
  runSide: ({ side, manifest, signal }) => executeSide({ side, manifest, signal }),
});

try {
  const outcome = await comparison.submit();
  console.log(outcome.runs);
} finally {
  await comparison.dispose();
}

The host supplies runSide, returning a side outcome or a result with its outcome. Cancellation aborts each active side's signal and waits for settlement. Sequential scheduling skips a side that has not started after cancellation. Parallel scheduling is the default. getManifest supplies the current comparison for shared-seed validation; submit({ manifest }) can supply another.

createRuntimeComparisonController from the package root uses the runtime's createComparison to own both executions. Its runSide callback attaches optional history to the supplied execution port and receives the same captured pair that the SDK executes. Each side's history remains available independently. The comparison controller waits for SDK aggregate cleanup before settling; an aggregate cleanup failure closes admission, appears in state, and rejects pending submissions, cancellation and disposal. The caller still owns the runtime.

React

@drizzle-run/react supplies useRunController, useComparisonController, state selectors and context providers over these same contracts. It adds no execution lifecycle of its own.

Checks

pnpm --filter @drizzle-run/orchestration test covers controller behavior and internal transition paths. pnpm --filter @drizzle-run/orchestration test:pack installs core and orchestration outside the repository and compiles and executes a Node consumer without DOM libraries or a direct XState dependency. node scripts/audit-sdk-api.ts checks the built SDK declaration graph for exposed XState types and required peers.