fix: validate Cua window discovery filters and guide recovery
This commit is contained in:
1 parent
c89588a80d
commit
1c1d700e9b
12 files changed
+337
-31
No files matched your search
@@ -4,6 +4,7 @@ import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import urllib.request
|
||||
import zipfile
|
||||
@@ -26,6 +27,11 @@ def main():
|
||||
version = json.loads((SOURCE / "plugin.json").read_text("utf-8"))["version"]
|
||||
if version.split("+", 1)[0] != UPSTREAM_VERSION:
|
||||
raise ValueError("Plugin version must match the pinned Cua Driver version")
|
||||
match = re.search(
|
||||
r'const adapterVersion = "([^"]+)"', (SOURCE / "main.go").read_text("utf-8")
|
||||
)
|
||||
if not match or match[1] != version:
|
||||
raise ValueError("Adapter MCP version must match plugin.json")
|
||||
if hashlib.sha256(args.upstream_zip.read_bytes()).hexdigest() != DIGEST:
|
||||
raise ValueError("Cua release archive hash mismatch")
|
||||
output = args.output.resolve()
|
||||
@@ -93,7 +99,7 @@ def main():
|
||||
"source_commit": COMMIT,
|
||||
"upstream_version": UPSTREAM_VERSION,
|
||||
"plugin_version": version,
|
||||
"adapter_revision": 1,
|
||||
"adapter_revision": 2,
|
||||
"prerelease": True,
|
||||
"url": URL,
|
||||
"sha256": DIGEST,
|
||||
|
||||
Reference in new issue
Block a user