"""WebChain (webagentlab/webchain, CC-BY-4.0; human trajectories on real sites) -> laya cases. python finetune/convert_webchain.py fetch [workers=16] # AX-tree snapshots -> compact .json.gz (direct, no proxy) python finetune/convert_webchain.py convert # compact snapshots -> cases (same format as m2w_cases) Per step: goal = the trace's query; page = the AX snapshot taken at that step (interactive nodes + text-bearing nodes, page order); gold = the node the human acted on, found by its text (`value`) + html tag, ties broken by the selector's id/class tokens -- an ambiguous or missing gold drops the step. Candidates mirror Mind2Web's: the interactive nodes plus some non-semantic text nodes (the gold is often a clickable /
), capped at 60 in page order. Actions kept: click / double_click -> CLICK, type -> TYPE_TEXT (or SELECT on a native