/** * Serialization utilities for workflow inputs/outputs. * Uses JSON encoding with raw Buffer transport (no base64 round-trip). */ export declare function serialize(value: unknown): Buffer; export declare function deserialize(buf: Buffer | Uint8Array | undefined | null): T; /** Decode canonical RFC 4648 base64 without Node's permissive truncation/coercion. */ export declare function deserializeBase64(value: unknown, operation: string, field: string): Buffer; /** * Step-output-aware serialize (P5.2): if a `PayloadCodec` is registered for * `stepName` (see `codecs.register` in `./payload-codec.js`), wraps `value` * in a `{ $mfv: version, value }` envelope before encoding. Steps with no * registered codec serialize exactly as `serialize()` always has — * byte-identical to pre-P5.2 output. * * Used only at step-output write time (activity results, side-effect * results, signal payloads consumed by waitForSignal) — NOT for workflow * input/output or query state, which have no versioning story yet and stay * on the plain `serialize()`/`deserialize()` pair. */ export declare function serializeStepOutput(stepName: string, value: unknown): Buffer; /** * Step-output-aware deserialize (P5.2): decodes `buf`, then runs it through * the registered codec chain for `stepName` (if any) via `codecs.hydrate`. * An un-enveloped legacy checkpoint is implicitly version 0. A stored * version newer than the registered codec throws `PayloadVersionSkewError` * (see `./payload-codec.js`) rather than silently returning mismatched data. */ export declare function deserializeStepOutput(stepName: string, buf: Buffer | Uint8Array | undefined | null): T; export declare function serializeError(error: unknown): { error_type: string; error_message: string; }; export declare function deserializeError(errorType: string, errorMessage: string): Error; export declare function parseDuration(duration: string): number;