Commit Graph

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
3a5bf40f41 Address code review feedback
- Remove unused imports from main.py
- Add clearer documentation for extract_envelope_source_uuid
- Use Iterable[str] type hint instead of tuple

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
2025-12-01 15:16:15 +00:00
copilot-swe-agent[bot]
8a6dbca7c9 Add abstract and generic rule system for command triggers
- Create rules.py module with Rule base class and implementations:
  - MinReactionsRule: Trigger if received n reactions or more
  - MaxUsageRule: Trigger if total usage did not exceed n
  - CooldownRule: Trigger if cooldown time has elapsed
  - NotUserRule: Trigger if last user was not person x
  - NotSameUserRule: Prevent same user from using consecutively
  - TimeWindowRule: Trigger if time is between t1 and t2
  - AndRule/OrRule: Combine rules with AND/OR logic
  - GlobalCooldownRule: Rate limit across all commands

- Update main.py to use the new RuleEngine
- Add comprehensive test suite (60 tests)

Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
2025-12-01 15:13:25 +00:00