Commit 3434b97f authored by AI-甘富林's avatar AI-甘富林

feat(runtime): bundle expert runtime dependencies

parent 7ffa84fe
...@@ -3,8 +3,10 @@ dist/ ...@@ -3,8 +3,10 @@ dist/
.pnpm-store/ .pnpm-store/
.turbo/ .turbo/
.corepack/ .corepack/
.cache/
.tmp/ .tmp/
.tmp-gateway-probe/ .tmp-gateway-probe/
tmp/
.claude/ .claude/
.codex/ .codex/
Microsoft/ Microsoft/
...@@ -22,6 +24,7 @@ vendor/openclaw-runtime/runtime/ ...@@ -22,6 +24,7 @@ vendor/openclaw-runtime/runtime/
vendor/openclaw-runtime/node/ vendor/openclaw-runtime/node/
vendor/openclaw-runtime/openclaw/ vendor/openclaw-runtime/openclaw/
vendor/openclaw-runtime/playwright-browsers/ vendor/openclaw-runtime/playwright-browsers/
vendor/openclaw-runtime/ffmpeg/
vendor/openclaw-runtime/config/openclaw.json vendor/openclaw-runtime/config/openclaw.json
vendor/openclaw-runtime/runtime-manifest.json vendor/openclaw-runtime/runtime-manifest.json
vendor/openclaw-runtime/python/ vendor/openclaw-runtime/python/
......
...@@ -9,8 +9,18 @@ python-docx==1.1.2 ...@@ -9,8 +9,18 @@ python-docx==1.1.2
charset-normalizer==3.4.1 charset-normalizer==3.4.1
pyyaml==6.0.2 pyyaml==6.0.2
pillow==11.3.0 pillow==11.3.0
loguru==0.7.3
PyExecJS==1.5.1
python-dotenv==1.2.2 python-dotenv==1.2.2
certifi==2026.4.22
openai==2.32.0
retry==0.9.2
fastapi==0.136.1
uvicorn==0.46.0
python-multipart==0.0.27
pdfplumber==0.11.9
greenlet==3.1.1 greenlet==3.1.1
playwright==1.50.0 playwright==1.50.0
edge-tts==7.2.3 edge-tts==7.2.3
imageio-ffmpeg==0.6.0 imageio-ffmpeg==0.6.0
qiniu==7.17.0
...@@ -9,7 +9,16 @@ python-docx==1.1.2 ...@@ -9,7 +9,16 @@ python-docx==1.1.2
charset-normalizer==3.4.1 charset-normalizer==3.4.1
pyyaml==6.0.2 pyyaml==6.0.2
pillow==11.3.0 pillow==11.3.0
loguru==0.7.3
PyExecJS==1.5.1
python-dotenv==1.2.2 python-dotenv==1.2.2
certifi==2026.4.22
openai==2.32.0
retry==0.9.2
fastapi==0.136.1
uvicorn==0.46.0
python-multipart==0.0.27
pdfplumber==0.11.9
greenlet==3.1.1 greenlet==3.1.1
playwright==1.50.0 playwright==1.50.0
edge-tts==7.2.3 edge-tts==7.2.3
......
...@@ -434,7 +434,6 @@ function Invoke-RuntimePayloadCleanup { ...@@ -434,7 +434,6 @@ function Invoke-RuntimePayloadCleanup {
(Join-Path $PythonDir 'Lib\tkinter'), (Join-Path $PythonDir 'Lib\tkinter'),
(Join-Path $PythonDir 'Lib\turtledemo'), (Join-Path $PythonDir 'Lib\turtledemo'),
(Join-Path $PythonDir 'Lib\ensurepip'), (Join-Path $PythonDir 'Lib\ensurepip'),
(Join-Path $PythonDir 'Lib\site-packages\pip'),
(Join-Path $PythonDir 'Lib\site-packages\setuptools'), (Join-Path $PythonDir 'Lib\site-packages\setuptools'),
(Join-Path $PythonDir 'Lib\site-packages\wheel') (Join-Path $PythonDir 'Lib\site-packages\wheel')
)) { )) {
...@@ -446,7 +445,7 @@ function Invoke-RuntimePayloadCleanup { ...@@ -446,7 +445,7 @@ function Invoke-RuntimePayloadCleanup {
$pythonCompiledFiles = Remove-OptionalFilesByPattern -RuntimeRoot $RuntimeRoot -Root $PythonDir -Patterns @('*.pyc', '*.pyo') $pythonCompiledFiles = Remove-OptionalFilesByPattern -RuntimeRoot $RuntimeRoot -Root $PythonDir -Patterns @('*.pyc', '*.pyo')
return [ordered]@{ return [ordered]@{
cleanupRulesVersion = 2 cleanupRulesVersion = 3
prunedOpenClawDocs = [bool]$docsCleanup.pruned prunedOpenClawDocs = [bool]$docsCleanup.pruned
preservedWorkspaceTemplateDirs = @($docsCleanup.preservedDirs) preservedWorkspaceTemplateDirs = @($docsCleanup.preservedDirs)
removedLiteralPaths = @($removedLiteralPaths) removedLiteralPaths = @($removedLiteralPaths)
...@@ -578,7 +577,7 @@ if (-not (Test-Path $SourcePythonDir)) { ...@@ -578,7 +577,7 @@ if (-not (Test-Path $SourcePythonDir)) {
} }
$materializationInputs = [ordered]@{ $materializationInputs = [ordered]@{
schemaVersion = 4 schemaVersion = 5
gatewayPort = $GatewayPort gatewayPort = $GatewayPort
gatewayToken = $GatewayToken gatewayToken = $GatewayToken
sourceConfig = Get-FileFingerprint -Path $SourceConfigPath -IncludeHash sourceConfig = Get-FileFingerprint -Path $SourceConfigPath -IncludeHash
...@@ -790,7 +789,7 @@ main().catch((error) => { ...@@ -790,7 +789,7 @@ main().catch((error) => {
"@ "@
[System.IO.File]::WriteAllText($wrapperPath, $wrapper, $utf8NoBom) [System.IO.File]::WriteAllText($wrapperPath, $wrapper, $utf8NoBom)
$readme = @" $readme = @'
# Bundled Runtime Payload # Bundled Runtime Payload
Immutable packaged payload under `vendor/openclaw-runtime/` includes: Immutable packaged payload under `vendor/openclaw-runtime/` includes:
...@@ -809,7 +808,7 @@ Immutable packaged payload under `vendor/openclaw-runtime/` includes: ...@@ -809,7 +808,7 @@ Immutable packaged payload under `vendor/openclaw-runtime/` includes:
Mutable runtime data lives outside the installer payload and should be created under Electron `userData/runtime/`. Mutable runtime data lives outside the installer payload and should be created under Electron `userData/runtime/`.
The payload is considered ready only when the Node entry, OpenClaw package, Python executable, Python manifest, FFmpeg/FFprobe tools, and locked Python imports all validate successfully on the target machine. The payload is considered ready only when the Node entry, OpenClaw package, Python executable, Python manifest, FFmpeg/FFprobe tools, and locked Python imports all validate successfully on the target machine.
"@ '@
[System.IO.File]::WriteAllText($payloadReadmePath, $readme.TrimStart(), $utf8NoBom) [System.IO.File]::WriteAllText($payloadReadmePath, $readme.TrimStart(), $utf8NoBom)
$payloadStatsBeforeCleanup = Get-RuntimePayloadStats -RuntimeDir $stagingDir $payloadStatsBeforeCleanup = Get-RuntimePayloadStats -RuntimeDir $stagingDir
......
...@@ -152,18 +152,31 @@ const PYTHON_RUNTIME_IMPORTS = [ ...@@ -152,18 +152,31 @@ const PYTHON_RUNTIME_IMPORTS = [
["requests", "requests"], ["requests", "requests"],
["beautifulsoup4", "bs4"], ["beautifulsoup4", "bs4"],
["lxml", "lxml"], ["lxml", "lxml"],
["urllib3", "urllib3"],
["pypdf", "pypdf"], ["pypdf", "pypdf"],
["python-docx", "docx"], ["python-docx", "docx"],
["charset-normalizer", "charset_normalizer"], ["charset-normalizer", "charset_normalizer"],
["pyyaml", "yaml"], ["pyyaml", "yaml"],
["pillow", "PIL"], ["pillow", "PIL"],
["loguru", "loguru"],
["pyexecjs", "execjs"],
["python-dotenv", "dotenv"], ["python-dotenv", "dotenv"],
["certifi", "certifi"],
["openai", "openai"],
["retry", "retry"],
["fastapi", "fastapi"],
["uvicorn", "uvicorn"],
["python-multipart", "multipart"],
["pdfplumber", "pdfplumber"],
["greenlet", "greenlet"], ["greenlet", "greenlet"],
["playwright", "playwright"], ["playwright", "playwright"],
["edge-tts", "edge_tts"] ["edge-tts", "edge_tts"]
] as const; ] as const;
const PYTHON_RUNTIME_DIRECT_IMPORT_PROBES = [ const PYTHON_RUNTIME_DIRECT_IMPORT_PROBES = [
["loguru", "from loguru import logger"],
["execjs", "import execjs"],
["openai.AsyncOpenAI", "from openai import AsyncOpenAI"],
["greenlet", "import greenlet"], ["greenlet", "import greenlet"],
["playwright.async_api", "from playwright.async_api import async_playwright"] ["playwright.async_api", "from playwright.async_api import async_playwright"]
] as const; ] as const;
......
# Bundled Runtime Payload # Bundled Runtime Payload
Immutable packaged payload under endor/openclaw-runtime/ includes: Immutable packaged payload under `vendor/openclaw-runtime/` includes:
- - `node/node.exe`
ode/node.exe - `openclaw/index.js`
- openclaw/index.js - `openclaw/package/openclaw.mjs`
- openclaw/package/openclaw.mjs - `config/openclaw.json`
- config/openclaw.json - `python/python.exe`
- python/python.exe - `python/python-manifest.json`
- python/python-manifest.json - `python/runtime-requirements.lock.txt`
- python/runtime-requirements.lock.txt - `ffmpeg/bin/ffmpeg.exe`
- playwright-browsers/ - `ffmpeg/bin/ffprobe.exe`
- `playwright-browsers/`
Mutable runtime data lives outside the installer payload and should be created under Electron userData/runtime/. Mutable runtime data lives outside the installer payload and should be created under Electron `userData/runtime/`.
The payload is considered ready only when the Node entry, OpenClaw package, Python executable, Python manifest, and locked Python imports all validate successfully on the target machine. The payload is considered ready only when the Node entry, OpenClaw package, Python executable, Python manifest, FFmpeg/FFprobe tools, and locked Python imports all validate successfully on the target machine.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment