@jem-open/mbali-ingress-webhook
v0.6.0
Published
Generic JSON webhook ingress for mbali with pluggable signature verifiers (HMAC, Upstash JWT, none).
Readme
@jem-open/mbali-ingress-webhook
A generic JSON webhook Ingress for mbali with pluggable signature verifiers — HMAC-SHA256,
Upstash/QStash JWT, or none.
This is a port adapter for mbali, not a standalone webhook server. WebhookIngress implements
the Ingress port from @jem-open/mbali-core: it verifies the request, parses the JSON body into a
normalized InboundEvent (pulling id/kind/text/channel/actor and a delivery id for
dedup), and hands it to the engine. It only does anything wired into an mbali host/engine.
Install
pnpm add @jem-open/mbali-ingress-webhook
pnpm add @jem-open/mbali-core # peer dependencyUsage
import { WebhookIngress, hmacSha256, upstashJwt, noVerification } from "@jem-open/mbali-ingress-webhook";
// HMAC-signed provider webhook (secret from app.settings.secret):
const ingress = new WebhookIngress({ verifier: hmacSha256({ header: "x-signature", prefix: "sha256=" }) });
// QStash schedule fires (currentSigningKey / nextSigningKey in app.settings):
const qstash = new WebhookIngress({ verifier: upstashJwt(), pathTemplate: "/qstash/{app}" });upstashJwt reads two signing keys for zero-downtime rotation. noVerification is for trusted
internal paths only — mbali doctor warns when it's in use. A matching EventSimulator powers
mbali simulate.
Part of mbali — the control plane for fleets of remote AI agent sessions.
