#!/usr/bin/env python3
"""Record the real Threads -> Settings navigation used for the audit captures.
Usage: record-flow.py SESSION OUTPUT_MP4
The compare-driver records the associated CLI behavior separately.
"""
import subprocess,sys
s,out=sys.argv[1:]
def run(*a):subprocess.run(['agent-device',*a,'--session',s],check=True)
run('record','start',out)
try:
 run('click','label=Chats','--settle')
 run('wait','text','No environments connected')
 run('click','label=Settings','--settle')
 run('wait','text','Connections')
finally:run('record','stop')
