"""Read-only complete probe input capture; creates only the named fresh receipt.""" from pathlib import Path import argparse,datetime,hashlib,json p=argparse.ArgumentParser();p.add_argument('--output',required=True);a=p.parse_args() b=Path(__file__).resolve().parent;o=Path(a.output).resolve();assert not o.exists() rows=[] for f in sorted(b.rglob('*')): if not f.is_file() or f.resolve()==o or f.relative_to(b).parts[0] in ('records','target'):continue raw=f.read_bytes();rows.append(dict(path=f.relative_to(b).as_posix(),bytes=len(raw),sha256=hashlib.sha256(raw).hexdigest())) o.parent.mkdir(parents=True,exist_ok=True) with o.open('x',encoding='utf-8',newline='\n') as s:json.dump(dict(atUtc=datetime.datetime.now(datetime.timezone.utc).isoformat(),scope='Input bytes only; no Cargo or probe execution',lockfilePresent=(b/'Cargo.lock').is_file(),files=rows),s,indent=2);s.write('\n') print(json.dumps(dict(path=str(o),files=len(rows),sha256=hashlib.sha256(o.read_bytes()).hexdigest())))