Commit Graph

44 Commits

Author SHA1 Message Date
agessaman c2f8a2e3cd refactor: companion FrameServer and related (substantive only, no Black)
Reapply refactor from ce8381a (replace monolithic FrameServer with thin
pymc_core subclass, re-export constants, SQLite persistence hooks) while
preserving pre-refactor whitespace where patch applied cleanly. Remaining
files match refactor commit exactly. Diff vs ce8381a is whitespace-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:35:47 -08:00
agessaman 49f412acb0 Enhance control data delivery and discovery handling
- Added a new method `deliver_control_data` in `RepeaterDaemon` to push CONTROL payloads to companion clients.
- Updated `PacketRouter` to invoke the new delivery method for control data packets.
- Introduced `push_control_data` in `CompanionFrameServer` to handle the sending of control data to clients.
- Enhanced `DiscoveryHelper` to support optional debug logging for control handling.

These changes improve the communication and control flow between the repeater and companion clients, facilitating better discovery response handling.
2026-02-14 20:24:00 -08:00
agessaman c0dec9e80a Implement companion client communication and statistics retrieval
- Added raw RX and trace completion handlers to push data to connected companion clients.
- Enhanced PacketRouter to deliver ACK packets to all companion bridges.
- Introduced methods for retrieving companion statistics based on different types.
- Updated constants for handling new commands and responses in the companion protocol.

This update improves the interaction between the repeater and companion clients, enabling better data flow and monitoring capabilities.
2026-02-13 22:26:05 -08:00
agessaman 15299bf374 Add companion module and API integration
- Add repeater/companion with frame server and constants
- Extend config, sqlite_handler, mesh_cli, packet_router for companion
- Update api_endpoints and auth_endpoints; adjust main entry

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:07:43 -08:00
Paul Picazo 942d4dfe28 Enhance advert storage logic: prioritize direct routes and handle zero-hop measurements
Refactor packet processing: use processed_packet for forwarding and drop reason checks

Fix: Update zero-hop determination logic in AdvertHelper

Fix: Clone packet in process_packet to prevent modification of the original

