forked from Azure/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValidationContext.cs
More file actions
74 lines (58 loc) · 2.18 KB
/
ValidationContext.cs
File metadata and controls
74 lines (58 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Azure.Sdk.Tools.Cli.Benchmarks.Infrastructure;
namespace Azure.Sdk.Tools.Cli.Benchmarks.Models;
/// <summary>
/// Context provided to validators containing execution results and workspace state.
/// </summary>
public class ValidationContext
{
// === WORKSPACE ===
/// <summary>
/// Gets the workspace containing the repository.
/// </summary>
public required Workspace Workspace { get; init; }
/// <summary>
/// Gets the path to the repository root within the workspace.
/// Shortcut for Workspace.RepoPath.
/// </summary>
public string RepoPath => Workspace.RepoPath;
// === GIT STATE ===
/// <summary>
/// Gets the git diff of all uncommitted changes (captured after agent execution).
/// May be null if diff capture failed.
/// </summary>
public string? GitDiff { get; init; }
/// <summary>
/// Gets the git diff for the home repo only (for multi-repo scenarios).
/// For single-repo scenarios, this is the same as GitDiff.
/// </summary>
public string? HomeRepoGitDiff { get; init; }
/// <summary>
/// Gets git diffs for all repos keyed by repo name (for multi-repo scenarios).
/// </summary>
public IReadOnlyDictionary<string, string> AllGitDiffs { get; init; } =
new Dictionary<string, string>();
// === EXECUTION RESULTS ===
/// <summary>
/// Gets the tool calls made during execution.
/// </summary>
public IReadOnlyList<ToolCallRecord> ToolCalls { get; init; } = [];
/// <summary>
/// Gets the conversation messages from the agent session.
/// </summary>
public IReadOnlyList<object> Messages { get; init; } = [];
/// <summary>
/// Gets whether the agent execution completed without errors.
/// </summary>
public bool ExecutionCompleted { get; init; }
/// <summary>
/// Gets any error message from execution.
/// </summary>
public string? ExecutionError { get; init; }
// === SCENARIO METADATA ===
/// <summary>
/// Gets the scenario name (for logging/debugging).
/// </summary>
public string ScenarioName { get; init; } = "";
}