From e9535379187d5f767f1add68527a249a72eda5c0 Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 15 Feb 2026 20:41:25 +0000 Subject: [PATCH 1/3] fix: bundle extension .vsix into wrapper before building (sequential CI) --- .github/workflows/build.yml | 50 ++++++++++++++++++++--------------- .github/workflows/release.yml | 8 ++++++ 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7fd0174..3178c210 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,29 @@ on: branches: [main] jobs: + build-extension: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install dependencies + run: npm ci + working-directory: apps/extension + - name: Compile extension + run: npm run compile + working-directory: apps/extension + - name: Package VSIX + run: npx @vscode/vsce package --no-dependencies --skip-license --no-git-tag-version --allow-missing-repository + working-directory: apps/extension + - uses: actions/upload-artifact@v4 + with: + name: openclaw-extension + path: apps/extension/*.vsix + build-wrapper: + needs: build-extension strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] @@ -17,6 +39,13 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20' + - name: Download extension VSIX + uses: actions/download-artifact@v4 + with: + name: openclaw-extension + path: apps/wrapper/extensions + - name: Verify VSIX bundled + run: ls -la apps/wrapper/extensions/*.vsix - name: Install dependencies run: npm ci working-directory: apps/wrapper @@ -29,24 +58,3 @@ jobs: with: name: occode-${{ matrix.os }} path: apps/wrapper/dist/* - - build-extension: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20' - - name: Install dependencies - run: npm ci - working-directory: apps/extension - - name: Compile extension - run: npm run compile - working-directory: apps/extension - - name: Package VSIX - run: npx @vscode/vsce package --no-dependencies --skip-license --no-git-tag-version --allow-missing-repository - working-directory: apps/extension - - uses: actions/upload-artifact@v4 - with: - name: openclaw-extension - path: apps/extension/*.vsix diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fa5597d..a34bd103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,7 @@ jobs: path: apps/extension/*.vsix build-wrapper: + needs: build-extension strategy: matrix: include: @@ -46,6 +47,13 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20' + - name: Download extension VSIX + uses: actions/download-artifact@v4 + with: + name: extension-vsix + path: apps/wrapper/extensions + - name: Verify VSIX bundled + run: ls -la apps/wrapper/extensions/*.vsix - name: Install dependencies run: npm ci working-directory: apps/wrapper From 746debbc9a32376da9f790362e52a891184d9a53 Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 15 Feb 2026 20:44:43 +0000 Subject: [PATCH 2/3] fix: use bash shell for VSIX verify step (Windows compat) --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3178c210..f61659df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: name: openclaw-extension path: apps/wrapper/extensions - name: Verify VSIX bundled + shell: bash run: ls -la apps/wrapper/extensions/*.vsix - name: Install dependencies run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a34bd103..243994b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,7 @@ jobs: name: extension-vsix path: apps/wrapper/extensions - name: Verify VSIX bundled + shell: bash run: ls -la apps/wrapper/extensions/*.vsix - name: Install dependencies run: npm ci From 396744d05514fe0874fe95094990ea29229e6ee2 Mon Sep 17 00:00:00 2001 From: Debian Date: Sun, 15 Feb 2026 22:05:04 +0000 Subject: [PATCH 3/3] fix: use execSync with shell:true for extension install (codium is a shell script) --- apps/wrapper/src/setup.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/wrapper/src/setup.js b/apps/wrapper/src/setup.js index 314fe276..7eaa79b7 100644 --- a/apps/wrapper/src/setup.js +++ b/apps/wrapper/src/setup.js @@ -1,9 +1,6 @@ const fs = require('fs'); const path = require('path'); -const { execFile, spawn } = require('child_process'); -const { promisify } = require('util'); - -const execFileAsync = promisify(execFile); +const { execSync, spawn } = require('child_process'); const DEFAULT_SETTINGS = { "workbench.startupEditor": "none", @@ -20,20 +17,23 @@ async function installExtension(codiumBinary, occodeDir) { path.join(process.resourcesPath || '', 'extensions'), ]; + console.log('[OCcode] Looking for extensions in:', searchPaths); + for (const dir of searchPaths) { if (!fs.existsSync(dir)) continue; const vsixFiles = fs.readdirSync(dir).filter(f => f.endsWith('.vsix')); + console.log('[OCcode] Found VSIX in', dir, ':', vsixFiles); for (const vsix of vsixFiles) { const vsixPath = path.join(dir, vsix); const userDataDir = path.join(occodeDir, 'user-data'); try { - await execFileAsync(codiumBinary, [ - '--install-extension', vsixPath, - '--user-data-dir', userDataDir, - '--force', - ], { timeout: 60000 }); + // Use execSync with shell:true — codium binary is a shell script on Linux/Mac + const cmd = `"${codiumBinary}" --install-extension "${vsixPath}" --user-data-dir "${userDataDir}" --force`; + console.log('[OCcode] Running:', cmd); + const output = execSync(cmd, { timeout: 120000, shell: true, encoding: 'utf8' }); + console.log('[OCcode] Install result:', output.trim()); } catch (err) { - console.warn(`Failed to install ${vsix}:`, err.message); + console.warn(`[OCcode] Failed to install ${vsix}:`, err.message); } } }