import json, sys
from pathlib import Path
base = Path(sys.argv[1])
out = Path(sys.argv[2])
d = json.loads((base / "caches/antigravity.json").read_text())
assert not (base / "tools").exists(), "Expected PATH installation"
out.write_text(json.dumps(d, indent=2) + "\n")
print(json.dumps({"version": d["version"], "compatibility": d["compatibilityAdvisory"]["status"], "status": d["status"], "auth": d["auth"], "models": len(d["models"]), "slashCommands": [c["name"] for c in d["slashCommands"]], "checkedAt": d["checkedAt"]}, indent=2))
