Add CLI and service skeleton
Some checks failed
CI / Build and Test (push) Has been cancelled
CI / Lint (push) Has been cancelled

This commit is contained in:
2026-05-17 05:59:48 +02:00
parent ccf68332f8
commit 61e113f8b6
5 changed files with 588 additions and 19 deletions

View File

@@ -154,6 +154,12 @@ func (e *Engine) Explain(decisionID string) (Explanation, error) {
return Explanation{}, fmt.Errorf("decision %q not found", decisionID)
}
return ExplainEnvelope(decision), nil
}
// ExplainEnvelope returns the same explanation shape for an already-loaded
// decision envelope.
func ExplainEnvelope(decision api.DecisionEnvelope) Explanation {
return Explanation{
DecisionID: decision.ID,
Effect: decision.Effect,
@@ -166,7 +172,7 @@ func (e *Engine) Explain(decisionID string) (Explanation, error) {
MatchedRule: decision.MatchedRule,
Diagnostics: decision.Diagnostics,
Caring: decision.Caring,
}, nil
}
}
type registryFacts struct {