| | | 1 | | using Intentum.Runtime.Policy; |
| | | 2 | | |
| | | 3 | | namespace Intentum.Runtime.Audit; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Append-only audit event for an intent inference or policy decision (input hash, model/policy version, user override) |
| | | 7 | | /// Use for compliance: record which input, model version, policy version produced which intent/decision, and whether a |
| | | 8 | | /// </summary> |
| | | 9 | | /// <param name="InputHash">Hash of the behavior space or input (e.g. SHA256 of serialized events) for reproducibility w |
| | | 10 | | /// <param name="ModelVersion">Version or identifier of the intent model used (e.g. "rule-v1", "onnx-2025-01").</param> |
| | | 11 | | /// <param name="PolicyVersion">Version or identifier of the policy used (e.g. "policy-v2").</param> |
| | | 12 | | /// <param name="UserOverride">True when a human override was applied (e.g. corrected intent or decision).</param> |
| | | 13 | | /// <param name="RecordedAt">When the audit event was recorded (UTC).</param> |
| | | 14 | | /// <param name="IntentName">Inferred intent name.</param> |
| | | 15 | | /// <param name="Decision">Policy decision (Allow, Block, Observe, etc.).</param> |
| | 1 | 16 | | public sealed record IntentAuditEvent( |
| | 0 | 17 | | string InputHash, |
| | 0 | 18 | | string? ModelVersion, |
| | 0 | 19 | | string? PolicyVersion, |
| | 0 | 20 | | bool UserOverride, |
| | 0 | 21 | | DateTimeOffset RecordedAt, |
| | 0 | 22 | | string IntentName, |
| | 1 | 23 | | PolicyDecision Decision); |