Spectre.Policy.Matcher (Spectre v0.3.0)

Copy Markdown View Source

Pure matcher for policy accept and reject branches.

It reads compiled regex evidence and returns a canonical resolution without touching conversation state.

Summary

Functions

Matches normalized user text. Accept branches intentionally precede reject branches to preserve the policy DSL's established precedence.

Types

result()

@type result() :: {:ok, Spectre.Policy.Resolution.t()} | :no_match

Functions

match(policy, text)

@spec match(Spectre.Policy.t(), String.t()) :: result()

Matches normalized user text. Accept branches intentionally precede reject branches to preserve the policy DSL's established precedence.