mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-03-30 20:15:40 +00:00
- Add Flask + Flask-SocketIO web viewer with dashboard (modules/web_viewer/app.py and related) - Add web viewer templates: index, realtime, tracking (contacts), cache, purging, stats (modules/web_viewer/templates/) - Add integration hooks and utility functions for web viewer (modules/web_viewer/integration.py, modules/utils.py) - Add command to launch web viewer from bot CLI (modules/commands/webviewer_command.py) - Update .gitignore: ignore db/log files, test scripts, and web viewer artifacts - Add restart_viewer.sh helper script for standalone web viewer restart/troubleshooting - Add guidance and documentation for modern viewer in WEB_VIEWER.md and docs/ - Various code structure and import improvements to core bot and command modules to support integration - Add ACL support for sensitive commands - Example config updates Benefits: - Decouples monitoring/UI from bot core process - Enables real-time browser dashboard and unified contact/repeater tracking - Easier integration, dev, and troubleshooting
24 lines
574 B
Python
24 lines
574 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Data models for the MeshCore Bot
|
|
Contains shared data structures used across modules
|
|
"""
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class MeshMessage:
|
|
"""Simplified message structure for our bot"""
|
|
content: str
|
|
sender_id: Optional[str] = None
|
|
sender_pubkey: Optional[str] = None
|
|
channel: Optional[str] = None
|
|
hops: Optional[int] = None
|
|
path: Optional[str] = None
|
|
is_dm: bool = False
|
|
timestamp: Optional[int] = None
|
|
snr: Optional[float] = None
|
|
rssi: Optional[int] = None
|