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

@bondi-labs/integration-sdk

v0.0.3

Published

Bondi integration SDK — define triggers and actions for the Bondi automation engine.

Readme

@bondi-labs/integration-sdk

npm version License: MIT Types Bundle size

Define triggers and actions for the Bondi automation engine — bring your own API into Bondi workflows.

| Resource | Link | |---|---| | 📚 API Reference | integration-sdk.heybondi.com | | 🚀 Examples | github.com/bondi-labs-inc/integration-sdk-examples | | 📝 Changelog | CHANGELOG.md | | 🐛 Issues | github.com/bondi-labs-inc/integration-sdk/issues |

Install

npm install @bondi-labs/integration-sdk

Quickstart

# 1. Authenticate and create an integration in your workspace.
npx bondi init

# 2. Define your integration in code.
# 3. Sync the definition to Bondi.
npx bondi sync

npx bondi init opens your browser for authentication, then writes:

BONDI_WORKSPACE_ID=ws-...
BONDI_INTEGRATION_TOKEN=bnd_tok_...

(BONDI_API_URL defaults to https://automation.heybondi.com and only needs to be set when targeting a non-prod Bondi deployment.)

Core API

import {
  defineIntegration,
  defineAction,
  defineTrigger,
  createBondiClient,
} from "@bondi-labs/integration-sdk/core";
import { z } from "zod";

const contactCreated = defineTrigger({
  name: "contact.created",
  label: "Contact Created",
  payload: z.object({ id: z.string(), email: z.string().email() }),
});

const myCRM = defineIntegration({
  name: "My CRM",
  slug: "my-crm",
  baseUrl: "https://api.mycrm.com/v1",
  services: [
    {
      name: "contacts",
      label: "Contacts",
      actions: [
        defineAction({
          name: "createContact",
          label: "Create Contact",
          method: "POST",
          endpoint: "/contacts",
          body: z.object({ name: z.string(), email: z.string() }),
          response: z.object({ id: z.string() }),
        }),
      ],
      triggers: [contactCreated],
    },
  ],
});

export default myCRM; // CLI sync reads `default` export

// Runtime — emit events from your app
const client = createBondiClient({
  workspaceId: process.env.BONDI_WORKSPACE_ID,
  token: process.env.BONDI_INTEGRATION_TOKEN,
});
const bondi = client.bind(myCRM);

bondi.triggers["contact.created"].emit({ id: "123", email: "[email protected]" });

emit() is fire-and-forget. Use emitAndWait() to await acknowledgement, or pass onEmitError to the client config to capture failures.

NestJS adapter

import {
  BondiModule,
  BondiTrigger,
  BondiTriggerBase,
  BondiService,
  BondiAction,
  BondiGuard,
} from "@bondi-labs/integration-sdk/nestjs";
import { Module, Controller, Injectable, Post, Body, UseGuards } from "@nestjs/common";
import { z } from "zod";

const contactPayload = z.object({ id: z.string(), email: z.string() });

@BondiTrigger({ name: "contact.created", label: "Contact Created", payload: contactPayload })
export class ContactCreatedTrigger extends BondiTriggerBase<typeof contactPayload> {}

@Injectable()
export class ContactsService {
  constructor(private contactCreated: ContactCreatedTrigger) {}
  create(dto: { id: string; email: string }) {
    this.contactCreated.emit(dto); // type-safe via Zod
  }
}

@BondiService({ name: "contacts", label: "Contacts" })
@Controller("contacts")
export class ContactsController {
  @UseGuards(BondiGuard)
  @BondiAction({ name: "createContact", label: "Create Contact" })
  @Post()
  async create(@Body() dto: unknown) {
    /* ... */
  }
}

@Module({
  imports: [
    BondiModule.forRoot({
      integration: { name: "My CRM", slug: "my-crm", category: "crm" },
      triggers: [ContactCreatedTrigger],
    }),
  ],
})
export class AppModule {}

BondiModule.forRoot reads BONDI_* env vars by default. To override, pass values directly:

BondiModule.forRoot({
  integration: { /* ... */ },
  workspaceId: "ws-abc-123",                            // hard-coded
  token: { envKey: "MY_BONDI_TOKEN" },                  // custom env var
  apiUrl: () => configService.get("BONDI_API_URL"),     // factory
})

Verifying webhook signatures

When Bondi calls your BondiAction endpoints, requests are signed with HMAC-SHA256 over {timestamp}.{action}.{rawBody}. Use the framework adapter that fits your stack — they handle raw-body capture, signature verification, body parsing, and end-to-end Zod typing in one call:

| Framework | Import | Helper | |---|---|---| | NestJS | @bondi-labs/integration-sdk/nestjs | BondiGuard | | Express | @bondi-labs/integration-sdk/express | actionHandler, bondiExpressMiddleware | | Fastify | @bondi-labs/integration-sdk/fastify | actionHandler, bondiFastifyVerifier | | Cloudflare Workers / Next.js / Hono / Bun / Deno | @bondi-labs/integration-sdk/web | withAction, withBondiVerification |

For non-Node stacks the algorithm is short — here's the Python equivalent:

import hmac, hashlib, time

def verify_bondi(headers, raw_body, token):
    ts     = headers["x-bondi-timestamp"]
    action = headers["x-bondi-action"]
    sig    = headers["x-bondi-signature"]
    if abs(time.time() - int(ts)) > 300:
        return False
    expected = hmac.new(token.encode(), f"{ts}.{action}.{raw_body}".encode(), hashlib.sha256).hexdigest()
    return hmac.compare_digest(sig.removeprefix("sha256="), expected)

Environment variables

| Var | Description | |---|---| | BONDI_WORKSPACE_ID | Your workspace ID | | BONDI_INTEGRATION_TOKEN | HMAC signing key — never sent over the wire | | BONDI_API_URL | Optional override — defaults to https://automation.heybondi.com. Set when targeting a non-prod Bondi deployment. |

Guides

| Topic | Link | |---|---| | Getting started — NestJS | docs/getting-started/nestjs.md | | Getting started — plain Node / Express | docs/getting-started/plain-node.md | | Verifying webhooks (Python, Go, Ruby) | docs/guides/webhook-verification.md | | Error handling, retries, dry-run | docs/guides/error-handling.md | | Token rotation | docs/guides/token-rotation.md | | internalMode (Bondi-only) | docs/guides/internal-mode.md | | HTTP header reference | docs/reference/headers.md |

Support

License

MIT — see LICENSE.