/**
 * pipeline/callback-delivery.ts
 *
 * Delivers evaluation results to a callback URL with HMAC signature.
 * Used by the API-triggered pipeline flow: after the report is published
 * to the Content Lake (system of record), the result is also POSTed
 * to the caller's callback URL.
 *
 * Fire-and-forget with 3 retries and exponential backoff. If callback
 * fails, log a warning — the result is still in the Content Lake.
 *
 * @see docs/design-docs/api-service-gateway.md
 */
import type { CallbackPayload } from "../_vendor/ailf-core/index.d.ts";
export type { CallbackPayload } from "../_vendor/ailf-core/index.d.ts";
export interface CallbackConfig {
    /** Optional custom headers to include in the callback request */
    headers?: Record<string, string>;
    /** The callback URL to POST results to */
    url: string;
}
/**
 * Generate an HMAC-SHA256 signature for the callback payload.
 *
 * The signature is computed over the raw JSON body using the callback URL
 * as the signing key. This allows the receiver to verify the request
 * originated from AILF without requiring a pre-shared secret.
 *
 * The receiver should:
 * 1. Read the raw request body
 * 2. Compute HMAC-SHA256(body, callbackUrl)
 * 3. Compare with the X-AILF-Signature header
 */
export declare function computeSignature(body: string, signingKey: string): string;
/**
 * Deliver evaluation results to a callback URL.
 *
 * POSTs the payload as JSON with:
 * - Content-Type: application/json
 * - X-AILF-Signature: HMAC-SHA256 signature
 * - Any custom headers from the callback config
 *
 * Retries up to 3 times with exponential backoff (1s → 2s → 4s).
 * Returns success/failure status — never throws.
 */
export declare function deliverCallback(callback: CallbackConfig, payload: CallbackPayload): Promise<{
    ok: boolean;
    error?: string;
    attempts: number;
}>;
