Creates a new StepBuilder.
Step name (e.g., 'apply_filters', 'keyword_generation')
Step type for categorization (default: 'custom')
OptionalonComplete: (step: XRayStep) => voidCallback invoked when step is completed
Adds a filter definition to this step.
Filter identifier (e.g., 'price_range', 'min_rating')
Human-readable rule description (e.g., '0.5x-2x of reference')
Filter configuration parameters
this for method chaining
Evaluates a candidate against criteria and records the result.
Unique identifier for the candidate
The candidate data being evaluated
Array of criterion results with pass/fail details
Optionalsummary: stringOptional summary override (auto-generated if not provided)
this for method chaining
Sets multiple evaluations at once, replacing any existing evaluations.
Array of evaluation results
this for method chaining
Marks the step as failed with an error message.
Error message describing what went wrong
The final step data
Sets multiple filters at once, replacing any existing filters.
Array of filter definitions
this for method chaining
Sets the input data for this step.
Input data object (e.g., candidates, parameters)
this for method chaining
Sets the output data for this step.
Output data object (e.g., results, selected items)
this for method chaining
Sets the reasoning/explanation for this step's decision.
Human-readable explanation of why this decision was made
this for method chaining
Marks the step as skipped.
Optionalreason: stringOptional reason for skipping
The final step data
Builder class for creating X-Ray steps with a fluent API.
Example