import type { WebhookServerState } from '../../types/index.js';
/** Returns the current webhook server state (immutable snapshot). */
export declare function getWebhookState(): WebhookServerState;
/** Replaces the webhook secret used for HMAC-SHA256 validation. */
export declare function setWebhookSecret(secret: string): void;
/**
 * Starts the HTTP webhook server on the given port.
 * Idempotent: if already running on the same port, returns the current state.
 *
 * @throws if the port is in use or an OS-level error occurs
 */
export declare function startWebhookServer(port?: number): Promise<WebhookServerState>;
/**
 * Stops the running webhook server gracefully.
 * Idempotent: if already stopped, returns idle state.
 */
export declare function stopWebhookServer(): Promise<WebhookServerState>;
//# sourceMappingURL=server.d.ts.map