Match
pkgs/genx/match Compiles YAML rules into matchers and performs template, variable and optional model-assisted matching on genx.Message. It is suitable for declaratively identifying input intent or extracting rule results.
Core structure and main function
| Symbol | Function |
|---|---|
Rule | Define matching rules, patterns, arguments and examples. |
Pattern | Describes a single matching pattern. |
Matcher | Holds the compiled rules and performs matching. |
Result | Returns the hit rule and parsing parameters. |
ParseRuleYAML | Parse a single Rule from YAML. |
Compile | Verify and compile Rules into Matcher. |
Collect | Collect the results or errors of matcher iterator. |
Match is only responsible for rule evaluation and does not own Agent routing, HTTP endpoints or workflow lifecycle. The caller decides subsequent product behavior based on the matching results.