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

@manya-hael/helixflow-sdk

v0.2.0

Published

Client and workflow helpers for HelixFlow.

Readme

@manya/helixflow-sdk

Client and workflow helpers for the HelixFlow workflow engine.

What It Does

This package provides an HTTP client and a set of factory/validation functions for working with HelixFlow workflows. It handles:

  • Workflow definitions -- create structured workflow DAGs with nodes and edges
  • uSINGA connection references -- create and validate connection refs that link workflow API nodes back to the uSINGA provider system
  • Shape validation -- check workflow structure before sending it to the API

This package intentionally does not store API keys, inspect provider balances, or choose providers. Those responsibilities belong to uSINGA - API NEXUS.

API Reference

HelixFlowClient

HTTP client for the HelixFlow API.

const client = new HelixFlowClient({
  baseUrl: "http://localhost:8100/api",  // default
  fetchImpl: globalThis.fetch            // default
});

| Method | Description | |---------------------|----------------------------------------| | listWorkflows() | Returns all workflows. | | getWorkflow(id) | Returns a single workflow by ID. | | createWorkflow(w) | Creates a workflow (validates first). | | runWorkflow(id, input?) | Runs a workflow with optional input. |

createWorkflowDefinition(input)

Creates a workflow definition with sensible defaults.

| Parameter | Type | Required | Description | |------------------|--------------------|----------|------------------------------------| | name | string | Yes | Workflow name | | nodes | WorkflowNode[] | Yes | Nodes in the DAG | | edges | WorkflowEdge[] | Yes | Directed edges connecting nodes | | failurePolicy | string | No | Default: "stop_workflow" | | retry | { attempts, backoff } | No | Default: { attempts: 3, backoff: "exponential" } |

Returns a WorkflowDefinition with status: "draft".

createUsingaConnectionRef(connectionId)

Creates a uSINGA connection reference string. Prepends "usinga:" if not already present.

createUsingaConnectionRef("crm-approved")       // "usinga:crm-approved"
createUsingaConnectionRef("usinga:billing-ok")   // "usinga:billing-ok"

Throws if connectionId is missing or not a string.

createApiRequestNode(input)

Creates an API request node that uses a uSINGA connection reference.

| Parameter | Type | Required | Description | |-----------------|----------|----------|--------------------------------------------| | id | string | Yes | Node identifier | | label | string | Yes | Human-readable label | | method | string | No | HTTP method (default: "GET") | | connectionRef | string | Yes | Must be a uSINGA ref (starts with "usinga:") |

Throws if connectionRef does not start with "usinga:".

validateWorkflowShape(workflow)

Validates a workflow definition's structure. Checks:

  • Workflow has a name
  • At least one node exists
  • Edges is an array
  • No duplicate node IDs
  • All API nodes use uSINGA connection references
  • All edge sources/targets reference existing nodes

Returns { valid: boolean, errors: string[] }.

Usage

import {
  HelixFlowClient,
  createWorkflowDefinition,
  createUsingaConnectionRef,
  createApiRequestNode,
  validateWorkflowShape
} from "@manya/helixflow-sdk";

// Build a workflow
const workflow = createWorkflowDefinition({
  name: "Sync CRM Contacts",
  nodes: [
    { id: "trigger", type: "trigger", label: "Daily schedule" },
    createApiRequestNode({
      id: "fetch-contacts",
      label: "Fetch from CRM",
      method: "GET",
      connectionRef: createUsingaConnectionRef("crm-approved")
    }),
    { id: "transform", type: "transform", label: "Map fields", config: {} }
  ],
  edges: [
    { source: "trigger", target: "fetch-contacts" },
    { source: "fetch-contacts", target: "transform" }
  ]
});

// Validate before sending
const check = validateWorkflowShape(workflow);
if (!check.valid) {
  console.error("Workflow errors:", check.errors);
  process.exit(1);
}

// Send to HelixFlow
const client = new HelixFlowClient();
const created = await client.createWorkflow(workflow);
console.log("Created workflow:", created);

Types

WorkflowNode

{
  id: string;
  type: "trigger" | "api" | "transform" | "condition" | "output" | string;
  label: string;
  config?: Record<string, unknown>;
}

WorkflowEdge

{
  id?: string;
  source: string;
  target: string;
}

WorkflowDefinition

{
  name: string;
  status?: string;
  failurePolicy?: string;
  retry?: { attempts: number; backoff: string };
  nodes: WorkflowNode[];
  edges: WorkflowEdge[];
}

License

MIT