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

@sewdn/workflow-plugins

v0.1.1

Published

Generic workflow plugins, one folder per plugin and one part per layer: meetings (a phase plans a meeting), documents (a task makes a document placeholder) and catalog (the data schemas and standard seats routes share), each with an engine part, a state a

Readme

@sewdn/workflow-plugins

Generic workflow plugins, one folder per plugin and one part per layer. Each part imports only its own layer and earlier ones (bun run boundaries checks src/<plugin>/engine, runtime, react and ui as the engine, the runtime, workflow-react and workflow-ui).

| Plugin | What it adds | | ----------- | ---------------------------------------------------------------------------------------------- | | meetings | meetings.plan-meeting: a phase plans a meeting when a run of it starts. | | documents | documents.create-document, documents.revise-document: a task makes a document placeholder. | | catalog | The data schemas and standard seats routes share, saved with the drafts that use them. |

Each plugin has state: the register of what its triggers asked for, projected from trigger.fired in the commit that fired them (so it is in snapshots, seeds and rollbacks) and read by a query, not by a read-model row.

| Query | Params | Result | | --------------------- | -------------------- | ---------------------------- | | meetings.planned | { runId?: string } | the meetings a phase planned | | documents.requested | { runId?: string } | the placeholders a task made | | catalog.schemas | {} | the catalog's data schemas | | catalog.seats | {} | the catalog's standard seats |

Subpaths: ./<plugin>/engine (the pure part: triggers, state, queries and the record types), ./<plugin>/runtime (the outward binding), ./<plugin>/react (the hooks that read the queries and give the commands, and the lists a screen shows), ./meetings/ui (the meetings plugin's UI part meetingsUi: its trigger's inspector, and its part of a run's screens drawn with the kit's primitives: the meetings of a phase visit with "Mark held", and the view of its planning task that puts a place on the series on a series meeting or moves it).

The catalog plugin has no trigger and no outward work: its state is the application's lists of data schemas and standard seats, and its commands (catalog.save-schema, .remove-schema, .save-seat, .remove-seat; authors only, workflow.author) change them. A save is one commit with the edits it causes: it chains the engine's editDraft, as item-addressed changes that are on nobody's undo stack (undoable: false), on the draft of every route that uses the schema, or has the seat. skipDefinitionId leaves one route's draft to the editor that has it open, materialize: false changes the catalog alone, and a route that stops using a schema while a field of its draft is typed by it refuses the save (schema-in-use). A route without a draft is not touched. Its UI part catalogUi (./catalog/ui) contributes catalog: { useSchemas, useSeats, useSaveSchema }, which the editor reads through useCatalog() of workflow-react without importing the plugin.

A plugin's events can read as lines of a run's history: the meetings plugin's records (put on a series meeting, moved, a series meeting held, a planned meeting held) do, worded by its copy.

An application composes each plugin from its parts and registers the one list with the engine, the runtime and the React provider; the plugin works with no runtime part at all:

import { meetingsUi } from "@sewdn/workflow-plugins/meetings/ui";

const plugins = [
  { ...meetingsPlugin, ui: meetingsUi },
  { ...documentsPlugin, ui: documentsUi },
];
const meetings = usePlannedMeetings(runId); // a QueryState of the `meetings.planned` query

Bindings

The engine makes the meeting and the placeholder inside the run, and the plugin's state shows them in the same commit. The runtime part is only what a host does outward with them, as one function: meetingsBinding(planner) and documentsBinding(planner) take a planner (MeetingPlanner, DocumentPlanner) and bind it as the trigger's handler. A server binding passes a planner that calls its calendar or its document store. A planner is idempotent by its record's id (the same id the state's record has): the reactions deliver at least once.