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

@lastshotlabs/slingshot-webhooks

v0.0.3

Published

Inbound and outbound webhook plugin with entity-backed endpoints for Slingshot

Readme


title: Human Guide description: Human-maintained guidance for @lastshotlabs/slingshot-webhooks

Human-owned documentation. This is the authoritative lane for package boundaries, constraints, and operational guidance.

Purpose

@lastshotlabs/slingshot-webhooks owns outbound webhook endpoint management, scoped delivery, and inbound provider intake. It does not own the event universe. Event owners define what is externally deliverable through the registry, and this package projects those definitions onto subscribers. The webhook entities themselves follow the shared package-first/entity authoring model; createWebhookPlugin() is the runtime shell that composes delivery and intake wiring.

Package Boundaries

  • Own endpoint persistence, delivery orchestration, retry state, and inbound provider hooks.
  • Consume slingshot-core event definitions, event envelopes, and subscriber authorization rules.
  • Stay policy-aware at the boundary but transport-light underneath. Queue implementations should carry projected payloads and subscriber metadata, not rebuild authorization later.
  • Do not reintroduce a webhook-owned default event universe, string allowlist API, or cross-tenant widening path.

Operational Notes

  • Webhook management routes now fail closed. Configure adminGuard unless you explicitly disable the endpoints route group.
  • Manifest mode can resolve the webhook adapter from store when you cannot pass a live adapter instance. Use handler refs for adminGuard, custom queues, and inbound providers.
  • Webhook endpoint URLs must use http: or https:. Non-HTTP schemes are rejected at validation time.
  • HTTP responses fully redact stored webhook secrets. The runtime adapter still holds the raw secret internally for signing deliveries.
  • Management writes use subscriptions, not legacy events. Each entry is either { event } or { pattern }, and patterns are normalized up front into concrete approved event keys.
  • Endpoint records now carry ownerType, ownerId, optional tenantId, and normalized subscriptions. Delivery records preserve eventId, occurredAt, subscriber identity, and source scope.
  • Existing legacy rows are normalized at startup. If stored subscriptions cannot be resolved safely, the endpoint is disabled rather than widened.
  • HTTP delivery timeout is configurable via the plugin-wide deliveryTimeoutMs (default 30000) and the per-endpoint deliveryTimeoutMs override. Both are bounded to a hard 120000 ms ceiling to keep stuck deliveries from monopolising queue workers.
  • Inbound webhook routes enforce a maximum request body size via inboundMaxBodyBytes (default 1 MiB). Oversized requests are rejected with 413 Payload Too Large before any provider parsing runs. Raise this only when a known provider posts larger payloads.

Gotchas

  • Plugin config still has an events field, but that is only the webhook plugin's own intake filter on the app bus. It is not the endpoint-management payload shape.
  • Future plugin event registrations do not silently expand existing endpoint subscriptions. Concrete event subscriptions stay frozen until an endpoint is updated explicitly.
  • Delivery attempts time out after endpoint.deliveryTimeoutMs (when set), otherwise config.deliveryTimeoutMs, otherwise 30 s. Both knobs accept a positive integer up to 120000 ms (2 min); larger values are rejected at validation time. Timeouts surface as retryable delivery failures.
  • If enqueueing a delivery fails, the delivery record is immediately marked dead. If that status update itself fails, the error is logged but does not propagate — the event handler always returns cleanly.

Key Files

  • packages/slingshot-webhooks/src/index.ts
  • packages/slingshot-webhooks/src/manifest/runtime.ts
  • packages/slingshot-webhooks/src/lib/eventWiring.ts