/**
 * webhook:// adapter — generic outbound HTTPS POST with optional HMAC
 * signing and jittered exponential backoff on 5xx.
 *
 * URI scheme: `webhook://<name>` where `<name>` is an exact string
 * match against `opts.name`. Each webhookAdapter instance handles
 * exactly one URI — the runtime registers one adapter per configured
 * webhook endpoint.
 *
 * Body: JSON `{ text, severity }`. We keep the surface minimal so the
 * receiver doesn't need to parse opensquid-internal types.
 *
 * Signature header (optional): `x-opensquid-signature: sha256=<hex>`
 * where `<hex>` is the lowercase HMAC-SHA256 of the raw response body
 * keyed by `signingSecret`. Receivers should compute the same HMAC and
 * timing-safe compare. The convention mirrors GitHub's webhook spec.
 *
 * Retry policy: 3 total attempts. On 5xx, wait `100ms × 2^attempt + jitter`
 * (jitter ≤ half the base delay) then retry. 4xx and network errors on
 * the final attempt are not retried. The exit shape is always a
 * SendResult — the adapter never throws.
 *
 * Security: `signingSecret` is closed over by this function and never
 * appears in any log line, error string, or returned SendResult. Same
 * discipline as the Telegram/Discord/Slack adapters.
 */
import type { ChannelAdapter } from '../types.js';
export interface WebhookAdapterOpts {
    /** Name segment in the URI: `webhook://<name>`. Must be non-empty. */
    name: string;
    /** Destination URL (https:// recommended). */
    url: string;
    /** Optional HMAC-SHA256 signing key. When set, every POST carries
     * `x-opensquid-signature: sha256=<hex>`. */
    signingSecret?: string;
    /**
     * Injection seam for tests — defaults to the global `fetch`. Production
     * callers should leave this unset.
     */
    fetch?: typeof fetch;
    /**
     * Injection seam for tests — defaults to `Math.random()`. Production
     * callers should leave this unset.
     */
    random?: () => number;
    /**
     * Injection seam for the backoff sleep — defaults to `setTimeout`-
     * based promise. Tests pass a synchronous stub.
     */
    sleep?: (ms: number) => Promise<void>;
}
export declare function webhookAdapter(opts: WebhookAdapterOpts): ChannelAdapter;
//# sourceMappingURL=webhook.d.ts.map