package reputation import ( "context" "provenance/internal/domain" "provenance/internal/trust" ) // Trust supplies source-relative author scores through the service cache. type Trust interface { Score(context.Context, string) (trust.Result, error) } // Algorithm aggregates direct assertions. Results have no trust-score clamp or single path. // Implementations must support concurrent requests and respect context cancellation and limits. type Algorithm interface { Describe() trust.Descriptor Calculate(context.Context, Input) (Result, error) } type Input struct { Target string Vouches []domain.Vouch Threshold float64 Trust Trust Limits trust.Limits } // AbsoluteScore is the signed sum, not its mathematical absolute value. // Score preserves the original sum field for existing clients. type Result struct { Score float64 `json:"score"` AbsoluteScore float64 `json:"absolute_score"` MeanScore float64 `json:"mean_score"` }