/** * Deep-clone helpers for continuity records. * * Extracted from `continuity/index.ts` to satisfy the ≤500 LOC gate (GA-4). * The clone functions preserve defensive-copy semantics for the * session continuity store (Q6: deep-clone-on-read, deep-clone-on-write). * * @module task-management/continuity/continuity-clone */ import type { CapturedResult, CompactionCheckpointData, DelegationMeta, DelegationPacket, PendingNotification, SessionContinuityRecord, SessionLifecycleState } from "../../shared/types.js"; /** * Clone a DelegationMeta envelope (or null). * * @param meta - Source meta or null. * @returns Deep-cloned copy or null. */ export declare function cloneDelegationMeta(meta: DelegationMeta | null): DelegationMeta | null; /** * Clone a CompactionCheckpointData value, deep-copying nested tools/warnings. * * @param cp - Source checkpoint or undefined. * @returns Deep-cloned copy or undefined. */ export declare function cloneCompactionCheckpoint(cp: CompactionCheckpointData | undefined): CompactionCheckpointData | undefined; /** * Clone a DelegationPacket envelope with deep-copied arrays. * * @param packet - Source packet or undefined. * @returns Deep-cloned copy or undefined. */ export declare function cloneDelegationPacket(packet: DelegationPacket | undefined): DelegationPacket | undefined; /** * Clone a SessionLifecycleState envelope. * * @param state - Source lifecycle state or undefined. * @returns Deep-cloned copy or undefined. */ export declare function cloneLifecycleState(state: SessionLifecycleState | undefined): SessionLifecycleState | undefined; /** * Clone the pendingNotifications array, deep-copying nested metadata/artifacts/commits. * * @param notifications - Source array or undefined. * @returns Deep-cloned array (empty if input is not an array). */ export declare function clonePendingNotifications(notifications: PendingNotification[] | undefined): PendingNotification[]; /** * Clone a CapturedResult envelope with deep-copied arrays. * * @param result - Source result or undefined. * @returns Deep-cloned copy or undefined. */ export declare function cloneCapturedResult(result: CapturedResult | undefined): CapturedResult | undefined; /** * Clone a SessionContinuityRecord, deep-copying every nested metadata field. * * This is the canonical defensive-copy entry point used by the public API * surface in `continuity/index.ts` for all reads and writes. * * @param record - Source record. * @returns Deep-cloned copy. */ export declare function cloneContinuityRecord(record: SessionContinuityRecord): SessionContinuityRecord; //# sourceMappingURL=continuity-clone.d.ts.map