| | | 1 | | namespace NexusLabs.Needlr.AgentFramework.Diagnostics; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// A single entry in an agent run's ordered timeline of chat completions and tool calls. |
| | | 5 | | /// </summary> |
| | | 6 | | /// <remarks> |
| | | 7 | | /// <para> |
| | | 8 | | /// Timeline entries are constructed by |
| | | 9 | | /// <see cref="AgentRunDiagnosticsTimelineExtensions.GetOrderedTimeline(IAgentRunDiagnostics)"/>, |
| | | 10 | | /// which merges and orders the <see cref="IAgentRunDiagnostics.ChatCompletions"/> and |
| | | 11 | | /// <see cref="IAgentRunDiagnostics.ToolCalls"/> collections by wall-clock time. Use the |
| | | 12 | | /// <see cref="ChatCompletion"/> or <see cref="ToolCall"/> property corresponding to |
| | | 13 | | /// <see cref="Kind"/> to access the original diagnostics record. |
| | | 14 | | /// </para> |
| | | 15 | | /// </remarks> |
| | | 16 | | /// <param name="Kind">Whether this entry represents a chat completion or a tool call.</param> |
| | | 17 | | /// <param name="Sequence">The invocation sequence within the source collection.</param> |
| | | 18 | | /// <param name="StartedAt">UTC timestamp when the operation began.</param> |
| | | 19 | | /// <param name="CompletedAt">UTC timestamp when the operation finished.</param> |
| | | 20 | | /// <param name="ChatCompletion">The source chat-completion record when <see cref="Kind"/> is <see cref="DiagnosticsTime |
| | | 21 | | /// <param name="ToolCall">The source tool-call record when <see cref="Kind"/> is <see cref="DiagnosticsTimelineEntryKin |
| | 19 | 22 | | public sealed record DiagnosticsTimelineEntry( |
| | 24 | 23 | | DiagnosticsTimelineEntryKind Kind, |
| | 7 | 24 | | int Sequence, |
| | 34 | 25 | | DateTimeOffset StartedAt, |
| | 2 | 26 | | DateTimeOffset CompletedAt, |
| | 6 | 27 | | ChatCompletionDiagnostics? ChatCompletion, |
| | 23 | 28 | | ToolCallDiagnostics? ToolCall); |