mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 09:24:44 +02:00
feat: Dynamic MeshMonitor trigger sync — auto-ignore MeshMonitor commands
Add MeshMonitorSync class that reads trigger patterns from a JSON file and compiles them to regex. The router checks incoming messages against these patterns and ignores messages that MeshMonitor will handle. - New meshai/meshmonitor.py: Pattern compilation and file watching - MeshMonitorConfig dataclass with enabled, triggers_file, inject_into_prompt - Router integration: ignore matching messages, inject commands into prompt - Main loop refresh: watch triggers file for changes without restart Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1172b9b67f
commit
f6540e893d
7 changed files with 251 additions and 0 deletions
|
|
@ -75,6 +75,16 @@ class ContextConfig:
|
|||
max_context_items: int = 20 # Max observations injected into LLM context
|
||||
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class MeshMonitorConfig:
|
||||
"""MeshMonitor trigger sync settings."""
|
||||
|
||||
enabled: bool = False
|
||||
triggers_file: str = ""
|
||||
inject_into_prompt: bool = True
|
||||
|
||||
@dataclass
|
||||
class CommandsConfig:
|
||||
"""Command settings."""
|
||||
|
|
@ -146,6 +156,7 @@ class Config:
|
|||
commands: CommandsConfig = field(default_factory=CommandsConfig)
|
||||
llm: LLMConfig = field(default_factory=LLMConfig)
|
||||
weather: WeatherConfig = field(default_factory=WeatherConfig)
|
||||
meshmonitor: MeshMonitorConfig = field(default_factory=MeshMonitorConfig)
|
||||
|
||||
_config_path: Optional[Path] = field(default=None, repr=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue