@@ -76,46 +76,51 @@ jobs:
7676
7777 - run : pnpm install --frozen-lockfile
7878
79- # The browser plugin is BUNDLED into the runtime (loads as stock:browser)
80- # and uses child_process/eval, so it cannot be installed as an external
81- # plugin (the loader's dangerous-code scan blocks it). We therefore ship
82- # it as a trusted bundled overlay: build the runtime bundle and tar the
83- # compiled extensions/browser tree. The fleet drops this over
84- # <openclaw-pkg>/dist/extensions/browser in the INSTALLED runtime, where
85- # it is trusted (under the package root) and exempt from the scan .
86- - name : Build runtime bundle (compiled extensions )
79+ # The browser plugin is BUNDLED into the runtime (loads as stock:browser),
80+ # uses child_process/eval ( so the external-plugin security scan blocks
81+ # installing it as a tarball), AND tsdown hoists its modules into shared
82+ # chunks across the whole runtime bundle. So the change can't be isolated
83+ # to extensions/browser — we ship the entire compiled dist/ as a runtime
84+ # overlay. node_modules/deps are unchanged from stock 2026.5.20, so the
85+ # fleet drops this dist/ over the INSTALLED runtime's dist/ and restarts .
86+ - name : Build patched runtime (compiled dist )
8787 run : |
8888 pnpm plugins:assets:build
8989 node scripts/tsdown-build.mjs
90+ node scripts/build-stamp.mjs
9091
91- - name : Pack browser bundled-overlay tarball
92+ - name : Pack runtime dist overlay
9293 id : pack
9394 run : |
94- test -f dist/extensions/browser/index.js || { echo "missing compiled browser bundle"; exit 1; }
95- # Identifiers are minified; assert on a string literal from env-secrets.ts.
96- grep -rq "providers.<env>.allowlist" dist/extensions/browser/ || { echo "patch not present in built bundle"; exit 1; }
95+ test -f dist/extensions/browser/index.js || { echo "missing compiled runtime"; exit 1; }
96+ # Identifiers are minified; assert on a string literal from env-secrets.ts
97+ # somewhere in the compiled dist (it lands in a shared chunk).
98+ grep -rq "providers.<env>.allowlist" dist/ || { echo "patch not present in built dist"; exit 1; }
9799 VERSION="${{ steps.target.outputs.tag }}"; VERSION="${VERSION#v}"
98- TARBALL="openclaw-browser-bundle-overlay-${VERSION}.tgz"
99- tar czf "$TARBALL" -C dist/extensions browser
100+ TARBALL="openclaw-runtime-dist-overlay-${VERSION}.tgz"
101+ # Exclude staged node_modules: the installed runtime already has them
102+ # (deps are unchanged); we only overlay compiled JS.
103+ tar czf "$TARBALL" --exclude='node_modules' -C dist .
100104 echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT"
101105 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
106+ echo "size=$(du -h "$TARBALL" | cut -f1)" >> "$GITHUB_OUTPUT"
102107
103108 - name : Publish GitHub Release
104109 uses : softprops/action-gh-release@v2
105110 with :
106111 tag_name : browser-v${{ steps.pack.outputs.version }}
107- name : " openclaw browser bundled overlay ${{ steps.pack.outputs.version }} (Clawnify fork + env-var typing)"
112+ name : " openclaw runtime dist overlay ${{ steps.pack.outputs.version }} (Clawnify fork + browser env-var typing)"
108113 body : |
109- Compiled `dist/extensions/browser` tree for openclaw `${{ steps.target.outputs.tag }}` with
110- `{{env:KEY}}` substitution in the browser tool's type/fill/select actions, gated by the native
111- `secrets.providers.<env>.allowlist`.
114+ Compiled `dist/` for openclaw `${{ steps.target.outputs.tag }}` patched with `{{env:KEY}}`
115+ substitution in the browser tool's type/fill/select actions, gated by the native
116+ `secrets.providers.<env>.allowlist` (${{ steps.pack.outputs.size }}, node_modules excluded) .
112117
113- This is a BUNDLED overlay, not an installable plugin ( the browser plugin uses child_process and
114- is rejected by the external- plugin security scan) . Apply it on a server running openclaw
115- `${{ steps.pack.outputs.version }}` by overlaying it into the installed runtime:
118+ The browser plugin is bundled and chunk-shared across the runtime bundle, so it can't be shipped
119+ as an isolated plugin/dir . Apply on a server running openclaw `${{ steps.pack.outputs.version }}`
120+ by overlaying the compiled dist/ into the installed runtime:
116121 ```
117- D="$(dirname "$(readlink -f "$(which openclaw)")")/dist/extensions "
118- cp -r "$D/browser " "$D/browser .bak"
122+ D="$(dirname "$(readlink -f "$(which openclaw)")")/dist"
123+ cp -a "$D" "$D.bak"
119124 curl -fsSL <this-asset-url> | tar xz -C "$D"
120125 systemctl restart openclaw-gateway
121126 ```
0 commit comments