@jem-open/mbali-host
v0.6.0
Published
HTTP host for mbali ingresses: route → verify → parse → engine, with the durable IngressBuffer retry path (ADR-0006).
Readme
@jem-open/mbali-host
The HTTP host for mbali ingresses: it turns inbound webhooks into engine events along the path route → verify → parse → engine, with a durable ingress buffer for at-least-once delivery.
This is an mbali adapter, not a standalone web framework. It only does anything wired to an
Engine and ingress drivers from @jem-open/mbali-core — it routes a request to the matching
plane's Ingress, verifies the signature, parses it to an InboundEvent, and hands it to the
engine. On transient failure the event lands in the IngressBuffer and drain() replays it.
Install
pnpm add @jem-open/mbali-host
pnpm add @jem-open/mbali-core # peer dependencyUsage
import { createHost } from "@jem-open/mbali-host";
const host = createHost({
engine,
buffer, // a durable IngressBuffer (e.g. @jem-open/mbali-firestore)
planes: [{ ingress: slackIngress, app: slackApp, plane }],
});
await host.listen(3000);
setInterval(() => host.drain(), 10_000); // replay due buffered eventsThe host refuses to start with a non-durable buffer — acked events would be lost on restart
(ADR-0006). Pass allowMemoryBuffer: true only for dev and tests.
Part of mbali — the control plane for fleets of remote AI agent sessions.
