refactor(office): Office 技能统一读取包内 assets,移除包外 office-skills 拷贝与 DSH_BUNDLED_OFFICE_SKILLS

- web-app、sdk-app 的 skill-office 不再覆盖 assetRoot;pythonEnvironment 不变
- Desktop 与 Python SDK 打包不再生成 office-skills 资源目录,删除 prepareOfficeSkillAssets 与 skillSource
- Desktop 打包 smoke 校验 4 个 Office 技能可从运行时归档列出并加载
- 同步测试、README、Agent Note,新增升级指南 office-skill-resources
This commit is contained in:
yudshj authored and GitHub committed 2026-11-04 13:25:24 +00:00
1 parent 3f6cd80c9d
commit 9df26413ee
49 files changed
+232 -214

No files matched your search

@@ -176,7 +176,7 @@ def download_office() -> Path:
def download_primary_runtime() -> Path:
"""Download locked CPython, libraries, Node, pnpm and skills into the resource cache.
"""Download locked CPython, libraries, Node and pnpm into the resource cache.
Return the absolute primary-runtime directory. This is independent of the
Office engine download and does not copy resources into a Harness home.
@@ -14,7 +14,7 @@ from pathlib import Path
def validate_resources(root: Path | zipfile.Path, target: str) -> None:
"""Reject a missing or wrong-target Python/Node environment or bundled Office skill tree."""
"""Reject a missing or wrong-target Python/Node environment."""
manifest_path = root / "primary-runtime/runtime.json"
if not manifest_path.is_file():
raise FileNotFoundError(f"runtime authoring resources are missing: {manifest_path}")
@@ -32,9 +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]
required.extend(root / f"office-skills/office-{kind}/SKILL.md" for kind in ("docx", "pptx", "xlsx"))
for path in required:
for path in (executable, node):
if not path.is_file():
raise FileNotFoundError(f"runtime authoring resource is missing: {path}")
if not packages.is_dir():
@@ -57,9 +55,6 @@ 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 (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