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

@offbit-ai/zeal-sdk

v1.0.2

Published

TypeScript SDK for Zeal Integration Protocol (ZIP)

Downloads

7

Readme

Zeal SDK

TypeScript SDK for the Zeal Integration Protocol (ZIP), enabling third-party workflow runtime integration with the Zeal workflow editor.

Prerequisites

⚠️ Important: A running Zeal server instance is required for the SDK to function. The SDK communicates with the Zeal server via REST APIs and WebSocket connections.

Starting the Zeal Server

# Clone the Zeal repository
git clone https://github.com/offbit-ai/zeal.git
cd zeal

# Install dependencies
npm install

# Start the development server
npm run dev
# Or use the start script
./start-dev.sh

The Zeal server will be available at http://localhost:3000 by default.

For detailed setup instructions, deployment options, and configuration, please refer to the Zeal repository.

Installation

npm install @offbit-ai/zeal-sdk

Quick Start

import ZealClient from '@offbit-ai/zeal-sdk'

const client = new ZealClient({
  baseUrl: 'http://localhost:3000',
})

// Register node templates
await client.templates.register({
  namespace: 'my-integration',
  category: 'Custom Nodes',
  templates: [...],
})

// Orchestrate workflows
const workflow = await client.orchestrator.createWorkflow({
  name: 'My Workflow',
  description: 'Created via SDK',
})

// Submit execution traces
const session = await client.traces.createSession({
  workflowId: workflow.workflowId,
  workflowName: workflow.name,
})

Webhook Subscriptions

The SDK provides two patterns for receiving webhook events: callbacks and observables.

Callback Pattern

const subscription = client.createSubscription({
  port: 3001,
  namespace: 'my-integration',
  events: ['workflow.*', 'node.*'],
})

// Subscribe with callback
const unsubscribe = subscription.onEvent(async (event) => {
  console.log('Received event:', event.type, event.data)
})

// Start receiving events
await subscription.start()

// Later: cleanup
unsubscribe()
await subscription.stop()

Observable Pattern

const subscription = client.createSubscription({
  port: 3001,
  namespace: 'my-integration',
})

// Get observable
const observable = subscription.asObservable()

// Filter and transform events
const errorEvents = observable
  .filter(event => event.type.includes('error'))
  .map(event => ({
    id: event.id,
    error: event.data.error,
    timestamp: event.timestamp,
  }))

// Subscribe to transformed stream
const sub = errorEvents.subscribe(
  (error) => console.error('Error:', error),
  (err) => console.error('Stream error:', err),
  () => console.log('Stream completed')
)

await subscription.start()

// Later: cleanup
sub.unsubscribe()
await subscription.stop()

Event Type Filtering

// Subscribe to specific event types
subscription.onEventType(['node.executed', 'execution.completed'], (event) => {
  console.log('Execution event:', event)
})

// Subscribe to events from specific sources
subscription.onEventSource('crdt', (event) => {
  console.log('CRDT event:', event)
})

API Documentation

Templates API

Register and manage node templates:

// Register templates
await client.templates.register({
  namespace: 'my-integration',
  category: 'Custom',
  templates: [...],
})

// List templates
const templates = await client.templates.list('my-integration')

// Get template by ID
const template = await client.templates.get('template-id')

Orchestrator API

Programmatically create and modify workflows:

// Create workflow
const workflow = await client.orchestrator.createWorkflow({
  name: 'My Workflow',
  description: 'Created via SDK',
})

// Add node
const node = await client.orchestrator.addNode({
  workflowId: workflow.workflowId,
  templateId: 'template-id',
  position: { x: 100, y: 100 },
  properties: {...},
})

// Connect nodes
await client.orchestrator.addConnection({
  workflowId: workflow.workflowId,
  source: { nodeId: 'node1', portId: 'output' },
  target: { nodeId: 'node2', portId: 'input' },
})

Traces API

Submit execution trace data:

// Create session
const session = await client.traces.createSession({
  workflowId: 'workflow-id',
  workflowName: 'My Workflow',
})

// Submit events
await client.traces.submitEvents(session.sessionId, {
  events: [
    {
      timestamp: Date.now(),
      nodeId: 'node-id',
      eventType: 'output',
      data: {...},
    },
  ],
})

// Complete session
await client.traces.completeSession(session.sessionId, 'completed')

Events API

Real-time bidirectional communication:

// Connect to WebSocket
await client.events.connect()

// Subscribe to events
client.events.on('runtime:nodeExecuting', (data) => {
  console.log('Node executing:', data.nodeId)
})

// Send events
await client.events.send('runtime:nodeCompleted', {
  nodeId: 'node-id',
  output: {...},
})

Webhooks API

Manage webhook registrations:

// Register webhook
const webhook = await client.webhooks.register({
  namespace: 'my-integration',
  url: 'https://my-service.com/webhook',
  events: ['workflow.*', 'execution.*'],
})

// List webhooks
const webhooks = await client.webhooks.list('my-integration')

// Update webhook
await client.webhooks.update(webhook.webhookId, {
  events: ['node.*'],
  isActive: false,
})

// Delete webhook
await client.webhooks.delete(webhook.webhookId)

Webhook Event Types

Workflow Events

  • workflow.created - New workflow created
  • workflow.updated - Workflow updated
  • workflow.deleted - Workflow deleted
  • workflow.published - Workflow published

Node Events

  • node.added - Node added to workflow
  • node.updated - Node properties updated
  • node.deleted - Node removed
  • node.executed - Node executed in runtime

Connection Events

  • connection.added - Connection created
  • connection.deleted - Connection removed

Execution Events

  • execution.started - Workflow execution started
  • execution.completed - Workflow execution completed
  • execution.failed - Workflow execution failed

Trace Events

  • trace.event - Trace event recorded

Examples

See the examples directory for complete working examples.

License

Apache-2.0