Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

feat: add version alignment verification script

JerrettDavis3d891264ddf0
diff --git a/.gitignore b/.gitignore
index 51b02ad44..a08e63c69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,10 @@ scripts/
scripts/*
!scripts/install.sh
!scripts/install.ps1
+!scripts/version-sync.py
+!scripts/changelog-gen.py
+!scripts/verify-versions.py
+!scripts/tests/
# Swift SDK (separate repo)
swift/
diff --git a/scripts/verify-versions.py b/scripts/verify-versions.py
new file mode 100644
index 000000000..0693055ad
--- /dev/null
+++ b/scripts/verify-versions.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+"""Verify all package versions are in sync before publishing."""
+
+import json
+from pathlib import Path
+
+import tomllib
+
+ROOT = Path(__file__).parent.parent
+
+
+def main():
+ with open(ROOT / "pyproject.toml", "rb") as f:
+ py_ver = tomllib.load(f)["project"]["version"]
+
+ with open(ROOT / "plugins/openclaw/package.json") as f:
+ npm_openclaw_ver = json.load(f)["version"]
+
+ with open(ROOT / "sdk/typescript/package.json") as f:
+ npm_sdk_ver = json.load(f)["version"]
+
+ headroom_ver = (
+ (ROOT / "headroom" / "_version.py").read_text().split('__version__ = "')[1].split('"')[0]
+ )
+
+ versions = {
+ "pyproject.toml": py_ver,
+ "openclaw/package.json": npm_openclaw_ver,
+ "typescript/package.json": npm_sdk_ver,
+ "headroom/_version.py": headroom_ver,
+ }
+
+ if not all(v == py_ver for v in versions.values()):
+ print("Version mismatch detected:")
+ for file, ver in versions.items():
+ print(f" {file}: {ver}")
+ print(f"Expected all to be: {py_ver}")
+ raise SystemExit(1)
+
+ print(f"All versions aligned at {py_ver}")
+ print("Packages:", ", ".join(versions.keys()))
+
+
+if __name__ == "__main__":
+ main()