< Summary

Information
Class: Intentum.Runtime.Policy.PolicyContext
Assembly: Intentum.Runtime
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Policy/PolicyContext.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 27
Line coverage: 100%
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 Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Policy/PolicyContext.cs

#LineLine coverage
 1using Intentum.Core.Intents;
 2
 3namespace Intentum.Runtime.Policy;
 4
 5/// <summary>
 6/// Context for policy evaluation: system load, region, recent intents, and custom data.
 7/// Used by context-aware policy rules to decide based on more than intent alone.
 8/// </summary>
 9/// <param name="Intent">The inferred intent being evaluated.</param>
 10/// <param name="SystemLoad">Optional system load (0–1 or metric). Used e.g. to Escalate when load is high.</param>
 11/// <param name="Region">Optional region or geography. Used e.g. for region-specific rules.</param>
 12/// <param name="RecentIntents">Optional recent intent summaries for this entity. Used e.g. to detect patterns.</param>
 13/// <param name="CustomContext">Optional custom key-value context from the application.</param>
 714public sealed record PolicyContext(
 115    Intent Intent,
 216    double? SystemLoad = null,
 117    string? Region = null,
 418    IReadOnlyList<IntentSummary>? RecentIntents = null,
 719    IReadOnlyDictionary<string, object>? CustomContext = null);
 20
 21/// <summary>
 22/// Summary of a past intent (name, confidence) for context-aware policies.
 23/// </summary>
 24public sealed record IntentSummary(
 25    string Name,
 26    string ConfidenceLevel,
 27    double ConfidenceScore);