refactor(office): remove the bundled structural checker

This commit is contained in:
yudshj committed 2026-10-12 16:07:23 +08:00
1 parent 2fe9783f55
commit fb2a554cd3
39 files changed
+123 -709

No files matched your search

@@ -32,7 +32,7 @@ def validate_resources(root: Path | zipfile.Path, target: str) -> None:
executable = python_root / ("python.exe" if platform == "win32" else "bin/python3")
packages = python_root / ("Lib/site-packages" if platform == "win32" else f"lib/python{version.rsplit('.', 1)[0]}/site-packages")
node = root / "primary-runtime/dependencies/node/bin" / ("node.exe" if platform == "win32" else "node")
required = [executable, node, root / "office-skills/scripts/check_office.py"]
required = [executable, node]
required.extend(root / f"office-skills/office-{kind}/SKILL.md" for kind in ("docx", "pptx", "xlsx"))
for path in required:
if not path.is_file():
@@ -57,7 +57,7 @@ def validate_downloads(root: Path | zipfile.Path, target: str) -> dict:
or not isinstance(value.get("office"), list) or not value["office"]
or not isinstance(value.get("pnpm"), dict)):
raise ValueError(f"invalid runtime download manifest: {path}")
for file in ["scripts/check_office.py", *(f"office-{kind}/SKILL.md" for kind in ("docx", "pptx", "xlsx"))]:
for file in (f"office-{kind}/SKILL.md" for kind in ("docx", "pptx", "xlsx")):
if not (root / "office-skills" / file).is_file():
raise FileNotFoundError(f"runtime Office skill is missing: {root / 'office-skills' / file}")
return value