MidStreamDisconnect
The BLE link dropped while firmware bytes were in flight. Carries the host in-flight offset (the end of the write the host had dispatched or was in flight at the moment of the drop) so the retry coordinator can distinguish a mid-stream failure (which switches subsequent Legacy uploads to LegacyDfuStreamProfile.RECOVERY) from a handshake/connect failure (which does not).
bytesSent is the end offset of the host write currently dispatched or in flight. It may include the current chunk when the disconnect occurs during service.write(). It does NOT prove the host stack accepted the chunk, and it does NOT prove the bootloader received or committed it. lastConfirmedBytes is the authoritative PRN-confirmed checkpoint (the last byte the bootloader explicitly acknowledged); -1 means no PRN was received before the drop. Do not treat bytesSent as confirmed device progress.
connectionState is the typed BleConnectionState observed at the moment of the drop (always BleConnectionState.Disconnected); the message renders it via toString() only for human-readable logging.
The optional cause carries the underlying operational write exception when classification was triggered by a failed BLE write on an already-disconnected link. Watcher-originated disconnects (where the state-flow watcher detected the drop independently) may have no cause.
Typed — callers must NOT parse the message to detect a mid-stream drop.