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

@siglo/core

v1.2.6

Published

TypeScript workflow orchestration with durable checkpoints, retries, saga compensation, and live DevTools.

Readme

Siglo Core

Zero-daemon, in-process workflow orchestration with durable checkpoints, Sagas, and live visual DevTools.

NPM Version License: MIT Node Version TypeScript Coverage

Siglo is a lightweight, zero-daemon workflow runtime for TypeScript. It orchestrates complex business logic into composable, resilient steps—featuring end-to-end type inference, automatic Sagas, durable checkpoints, and live DevTools without external infrastructure.


Positioning: In-Process Orchestration vs Distributed Engines

| Dimension | Siglo | Distributed Engines (Temporal, Inngest) | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- | | Architecture | Lightweight, zero-infrastructure in-process library | Heavy multi-cluster / external orchestrator daemon | | Latency | Microsecond direct async function invocation | Millisecond-to-second RPC / polling overhead | | Footprint | Zero external dependencies, pure TypeScript | Requires persistent workers, queue servers, and databases | | Primary Focus | Modular workflows, parallel fan-out/fan-in, bounded worker mapping, request-scoped sagas, idempotency, durable event waits, retry backoff with jitter, OCC checkpointing | Months-long durable human-in-the-loop workflows |


Documentation & Topic Guides

Explore the 11 comprehensive guides covering architecture, design patterns, testing, and production operations:

  1. 🚀 01. Getting Started — Installation, quickstart walkthrough, minimal examples, and CLI scaffolding.
  2. 💡 02. Core Concepts — Executable ASTs, accumulated context immutability, 5-phase step lifecycle, and reserved keys.
  3. ⛓️ 03. Sequential Workflows — Linear pipelines, clean POJO parameters, lifecycle hooks (onBefore, onSkip, onAfter), and caching.
  4. 🔀 04. Branching and Parallelism — Concurrent fan-outs (parallel, all, allSettled, race), dynamic routing (when, branch), and bounded mapping (map).
  5. 🛡️ 05. Retries, Timeouts, and Cancellation — Two-tier timeouts, exponential backoff with jitter, cooperative AbortSignal cancellation, and saga rollbacks.
  6. ⏳ 06. Durable Workflows — Long-running human-in-the-loop waits (waitForEvent, wait), checkpoint resumption, and state migrations.
  7. 💾 07. Storage and Adapters — Distributed persistence contracts, PostgreSQL & Redis adapters, and multi-tenant namespaces.
  8. 🔭 08. Observability — Graph exports (Mermaid, DOT, JSON), OpenTelemetry distributed tracing, and W3C trace propagation.
  9. 🧪 09. Testing and Replay — Deterministic workflow harnesses (@siglo/testing), fake clocks, step spies, mocks, and failure replay.
  10. 🏷️ 10. TypeScript Reference — End-to-end accumulated context inference, typed step history ($steps), and Standard Schema integration.
  11. 🏭 11. Production Operations — Production deployment checklist, zero-daemon operational topologies, connection pooling, and retention cleanup.

Quickstart: Type-Safe Composable Flows

Install the TypeScript workflow runtime:

npm install @siglo/core
import { Step, flow } from '@siglo/core';

// 1. Define modular steps with input/output contracts
const fetchUser = Step.create('fetchUser', async (param: { userId: string }) => {
    return { name: 'Alice', tier: 'PRO' };
});

const calculateDiscount = Step.create('calculateDiscount', async (param: { tier: string }) => {
    const discount = param.tier === 'PRO' ? 0.2 : 0.05;
    return { discountPercentage: discount };
});

// 2. Compose into an executable flow
export const orderWorkflow = flow(fetchUser, calculateDiscount);

// 3. Run the flow with full type safety
async function main() {
    const result = await orderWorkflow.run({ userId: 'u_123' }, { pojo: true });
    console.log(result.name); // 'Alice'
    console.log(result.discountPercentage); // 0.20
    console.log(result.$steps.fetchUser); // { name: 'Alice', tier: 'PRO' }
}

main();

Key Features

  • ⚡ Composable Flows (flow) — Compose steps directly into workflows without global registries; steps are pure execution units.
  • 🧠 Accumulated Context Inference — TypeScript automatically computes the accumulated output type across composed sequential steps at compile time.
  • 📜 Typed Step History ($steps) — Statically typed access to any step's output using string literal names (context.$steps.loadUser.user).
  • 🗺️ Workflow Graph Visualization — Export workflow graphs directly to Mermaid diagrams (flow.toMermaid()), Graphviz DOT (flow.toDot()), and JSON AST (flow.toJSON()) with policy badges.
  • 💉 Runtime Dependency Injection — Inject services and repositories explicitly via options.services or step-level step.withDependencies().
  • 🔀 Parallel Execution Combinators — Run branches concurrently with parallel, all, allSettled, and race, equipped with branch context isolation and configurable merge strategies.
  • 🌿 Conditional Branching & Routing — Dynamic decision routing via when(predicate, thenStep, elseStep) and multi-branch selectors via branch(selectorFn, branchesMap, defaultBranch).
  • 🔄 Dynamic Mapping & Bounded Concurrency — Process arrays with map(items, step, { concurrency }), order preservation, and error aggregation.
  • 🔑 Scoped Idempotency & Deduplication — Protect workflows and individual steps (step.idempotent()) with deterministic hash keys and TTL stores.
  • ⏪ Sagas & LIFO Compensations — Attach rollback handlers (step.compensate(handler)) that run automatically in reverse execution order upon failure.
  • ⏳ Durable Waits & Event Resumption — Pause execution with waitForEvent(eventName) or wait('30m'), persist suspended checkpoints, and safely resume workflows.
  • 🏷️ Workflow Versioning & State Migrations — Declare workflow versions (flow.version('v2')), detect version mismatches upon resumption, and run registered state transformation functions.
  • ⏱️ Resilient Deadlines & Two-Tier Timeouts — Enforce per-step SLA (step.timeout(ms)) and workflow-level deadlines (flow.timeout(ms)).\
  • 🔁 Structured Retry Strategies — Automatic retries with exponential, linear, or fixed backoff, jitter, and onRetry hooks right in onFail.\
  • 📦 Standard Schema Integration (spec / schema) — Native Standard Schema, Zod, Valibot, and ArkType contract enforcement.\
  • 🛑 Graceful Cancellation & AbortSignals — Cancel flows, in-flight async steps, and retry timers seamlessly using standard AbortSignal.

License

This project is licensed under the MIT License - see the LICENSE file for details.