The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(build): honor the provisioned Python in desktop hooks
ethernet525ea2ad553d
diff --git a/.github/workflows/js-tests.yml b/.github/workflows/js-tests.ymlindex d1067f0960a..2fcc61cafac 100644--- a/.github/workflows/js-tests.yml+++ b/.github/workflows/js-tests.yml@@ -18,13 +18,15 @@ jobs:timeout-minutes: 30steps:- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2- - name: Set up locked Node and npm+ - name: Set up the locked JS build toolchainid: nodeuses: ./.github/actions/setup-pmwith:- toolchain: node+ # Desktop checks also run Python payload and icon build helpers.+ toolchain: all- # setup-pm caches npm downloads, not the installed workspace tree. The job then extracts the full workspace node_modules+ # setup-pm caches npm downloads, not the installed workspace tree.+ # The job then extracts the full workspace node_modules# again and runs the postinstalls again, which includes the Electron# binary fetch. This caches the installed tree itself, keyed on the# lockfile, and skips ``npm ci`` on an exact hit. There are nodiff --git a/.github/workflows/pm-toolchain.yml b/.github/workflows/pm-toolchain.ymlindex 776f8ab0ed3..e1dc43a0fed 100644--- a/.github/workflows/pm-toolchain.yml+++ b/.github/workflows/pm-toolchain.yml@@ -57,7 +57,10 @@ jobs:- name: Install the locked desktop and test workspacesrun: npm ci --workspace apps/desktop --workspace tests-js --include-workspace-root --include=dev --ignore-scripts --no-audit --no-fund- name: Exercise the actual after-pack relocation hook- run: node node_modules/vitest/vitest.mjs run --root tests-js after-pack-toolchain.test.mjs generate-icons.test.mjs setup-pm-post.test.mjs+ working-directory: apps/desktop+ run: node ../../node_modules/vitest/vitest.mjs run --project electron scripts/after-pack-toolchain.test.mjs+ - name: Verify the icon and cache-post contracts+ run: node node_modules/vitest/vitest.mjs run --root tests-js generate-icons.test.mjs setup-pm-post.test.mjs- name: Exercise the payload and icon build entrypointsrun: |npm run payload --workspace apps/desktop -- --helpdiff --git a/tests-js/after-pack-toolchain.test.mjs b/apps/desktop/scripts/after-pack-toolchain.test.mjssimilarity index 97%rename from tests-js/after-pack-toolchain.test.mjsrename to apps/desktop/scripts/after-pack-toolchain.test.mjsindex ad7719999d3..ecf70c081a1 100644--- a/tests-js/after-pack-toolchain.test.mjs+++ b/apps/desktop/scripts/after-pack-toolchain.test.mjs@@ -3,7 +3,7 @@ import { mkdirSync, mkdtempSync, readFileSync, readlinkSync, rmSync, symlinkSyncimport { tmpdir } from 'node:os'import path from 'node:path'import { expect, test } from 'vitest'-import afterPack from '../apps/desktop/scripts/after-pack.mjs'+import afterPack from './after-pack.mjs'// This is the Linux afterPack path on a real Linux host, not a fake host flag.// macOS adds Developer ID signing; its native release lane owns that proof.diff --git a/apps/desktop/scripts/after-pack.mjs b/apps/desktop/scripts/after-pack.mjsindex 8eb56cb02ff..d9589ada9f3 100644--- a/apps/desktop/scripts/after-pack.mjs+++ b/apps/desktop/scripts/after-pack.mjs@@ -35,7 +35,7 @@ export default async function afterPack(context) {: path.join(context.appOutDir, 'resources')const payload = path.join(resources, 'agent-payload')if (platform !== 'win32' && fs.existsSync(path.join(payload, 'manifest.json'))) {- execFileSync('uv', ['run', '--no-project', '--python', '3.11', 'python',+ execFileSync('uv', ['run', '--no-project', 'python',path.resolve(import.meta.dirname, '../../../scripts/bundles/payload.py'), 'relocate', payload], { stdio: 'inherit' })}if (platform === 'darwin') {