A tool to automatically derive hierarchical Protobuf tag-to-string-key mappings by correlating a raw protoc output with a reference JSON file.
This skill provides a robust heuristic algorithm to reverse-engineer undocumented binary Protobuf schemas. It achieves this by matching unique scalar values (like UUIDs, special strings, distinct numbers) found in a reference semantic JSON file with those found in a generic numeric parsed Protobuf tree.
protoc --decode_raw).{"parentKey": {"1": "childKeyA", "2": "childKeyB"}}) which can be plugged directly into a deserializer.Run the following script to derive the mapping. You will need to modify the script's __main__ block or pass the paths to your JSON and RAW inputs.
python3 /Users/wangfeifei/.gemini/antigravity/skills/protobuf_semantic_mapper/scripts/derive_semantic_mapping.py <origin_json_path> <raw_protoc_txt_path>