import type { DeployCallbacks } from "../types/callbacks.js"; /** * Metadata attached to each sequenced callback invocation. */ export interface CallbackMetadata { /** Monotonically increasing sequence number, starting at 1. */ sequence: number; /** ISO 8601 timestamp of when the callback was invoked. */ timestamp: string; } /** * A recorded callback event for replay or ordering analysis. */ export interface SequencedCallbackEvent { /** Name of the callback that was invoked (e.g. "onLog", "onProgress"). */ callbackName: string; /** Arguments passed to the callback. */ args: unknown[]; /** Sequence and timing metadata. */ metadata: CallbackMetadata; } /** * Result of createSequencedCallbacks — the wrapped callbacks plus * accessors for the recorded event log. */ export interface SequencedCallbacksResult { /** DeployCallbacks-conforming wrapper that records invocations. */ callbacks: DeployCallbacks; /** Returns a copy of all recorded events in invocation order. */ getEvents: () => SequencedCallbackEvent[]; /** Clears the event log without resetting the sequence counter. */ clearEvents: () => void; } /** * Wraps a DeployCallbacks object so that every callback invocation is * recorded with a monotonically increasing sequence number and an ISO * timestamp. The original callback is called through with its original * arguments, and return values (including Promises) are preserved. * * Only callbacks that exist on the inner object are wrapped — missing * callbacks remain undefined on the wrapper so that optional-chaining * call sites behave identically. */ export declare function createSequencedCallbacks(inner: DeployCallbacks): SequencedCallbacksResult;