fix(runtime): separate packaged JSON-RPC resolution

This commit is contained in:
Yichen Jiang
2026-08-10 21:39:47 +08:00
parent 7175ba3d5e
commit 523764a582
18 changed files with 141 additions and 85 deletions

View File

@@ -9,7 +9,7 @@ Two runtime carriers coexist under ``runtime/``, both injected by the repo's
needs no Node installation.
- **node (dev-only)**: the full deploy closure under ``runtime/node/``
(``package.json`` + ``node_modules/``), executed as ``node
runtime/node/node_modules/@deepseek-ai/dsh-jsonrpc-demo/lib/bin.js`` on a
runtime/node/node_modules/@deepseek-ai/dsh-jsonrpc-demo/lib/packaged-bin.js`` on a
system Node >= 22.19. It is the current checkout's source build, never
selected automatically, and excluded from wheel/sdist distributions.
@@ -131,7 +131,12 @@ def _current_platform_tag() -> str:
def _node_launch_args() -> tuple[str, str]:
node_root = bundled_package_dir() / "runtime" / "node"
bin_js = (
node_root / "node_modules" / "@deepseek-ai" / "dsh-jsonrpc-demo" / "lib" / "bin.js"
node_root
/ "node_modules"
/ "@deepseek-ai"
/ "dsh-jsonrpc-demo"
/ "lib"
/ "packaged-bin.js"
)
if not bin_js.is_file():
raise FileNotFoundError(