| | | 1 | | using NexusLabs.Needlr.AgentFramework.Diagnostics; |
| | | 2 | | |
| | | 3 | | namespace NexusLabs.Needlr.AgentFramework.Workflows.Sequential; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Configuration options for a <see cref="SequentialPipelineRunner"/> execution, |
| | | 7 | | /// including an optional completion gate and overall token budget. |
| | | 8 | | /// </summary> |
| | | 9 | | /// <example> |
| | | 10 | | /// <code> |
| | | 11 | | /// var options = new SequentialPipelineOptions |
| | | 12 | | /// { |
| | | 13 | | /// CompletionGate = result => result.Succeeded ? null : "Pipeline did not succeed", |
| | | 14 | | /// TotalTokenBudget = 50_000, |
| | | 15 | | /// }; |
| | | 16 | | /// </code> |
| | | 17 | | /// </example> |
| | | 18 | | public sealed record SequentialPipelineOptions |
| | | 19 | | { |
| | | 20 | | /// <summary> |
| | | 21 | | /// Optional completion gate evaluated after all stages succeed. |
| | | 22 | | /// Returns <see langword="null"/> on success, or an error message |
| | | 23 | | /// if the pipeline output is unacceptable. |
| | | 24 | | /// </summary> |
| | 5 | 25 | | public Func<IPipelineRunResult, string?>? CompletionGate { get; init; } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// Optional overall pipeline token budget. |
| | | 29 | | /// </summary> |
| | 4 | 30 | | public long? TotalTokenBudget { get; init; } |
| | | 31 | | } |