fix(office): upgrade LibreOffice Kit to 0.2.4 and select its glibc engines on Linux

LibreOffice Kit 0.2.4 publishes its Linux engines as linux-x64-glibc and linux-arm64-glibc, but the sidecar and Desktop packaging looked for linux-<arch>, so a Linux target always fell back to WASM even when the kit declared a native engine. DSH's Linux distributions are glibc builds, so a Linux target now selects the glibc engine for its CPU. The third-party notices accept the two Linux engine packages under the same MPL-2.0 identity rule as the other engines.

The web app and office-kit take Kit 0.2.4, the first release with those engines. Its release-age exclusions name the API and the six native engines; WASM is no longer an optional dependency of the kit and is no longer excluded.

Because DSH no longer installs WASM, packaging now requires the target's declared native engine and rejects a target without one, naming its platform and CPU, instead of selecting a WASM package that cannot be present. The Python runtime smoke derives the same glibc package name and checks that the Office sidecar holds exactly that native engine. The Office provider, subsystem, package-surface and Desktop packaging documents describe Kit 0.2.4 and the native-only rule.
This commit is contained in:
yudshj committed 2026-11-26 23:15:45 +08:00
1 parent 5b0daea245
commit 92e65be447
24 files changed
+146 -91

No files matched your search

+9 -5
View File
@@ -1127,15 +1127,19 @@ def smoke_sdk_office(executable: Path) -> None:
assert not (office.parent / "primary").exists(), "Office download unexpectedly prepared the authoring environment"
adapter = office / "node_modules/@deepseek-ai/libreoffice-kit/package.json"
native = stem.removeprefix("deepseek-harness-sdk-runtime-").replace("win-", "win32-").replace("macos-", "darwin-")
if native.startswith("linux-"):
native = f"{native}-glibc"
declared = json.loads(adapter.read_text(encoding="utf-8")).get("optionalDependencies", {})
selected = native if f"@deepseek-ai/libreoffice-kit-{native}" in declared else "wasm"
expected_backend = "wasm" if selected == "wasm" else "native"
expected_package = f"@deepseek-ai/libreoffice-kit-{native}"
if expected_package not in declared:
raise AssertionError(f"Kit manifest must declare native engine {expected_package}: {sorted(declared)}")
expected_backend = "native"
engines = [
json.loads(manifest.read_text())["engine"]["kind"]
(manifest.parent.name, json.loads(manifest.read_text())["engine"]["kind"])
for manifest in (office / "node_modules/@deepseek-ai").glob("libreoffice-kit-*/prebuilds.json")
]
if engines != [expected_backend]:
raise AssertionError(f"Office sidecar must contain only {expected_backend}: {engines}")
if engines != [(f"libreoffice-kit-{native}", expected_backend)]:
raise AssertionError(f"Office sidecar must contain only {expected_package} ({expected_backend}): {engines}")
plugin = root / "office.mjs"
shutil.copy2(Path(__file__).resolve().parent / "fixtures/python-sdk-office.mjs", plugin)
documents = checks["copy_documents"](root)