Coverage for integrations / channels / commands / __init__.py: 100.0%

6 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-12 04:49 +0000

1""" 

2Command System 

3 

4Phase 3 of the HevolveBot integration plan. 

5Provides command registration, detection, parsing, and built-in commands. 

6 

7Modules: 

8- registry: Command registration and lookup 

9- detection: Command detection in messages 

10- arguments: Argument parsing and validation 

11- mention_gating: Mention-based response gating 

12- builtin: 20+ built-in commands 

13""" 

14 

15from .registry import ( 

16 CommandRegistry, 

17 CommandDefinition, 

18 CommandScope, 

19 CommandCategory, 

20 get_command_registry, 

21 reset_command_registry, 

22) 

23 

24from .detection import ( 

25 CommandDetector, 

26 CommandDetectorConfig, 

27 DetectedCommand, 

28 get_command_detector, 

29 reset_command_detector, 

30) 

31 

32from .arguments import ( 

33 ArgumentParser, 

34 ArgumentDefinition, 

35 ArgumentType, 

36 ArgumentChoice, 

37 ParseResult, 

38 ParsedArgument, 

39 create_parser, 

40 validate_range, 

41 validate_pattern, 

42 validate_length, 

43) 

44 

45from .mention_gating import ( 

46 MentionGate, 

47 MentionMode, 

48 MentionGateConfig, 

49 MentionCheckResult, 

50 get_mention_gate, 

51 reset_mention_gate, 

52) 

53 

54from .builtin import ( 

55 BuiltinCommands, 

56 CommandContext, 

57 CommandResult, 

58 CommandHandler, 

59 get_builtin_commands, 

60 reset_builtin_commands, 

61 register_builtin_commands, 

62) 

63 

64__all__ = [ 

65 # Registry 

66 "CommandRegistry", 

67 "CommandDefinition", 

68 "CommandScope", 

69 "CommandCategory", 

70 "get_command_registry", 

71 "reset_command_registry", 

72 # Detection 

73 "CommandDetector", 

74 "CommandDetectorConfig", 

75 "DetectedCommand", 

76 "get_command_detector", 

77 "reset_command_detector", 

78 # Arguments 

79 "ArgumentParser", 

80 "ArgumentDefinition", 

81 "ArgumentType", 

82 "ArgumentChoice", 

83 "ParseResult", 

84 "ParsedArgument", 

85 "create_parser", 

86 "validate_range", 

87 "validate_pattern", 

88 "validate_length", 

89 # Mention Gating 

90 "MentionGate", 

91 "MentionMode", 

92 "MentionGateConfig", 

93 "MentionCheckResult", 

94 "get_mention_gate", 

95 "reset_mention_gate", 

96 # Built-in Commands 

97 "BuiltinCommands", 

98 "CommandContext", 

99 "CommandResult", 

100 "CommandHandler", 

101 "get_builtin_commands", 

102 "reset_builtin_commands", 

103 "register_builtin_commands", 

104]