import type { ChannelAdapter, IncomingMessage, OutgoingMessage } from "./types.js";
interface WebhookOptions {
    port: number;
    /** Bearer token expected in `Authorization: Bearer <token>` header. */
    token: string;
    /** Optional outbound webhook URL to POST replies to. */
    replyUrl?: string;
}
/**
 * Generic webhook channel for any sender that can POST JSON.
 *
 * Inbound:  POST /  with Authorization: Bearer <token>
 *           body: {"from": "<sender id>", "text": "...", "threadId"?: "..."}
 *           Lisa replies inline (long-running response) — the HTTP request stays
 *           open until she's done answering, then her reply is the response body.
 *
 * Outbound: if `replyUrl` is configured, replies are also POSTed there as
 *           {"to": "<sender>", "text": "...", "threadId"?: "...", "channel": "webhook"}.
 */
export declare class WebhookChannel implements ChannelAdapter {
    readonly name = "webhook";
    private server?;
    private opts;
    private handler?;
    private pending;
    constructor(opts: WebhookOptions);
    start(handler: (msg: IncomingMessage) => Promise<void>): Promise<void>;
    stop(): Promise<void>;
    send(msg: OutgoingMessage): Promise<void>;
    private onRequest;
    private checkAuth;
}
export {};
//# sourceMappingURL=webhook.d.ts.map