/**
 * HITL HTTP API helpers — framework-agnostic request body reader and
 * shared types used by both Slack and Telegram callback handlers.
 *
 * Plan v6 §1.7: state lives in HITLPort; this module is pure transport plumbing.
 *
 * @public
 */
import type { IncomingMessage } from "node:http";
/** Framework-agnostic result returned by all HITL callback handlers. */
export interface HITLHandlerResult {
    status: number;
    body: unknown;
}
/**
 * Read the full body from a Node.js `IncomingMessage` stream.
 * Returns the raw UTF-8 string (required for HMAC verification).
 */
export declare function collectBody(req: IncomingMessage): Promise<string>;
/**
 * Extract all headers from a Node `IncomingMessage` as a flat string map.
 * Multi-value headers are joined with `, `.
 */
export declare function extractHeaders(req: IncomingMessage): Record<string, string>;
/** Compact callback_data format used by both Slack (button value) and Telegram. */
export interface HITLCallbackData {
    approvalId: string;
    action: "approve" | "reject";
}
/**
 * Parse a HITL button value that may use either:
 * - compact format: `{ a: "<id>", v: "approve"|"reject" }`
 * - legacy format:  `{ approval_id: "<id>", action: "approve"|"reject" }`
 *
 * Returns null on any parsing failure.
 */
export declare function parseCallbackData(raw: string): HITLCallbackData | null;
//# sourceMappingURL=api.d.ts.map