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

feat(runtime): bundle expert runtime dependencies

parent 7ffa84fe
......@@ -3,8 +3,10 @@ dist/
.pnpm-store/
.turbo/
.corepack/
.cache/
.tmp/
.tmp-gateway-probe/
tmp/
.claude/
.codex/
Microsoft/
......@@ -22,6 +24,7 @@ vendor/openclaw-runtime/runtime/
vendor/openclaw-runtime/node/
vendor/openclaw-runtime/openclaw/
vendor/openclaw-runtime/playwright-browsers/
vendor/openclaw-runtime/ffmpeg/
vendor/openclaw-runtime/config/openclaw.json
vendor/openclaw-runtime/runtime-manifest.json
vendor/openclaw-runtime/python/
......
......@@ -9,8 +9,18 @@ python-docx==1.1.2
charset-normalizer==3.4.1
pyyaml==6.0.2
pillow==11.3.0
loguru==0.7.3
PyExecJS==1.5.1
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
playwright==1.50.0
edge-tts==7.2.3
imageio-ffmpeg==0.6.0
qiniu==7.17.0
......@@ -9,7 +9,16 @@ python-docx==1.1.2
charset-normalizer==3.4.1
pyyaml==6.0.2
pillow==11.3.0
loguru==0.7.3
PyExecJS==1.5.1
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
playwright==1.50.0
edge-tts==7.2.3
......
......@@ -434,7 +434,6 @@ function Invoke-RuntimePayloadCleanup {
(Join-Path $PythonDir 'Lib\tkinter'),
(Join-Path $PythonDir 'Lib\turtledemo'),
(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\wheel')
)) {
......@@ -446,7 +445,7 @@ function Invoke-RuntimePayloadCleanup {
$pythonCompiledFiles = Remove-OptionalFilesByPattern -RuntimeRoot $RuntimeRoot -Root $PythonDir -Patterns @('*.pyc', '*.pyo')
return [ordered]@{
cleanupRulesVersion = 2
cleanupRulesVersion = 3
prunedOpenClawDocs = [bool]$docsCleanup.pruned
preservedWorkspaceTemplateDirs = @($docsCleanup.preservedDirs)
removedLiteralPaths = @($removedLiteralPaths)
......@@ -578,7 +577,7 @@ if (-not (Test-Path $SourcePythonDir)) {
}
$materializationInputs = [ordered]@{
schemaVersion = 4
schemaVersion = 5
gatewayPort = $GatewayPort
gatewayToken = $GatewayToken
sourceConfig = Get-FileFingerprint -Path $SourceConfigPath -IncludeHash
......@@ -790,7 +789,7 @@ main().catch((error) => {
"@
[System.IO.File]::WriteAllText($wrapperPath, $wrapper, $utf8NoBom)
$readme = @"
$readme = @'
# Bundled Runtime Payload
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/`.
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)
$payloadStatsBeforeCleanup = Get-RuntimePayloadStats -RuntimeDir $stagingDir
......
......@@ -152,18 +152,31 @@ const PYTHON_RUNTIME_IMPORTS = [
["requests", "requests"],
["beautifulsoup4", "bs4"],
["lxml", "lxml"],
["urllib3", "urllib3"],
["pypdf", "pypdf"],
["python-docx", "docx"],
["charset-normalizer", "charset_normalizer"],
["pyyaml", "yaml"],
["pillow", "PIL"],
["loguru", "loguru"],
["pyexecjs", "execjs"],
["python-dotenv", "dotenv"],
["certifi", "certifi"],
["openai", "openai"],
["retry", "retry"],
["fastapi", "fastapi"],
["uvicorn", "uvicorn"],
["python-multipart", "multipart"],
["pdfplumber", "pdfplumber"],
["greenlet", "greenlet"],
["playwright", "playwright"],
["edge-tts", "edge_tts"]
] as const;
const PYTHON_RUNTIME_DIRECT_IMPORT_PROBES = [
["loguru", "from loguru import logger"],
["execjs", "import execjs"],
["openai.AsyncOpenAI", "from openai import AsyncOpenAI"],
["greenlet", "import greenlet"],
["playwright.async_api", "from playwright.async_api import async_playwright"]
] as const;
......
# Bundled Runtime Payload
Immutable packaged payload under endor/openclaw-runtime/ includes:
Immutable packaged payload under `vendor/openclaw-runtime/` includes:
-
ode/node.exe
- openclaw/index.js
- openclaw/package/openclaw.mjs
- config/openclaw.json
- python/python.exe
- python/python-manifest.json
- python/runtime-requirements.lock.txt
- playwright-browsers/
- `node/node.exe`
- `openclaw/index.js`
- `openclaw/package/openclaw.mjs`
- `config/openclaw.json`
- `python/python.exe`
- `python/python-manifest.json`
- `python/runtime-requirements.lock.txt`
- `ffmpeg/bin/ffmpeg.exe`
- `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.
\ No newline at end of file
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.
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