Shared context object passed to every hook callback.
Both beforeTransform and onError hooks receive exactly this shape.
The afterTransform hook extends it with inputCount, outputCount, and
durationMs (see AfterTransformHook).
name: string
Name of the transformation (same string as the TransformationType enum value)
Transformation type enum value — use this for type-safe comparisons
ruleCount: number
Number of rules at the time the hook is called.
- In
beforeTransformhooks this equals the input rule count for the current transformation. - In
onErrorhooks this equals the input count at the point of failure. - In
afterTransformhooks this equals the output count; useinputCount/outputCounton the extended context instead for clarity.
timestamp: number
Unix millisecond timestamp captured immediately before hook execution
optional
durationMs: number
Duration in milliseconds — present only on afterTransform extended context
optional
metadata: Record<string, unknown>
Optional free-form metadata that hook producers can attach for consumers