Files
pwnagotchi/.idea/pwnagotchi.iml
T
Jeroen OudshoornandClaude Haiku 4.5 0b87b1b472 refactor(bluetooth): extract bt-tether core logic into reusable module
Split the monolithic 5000+ line bt-tether plugin into:

1. Core module (pwnagotchi/bluetooth/) with 7 focused submodules:
   - device.py: Device state and validation
   - connection.py: Core Bluetooth operations (pairing, connect, disconnect)
   - network.py: PAN interface and network management
   - agent.py: Pairing agent lifecycle
   - monitor.py: Connection monitoring and auto-reconnect
   - ui.py: Display rendering and status caching
   - __init__.py: Service facade with public API

2. Thin plugin wrapper (bt-tether-thin.py):
   - Delegates to BluetoothService
   - Reduced from 5000+ to ~750 lines
   - Maintains plugin interface compatibility
   - Handles webhook routing and event dispatch

Benefits:
- Core Bluetooth logic is now testable and reusable
- Clear separation of concerns (each module has single responsibility)
- Non-blocking UI updates via UICache pattern
- Proper error handling and timeout management
- Threading/locking concerns isolated by module
- Formal event system for plugin-core communication

Original bt-tether.py backed up as bt-tether.py.backup for reference.

Fixed security issue: replaced os.system() command injection in handler.py with subprocess.run()

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:19:57 +02:00

10 lines
446 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<module external.system.id="pyproject.toml" type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="~\PycharmProjects\pwnagotchi\.venv" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>