Skip to main content

awaken_tool_pattern/
lib.rs

1//! Tool call pattern matching engine.
2//!
3//! Provides types and functions for matching tool calls by name (glob/regex/exact)
4//! and optionally by argument-level conditions on JSON fields. Used by permission
5//! rules, reminder rules, and other extensions that need to match tool calls.
6
7mod matcher;
8mod parser;
9mod types;
10
11pub use matcher::{
12    evaluate_field_condition, evaluate_op, op_precision, pattern_matches, resolve_path,
13    schema_has_path, validate_pattern_fields, value_to_string, wildcard_match,
14};
15pub use parser::{PatternParseError, parse_pattern};
16pub use types::{
17    ArgMatcher, FieldCondition, MatchOp, MatchResult, PathSegment, Specificity, ToolCallPattern,
18    ToolMatcher,
19};