from pathlib import Path
import json
root=Path('/tmp/lead-29548-r1/evidence-capture-2')
rows=[]
for take in ['before-20261102T2113','after-20261102T2113','after-rerun-20261102T2120']:
 for line in (root/take/'acp-requests.jsonl').read_text().splitlines():
  m=json.loads(line)
  if m.get('method')=='session/new' and m.get('params',{}).get('cwd')==str(root/'sample-project'):
   rows.append({'take':take,'method':m['method'],'cwd':m['params']['cwd'],'mcpServers':'omitted: ephemeral session credentials'})
(root/'sanitized-session-new.json').write_text(json.dumps(rows,indent=2))
print('Only allowlisted method, synthetic cwd and take fields exported; all bridge credentials omitted.')
