import type { Logger, SourceAdapter } from "@onenomad/przm-cortex-core"; import type { LLMRouter } from "@onenomad/przm-cortex-llm-core"; import type { EngramClient } from "./clients/engram.js"; import type { HeartbeatWriter } from "./heartbeat.js"; export interface WebhookReceiverOptions { adapters: readonly SourceAdapter[]; engram: EngramClient; llmRouter?: LLMRouter; heartbeat?: HeartbeatWriter; logger: Logger; host?: string; port: number; } export interface WebhookReceiver { start(): Promise; stop(): Promise; /** Resolved to the actual bound port (handy when `port: 0` was requested). */ boundPort(): number | undefined; /** Routes registered at boot. Useful for diagnostics. */ routes(): ReadonlyArray<{ adapter: string; path: string; methods: readonly string[]; }>; } /** * Tiny HTTP server that serves as the inbound endpoint for push-based * sources. Built on `node:http` rather than Express/Fastify because: * - The surface is small (a switch statement on `path + method`). * - We need raw request bodies for HMAC verification; most frameworks * make that harder, not easier. * - Adding a dep to the server package is a bigger commitment than a * handful of vanilla http lines. * * The receiver never sends back error details — a failed signature gets * a plain 401 so a probing attacker doesn't learn which header field was * the problem. Successful parses respond 204 regardless of how many items * were produced, so providers stop retrying. */ export declare function createWebhookReceiver(opts: WebhookReceiverOptions): WebhookReceiver; //# sourceMappingURL=webhooks.d.ts.map