Skip to content

v0.2.0

Latest

Choose a tag to compare

@himattm himattm released this 05 Feb 22:57
· 1 commit to main since this release
9ecdad8

What's New

Verdict Convenience Extensions (verdikt-core)

  • failureCount - number of failures (0 if passed)
  • failedRuleNames - list of failed rule names (empty if passed)
  • hasFailure(ruleName) - check if a specific rule failed
  • failuresMatching { } - filter failures by predicate

Engine Event Collector (verdikt-engine)

  • EngineEvent sealed class with structured event types for real-time observability
  • EngineEventCollector SAM interface for receiving events during evaluation
  • CompositeCollector for combining multiple collectors
  • Optional collector parameter on evaluate() and evaluateAsync() (backward compatible)

Flow Extensions (verdikt-engine)

  • evaluateAsFlow(facts) - returns Flow<EngineEvent> for sync evaluation
  • evaluateAsyncAsFlow(facts) - returns Flow<EngineEvent> for async evaluation

Other

  • EngineResult.failuresOfType<T>() for type-safe failure retrieval
  • Enhanced Guard documentation with "Guard vs Condition" distinction

See CHANGELOG.md for full details.