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

@boringos/workflow

v0.1.8

Published

DAG-based workflow engine with typed block handlers

Downloads

90

Readme

@boringos/workflow

DAG-based workflow engine for BoringOS with typed block handlers, condition branching, and template resolution.

Install

npm install @boringos/workflow

Usage

import {
  buildDAG,
  createWorkflowEngine,
  createWorkflowStore,
  createHandlerRegistry,
  createExecutionState,
  triggerHandler,
  conditionHandler,
  delayHandler,
  transformHandler,
  wakeAgentHandler,
} from "@boringos/workflow";

// Register block handlers
const handlers = createHandlerRegistry();
handlers.register(triggerHandler);
handlers.register(conditionHandler);
handlers.register(delayHandler);
handlers.register(transformHandler);
handlers.register(wakeAgentHandler);

// Create workflow store (Drizzle-backed)
const store = createWorkflowStore(db);

// Create the engine
const engine = createWorkflowEngine({ store, handlers, services });

// Build and execute a DAG
const dag = buildDAG(blocks, edges);
const result = await engine.run(workflowId, { type: "webhook", data: {} });

Template Resolution

Block configs can reference outputs from previous blocks:

import { resolveTemplate } from "@boringos/workflow";

// {{blockName.field}} syntax
const resolved = resolveTemplate(
  "Hello {{trigger.user_name}}",
  executionState,
  nameToIdMap
);

API Reference

Core

| Export | Description | |---|---| | buildDAG(blocks, edges) | Construct executable graph from block/edge arrays | | createWorkflowEngine(config) | Core execution loop with topological walk | | createWorkflowStore(db) | Drizzle-backed CRUD for workflow definitions | | createHandlerRegistry() | Maps block types to handlers | | createExecutionState() | Tracks block status + outputs during execution | | resolveTemplate(tpl, state, map) | Substitute {{blockName.field}} references |

Built-in Handlers (9)

| Handler | Description | |---|---| | triggerHandler | Entry point (cron, webhook, event) | | conditionHandler | True/false branching via selectedHandle | | delayHandler | Wait for a duration | | transformHandler | Data mapping/transformation | | wakeAgentHandler | Wake an agent | | connectorActionHandler | Invoke a connector action | | forEachHandler | Iterate over a collection | | createInboxItemHandler | Create an inbox item | | emitEventHandler | Emit an event to the event bus |

Types

DAG, DAGNode, DAGEdge, BlockHandler, BlockHandlerContext, WorkflowEngine, WorkflowStore, WorkflowDefinition, ExecutionState, TriggerType

Part of BoringOS