< Summary

Information
Class: Elsa.AI.Abstractions.Models.AIProposal
Assembly: Elsa.AI.Abstractions
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Abstractions/Models/AIProposal.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 18
Coverable lines: 18
Total lines: 63
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%210%
get_TenantId()100%210%
get_ConversationId()100%210%
get_Kind()100%210%
get_Status()100%210%
get_BaselineWorkflowDefinitionId()100%210%
get_BaselineVersionId()100%210%
get_WorkflowPayload()100%210%
get_Rationale()100%210%
get_Warnings()100%210%
get_ValidationDiagnostics()100%210%
get_GraphDiff()100%210%
get_CreatedBy()100%210%
get_CreatedAt()100%210%
get_ReviewedBy()100%210%
get_ReviewedAt()100%210%
get_AppliedBy()100%210%
get_AppliedAt()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.AI.Abstractions/Models/AIProposal.cs

#LineLine coverage
 1namespace Elsa.AI.Abstractions.Models;
 2
 3public record AIProposal
 4{
 05    public string Id { get; init; } = Guid.NewGuid().ToString("N");
 06    public string? TenantId { get; init; }
 07    public string ConversationId { get; init; } = "";
 08    public AIProposalKind Kind { get; init; }
 09    public AIProposalStatus Status { get; init; } = AIProposalStatus.Draft;
 010    public string? BaselineWorkflowDefinitionId { get; init; }
 011    public string? BaselineVersionId { get; init; }
 012    public JsonObject WorkflowPayload { get; init; } = [];
 013    public string Rationale { get; init; } = "";
 014    public ICollection<string> Warnings { get; init; } = [];
 015    public ICollection<AIValidationDiagnostic> ValidationDiagnostics { get; init; } = [];
 016    public AIGraphDiff? GraphDiff { get; init; }
 017    public string CreatedBy { get; init; } = "";
 018    public DateTimeOffset CreatedAt { get; init; } = DateTimeOffset.UtcNow;
 019    public string? ReviewedBy { get; init; }
 020    public DateTimeOffset? ReviewedAt { get; init; }
 021    public string? AppliedBy { get; init; }
 022    public DateTimeOffset? AppliedAt { get; init; }
 23}
 24
 25public record AIValidationDiagnostic
 26{
 27    public string Code { get; init; } = default!;
 28    public string Message { get; init; } = "";
 29    public AIValidationSeverity Severity { get; init; } = AIValidationSeverity.Warning;
 30    public string? Path { get; init; }
 31}
 32
 33public record AIGraphDiff
 34{
 35    public ICollection<string> AddedActivityIds { get; init; } = [];
 36    public ICollection<string> RemovedActivityIds { get; init; } = [];
 37    public ICollection<string> ChangedActivityIds { get; init; } = [];
 38    public JsonObject Data { get; init; } = [];
 39}
 40
 41public enum AIProposalKind
 42{
 43    WorkflowCreate,
 44    WorkflowUpdate
 45}
 46
 47public enum AIProposalStatus
 48{
 49    Draft,
 50    Validated,
 51    Blocked,
 52    Approved,
 53    Rejected,
 54    Applied,
 55    Expired
 56}
 57
 58public enum AIValidationSeverity
 59{
 60    Information,
 61    Warning,
 62    Error
 63}