How hamanpaul/serialwrap works
serialwrap is a UART broker: CLI and human-console clients submit work to a daemon, which coordinates session state and serialized writes to real devices while capturing raw evidence. The graph also preserves documented event-rule, file-transfer, flashing, and device-discovery capabilities. Relationships come from the README and SOURCE INDEX; unsampled subsystems are shown only where documented or explicitly referenced, so some internal links are omitted.
Main entry points: service.py Service dispatcher · uart_io.py UART bridge · session_manager.py Session manager · engine.py Event engine
Components 19
Clients and daemon
- CLI client
sw_core/cli.py - Broker daemon
sw_core/daemon.py - Service dispatcher
sw_core/service.py
Session and transport
- Profiles and config
sw_core/config.py - Session manager
sw_core/session_manager.py - Command arbiter
sw_core/arbiter.py - UART bridge
sw_core/uart_io.py
Evidence and events
- Raw WAL and mirror
sw_core/wal.py - Event engine
sw_core/event_engine/engine.py - Rule matcher
sw_core/event_engine/matcher.py - Event dispatcher
sw_core/event_engine/dispatcher.py
Device integrations
- File transfer
sw_core/file_transfer.py - Flash endpoint
sw_core/flash_endpoint.py - Device watcher
sw_core/device_watcher.py - Device discovery
sw_core/device_source.py
Other components
- Agents and CLI users
- Human console
- Real UART device
- External flasher
Connections 21
- Agents and CLI users → CLI client: issue commands
README.md - Human console → CLI client: use broker
README.md - CLI client → Broker daemon: RPC requests
README.md - Broker daemon → Service dispatcher: dispatches
README.md - Service dispatcher → Session manager: coordinates sessions
README.md - Service dispatcher → Command arbiter: submits work
README.md - Service dispatcher → Event engine: feeds RX lines
sw_core/service.py - Service dispatcher → Raw WAL and mirror: writes capture
README.md - Service dispatcher → File transfer: routes transfer
sw_core/service.py - Service dispatcher → Flash endpoint: routes flashing
sw_core/service.py - Session manager → Profiles and config: loads profiles
sw_core/session_manager.py - Session manager → UART bridge: manages bridge
sw_core/session_manager.py - Command arbiter → UART bridge: serializes writes
README.md - UART bridge → Real UART device: reads and writes
README.md - UART bridge → Raw WAL and mirror: captures raw bytes
README.md - UART bridge → Human console: fans out RX
README.md - Event engine → Rule matcher: matches lines
sw_core/event_engine/engine.py - Event engine → Event dispatcher: dispatches events
sw_core/event_engine/engine.py - Device watcher → Device discovery: discovers devices
sw_core/device_watcher.py - Service dispatcher → Device watcher: coordinates discovery
sw_core/service.py - Flash endpoint → External flasher: bridges flashing
README.md