Files
fusion/.github/workflows/agent-browser-install.yml
dependabot[bot] 74d6513fae chore(deps): bump actions/upload-artifact from 4 to 7 (#2444)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 4 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<h2>v7 What's new</h2>
<h3>Direct Uploads</h3>
<p>Adds support for uploading single files directly (unzipped). Callers
can set the new <code>archive</code> parameter to <code>false</code> to
skip zipping the file during upload. Right now, we only support single
files. The action will fail if the glob passed resolves to multiple
files. The <code>name</code> parameter is also ignored with this
setting. Instead, the name of the artifact will be the name of the
uploaded file.</p>
<h3>ESM</h3>
<p>To support new versions of the <code>@actions/*</code> packages,
we've upgraded the package to ESM.</p>
<h2>What's Changed</h2>
<ul>
<li>Add proxy integration test by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/upload-artifact/pull/754">actions/upload-artifact#754</a></li>
<li>Upgrade the module to ESM and bump dependencies by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/762">actions/upload-artifact#762</a></li>
<li>Support direct file uploads by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/764">actions/upload-artifact#764</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Link"><code>@​Link</code></a>- made
their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/754">actions/upload-artifact#754</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v6...v7.0.0">https://github.com/actions/upload-artifact/compare/v6...v7.0.0</a></p>
<h2>v6.0.0</h2>
<h2>v6 - What's new</h2>
<blockquote>
<p>[!IMPORTANT]
actions/upload-artifact@v6 now runs on Node.js 24 (<code>runs.using:
node24</code>) and requires a minimum Actions Runner version of 2.327.1.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>Node.js 24</h3>
<p>This release updates the runtime to Node.js 24. v5 had preliminary
support for Node.js 24, however this action was by default still running
on Node.js 20. Now this action by default will run on Node.js 24.</p>
<h2>What's Changed</h2>
<ul>
<li>Upload Artifact Node 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/719">actions/upload-artifact#719</a></li>
<li>fix: update <code>@​actions/artifact</code> for Node.js 24 punycode
deprecation by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/744">actions/upload-artifact#744</a></li>
<li>prepare release v6.0.0 for Node.js 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/745">actions/upload-artifact#745</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0">https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0</a></p>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<p><strong>BREAKING CHANGE:</strong> this update supports Node
<code>v24.x</code>. This is not a breaking change per-se but we're
treating it as such.</p>
<ul>
<li>Update README.md by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li>Readme: spell out the first use of GHES by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li>Update GHES guidance to include reference to Node 20 version by <a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
<li>Bump <code>@actions/artifact</code> to <code>v4.0.0</code></li>
<li>Prepare <code>v5.0.0</code> by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/734">actions/upload-artifact#734</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="043fb46d1a"><code>043fb46</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/797">#797</a>
from actions/yacaovsnc/update-dependency</li>
<li><a
href="634250c138"><code>634250c</code></a>
Include changes in typespec/ts-http-runtime 0.3.5</li>
<li><a
href="e454baaac2"><code>e454baa</code></a>
Readme: bump all the example versions to v7 (<a
href="https://redirect.github.com/actions/upload-artifact/issues/796">#796</a>)</li>
<li><a
href="74fad66b98"><code>74fad66</code></a>
Update the readme with direct upload details (<a
href="https://redirect.github.com/actions/upload-artifact/issues/795">#795</a>)</li>
<li><a
href="bbbca2ddaa"><code>bbbca2d</code></a>
Support direct file uploads (<a
href="https://redirect.github.com/actions/upload-artifact/issues/764">#764</a>)</li>
<li><a
href="589182c5a4"><code>589182c</code></a>
Upgrade the module to ESM and bump dependencies (<a
href="https://redirect.github.com/actions/upload-artifact/issues/762">#762</a>)</li>
<li><a
href="47309c993a"><code>47309c9</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/754">#754</a>
from actions/Link-/add-proxy-integration-tests</li>
<li><a
href="02a8460834"><code>02a8460</code></a>
Add proxy integration test</li>
<li><a
href="b7c566a772"><code>b7c566a</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/745">#745</a>
from actions/upload-artifact-v6-release</li>
<li><a
href="e516bc8500"><code>e516bc8</code></a>
docs: correct description of Node.js 24 support in README</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v4...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
2026-07-27 19:06:09 -07:00

152 lines
8.4 KiB
YAML

name: Agent-browser install
# FNXC:AgentBrowserPackaging 2026-07-22-13:25:
# Exercise the published npm boundary on every supported desktop OS because
# source-tree tests cannot prove the platform shim and native binary survive a
# packed consumer install.
on:
pull_request:
branches: [main]
paths:
- ".github/workflows/agent-browser-install.yml"
- "packages/cli/agent-browser.mjs"
- "packages/cli/package.json"
- "packages/cli/scripts/prepare-publish-manifest.mjs"
concurrency:
group: agent-browser-install-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
pack-fixture:
name: Pack agent-browser install fixture
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
skip-install: "true"
- name: Pack Fusion CLI and agent-browser
shell: bash
working-directory: packages/cli
run: |
pack_dir="$RUNNER_TEMP/fusion-agent-browser-pack"
mkdir -p "$pack_dir"
pnpm pack --pack-destination "$pack_dir"
agent_browser_version="$(node -p 'require("./package.json").dependencies["agent-browser"]')"
node -e "const version = process.argv[1]; if (!/^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$/.test(version)) throw new Error('agent-browser must use an exact version pin')" "$agent_browser_version"
npm pack "agent-browser@$agent_browser_version" --ignore-scripts --pack-destination "$pack_dir"
node -e "require('node:fs').writeFileSync(process.argv[1], process.argv[2] + '\n')" "$pack_dir/agent-browser-version.txt" "$agent_browser_version"
- name: Upload packed install fixture
uses: actions/upload-artifact@v7
with:
name: agent-browser-install-pack
path: |
${{ runner.temp }}/fusion-agent-browser-pack/*.tgz
${{ runner.temp }}/fusion-agent-browser-pack/agent-browser-version.txt
retention-days: 1
install-smoke:
name: Agent-browser install (${{ matrix.os }})
needs: pack-fixture
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: "24"
- name: Download packed install fixture
uses: actions/download-artifact@v4
with:
name: agent-browser-install-pack
path: ${{ runner.temp }}/fusion-agent-browser-pack
- name: Install packed CLI and execute npm shim
shell: pwsh
run: |
$packDir = Join-Path $env:RUNNER_TEMP "fusion-agent-browser-pack"
$fixtureDir = Join-Path $env:RUNNER_TEMP "fusion-agent-browser-fixture"
$fixturePackDir = Join-Path $env:RUNNER_TEMP "fusion-agent-browser-fixture-pack"
$installDir = Join-Path $env:RUNNER_TEMP "fusion-agent-browser-consumer"
$tarball = Get-ChildItem $packDir -Filter "runfusion-fusion-*.tgz" | Select-Object -First 1
if (!$tarball) { Write-Error "Packed Fusion CLI tarball was not created"; exit 1 }
$agentBrowserTarball = Get-ChildItem $packDir -Filter "agent-browser-*.tgz" | Select-Object -First 1
if (!$agentBrowserTarball) { Write-Error "Packed agent-browser dependency was not created"; exit 1 }
$expectedVersion = (Get-Content (Join-Path $packDir "agent-browser-version.txt") -Raw).Trim()
New-Item -ItemType Directory -Force -Path $fixtureDir | Out-Null
New-Item -ItemType Directory -Force -Path $fixturePackDir | Out-Null
New-Item -ItemType Directory -Force -Path $installDir | Out-Null
tar -xzf $tarball.FullName -C $fixtureDir
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# FNXC:AgentBrowserPackaging 2026-07-22-13:25:
# Derive a minimal fixture from the real Fusion tarball to exercise its
# launcher and bin declaration without installing unrelated dependencies.
$fixturePackage = Join-Path $fixtureDir "package"
node -e "const { existsSync, readFileSync, writeFileSync } = require('node:fs'); const { join } = require('node:path'); const root = process.argv[1]; const dep = process.argv[2].replaceAll('\\', '/'); const expected = process.argv[3]; const file = join(root, 'package.json'); const pkg = JSON.parse(readFileSync(file, 'utf8')); if (pkg.dependencies?.['agent-browser'] !== expected) throw new Error('Packed Fusion manifest lost the exact agent-browser pin'); if (pkg.bin?.['agent-browser'] !== './agent-browser.mjs') throw new Error('Packed Fusion manifest lost the agent-browser bin'); if (!existsSync(join(root, 'agent-browser.mjs'))) throw new Error('Packed Fusion tarball omitted agent-browser.mjs'); pkg.dependencies = { 'agent-browser': 'file:' + dep }; delete pkg.devDependencies; delete pkg.peerDependencies; delete pkg.peerDependenciesMeta; delete pkg.scripts; writeFileSync(file, JSON.stringify(pkg, null, 2) + '\n');" $fixturePackage $agentBrowserTarball.FullName $expectedVersion
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm pack $fixturePackage --ignore-scripts --pack-destination $fixturePackDir
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$fixtureTarball = Get-ChildItem $fixturePackDir -Filter "runfusion-fusion-*.tgz" | Select-Object -First 1
if (!$fixtureTarball) { Write-Error "Minimal Fusion install fixture was not created"; exit 1 }
Push-Location $installDir
try {
npm init --yes | Out-Null
npm install --ignore-scripts --no-audit --no-fund --install-strategy=nested $fixtureTarball.FullName
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$shimName = if ($IsWindows) { "agent-browser.cmd" } else { "agent-browser" }
$shim = Join-Path $installDir "node_modules/.bin/$shimName"
if (!(Test-Path $shim)) { Write-Error "npm did not generate $shimName"; exit 1 }
if ($IsWindows) {
$normalizedShim = (Get-Content $shim -Raw).Replace("\", "/")
if (!$normalizedShim.Contains("@runfusion/fusion/agent-browser.mjs")) {
Write-Error "agent-browser.cmd does not target Fusion's packed launcher"
exit 1
}
} else {
node -e "const { readlinkSync } = require('node:fs'); const target = readlinkSync(process.argv[1]).replaceAll('\\', '/'); if (target !== '../@runfusion/fusion/agent-browser.mjs') { console.error('agent-browser does not target Fusion packed launcher: ' + target); process.exit(1); }" $shim
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
$version = (& $shim --version | Out-String).Trim()
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
$installedVersion = (node -e "const { readFileSync } = require('node:fs'); const { createRequire } = require('node:module'); const fromFusion = createRequire(require.resolve('@runfusion/fusion/package.json')); console.log(JSON.parse(readFileSync(fromFusion.resolve('agent-browser/package.json'), 'utf8')).version)" | Out-String).Trim()
if ($installedVersion -ne $expectedVersion) {
Write-Error "Installed agent-browser $installedVersion does not match declared pin $expectedVersion"
exit 1
}
if ($version -ne "agent-browser $expectedVersion") {
Write-Error "Unexpected agent-browser version: $version"
exit 1
}
node -e "const { existsSync } = require('node:fs'); const { createRequire } = require('node:module'); const { dirname, join } = require('node:path'); const fromFusion = createRequire(require.resolve('@runfusion/fusion/package.json')); const pkg = fromFusion.resolve('agent-browser/package.json'); const suffix = process.platform === 'win32' ? 'win32-x64.exe' : process.platform + '-' + process.arch; const native = join(dirname(pkg), 'bin', 'agent-browser-' + suffix); if (!existsSync(native)) { console.error('Missing native executable: ' + native); process.exit(1); } console.log(native);"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally {
Pop-Location
}