import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
want = sys.argv[1] if len(sys.argv)>1 else 'LeakGauge'
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_93c95bcc-09a\journal.jsonl"
for line in open(p,encoding='utf-8'):
    try: o=json.loads(line)
    except: continue
    if o.get('type')!='result': continue
    r=o.get('result')
    if not isinstance(r,dict) or 'widget' not in r: continue
    if want.lower() not in (r.get('widget','')+r.get('configKeyword','')).lower(): continue
    print('WIDGET:', r.get('widget'))
    print('\n===== methodDescription + registration =====\n', r.get('methodDescription'))
    print('\n===== classLayout =====\n', r.get('classLayout'))
    print('\n===== attributeTableAdditions =====\n', r.get('attributeTableAdditions'))
    for f in (r.get('functions') or []):
        print('\n===== FN:', f.get('name'), '@', f.get('address'), '=====')
        print(f.get('cpp'))
    print('\n===== forceSafeChecklist =====')
    for x in (r.get('forceSafeChecklist') or []): print(' -', x)
    print('\n===== integrationNotes =====\n', r.get('integrationNotes'))
    break
