Files
meshcore-bot/modules/models.py
agessaman 7bb51f219b Web Viewer Integration
- 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
2025-10-21 21:57:00 -07:00

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