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

@bpmnkit/worker-client

v0.0.3

Published

Thin Zeebe REST client for standalone workers — no BPMNKit SDK required at runtime

Readme

npm license typescript ai-assisted experimental

Website · Documentation · GitHub · Changelog


Overview

@bpmnkit/worker-client is a minimal TypeScript wrapper around the Zeebe REST API. It is the only runtime dependency for workers scaffolded by the BPMNKit AIKit /implement skill. It works with both local reebe and Camunda 8 cloud.

The key principle: workers built with this package have zero BPMNKit runtime dependency. They are standalone Node.js programs that can run anywhere.

Features

  • Async generator pollingclient.poll(jobType) yields one ActivatedJob at a time; idles cleanly between polls
  • Job lifecyclecomplete(variables), fail(message, retries), throwError(code, message, variables)
  • OAuth2 for Camunda SaaS — token fetching and caching built in; no manual auth management
  • Env-var driven — reads ZEEBE_ADDRESS, ZEEBE_CLIENT_ID, ZEEBE_CLIENT_SECRET automatically
  • Zero dependencies — pure Node.js fetch, no external packages

Installation

npm install @bpmnkit/worker-client

Quick Start

import { createWorkerClient } from "@bpmnkit/worker-client"

const client = createWorkerClient()  // reads ZEEBE_ADDRESS from env

for await (const job of client.poll("com.example:send-email:1")) {
  try {
    await sendEmail(job.variables)
    await job.complete({ sent: true })
    console.log("completed", job.key)
  } catch (err) {
    await job.fail(err instanceof Error ? err.message : String(err), job.retries - 1)
  }
}

API Reference

createWorkerClient(options?)

const client = createWorkerClient({
  address:      "http://localhost:26500",  // or ZEEBE_ADDRESS
  clientId:     "...",                     // or ZEEBE_CLIENT_ID  (Camunda SaaS)
  clientSecret: "...",                     // or ZEEBE_CLIENT_SECRET
  tokenUrl:     "...",                     // or ZEEBE_TOKEN_URL
  audience:     "zeebe.camunda.io",        // or ZEEBE_TOKEN_AUDIENCE
  workerName:   "my-worker",
})

client.poll(jobType, options?)

Async generator. Continuously polls Zeebe. Pauses 5 seconds between polls when idle.

for await (const job of client.poll("my-job-type", { maxJobs: 10, timeout: 60_000 })) {
  // job.key, job.variables, job.retries, job.bpmnProcessId, ...
  await job.complete({ result: "ok" })
}

Job methods

// Return output variables to the process
await job.complete({ approved: true })

// Fail the job (Zeebe retries or raises incident at retries=0)
await job.fail("upstream timeout", job.retries - 1)

// Throw a BPMN error (caught by an error boundary event in the diagram)
await job.throwError("PAYMENT_DECLINED", "Card issuer declined", { code: "05" })

Environment Variables

| Variable | Description | |----------|-------------| | ZEEBE_ADDRESS | Zeebe REST base URL (default: http://localhost:26500) | | ZEEBE_CLIENT_ID | OAuth2 client ID (Camunda SaaS) | | ZEEBE_CLIENT_SECRET | OAuth2 client secret (Camunda SaaS) | | ZEEBE_TOKEN_URL | OAuth2 token URL | | ZEEBE_TOKEN_AUDIENCE | OAuth2 audience |

Used by AIKit

Workers generated by /implement (via the worker_scaffold MCP tool) depend only on this package. They are TypeScript programs with their own package.json — fully standalone, no other BPMNKit packages needed.

See the Standalone Workers guide for deployment options (local dev, Docker, Camunda SaaS).


Related Packages

| Package | Description | |---------|-------------| | @bpmnkit/core | BPMN/DMN/Form parser, builder, layout engine | | @bpmnkit/canvas | Zero-dependency SVG BPMN viewer | | @bpmnkit/editor | Full-featured interactive BPMN editor | | @bpmnkit/engine | Lightweight BPMN process execution engine | | @bpmnkit/feel | FEEL expression language parser & evaluator | | @bpmnkit/plugins | 22 composable canvas plugins | | @bpmnkit/api | Camunda 8 REST API TypeScript client | | @bpmnkit/ascii | Render BPMN diagrams as Unicode ASCII art | | @bpmnkit/ui | Shared design tokens and UI components | | @bpmnkit/profiles | Shared auth, profile storage, and client factories for CLI & proxy | | @bpmnkit/operate | Monitoring & operations frontend for Camunda clusters | | @bpmnkit/connector-gen | Generate connector templates from OpenAPI specs | | @bpmnkit/cli | Camunda 8 command-line interface (casen) | | @bpmnkit/proxy | Local AI bridge and Camunda API proxy server | | @bpmnkit/patterns | Domain process patterns for BPMNKit AIKit | | @bpmnkit/reebe-wasm | WebAssembly BPMN engine for browser simulation | | @bpmnkit/cli-sdk | Plugin authoring SDK for the casen CLI | | @bpmnkit/create-casen-plugin | Scaffold a new casen CLI plugin in seconds | | @bpmnkit/casen-report | HTML reports from Camunda 8 incident and SLA data | | @bpmnkit/casen-worker-http | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data | | @bpmnkit/casen-worker-ai | AI task worker — classify, summarize, extract, and decide using Claude |

License

MIT © BPMN Kit — made by u11g