As you have probably realised, the adaptor can't simply use the current state of the lights. For example, when the left light is on and the right light is off, that could be either turning left and not braking or turning right and braking.
The adaptor has to use whether the lights have changed state recently or not. If a light is flashing as a turn signal, it will always have changed state recently. You then get the following rules:-
0 Left on, not changed, Right on, not changed - brake only
1 Left on, not changed, Right on, changed - brake and right indicator in on phase
2 Left on, not changed, Right off, not changed - unknown state
3 Left on, not changed, Right off, changed - brake and right indicator in off phase
4 Left on, changed, Right on, not changed - brake and left indicator in on phase
5 Left on, changed, Right on, changed - both indicators (hazard lights) in on phase
6 Left on, changed, Right off, not changed - left indicator only in on phase
7 Left on, changed, Right off, changed - left indicator only in on phase
8 Left off, not changed, Right on, not changed - unknown state
9 Left off, not changed, Right on, changed - right indicator only in on phase
10 Left off, not changed, Right off, not changed - all off
11 Left off, not changed, Right off, changed - all off
12 Left off, changed, Right on, not changed - brake and left indicator in off phase
13 Left off, changed, Right on, changed - right indicator only in on phase
14 Left off, changed, Right off, not changed - all off
15 Left off, changed, Right off, changed - all off
So off will just be state 11
Braking only will be state 0
Left indicating only will alternate between states 6 and 14
Right indicating only will alternate between states 9 and 11
Left indicating and braking will alternate between states 4 and 12
Right indicating and braking will alternate between states 1 and 3
Hazard lights will alternate between states 5 and 15
The circuit has to remember if a light has changed recently, and then use rules like that to decide which outputs to drive.
The actual adaptor is probably more sophisticated than that because when braking starts, the state will go from 11 to 5 initially, and then to 0, so the indicators would flash once and the brake light would be slow to light. Maybe when both turn on at the same time, that is a separate state. Maybe a light is only assumed to have changed when it turned off recently.
Whatever the rules are in detail, the system never has to light anything when all the lights are off, so the adaptor can always get power from one or other of the lights.