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

@governed-ai/democraft-runtime

v0.1.0

Published

DEMOCRAFT demo-orchestration runtime: signal-driven FSM execution engine, evaluation engine, session manager, flow/feature registries, and storyboard loader — application-neutral, deterministic, content-agnostic.

Readme

@governed-ai/democraft-runtime

DEMOCRAFT is a demo-orchestration runtime — a deterministic, signal-driven finite-state-machine (FSM) engine for building guided, scripted product walkthroughs and validating that they ran exactly as authored. It executes a storyboard (features → flows → steps), advances strictly on the signals it is told to expect, and produces a strict pass/fail evaluation of the run.

It carries no application domain logic, no database driver, and no built-in content. A host application supplies persistence and storyboard content through documented extension seams.

  • Deterministic — step advancement is governed solely by the signals a step declares as required. Given the same signals in the same order, a run always produces the same execution state and the same evaluation. No LLM, no clocks, no randomness in the decision path.
  • Content-agnostic — the runtime ships zero storyboards. The host registers its own content via registerStoryboard(). DEMOCRAFT knows how to run a storyboard, never what it contains.
  • Persistence-agnostic — the runtime talks to a DemocraftPersistence port; the host injects a concrete adapter (e.g. a Drizzle/Postgres implementation) via configureDemocraftPersistence().
  • Strictly evaluated — every completed session can be evaluated into a pass/fail report with per-criterion evidence, so a demo is verifiable, not just runnable.

What problem does it solve?

Scripted product demos are fragile: steps get skipped, timing drifts, and there is usually no machine-checkable proof that the demo actually did what it was supposed to. DEMOCRAFT turns a demo into a verifiable state machine — each step declares the exact signals required to advance, and the evaluation engine emits a deterministic verdict (pass / fail) with evidence. This makes a demo a regression-testable asset, not a manual ritual.

How does it differ from PADP Runtime?

| | @governed-ai/padp-runtime | @governed-ai/democraft-runtime | | --- | --- | --- | | Concern | Governed AI decisioning (intelligence pipeline, governance gate, artifacts) | Demo orchestration (FSM, signals, evaluation) | | Decides | Whether/how a skill runs under policy | Whether a demo step may advance | | Output | Governed intelligence artifacts | Execution state + pass/fail evaluation | | Relationship | Foundational runtime | Independent — no dependency on PADP Runtime |

DEMOCRAFT is a fully independent runtime. It does not depend on @governed-ai/padp-runtime (its only external dependencies are zod and pino), and it does not drive, wrap, or govern PADP intelligence requests.

How does HEART use it?

HEART (a host application) embeds DEMOCRAFT to script and verify product walkthroughs:

  1. Implements a DemocraftPersistence adapter and installs it with configureDemocraftPersistence().
  2. Authors storyboard content (features, flows, steps) and registers it with registerStoryboard().
  3. Drives the engines (storyboardLoader, sessionManager, executionEngine) from its own routes/UI to launch sessions and feed signals.
  4. Calls evaluationEngine.evaluateSession() to obtain a deterministic verdict.

The reference in-repo host (@workspace/api-server) does exactly this; see docs/QUICK_START.md.

Install

npm install @governed-ai/democraft-runtime

Requires Node.js >=22. See docs/INSTALLATION.md.

Quick start

import {
  configureDemocraftPersistence,
  registerStoryboard,
  storyboardLoader,
  sessionManager,
  executionEngine,
  evaluationEngine,
} from "@governed-ai/democraft-runtime";

configureDemocraftPersistence(myAdapter);   // 1. host persistence
registerStoryboard(myCatalogEntry);          // 2. host content

await storyboardLoader.loadStoryboard({ storyboardId: "demo", flowIds, featureIds });
const session = await sessionManager.createSession({ storyboardId: "demo", requestedBy: "host" });
await executionEngine.receiveSignal(session.sessionId, "ui-action");
const evaluation = await evaluationEngine.evaluateSession(session);

Full runnable walkthrough: docs/QUICK_START.md.

Public API surface

The package exposes a single curated entry point — @governed-ai/democraft-runtime. Internal modules are not importable from the published package.

| Export | Kind | Purpose | | --- | --- | --- | | configureDemocraftPersistence, getDemocraftPersistence | function | Persistence injection seam | | DemocraftPersistence + repository/DTO types | type | Contract the host adapter implements | | registerStoryboard, getCatalogEntry, listRegisteredStoryboards, clearStoryboardCatalog | function | Storyboard content registry | | StoryboardCatalogEntry | type | Shape of registered content | | storyboardLoader, sessionManager, executionEngine, evaluationEngine, featureRegistry, flowRegistry | object | Engine singletons | | Domain types (DemoFeature, DemoFlow, DemoStep, DemoExecutionState, DemoEvaluation, SignalType, …) | type | The DEMOCRAFT domain model | | Contract schemas (*Schema, *Contract) | object/type | Zod/TS API contracts for host routes |

Full enumeration: repository docs/PHASE_7H_PUBLIC_API_INVENTORY.md.

Documentation

License

UNLICENSED — distribution is controlled by the platform owner.