/** * Web-specific hydration for o11y display. * * Browser-safe revivers that use `atob()` for base64 decoding (no Node.js * `Buffer` dependency). Produces `ClassInstanceRef` objects and `StreamRef` * objects for UI rendering. */ import { type Revivers } from '@workflow/core/serialization-format'; export { CLASS_INSTANCE_REF_TYPE, ClassInstanceRef, ENCRYPTED_PLACEHOLDER, extractStreamIds, isClassInstanceRef, isEncryptedData, isStreamId, isStreamRef, type Revivers, STREAM_REF_TYPE, type StreamRef, truncateId, } from '@workflow/core/serialization-format'; /** * Get the web-specific revivers for hydrating serialized data. * * Uses `atob()` for base64 decoding (no Node.js Buffer dependency). * All types are revived as real instances (Date, Map, Set, URL, * URLSearchParams, Headers, Error, etc.). */ export declare function getWebRevivers(): Revivers; /** * Hydrate the serialized data fields of a resource for web display. * * Uses browser-safe revivers (atob for base64, ClassInstanceRef for * custom classes, StreamRef for streams). Call this on data received * from the server before passing it to UI components. */ export declare function hydrateResourceIO(resource: T): T; export declare const ENCRYPTED_DISPLAY_NAME = "Encrypted"; /** Check if a value is an encrypted display marker */ export declare function isEncryptedMarker(value: unknown): boolean; export declare const EXPIRED_DISPLAY_NAME = "Expired Data"; /** Check if a value is an expired data display marker */ export declare function isExpiredMarker(value: unknown): boolean; /** * Hydrate resource data with decryption support. * * When a key is provided, encrypted fields are decrypted before hydration. * This is the async version used when the user clicks "Decrypt" in the web UI. * * Handles both top-level fields (input, output, metadata) and nested * eventData subfields per `EVENT_DATA_REF_FIELDS` from `@workflow/world` for that event type. */ export declare function hydrateResourceIOWithKey(resource: T, key: Uint8Array): Promise; /** * Check whether a hydrated resource (event, step, run, etc.) contains any * encrypted display markers. Inspects the standard top-level fields * (`input`, `output`, `error`, `metadata`) as well as the event-type-specific * `eventData` ref fields. */ export declare function hasEncryptedFields(resource: unknown): boolean; //# sourceMappingURL=hydration.d.ts.map