import type { GovernanceServiceCredential } from './capability-grant.js'; import type { GovernanceServiceResponse } from './project-service.js'; export declare const GOVERNANCE_MANAGEMENT_RECEIPT_TTL_MS = 30000; interface GovernanceManagementReceiptCacheOptions { readonly now?: (() => number) | undefined; readonly ttlMs?: number | undefined; readonly maxEntries?: number | undefined; } type GovernanceManagementReceiptLookup = { readonly kind: 'miss'; } | { readonly kind: 'in_progress'; } | { readonly kind: 'conflict'; readonly allowAfterRotation: boolean; } | { readonly kind: 'replay'; readonly response: GovernanceServiceResponse; readonly allowAfterRotation: boolean; }; interface GovernanceManagementReceiptReservation { readonly key: string; readonly fingerprint: string; readonly requestId: string; } export declare class GovernanceManagementReceiptCache { private readonly now; private readonly ttlMs; private readonly maxEntries; private readonly records; private readonly reservations; constructor(options?: GovernanceManagementReceiptCacheOptions); lookup(input: unknown, credential: GovernanceServiceCredential): GovernanceManagementReceiptLookup; reserve(options: { readonly input: unknown; readonly credential: GovernanceServiceCredential; /** * Raw wire payload to fingerprint for replay-conflict detection. Must be * the same form that subsequent `lookup` calls see; defaults to `input` * when the caller has no separate wire form. Passing the raw form (and * not the decoder-normalized form) keeps the contract immune to a future * decoder that adds content-preserving normalization, which would * otherwise turn every legitimate retry into a misleading * "requestId already used" conflict. */ readonly wireInput?: unknown; }): GovernanceManagementReceiptReservation | null; commit(reservation: GovernanceManagementReceiptReservation, response: GovernanceServiceResponse, allowAfterRotation?: boolean): void; release(reservation: GovernanceManagementReceiptReservation): void; clear(): void; private pruneExpired; } export {}; //# sourceMappingURL=management-receipt-cache.d.ts.map