save progress
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// <copyright file="IExplainableDecision.cs" company="StellaOps">
|
||||
// Copyright (c) StellaOps. Licensed under AGPL-3.0-or-later.
|
||||
// </copyright>
|
||||
// Sprint: SPRINT_20260105_002_004_TEST_policy_explainability
|
||||
// Task: PEXP-003
|
||||
|
||||
namespace StellaOps.Testing.Explainability;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for services that produce explainable decisions.
|
||||
/// </summary>
|
||||
/// <typeparam name="TInput">Type of input to the decision.</typeparam>
|
||||
/// <typeparam name="TOutput">Type of output from the decision.</typeparam>
|
||||
public interface IExplainableDecision<TInput, TOutput>
|
||||
{
|
||||
/// <summary>
|
||||
/// Evaluate input and produce output with explanation.
|
||||
/// </summary>
|
||||
/// <param name="input">The input to evaluate.</param>
|
||||
/// <param name="ct">Cancellation token.</param>
|
||||
/// <returns>Result with explanation.</returns>
|
||||
Task<ExplainedResult<TOutput>> EvaluateWithExplanationAsync(
|
||||
TInput input,
|
||||
CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Marker interface for decisions that support explanation.
|
||||
/// </summary>
|
||||
public interface IExplainable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether explanations are enabled.
|
||||
/// </summary>
|
||||
bool ExplanationsEnabled { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable explanations.
|
||||
/// </summary>
|
||||
/// <param name="enabled">Whether to enable explanations.</param>
|
||||
void SetExplanationsEnabled(bool enabled);
|
||||
}
|
||||
Reference in New Issue
Block a user