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

@aidex/workflow

v1.0.1

Published

Aidex Workflow — reusable, provider-agnostic sequential step orchestration primitives.

Readme

@aidex/workflow

Installation

pnpm add @aidex/workflow
npm install @aidex/workflow

Reusable workflow primitives for Aidex: an ordered sequence of steps (Workflow), the contract each step satisfies (WorkflowStep), the shared state threaded between them (WorkflowContext), and a minimal sequential runner (WorkflowExecutor).

Contents

  • workflow/Workflow — maintains an ordered list of WorkflowSteps. Constructor accepts an optional id: string parameter (backward-compatible — omitting it works exactly as before). addStep() appends, getSteps() returns a snapshot. No execution logic of its own.
  • step/WorkflowStep — the contract only: { name: string; execute(context): Promise<void> }. No implementation ships here.
  • types/WorkflowContext — a generic, provider- and application-independent bag of shared state (WorkflowContext<TState> = TState). Steps typically communicate forward by mutating it in place.
  • executor/WorkflowExecutor — runs a Workflow's steps sequentially against one shared WorkflowContext instance, awaiting each step in order. Stops immediately (the rejection propagates) if a step throws — no later step runs. No retry, no parallelism, no branching, no persistence, no logging.
  • WorkflowCancelledError / cancellationexecute() takes an optional third options argument: { signal?: AbortSignal }. Checked before each step, and raced against an in-flight one, so aborting stops execution promptly even if the current step's own promise never settles. Fully backward-compatible — omitting options behaves exactly as before.
  • registry/WorkflowRegistry — id-keyed registry for managing a set of workflows, patterned after EngineRegistry. Methods: register(workflow) (requires workflow.id to be set; throws Error if not, WorkflowAlreadyRegisteredError if the id is already registered), unregister(id), has(id), get(id), list(), and execute(id, context, options) (throws WorkflowNotFoundError if not found; delegates entirely to WorkflowExecutor, never reimplementing step-running).
  • WorkflowEvent / observability eventsoptions.onEvent?: (event: WorkflowEvent) => void is an opt-in callback firing workflow-started, step-started, step-completed, step-failed (carries the thrown error), workflow-cancelled (carries the WorkflowCancelledError), and workflow-completed. The executor never logs or persists anything itself — this is a plain hook a caller (or a future observability layer) can subscribe to.

Independence

This package knows nothing about Gemini, OpenAI, Claude, Ollama, Design Platform, Print Platform, or any other application or vendor — it only coordinates the order steps run in and the context they share. It has no runtime dependency on @aidex/core (or any other Aidex package): every type here is self-contained and generic over the caller's own TState. Adding WorkflowRegistry did not change this — WorkflowAlreadyRegisteredError is defined package-locally specifically to preserve the zero-Aidex-dependency design.

Architecture rules this package follows

  • Composition only — no inheritance, no abstract base class.
  • No singletons, no global mutable state — Workflow and WorkflowExecutor are both plain classes instantiated by the caller.
  • src/index.ts exports Workflow, WorkflowExecutor, WorkflowCancelledError, WorkflowRegistry, WorkflowNotFoundError, WorkflowAlreadyRegisteredError, and the WorkflowStep/WorkflowContext/WorkflowEvent/WorkflowEventType/ WorkflowExecutionOptions types — nothing internal beyond that.

Dependency direction

@aidex/workflow has no dependency on @aidex/providers, @aidex/strategies, @aidex/plugins, @aidex/observability, or any future memory/sdk package — and none on @aidex/core either, since nothing in this package's design needs a kernel type. It is a standalone orchestration primitive any of those packages (or an application) could depend on, never the other way around.