Transform an artifact between stations
Dry-run an expression mapping, pin a version to a station and turn a worker's JSON artifact into a typed result.
Open Station settings → Contract → Transforms, then choose Manage transforms. A transform maps fields from one JSON artifact into another. Define the output schema, and add an input schema if you want CodeBook to validate that shape first.
Try a mapping
For example, use the sample input {"name":"demo"}. Set the output field to title and enter the expression upper($.name) + " release". An object output schema that requires a string title accepts {"title":"DEMO release"}.
Dry-run the sample before attaching the transform. If the output fails its schema or the expression cannot run, use the displayed reason to correct the mapping and preview again. Expressions read the supplied artifact. They have execution and size limits and cannot read files, secrets or the network.
Bind a version and read the result
Save the version and bind it to the station with the input and output artifact kinds. Saving a new version leaves existing station bindings pinned to their selected version.
When a worker passes, CodeBook reads the newest input artifact that run produced for the binding. It checks the output and records the resulting typed artifact before evaluating the station contract. A missing input or failed transform blocks the run and records why. Inspect the story's artifact and run evidence to see which version produced the result.