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

@sensigo/realm

v0.7.1

Published

Realm workflow execution engine — state machine, evidence capture, and service adapters for agent-driven workflows.

Readme

@sensigo/realm

@sensigo/realm — the Realm workflow execution engine. Use this package to load, register, and execute YAML-defined workflows programmatically, or to build custom service adapters and step handlers.

Installation

npm install @sensigo/realm

Usage — Execute a Workflow

Load a workflow definition and drive it step by step. Each executeStep call advances the run and returns a ResponseEnvelope with the current state and what comes next.

import { loadWorkflowFromFile, JsonFileStore, executeStep } from '@sensigo/realm';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const definition = loadWorkflowFromFile(path.join(__dirname, 'my-workflow/workflow.yaml'));

const store = new JsonFileStore(); // defaults to ~/.realm/runs/
const run = await store.create({
  workflowId: definition.id,
  workflowVersion: definition.version,
  params: { input: 'hello' },
});

const response = await executeStep(store, definition, {
  runId: run.id,
  command: 'my_step',
  input: { answer: 'done' },
  dispatcher: async (_stepName, stepInput) => stepInput, // replace with real agent/handler
});

console.log(response.status);
// response.next_actions[0] carries the next step to execute — repeat until next_actions is empty

Usage — Custom Service Adapter

Implement ServiceAdapter to connect a workflow step to any external API, then register it with ExtensionRegistry before executing.

import {
  ExtensionRegistry,
  executeStep,
  type ServiceAdapter,
  type ServiceResponse,
} from '@sensigo/realm';

const myAdapter: ServiceAdapter = {
  id: 'my-api',
  async fetch(operation, params, _config): Promise<ServiceResponse> {
    const data = await callMyApi(operation, params);
    return { status: 200, data };
  },
  async create(operation, params, _config): Promise<ServiceResponse> {
    return this.fetch(operation, params, _config);
  },
  async update(operation, params, _config): Promise<ServiceResponse> {
    return this.fetch(operation, params, _config);
  },
};

const registry = new ExtensionRegistry();
registry.register('adapter', 'my-adapter', myAdapter);

// Pass registry to executeStep or executeChain:
// await executeStep(store, definition, { ..., registry });

API Reference

Engine

| Symbol | Notes | | --------------------- | --------------------------------------------------------------- | | executeStep | Advance a run by one step. Returns ResponseEnvelope. | | executeChain | Auto-chain through auto steps until an agent step is reached. | | submitHumanResponse | Resolve an open human gate. | | buildNextActions | Build NextAction[] for all currently eligible agent steps. | | findEligibleSteps | Return names of steps ready to execute given current run state. | | propagateSkips | Propagate skip flags through dependent steps. |

Store

| Symbol | Notes | | ------------------- | ------------------------------------------------------ | | JsonFileStore | File-backed RunStore. Defaults to ~/.realm/runs/. | | JsonWorkflowStore | File-backed store for registered workflow definitions. |

Workflow

| Symbol | Notes | | ------------------------ | ------------------------------------------------------ | | loadWorkflowFromFile | Synchronous. Parses workflow.yaml at the given path. | | loadWorkflowFromString | Parse a workflow from a raw YAML string. |

Adapters

| Symbol | | -------------------- | | FileSystemAdapter | | GitHubAdapter | | SlackAdapter | | GenericHttpAdapter | | MockAdapter |

Registry

| Symbol | | ----------------------- | | ExtensionRegistry | | createDefaultRegistry |

Types

| Symbol | | -------------------- | | WorkflowDefinition | | RunRecord | | ResponseEnvelope | | ServiceAdapter | | ServiceResponse | | RunStore | | WorkflowError |

Processors

| Symbol | | --------------- | | normalizeText | | computeHash |

Handler primitives

| Symbol | | ---------------------- | | resolveResource | | walkField | | partitionBySubstring | | countResults | | compareStrings |

Full documentation

Full documentation: https://github.com/sensigo-hq/realm