cleanup(build): minimize native payload handling

This commit is contained in:
Tianyi Cui
2026-07-30 01:29:18 +08:00
parent 7118b4cfe1
commit 8a9d882a11
9 changed files with 47 additions and 119 deletions
+1 -2
View File
@@ -13,7 +13,6 @@ _PLATFORMS = {
"linux-arm64": ("manylinux_2_28_aarch64", "dsh-jsonrpc-agent-pkg-linux-arm64"),
"macos-arm64": ("macosx_11_0_arm64", "dsh-jsonrpc-agent-pkg-macos-arm64"),
}
_SPAWN_HELPER_SUFFIX = "-spawn-helper"
def _host_platform_tag() -> str:
@@ -50,7 +49,7 @@ class RuntimeBuildHook(BuildHookInterface):
runtime_files = sorted(runtime_dir.glob("dsh-jsonrpc-agent-pkg-*") if runtime_dir.is_dir() else [])
expected_files = [expected_executable]
if "-macos-" in expected_executable:
expected_files.append(f"{expected_executable}{_SPAWN_HELPER_SUFFIX}")
expected_files.append(f"{expected_executable}-spawn-helper")
found_files = [path.name for path in runtime_files]
if found_files != expected_files:
raise RuntimeError(
@@ -28,7 +28,6 @@ import sys
from pathlib import Path
PACKAGE_METADATA_FILENAME = "deepseek-harness-runtime.json"
SPAWN_HELPER_SUFFIX = "-spawn-helper"
RUNTIME_MODE_ENV_VAR = "DSH_RUNTIME_MODE"
@@ -85,7 +84,7 @@ def bundled_runtime_path() -> Path:
+ _EXE_ACQUISITION_HINT
)
if tag.startswith("macos-"):
helper = Path(f"{path}{SPAWN_HELPER_SUFFIX}")
helper = Path(f"{path}-spawn-helper")
if not helper.is_file():
raise FileNotFoundError(
f"deepseek-harness-runtime-bin is missing the node-pty spawn helper at {helper}. "
@@ -153,7 +152,6 @@ def _node_launch_args() -> tuple[str, str]:
__all__ = [
"PACKAGE_METADATA_FILENAME",
"RUNTIME_MODE_ENV_VAR",
"SPAWN_HELPER_SUFFIX",
"bundled_default_config_path",
"bundled_package_dir",
"bundled_runtime_path",