Fix: Import copy module for deep copying of packets in process_packet
2026-01-03 14:35:30 -08:00
Lloyd 7112da98c2 feat: Add authentication endpoints and JWT support
- Implemented JWT authentication with auto-generated secret if not provided.
- Added API token management functionality.
- Created authentication endpoints for login, token refresh, verification, and password change.
- Introduced API documentation endpoints for Swagger UI and OpenAPI spec.
- Enhanced CORS support for API and documentation endpoints.
- Updated OpenAPI specification to include new authentication and system endpoints.
2025-12-30 00:10:48 +00:00
Lloyd 98b425f444 added CLI 2025-12-29 14:37:54 +00:00
Lloyd fbe4e4e2bc bug:Skip already-evicted clients during eviction checks in RoomServer 2025-12-22 13:23:34 +00:00
Lloyd d9119d3b92 Refactor text message handling to prioritize CLI command processing before storing room server messages 2025-12-20 22:34:42 +00:00
Lloyd dbec76917a Fix neighbor listing format to ensure seconds ago and SNR are integers, stupid 2025-12-20 22:18:33 +00:00
Lloyd 61eaec6cf4 Implement advert scheduling delay and update neighbor listing format to match C++ specifications 2025-12-20 22:12:37 +00:00
Lloyd f5daf41825 MeshCLI and RoomServer initialization with identity and storage handler support; update neighbor listing to filter repeaters and zero hop nodes. 2025-12-20 22:03:02 +00:00
Lloyd 6c2c2a13aa Refactor advert scheduling in MeshCLI: update to match C++ behavior by scheduling advert sends without waiting for completion. 2025-12-20 21:54:17 +00:00
Lloyd 1a56b64dad Refactor Mesh CLI handler: rename RepeaterCLI to MeshCLI, initialization with identity type and region support, and update command handling for room servers. 2025-12-20 21:46:16 +00:00
Lloyd 4e1eb888e5 Refactor database connection handling in StorageCollector and reduce log verbosity in RoomServer to minimize spam during idle periods 2025-12-18 22:12:25 +00:00
Lloyd d321612670 Add node name lookup by public key and enhance CORS handling in API endpoints 2025-12-18 21:26:31 +00:00
Lloyd 3f57e78d6a Add debug logging for repeater security configuration in LoginHelper 2025-12-18 15:44:22 +00:00
Lloyd c98a33eda5 Refactor security configuration handling: update LoginHelper to retrieve security settings from the correct config path and adjust max_clients default value; modify APIEndpoints to ensure distinct admin and guest passwords, and enhance identity key validation logic in API responses. 2025-12-18 15:02:23 +00:00
Lloyd ccc908ce32 Update server message handling: use room server's public key for system messages and improve identification for clients 2025-12-18 13:35:22 +00:00
Lloyd d51f9cae0f Enhance client activity tracking: update timestamps during posting to prevent eviction and improve synchronization logic for active clients 2025-12-18 13:05:01 +00:00
Lloyd e8c1ba27e9 Fix push timing for evicted clients in RoomServer to ensure proper synchronization intervals 2025-12-18 12:57:51 +00:00
Lloyd 9cd98cd7ad Add room server messaging endpoints and database functions
- Implemented functions to retrieve, post, delete, and clear messages in room servers.
- Added API endpoints for room message retrieval, posting, and management.
- added OpenAPI documentation to include new room server functionalities.
2025-12-18 11:21:38 +00:00
Lloyd 710ee5b666 Implement room server functionality: add database schema, message handling, and client synchronization 2025-12-18 10:44:00 +00:00
Lloyd 02d3cbc396 Enhance ACL: add sync_since handling for room server clients and log timestamps 2025-12-17 23:01:29 +00:00
Lloyd 174c1309fc identity management: update security handling in room servers to use settings section and improve identity key update logic 2025-12-17 22:30:36 +00:00
Lloyd 2dce072124 Add ProtocolRequestHelper for handling protocol requests and update related components 2025-12-17 16:20:16 +00:00
Lloyd 82f1a20f44 Add PathHelper for processing PATH packets and update routing logic 2025-12-17 14:06:16 +00:00
Lloyd a8cc36abf3 Implement CLI reply handling in TextHelper with TXT_MSG datagram support 2025-12-17 11:17:44 +00:00
Lloyd 1bb2d39940 Refactor LoginHelper and TextHelper to implement per-identity ACLs add CLI command handling 2025-12-17 11:08:14 +00:00
Lloyd 4b97c7b439 Implement text message handling and identity registration for room servers 2025-12-17 10:38:23 +00:00
Lloyd 5df266c83e Implement access control and login management for identities
- Added security settings in config.yaml.example for managing authenticated clients.
- Introduced ACL class for handling access control and client authentication in acl.py.
- Created LoginHelper class for processing login requests and managing authentication in login.py.
- Added IdentityManager class for managing multiple identities in identity_manager.py.
- Updated main.py to initialize IdentityManager and LoginHelper, and register identities.
- Added packet_router to process ANON_REQ login packets through the LoginHelper.
2025-12-16 22:39:26 +00:00
Paul Picazo 5656a48b31 Refactor SNR calculation in TraceHelper to use snr_register_to_db utility 2025-12-13 22:04:18 -08:00
Lloyd f901493ffc Update repeater/handler_helpers/trace.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 21:40:45 +00:00
Lloyd 0e5037a7f3 Update repeater/handler_helpers/trace.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 21:39:18 +00:00
Lloyd 1a490ee571 Update repeater/handler_helpers/discovery.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 21:38:48 +00:00
Lloyd 3e46379623 Add zero_hop flag to advertisement packet data for direct route identification 2025-12-08 22:37:52 +00:00
Lloyd 60db061f2b Improve logging for invalid advertisement packets 2025-12-03 08:55:09 +00:00
Lloyd 9b53c5b6de Update packet handling to skip invalid advert packets and update record_packet method to conditionally publish to LetsMesh 2025-12-02 16:09:43 +00:00
Lloyd d1fdbf6929 mark invalid advertisement packets to prevent retransmission 2025-12-02 08:13:43 +00:00
Lloyd fa0261d2a2 streamline processing in TraceHelper and PacketRouter 2025-12-01 23:39:22 +00:00
Lloyd 1b3ee8f4f1 packet handling to support locally injected packets in RepeaterHandler and update trace packet forwarding to use injection method 2025-12-01 22:43:02 +00:00
Lloyd 60964ea13d Refactor packet handling to use packet injector for sending responses in DiscoveryHelper and TraceHelper; remove PacketRouter as it's no longer needed. 2025-12-01 22:05:02 +00:00
Lloyd ea54e86585 update trace packet forwarding by updating routing inline with new flow 2025-12-01 21:08:47 +00:00
Lloyd e8afa79114 Refactor packet handling in pyMC Repeater
- Updated dependency for pymc_core to use the feat/valid-packets-checks branch.
- Removed neighbor tracking logic from RepeaterHandler and moved it to AdvertHelper.
- Introduced PacketPipeline for centralized packet processing, ensuring all packets flow through repeater logic.
- Created handler helpers: TraceHelper, DiscoveryHelper, and AdvertHelper for better modularity.
- Implemented asynchronous processing of advertisement packets and discovery requests.
- Enhanced logging for better traceability and debugging.
- Cleaned up unused code and improved overall structure for maintainability.
2025-12-01 15:13:23 +00:00