/**
 * Idempotency primitives for orchestration-layer deduplication.
 *
 * Sprint-468 (command-center:sprint-468:idempotency-keys).
 *
 * Three utilities:
 *   - computeIdempotencyKey  — SHA-256 fingerprint of a semantic payload
 *   - withIdempotency        — in-memory call deduplication by key
 *   - addIdempotencyHeader   — HTTP header injection for downstream services
 *
 * These operate at the orchestration layer (agent dispatch, pipeline step)
 * rather than at the port level. Use the resilience/idempotent.ts primitive
 * for direct port-wrapping; use these when you need explicit key management
 * or HTTP propagation.
 */
export interface IdempotencyKeyPayload {
    content: string;
    author: string;
    category: string;
}
/**
 * Derive a stable SHA-256 hex key from a semantic payload.
 *
 * Fields are ordered deterministically (alphabetical) before hashing so
 * that object construction order does not affect the result.
 *
 * @param payload - Semantic payload with content, author, and category.
 * @returns 64-character lowercase hex string.
 */
export declare function computeIdempotencyKey(payload: IdempotencyKeyPayload): string;
export interface WithIdempotencyOptions {
    /** Entry TTL in ms. Default: 5 minutes. */
    ttlMs?: number;
}
interface CacheEntry<T> {
    promise: Promise<T>;
    expiresAt: number;
}
export declare function withIdempotency<T>(call: () => Promise<T>, key: string, opts?: WithIdempotencyOptions, store?: Map<string, CacheEntry<unknown>>): Promise<T>;
/**
 * Inject an `X-Idempotency-Key` header into a plain headers record.
 *
 * Returns a new object — does not mutate the input. Safe to call in a
 * pipeline step that builds the options for a downstream `fetch` call.
 *
 * @param headers - Existing headers object (may be empty).
 * @param key     - Idempotency key (from computeIdempotencyKey or any string).
 * @returns New headers object with X-Idempotency-Key added.
 */
export declare function addIdempotencyHeader(headers: Record<string, string>, key: string): Record<string, string>;
export {};
//# sourceMappingURL=idempotency.d.ts.map