agentic-threat-hunting-framework 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/METADATA +1 -1
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/RECORD +19 -11
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/WHEEL +1 -1
- athf/agents/base.py +2 -2
- athf/cli.py +10 -2
- athf/commands/__init__.py +6 -1
- athf/commands/similar.py +2 -2
- athf/core/clickhouse_connection.py +396 -0
- athf/core/metrics_tracker.py +518 -0
- athf/core/query_executor.py +169 -0
- athf/core/query_parser.py +203 -0
- athf/core/query_suggester.py +235 -0
- athf/core/query_validator.py +240 -0
- athf/core/session_manager.py +764 -0
- athf/core/web_search.py +1 -1
- athf/plugin_system.py +48 -0
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/entry_points.txt +0 -0
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/licenses/LICENSE +0 -0
- {agentic_threat_hunting_framework-0.4.0.dist-info → agentic_threat_hunting_framework-0.5.0.dist-info}/top_level.txt +0 -0
athf/core/web_search.py
CHANGED
|
@@ -84,7 +84,7 @@ class TavilySearchClient:
|
|
|
84
84
|
"""Get or create Tavily client instance."""
|
|
85
85
|
if self._client is None:
|
|
86
86
|
try:
|
|
87
|
-
from tavily import TavilyClient
|
|
87
|
+
from tavily import TavilyClient
|
|
88
88
|
|
|
89
89
|
self._client = TavilyClient(api_key=self.api_key)
|
|
90
90
|
except ImportError:
|
athf/plugin_system.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Plugin system for ATHF extensions."""
|
|
2
|
+
from typing import Dict, Type, Callable
|
|
3
|
+
import importlib.metadata
|
|
4
|
+
from click import Command
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class PluginRegistry:
|
|
8
|
+
"""Central registry for ATHF plugins."""
|
|
9
|
+
|
|
10
|
+
_agents: Dict[str, Type] = {}
|
|
11
|
+
_commands: Dict[str, Command] = {}
|
|
12
|
+
|
|
13
|
+
@classmethod
|
|
14
|
+
def register_agent(cls, name: str, agent_class: Type) -> None:
|
|
15
|
+
"""Register an agent plugin."""
|
|
16
|
+
cls._agents[name] = agent_class
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def register_command(cls, name: str, command: Command) -> None:
|
|
20
|
+
"""Register a CLI command plugin."""
|
|
21
|
+
cls._commands[name] = command
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def get_agent(cls, name: str) -> Type:
|
|
25
|
+
"""Get registered agent by name."""
|
|
26
|
+
return cls._agents.get(name)
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def get_command(cls, name: str) -> Command:
|
|
30
|
+
"""Get registered command by name."""
|
|
31
|
+
return cls._commands.get(name)
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def load_plugins(cls) -> None:
|
|
35
|
+
"""Auto-discover and load all installed plugins."""
|
|
36
|
+
try:
|
|
37
|
+
for ep in importlib.metadata.entry_points(group='athf.commands'):
|
|
38
|
+
command = ep.load()
|
|
39
|
+
cls.register_command(ep.name, command)
|
|
40
|
+
except Exception:
|
|
41
|
+
pass # No plugins installed yet
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
for ep in importlib.metadata.entry_points(group='athf.agents'):
|
|
45
|
+
agent = ep.load()
|
|
46
|
+
cls.register_agent(ep.name, agent)
|
|
47
|
+
except Exception:
|
|
48
|
+
pass # No plugins installed yet
|
|
File without changes
|
|
File without changes
|
|
File without changes
|