/** * Content-addressed idempotency — hash command + inputs + environment * fingerprint, look up `.czap/cache/.json`, return cached receipt * if present unless `force` is true. * * @module */ /** Context supplied to the idempotency helpers. */ export interface IdempotencyCtx { readonly command: string; readonly inputs: Record; readonly force: boolean; /** Cache root. Defaults to `process.cwd()` when omitted. */ readonly cwd?: string; /** * Environment fingerprint folded into the cache identity so a receipt * cached under one toolchain (node / platform / arch / package-manager) is * never served to another. Defaults to {@link currentEnvFingerprint} when * omitted — pass an explicit one only to pin it in a test. */ readonly env?: Readonly>; } /** * The current process's environment fingerprint — node version, platform, * arch, and (when invoked through a package manager) its user-agent. This is a * genuine input to a cached command's result, so it belongs IN the cache * identity rather than standing beside it. */ export declare function currentEnvFingerprint(): Record; /** Hash the command + inputs + environment fingerprint into a short hex slug. */ export declare function hashInputs(ctx: IdempotencyCtx): string; /** Path where the cached receipt lives (relative to `cwd`, or process cwd). */ export declare function cachePath(hash: string, cwd?: string): string; /** Return a cached receipt for this invocation, or null if absent / forced. */ export declare function tryReadCache(ctx: IdempotencyCtx): unknown | null; /** Write the fresh receipt to the cache for future identical invocations. */ export declare function writeCache(ctx: IdempotencyCtx, receipt: unknown): void; //# sourceMappingURL=idempotency.d.ts.map