Hydrate the serialized data fields of a run, step, hook, or event for display.
Hydrates (deserializes) the data fields of a resource returned by the World SDK — a workflow run, step, hook, or event. Workflow data is serialized using the devalue format, so this is required before displaying step input/output in a UI.
The function dispatches on the resource shape: steps get input/output hydrated, hooks get metadata, events get eventData, and runs get input/output.
import { getWorld } from "workflow/runtime";
import { hydrateResourceIO, observabilityRevivers } from "workflow/observability";
declare const runId: string; // @setup
declare const stepId: string; // @setup
const world = await getWorld();
const step = await world.steps.get(runId, stepId);
const hydrated = hydrateResourceIO(step, observabilityRevivers);
console.log(hydrated.input, hydrated.output);Parameters
| Parameter | Type | Description |
|---|---|---|
resource | WorkflowRun | Step | Hook | Event | The resource with serialized data fields |
revivers | Revivers | Reviver functions for deserialization. Use observabilityRevivers for standard use. |
Returns
The same resource with its data fields hydrated into plain JavaScript values.
Encrypted data fields pass through as raw Uint8Array values rather than being decrypted — see Encrypted Data.
Display a Run's Steps with Hydrated I/O
import { getWorld } from "workflow/runtime";
import { hydrateResourceIO, observabilityRevivers } from "workflow/observability";
declare const runId: string; // @setup
const world = await getWorld();
const steps = await world.steps.list({ runId, resolveData: "all" });
for (const step of steps.data) {
const hydrated = hydrateResourceIO(step, observabilityRevivers);
console.log(step.stepName, hydrated.input, hydrated.output);
}









