Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.
TypeScript agent-skillsai-agentsautomationcopilotcopilot-clicopilot-coworkcopilot-studioelectronmicrosoft-scoutscreen-recording
Bump sharp to 0.35.3 and bring compliance tooling up to date
Giorgio Ughinid5ef22eb5091
diff --git a/.github/workflows/non-windows.yml b/.github/workflows/non-windows.ymlindex 99bc7fd..c9f543a 100644--- a/.github/workflows/non-windows.yml+++ b/.github/workflows/non-windows.yml@@ -13,7 +13,7 @@ jobs:build:name: ${{ matrix.os }}runs-on: ${{ matrix.os }}- timeout-minutes: 20+ timeout-minutes: 45strategy:fail-fast: falsematrix:@@ -59,7 +59,22 @@ jobs:plutil -lint "$plist"- run: npm ci- - run: npm run compliance:licenses+ - name: Cache compliance source downloads+ uses: actions/cache@v4+ with:+ path: .compliance-cache+ key: compliance-${{ runner.os }}-${{ hashFiles('third_party/compliance-policy.json') }}+ restore-keys: compliance-${{ runner.os }}-++ # macOS arm64 is a release target, so it must be able to produce the complete+ # corresponding-source bundle. Linux installs from source and only needs the+ # license inventory.+ - name: Prepare compliance materials (release target)+ if: runner.os == 'macOS'+ run: npm run compliance:prepare+ - name: Prepare compliance licenses (source-install platform)+ if: runner.os != 'macOS'+ run: npm run compliance:licenses- name: Verify platform license coveragerun: |node --input-type=module -e "@@ -67,10 +82,24 @@ jobs:const inventory = JSON.parse(readFileSync('.compliance/LICENSE-INVENTORY.json'));const libvips = inventory.packages.find(({ name }) =>name.startsWith('@img/sharp-libvips-'));- if (!libvips || libvips.licenseSource !== 'licenses/LGPL-3.0.txt')+ if (!libvips || !libvips.licenseSource.includes('licenses/LGPL-3.0.txt'))throw new Error('Platform Sharp/libvips LGPL coverage is missing');if (!existsSync('.compliance/licenses/LGPL-3.0.txt'))throw new Error('Canonical LGPL-3.0 text is missing');+ const wasm = inventory.packages.find(({ name }) => name === '@img/sharp-wasm32');+ if (wasm) {+ for (const term of ['LICENSE', 'licenses/LGPL-3.0.txt', 'canonical SPDX MIT text'])+ if (!wasm.licenseSource.includes(term))+ throw new Error('@img/sharp-wasm32 license term ' + term + ' is unresolved');+ }+ const native = JSON.parse(readFileSync('.compliance/NATIVE-COMPONENTS.json'));+ if (native.packages.length !== 1)+ throw new Error('Exactly one native payload must be selected');+ if (!native.packages[0].name.endsWith('-' + process.arch))+ throw new Error('Native payload does not match the runner architecture');+ for (const excluded of native.excludedFromArtifacts)+ if (native.packages[0].name === excluded)+ throw new Error('An excluded WASM package was selected as the native payload');"- name: Verify optional window providerrun: >-diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.ymlindex ef85187..fb40037 100644--- a/.github/workflows/windows.yml+++ b/.github/workflows/windows.yml@@ -67,6 +67,13 @@ jobs:architecture: ${{ matrix.arch }}cache: npm+ - name: Cache compliance source downloads+ uses: actions/cache@v4+ with:+ path: .compliance-cache+ key: compliance-windows-${{ matrix.arch }}-${{ hashFiles('third_party/compliance-policy.json') }}+ restore-keys: compliance-windows-${{ matrix.arch }}-+- name: Install native dependenciesshell: pwshrun: |diff --git a/.gitignore b/.gitignoreindex 22c9eed..9f8b2fc 100644--- a/.gitignore+++ b/.gitignore@@ -4,6 +4,7 @@ dist-electronrelease.compliance.compliance-cache+.compliance-review*.log.DS_Storediff --git a/RELEASING.md b/RELEASING.mdindex 807fed8..8be56cd 100644--- a/RELEASING.md+++ b/RELEASING.md@@ -84,7 +84,8 @@ npm run compliance:prepareThe pull request must pass:- Windows x64 and ARM64 license, test, build, package, and architecture checks;-- macOS and Ubuntu license, test, and build checks;+- macOS full corresponding-source preparation, test, and build checks;+- Ubuntu license, test, and build checks;- commit-pinned source-installer checks on Windows, macOS, and Ubuntu.Resolve every compliance failure. Never disable or bypass a compliance check to@@ -158,8 +159,13 @@ Do not commit the temporary release-notes file.## 6. Optional binary release-Binary publication is a separate decision. Build each artifact on its native-operating system and architecture:+Binary publication is a separate decision. The supported release targets are+**Windows x64**, **Windows ARM64**, and **macOS arm64**; every other platform,+including Linux and macOS x64, is a source install (see `INSTALL.md`). The+compliance tooling refuses to prepare a redistributable bundle on an+unsupported target.++Build each artifact on its native operating system and architecture:```shnpm cidiff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.mdindex d9262b5..4098733 100644--- a/THIRD-PARTY-NOTICES.md+++ b/THIRD-PARTY-NOTICES.md@@ -69,12 +69,16 @@ Those components remain under their own terms; the generated**Apache-2.0 AND LGPL-3.0-or-later**; other platforms load the corresponding**LGPL-3.0-or-later** `@img/sharp-libvips-*` package.- The currently pinned source is Sharp- [`v0.34.5`](https://github.com/lovell/sharp/tree/v0.34.5), its reproducible+ [`v0.35.3`](https://github.com/lovell/sharp/tree/v0.35.3), its reproduciblepackaging scripts- [`sharp-libvips v1.2.4`](https://github.com/lovell/sharp-libvips/tree/v1.2.4),+ [`sharp-libvips v1.3.2`](https://github.com/lovell/sharp-libvips/tree/v1.3.2),and libvips- [`v8.17.3`](https://github.com/libvips/libvips/tree/v8.17.3). The unpacked+ [`v8.18.3`](https://github.com/libvips/libvips/tree/v8.18.3). The unpackednative module remains replaceable in the packaged application.+- Sharp also publishes a WebAssembly build, `@img/sharp-wasm32`, which npm+ installs on every platform because its FreeBSD and WebContainers wrappers+ declare the platform constraints. Skill Recorder never loads it and excludes it+ from every packaged artifact, so it is not distributed.- The native payload also contains libraries under MPL-2.0, MIT, BSD, ISC,fontconfig, FreeType, libpng, libtiff, zlib, and related permissive terms.The exact upstream table is distributed asdiff --git a/electron/frames/extractor.test.ts b/electron/frames/extractor.test.tsindex 122a14e..c963103 100644--- a/electron/frames/extractor.test.ts+++ b/electron/frames/extractor.test.ts@@ -1,6 +1,7 @@import assert from "node:assert/strict";import { existsSync } from "node:fs";import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";+import { createRequire } from "node:module";import { tmpdir } from "node:os";import path from "node:path";import test from "node:test";@@ -169,3 +170,21 @@ test("FrameExtractor deduplicates identical source JPEGs without deleting retainassert.equal(reloaded.manifest.length, 1);assert.equal(existsSync(path.join(framesDir, reloaded.manifest[0].file)), true);});++test("sharp loads through the app's require path as a callable factory (guards sharp 0.35 export shape)", async () => {+ // The frame extractor loads sharp with createRequire(import.meta.url)("sharp"), which+ // resolves sharp's CommonJS "require" export condition. sharp 0.35 split its import and+ // require export shapes, so this guards that the require path stays a directly-callable+ // factory exposing the .extract().jpeg() pipeline the extractor depends on.+ const requireFromHere = createRequire(import.meta.url);+ const loaded = requireFromHere("sharp") as typeof sharp;+ assert.equal(typeof loaded, "function");+ const cropped = await loaded({+ create: { width: 8, height: 8, channels: 3, background: { r: 10, g: 20, b: 30 } },+ })+ .extract({ left: 1, top: 1, width: 4, height: 4 })+ .jpeg({ quality: 88 })+ .toBuffer();+ assert.ok(cropped.length > 0);+});+diff --git a/electron/frames/extractor.ts b/electron/frames/extractor.tsindex eabefe3..43bb184 100644--- a/electron/frames/extractor.ts+++ b/electron/frames/extractor.ts@@ -18,7 +18,7 @@ const log = createLogger("Frames");const require = createRequire(import.meta.url);const execFileAsync = promisify(execFile);-type Sharp = typeof import("sharp");+type Sharp = (typeof import("sharp"))["default"];let sharpMod: Sharp | null | undefined;function sharp(): Sharp | null {if (sharpMod === undefined) {diff --git a/package-lock.json b/package-lock.jsonindex aded06f..ab5eb90 100644--- a/package-lock.json+++ b/package-lock.json@@ -15,7 +15,7 @@"koffi": "^3.1.1","react": "^19.2.5","react-dom": "^19.2.5",- "sharp": "^0.34.5",+ "sharp": "^0.35.3","zod": "^4.3.6"},"devDependencies": {@@ -308,7 +308,6 @@"dev": true,"license": "BSD-2-Clause","optional": true,- "peer": true,"dependencies": {"cross-dirname": "^0.1.0","debug": "^4.3.4",@@ -330,7 +329,6 @@"dev": true,"license": "MIT","optional": true,- "peer": true,"dependencies": {"graceful-fs": "^4.2.0","jsonfile": "^6.0.1",@@ -340,29 +338,6 @@"node": ">=14.14"}},- "node_modules/@emnapi/core": {- "version": "1.11.3",- "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",- "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",- "dev": true,- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "@emnapi/wasi-threads": "1.2.3",- "tslib": "^2.4.0"- }- },- "node_modules/@emnapi/runtime": {- "version": "1.11.3",- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",- "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",- "license": "MIT",- "optional": true,- "dependencies": {- "tslib": "^2.4.0"- }- },"node_modules/@emnapi/wasi-threads": {"version": "1.2.3","resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",@@ -370,7 +345,6 @@"dev": true,"license": "MIT","optional": true,- "peer": true,"dependencies": {"tslib": "^2.4.0"}@@ -578,9 +552,9 @@}},"node_modules/@img/sharp-darwin-arm64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",- "integrity": "sha1-bgcy3K3hJrZnCveqFwYLkmg16oY=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.3.tgz",+ "integrity": "sha1-iydAiEvFixJ/wwIEeaASlPoQlcs=","cpu": ["arm64"],@@ -590,19 +564,19 @@"darwin"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-darwin-arm64": "1.2.4"+ "@img/sharp-libvips-darwin-arm64": "1.3.2"}},"node_modules/@img/sharp-darwin-x64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",- "integrity": "sha1-Gbwd1uum1alig0mLnJ9AEYDunHs=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.3.tgz",+ "integrity": "sha1-kt+RMg+vV8xUszEYV3DVqT1RAEk=","cpu": ["x64"],@@ -612,19 +586,38 @@"darwin"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-darwin-x64": "1.2.4"+ "@img/sharp-libvips-darwin-x64": "1.3.2"+ }+ },+ "node_modules/@img/sharp-freebsd-wasm32": {+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.3.tgz",+ "integrity": "sha1-SAGME3mo9QfWgdbNjb5D2XldyAk=",+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "dependencies": {+ "@img/sharp-wasm32": "0.35.3"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"}},"node_modules/@img/sharp-libvips-darwin-arm64": {- "version": "1.2.4",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",- "integrity": "sha1-KJTAy4fUInbDiJlC6OLbUXpJLEM=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.2.tgz",+ "integrity": "sha1-IntB/8bJlhK86rpW+ZShkz13lXM=","cpu": ["arm64"],@@ -638,9 +631,9 @@}},"node_modules/@img/sharp-libvips-darwin-x64": {- "version": "1.2.4",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",- "integrity": "sha1-5jaB9FOalK+c0XJG7YiBc0OG+Mw=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.2.tgz",+ "integrity": "sha1-aUkD7EEMAJRc5bDCbayD1xhMi4Y=","cpu": ["x64"],@@ -654,9 +647,9 @@}},"node_modules/@img/sharp-libvips-linux-arm": {- "version": "1.2.4",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",- "integrity": "sha1-uSYN0evm+eO9vL3KydKsEl81hS0=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.2.tgz",+ "integrity": "sha1-5g4IjIBr3hrCi+ZItgw0ZfQcGKc=","cpu": ["arm"],@@ -670,9 +663,9 @@}},"node_modules/@img/sharp-libvips-linux-arm64": {- "version": "1.2.4",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",- "integrity": "sha1-sbKIs2hks7zlRa2R+m2tzxpK0xg=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.2.tgz",+ "integrity": "sha1-Sd3xVnKGZqId7tBxbzu3K7NRF54=","cpu": ["arm64"],@@ -686,9 +679,9 @@}},"node_modules/@img/sharp-libvips-linux-ppc64": {- "version": "1.2.4",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz",- "integrity": "sha1-S4Ps8qgpBXIis4hIx7Ai57TQeqc=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.2.tgz",+ "integrity": "sha1-vjFhqv1llBez4mN037vNLaK/tiw=","cpu": ["ppc64"],@@ -702,9 +695,9 @@}},"node_modules/@img/sharp-libvips-linux-riscv64": {- "version": "1.2.4",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz",- "integrity": "sha1-iAtGeACeWiCArxkjMrALCq+KSN4=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.2.tgz",+ "integrity": "sha1-vwCKZ3nZvitWpN9nt1OUH3Z8lX0=","cpu": ["riscv64"],@@ -718,9 +711,9 @@}},"node_modules/@img/sharp-libvips-linux-s390x": {- "version": "1.2.4",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz",- "integrity": "sha1-dPNDyOEPrYIbOPdc7TBIiTncWew=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.2.tgz",+ "integrity": "sha1-lYOBS421iInIW62eXgt4JSV/85Q=","cpu": ["s390x"],@@ -734,9 +727,9 @@}},"node_modules/@img/sharp-libvips-linux-x64": {- "version": "1.2.4",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",- "integrity": "sha1-30GD6L2EEPfWG2aFmjXt6rClMc4=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.2.tgz",+ "integrity": "sha1-q8mjEUSVtwW6ILfBVoue7NYq67s=","cpu": ["x64"],@@ -750,9 +743,9 @@}},"node_modules/@img/sharp-libvips-linuxmusl-arm64": {- "version": "1.2.4",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz",- "integrity": "sha1-yNa0ghHfZxN1QQB+6NG3sfjKjgY=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.2.tgz",+ "integrity": "sha1-5Y+xSnh58V2ecKmChw84TzmoMqI=","cpu": ["arm64"],@@ -766,9 +759,9 @@}},"node_modules/@img/sharp-libvips-linuxmusl-x64": {- "version": "1.2.4",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",- "integrity": "sha1-vhHHW+5bCAy+4xoVOod5RI+Rn3U=",+ "version": "1.3.2",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.2.tgz",+ "integrity": "sha1-VhFID8t0Zd1TFgRNtTrXqEPtSvg=","cpu": ["x64"],@@ -782,9 +775,9 @@}},"node_modules/@img/sharp-linux-arm": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz",- "integrity": "sha1-X7DDaV3RJSLTnD/3pryBZGF4Cg0=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.3.tgz",+ "integrity": "sha1-yNpQDEAWiTqJ1G6YMtCKBu73fyc=","cpu": ["arm"],@@ -794,19 +787,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-arm": "1.2.4"+ "@img/sharp-libvips-linux-arm": "1.3.2"}},"node_modules/@img/sharp-linux-arm64": {- "version": "0.34.5",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz",- "integrity": "sha1-eqd2TvnAAfFeYQVG1C/OVpEXkMw=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.3.tgz",+ "integrity": "sha1-RLZYI+zJd9RYWzCAcP/zlHJW3gQ=","cpu": ["arm64"],@@ -816,19 +809,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-arm64": "1.2.4"+ "@img/sharp-libvips-linux-arm64": "1.3.2"}},"node_modules/@img/sharp-linux-ppc64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz",- "integrity": "sha1-nCE6gVIKIMr2aXjz1MB0Vv8uCBM=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.3.tgz",+ "integrity": "sha1-6h19uBj1KvHh4FfoLVXyOy3jhkw=","cpu": ["ppc64"],@@ -838,19 +831,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-ppc64": "1.2.4"+ "@img/sharp-libvips-linux-ppc64": "1.3.2"}},"node_modules/@img/sharp-linux-riscv64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz",- "integrity": "sha1-zdKBgndOrb4E9iZ1oWqrvMuDP2A=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.3.tgz",+ "integrity": "sha1-civXmUZYeRsC0QN+oJyly3gDDY0=","cpu": ["riscv64"],@@ -860,19 +853,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-riscv64": "1.2.4"+ "@img/sharp-libvips-linux-riscv64": "1.3.2"}},"node_modules/@img/sharp-linux-s390x": {- "version": "0.34.5",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz",- "integrity": "sha1-k+rGAbnzKbsnkX4OGQmMci1jDfc=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.3.tgz",+ "integrity": "sha1-6ClIF9faSVVBpKhw9W5rXQ+GQ80=","cpu": ["s390x"],@@ -882,19 +875,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-s390x": "1.2.4"+ "@img/sharp-libvips-linux-s390x": "1.3.2"}},"node_modules/@img/sharp-linux-x64": {- "version": "0.34.5",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",- "integrity": "sha1-VavHzXVP/KUAK2wrcZq9/IRoGag=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.3.tgz",+ "integrity": "sha1-mEPDLzmurEtg3WD540FlIKTk3kY=","cpu": ["x64"],@@ -904,19 +897,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linux-x64": "1.2.4"+ "@img/sharp-libvips-linux-x64": "1.3.2"}},"node_modules/@img/sharp-linuxmusl-arm64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz",- "integrity": "sha1-1lFe6XG7YvcwAaSCm52GWhG3cIY=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.3.tgz",+ "integrity": "sha1-nP7k7MPUGrmidOAZ3+e0BihAUQw=","cpu": ["arm64"],@@ -926,19 +919,19 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.2"}},"node_modules/@img/sharp-linuxmusl-x64": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",- "integrity": "sha1-2Xl4rsfFIS+ZlxTy9bc2RX4S7p8=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.3.tgz",+ "integrity": "sha1-IE0GeMjDsVMA2aJuy5wNzaEcpd4=","cpu": ["x64"],@@ -948,38 +941,54 @@"linux"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-libvips-linuxmusl-x64": "1.2.4"+ "@img/sharp-libvips-linuxmusl-x64": "1.3.2"}},"node_modules/@img/sharp-wasm32": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz",- "integrity": "sha1-LxWAOqYm+MWd18nQu8dm8atSz6A=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-wasm32/-/sharp-wasm32-0.35.3.tgz",+ "integrity": "sha1-QviXm9vhpUGi6bmdO1vgfmtxx8A=",+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/runtime": "^1.11.1"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-webcontainers-wasm32": {+ "version": "0.35.3",+ "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.3.tgz",+ "integrity": "sha1-gjqqk9FNuEmZ1bXcln/1bPGWbZ8=","cpu": ["wasm32"],- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "@emnapi/runtime": "^1.7.0"+ "@img/sharp-wasm32": "0.35.3"},"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"}},"node_modules/@img/sharp-win32-arm64": {- "version": "0.34.5",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz",- "integrity": "sha1-Nwbp46w1/d/ByH+U6Enxt1MHzgo=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.3.tgz",+ "integrity": "sha1-81VNRcviRTKgrepzbsV2WPdKKRE=","cpu": ["arm64"],@@ -989,16 +998,16 @@"win32"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"}},"node_modules/@img/sharp-win32-ia32": {- "version": "0.34.5",- "resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz",- "integrity": "sha1-C3EWZZmwSeAy8IX7kmPgL05HiN4=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.3.tgz",+ "integrity": "sha1-CUKyZDvLV+SEGf5BGd6EB4rgrHQ=","cpu": ["ia32"],@@ -1008,16 +1017,16 @@"win32"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": "^20.9.0"},"funding": {"url": "https://opencollective.com/libvips"}},"node_modules/@img/sharp-win32-x64": {- "version": "0.34.5",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz",- "integrity": "sha1-qB/7AOaSZ80KHWJurtuKhDCysvg=",+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.3.tgz",+ "integrity": "sha1-iiXKzcdajCYHfAf7pR6AVqrkdPE=","cpu": ["x64"],@@ -1027,7 +1036,7 @@"win32"],"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"@@ -2100,6 +2109,7 @@"integrity": "sha1-3MrDZbqg8XNOwnD/S1HIlGXo3H8=","dev": true,"license": "MIT",+ "peer": true,"dependencies": {"csstype": "^3.2.2"}@@ -3011,6 +3021,7 @@"resolved": "https://ms-feed-2.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/bare-events/-/bare-events-2.9.1.tgz","integrity": "sha1-XIZhaWY0O8sDobMVX+qyU+rb80k=","license": "Apache-2.0",+ "peer": true,"peerDependencies": {"bare-abort-controller": "*"},@@ -3620,8 +3631,7 @@"integrity": "sha1-uJlZnzClOJ9Z54wVDhn5V60Wo3w=","dev": true,"license": "MIT",- "optional": true,- "peer": true+ "optional": true},"node_modules/cross-spawn": {"version": "7.0.6",@@ -3836,6 +3846,7 @@"integrity": "sha1-PQy/HT3GumvxmDaOW9rPGnNLYPw=","dev": true,"license": "MIT",+ "peer": true,"dependencies": {"app-builder-lib": "26.15.6","builder-util": "26.15.3",@@ -4035,7 +4046,6 @@"dev": true,"hasInstallScript": true,"license": "MIT",- "peer": true,"dependencies": {"@electron/asar": "^3.2.1","debug": "^4.1.1",@@ -4056,7 +4066,6 @@"integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=","dev": true,"license": "MIT",- "peer": true,"dependencies": {"graceful-fs": "^4.1.2","jsonfile": "^4.0.0",@@ -4072,7 +4081,6 @@"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=","dev": true,"license": "MIT",- "peer": true,"optionalDependencies": {"graceful-fs": "^4.1.6"}@@ -4083,7 +4091,6 @@"integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=","dev": true,"license": "MIT",- "peer": true,"engines": {"node": ">= 4.0.0"}@@ -4111,16 +4118,6 @@"integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=","license": "MIT"},- "node_modules/encoding": {- "version": "0.1.13",- "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/encoding/-/encoding-0.1.13.tgz",- "integrity": "sha1-VldK/deR9UqOmyeFwFgqLSYhD6k=",- "license": "MIT",- "optional": true,- "dependencies": {- "iconv-lite": "^0.6.2"- }- },"node_modules/end-of-stream": {"version": "1.4.5","resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/end-of-stream/-/end-of-stream-1.4.5.tgz",@@ -5945,7 +5942,6 @@"integrity": "sha1-fe8D0kMtyuS6HWEURcSDlgYiVfY=","dev": true,"license": "MIT",- "peer": true,"dependencies": {"minimist": "^1.2.6"},@@ -6427,6 +6423,7 @@"integrity": "sha1-UepXoX2G9gX4EDlZX7xA7QalX6s=","dev": true,"license": "MIT",+ "peer": true,"engines": {"node": ">=12"},@@ -6534,7 +6531,6 @@"dev": true,"license": "MIT","optional": true,- "peer": true,"dependencies": {"commander": "^9.4.0"},@@ -6552,7 +6548,6 @@"dev": true,"license": "MIT","optional": true,- "peer": true,"engines": {"node": "^12.20.0 || >=14"}@@ -6707,6 +6702,7 @@"resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/react/-/react-19.2.7.tgz","integrity": "sha1-H0ehv8BvjsiFdSxvSvFDaan4Jgs=","license": "MIT",+ "peer": true,"engines": {"node": ">=0.10.0"}@@ -7017,47 +7013,52 @@"optional": true},"node_modules/sharp": {- "version": "0.34.5",- "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sharp/-/sharp-0.34.5.tgz",- "integrity": "sha1-tvFI5LjGHxeXveEanRz+u64sV7A=",- "hasInstallScript": true,+ "version": "0.35.3",+ "resolved": "https://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/sharp/-/sharp-0.35.3.tgz",+ "integrity": "sha1-Qe0hpGQGvhY+rNC+ezZLQvzyiF8=","license": "Apache-2.0","dependencies": {- "@img/colour": "^1.0.0",+ "@img/colour": "^1.1.0","detect-libc": "^2.1.2",- "semver": "^7.7.3"+ "semver": "^7.8.5"},"engines": {- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ "node": ">=20.9.0"},"funding": {"url": "https://opencollective.com/libvips"},"optionalDependencies": {- "@img/sharp-darwin-arm64": "0.34.5",- "@img/sharp-darwin-x64": "0.34.5",- "@img/sharp-libvips-darwin-arm64": "1.2.4",- "@img/sharp-libvips-darwin-x64": "1.2.4",- "@img/sharp-libvips-linux-arm": "1.2.4",- "@img/sharp-libvips-linux-arm64": "1.2.4",- "@img/sharp-libvips-linux-ppc64": "1.2.4",- "@img/sharp-libvips-linux-riscv64": "1.2.4",- "@img/sharp-libvips-linux-s390x": "1.2.4",- "@img/sharp-libvips-linux-x64": "1.2.4",- "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",- "@img/sharp-libvips-linuxmusl-x64": "1.2.4",- "@img/sharp-linux-arm": "0.34.5",- "@img/sharp-linux-arm64": "0.34.5",- "@img/sharp-linux-ppc64": "0.34.5",- "@img/sharp-linux-riscv64": "0.34.5",- "@img/sharp-linux-s390x": "0.34.5",- "@img/sharp-linux-x64": "0.34.5",- "@img/sharp-linuxmusl-arm64": "0.34.5",- "@img/sharp-linuxmusl-x64": "0.34.5",- "@img/sharp-wasm32": "0.34.5",- "@img/sharp-win32-arm64": "0.34.5",- "@img/sharp-win32-ia32": "0.34.5",- "@img/sharp-win32-x64": "0.34.5"+ "@img/sharp-darwin-arm64": "0.35.3",+ "@img/sharp-darwin-x64": "0.35.3",+ "@img/sharp-freebsd-wasm32": "0.35.3",+ "@img/sharp-libvips-darwin-arm64": "1.3.2",+ "@img/sharp-libvips-darwin-x64": "1.3.2",+ "@img/sharp-libvips-linux-arm": "1.3.2",+ "@img/sharp-libvips-linux-arm64": "1.3.2",+ "@img/sharp-libvips-linux-ppc64": "1.3.2",+ "@img/sharp-libvips-linux-riscv64": "1.3.2",+ "@img/sharp-libvips-linux-s390x": "1.3.2",+ "@img/sharp-libvips-linux-x64": "1.3.2",+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.2",+ "@img/sharp-libvips-linuxmusl-x64": "1.3.2",+ "@img/sharp-linux-arm": "0.35.3",+ "@img/sharp-linux-arm64": "0.35.3",+ "@img/sharp-linux-ppc64": "0.35.3",+ "@img/sharp-linux-riscv64": "0.35.3",+ "@img/sharp-linux-s390x": "0.35.3",+ "@img/sharp-linux-x64": "0.35.3",+ "@img/sharp-linuxmusl-arm64": "0.35.3",+ "@img/sharp-linuxmusl-x64": "0.35.3",+ "@img/sharp-webcontainers-wasm32": "0.35.3",+ "@img/sharp-win32-arm64": "0.35.3",+ "@img/sharp-win32-ia32": "0.35.3",+ "@img/sharp-win32-x64": "0.35.3"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }}},"node_modules/shebang-command": {@@ -7356,7 +7357,6 @@"integrity": "sha1-zSCoWAy2NjXQ5OnUvZidRChudiA=","dev": true,"license": "MIT",- "peer": true,"dependencies": {"mkdirp": "^0.5.1","rimraf": "~2.6.2"@@ -7383,7 +7383,6 @@"deprecated": "Rimraf versions prior to v4 are no longer supported","dev": true,"license": "ISC",- "peer": true,"dependencies": {"glob": "^7.1.3"},@@ -7636,6 +7635,7 @@"integrity": "sha1-zP/OPuSHsYhiI7JOuye5FnSCfTA=","dev": true,"license": "MIT",+ "peer": true,"dependencies": {"lightningcss": "^1.32.0","picomatch": "^4.0.5",diff --git a/package.json b/package.jsonindex 6a0f5b5..a6e7ff6 100644--- a/package.json+++ b/package.json@@ -20,6 +20,7 @@"eval:skill": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs evals/skillbuilder/run.ts","compliance:licenses": "node scripts/prepare-compliance.mjs --licenses-only","compliance:prepare": "node scripts/prepare-compliance.mjs",+ "compliance:review": "node scripts/review-compliance-sources.mjs","compliance:test": "node --test scripts/compliance.test.mjs","dist": "npm run compliance:prepare && node scripts/assert-generic-dist-platform.mjs && vite build && electron-builder --publish never","dist:win:x64": "npm run compliance:prepare && node scripts/assert-native-windows-arch.mjs x64 && vite build && electron-builder --config.npmRebuild=false --publish never --win nsis --x64",@@ -35,7 +36,7 @@"koffi": "^3.1.1","react": "^19.2.5","react-dom": "^19.2.5",- "sharp": "^0.34.5",+ "sharp": "^0.35.3","zod": "^4.3.6"},"optionalDependencies": {@@ -58,6 +59,7 @@"overrides": {"adm-zip": "$adm-zip","fast-uri": "^3.1.4",+ "sharp": "$sharp","tar": "^7.5.21"},"build": {@@ -73,7 +75,10 @@"dist-electron/**","package.json","LICENSE",- "THIRD-PARTY-NOTICES.md"+ "THIRD-PARTY-NOTICES.md",+ "!node_modules/@img/sharp-wasm32/**",+ "!node_modules/@img/sharp-freebsd-wasm32/**",+ "!node_modules/@img/sharp-webcontainers-wasm32/**"],"extraResources": [{@@ -112,17 +117,14 @@"package.json","LICENSE","THIRD-PARTY-NOTICES.md",- "!node_modules/get-windows/**"+ "!node_modules/get-windows/**",+ "!node_modules/@img/sharp-wasm32/**",+ "!node_modules/@img/sharp-freebsd-wasm32/**",+ "!node_modules/@img/sharp-webcontainers-wasm32/**"],"target": "nsis","artifactName": "${productName}-${version}-windows-${arch}.${ext}"},- "linux": {- "target": [- "AppImage"- ],- "category": "Development"- },"compression": "normal","nsis": {"oneClick": false,diff --git a/scripts/assert-generic-dist-platform.mjs b/scripts/assert-generic-dist-platform.mjsindex 2993f6b..e207ad0 100644--- a/scripts/assert-generic-dist-platform.mjs+++ b/scripts/assert-generic-dist-platform.mjs@@ -3,3 +3,15 @@ if (process.platform === "win32") {`Use npm run dist:win:${process.arch} on Windows so Electron and native optional dependencies have the same architecture.`,);}++if (process.platform !== "darwin") {+ throw new Error(+ `${process.platform} is not a supported release target. Supported targets are Windows x64, Windows arm64, and macOS arm64; other platforms install from source (see INSTALL.md).`,+ );+}++if (process.arch !== "arm64") {+ throw new Error(+ `macOS ${process.arch} is not a supported release target; only macOS arm64 is distributed.`,+ );+}diff --git a/scripts/compliance.mjs b/scripts/compliance.mjsindex fc8daff..8c5f019 100644--- a/scripts/compliance.mjs+++ b/scripts/compliance.mjs@@ -90,6 +90,81 @@ export const legalTextSpecs = [},];+/**+ * Sharp ships a WebAssembly build that npm installs on every platform because+ * `@img/sharp-wasm32` itself declares no `os`/`cpu`; only its `freebsd`/`webcontainers`+ * wrappers do. It is never loaded by the packaged application, so it is excluded from+ * every Electron artifact instead of receiving static-LGPL treatment.+ */+export const excludedWasmPackages = [+ "@img/sharp-wasm32",+ "@img/sharp-freebsd-wasm32",+ "@img/sharp-webcontainers-wasm32",+];++/**+ * The single native payload that is actually packaged for each platform. Windows links+ * libvips into `@img/sharp-win32-*`; every other platform loads a separate+ * `@img/sharp-libvips-*` package, which is the only one carrying `versions.json` and the+ * upstream third-party notices.+ */+export const nativePayloadCandidates = {+ "win32-x64": ["@img/sharp-win32-x64"],+ "win32-arm64": ["@img/sharp-win32-arm64"],+ "darwin-x64": ["@img/sharp-libvips-darwin-x64"],+ "darwin-arm64": ["@img/sharp-libvips-darwin-arm64"],+ "linux-x64": ["@img/sharp-libvips-linux-x64", "@img/sharp-libvips-linuxmusl-x64"],+ "linux-arm64": ["@img/sharp-libvips-linux-arm64", "@img/sharp-libvips-linuxmusl-arm64"],+};++/** Targets that may produce a redistributable artifact and must pass full source preparation. */+export const releaseTargets = ["win32-x64", "win32-arm64", "darwin-arm64"];++/**+ * npm does not persist the `libc` field into `package-lock.json`, so `npm ci` installs both+ * the glibc and musl Linux payloads regardless of the host. Their manifests are identical,+ * but only one is loadable, so the running C library decides which one is authoritative.+ */+export function detectLinuxLibc(report = process.report) {+ const glibcVersion = report?.getReport?.()?.header?.glibcVersionRuntime;+ return typeof glibcVersion === "string" && glibcVersion.length > 0 ? "glibc" : "musl";+}++const nativeBinaryPattern = /\.(?:node|dll|dylib|so(?:\.\d+)*)$/;++/** Manifest tokens such as `732665c` or `0826579` identify a Git commit, not a release. */+export function isCommitToken(version) {+ return /^[0-9a-f]{7,40}$/.test(String(version ?? ""));+}++export function resolveReviewedCommit(component, version, sourceCommits) {+ const key = `${component}@${version}`;+ const resolved = sourceCommits?.[key];+ if (!/^[0-9a-f]{40}$/.test(resolved ?? "")) {+ throw new Error(+ `Sharp native component ${key} is identified by an abbreviated Git commit with no ` ++ "reviewed 40-character upstream commit. Add it to sourceCommits in " ++ "third_party/compliance-policy.json.",+ );+ }+ if (!resolved.startsWith(version)) {+ throw new Error(+ `Reviewed commit ${resolved} for ${key} does not extend the manifest token ${version}.`,+ );+ }+ return resolved;+}++function gitArchiveSpec(name, gitRepository, commitWebBase, gitRevision) {+ return {+ fileName: `${name}-${gitRevision}.tar`,+ url: `${commitWebBase}/${gitRevision}`,+ gitRepository,+ gitRevision,+ archivePrefix: `${name}-${gitRevision}/`,+ };+}+const sourceBuilders = {aom: (version) => ({fileName: `libaom-${version}.tar.gz`,@@ -161,10 +236,18 @@ const sourceBuilders = {fileName: `lcms2-${version}.tar.gz`,url: `https://github.com/mm2/Little-CMS/releases/download/lcms${version}/lcms2-${version}.tar.gz`,}),- mozjpeg: (version) => ({- fileName: `mozjpeg-${version}.tar.gz`,- url: `https://github.com/mozilla/mozjpeg/archive/${version}.tar.gz`,- }),+ mozjpeg: (version, context) =>+ isCommitToken(version)+ ? gitArchiveSpec(+ "mozjpeg",+ "https://github.com/mozilla/mozjpeg.git",+ "https://github.com/mozilla/mozjpeg/commit",+ context.commit("mozjpeg", version),+ )+ : {+ fileName: `mozjpeg-${version}.tar.gz`,+ url: `https://github.com/mozilla/mozjpeg/archive/${version}.tar.gz`,+ },pango: (version) => ({fileName: `pango-${version}.tar.xz`,url:@@ -193,10 +276,30 @@ const sourceBuilders = {fileName: `libspng-${version}.tar.gz`,url: `https://github.com/randy408/libspng/archive/refs/tags/v${version}.tar.gz`,}),- tiff: (version) => ({- fileName: `libtiff-${version}.tar.gz`,- url: `https://download.osgeo.org/libtiff/tiff-${version}.tar.gz`,- }),+ tiff: (version, context) =>+ isCommitToken(version)+ ? gitArchiveSpec(+ "libtiff",+ "https://gitlab.com/libtiff/libtiff.git",+ "https://gitlab.com/libtiff/libtiff/-/commit",+ context.commit("tiff", version),+ )+ : {+ fileName: `libtiff-${version}.tar.gz`,+ url: `https://download.osgeo.org/libtiff/tiff-${version}.tar.gz`,+ },+ uhdr: (version, context) =>+ isCommitToken(version)+ ? gitArchiveSpec(+ "libultrahdr",+ "https://github.com/google/libultrahdr.git",+ "https://github.com/google/libultrahdr/commit",+ context.commit("uhdr", version),+ )+ : {+ fileName: `libultrahdr-${version}.tar.gz`,+ url: `https://github.com/google/libultrahdr/archive/refs/tags/v${version}.tar.gz`,+ },vips: (version) => ({fileName: `vips-${version}.tar.xz`,url: `https://github.com/libvips/libvips/releases/download/v${version}/vips-${version}.tar.xz`,@@ -295,17 +398,32 @@ export function buildNativeSourceSpecs(sharpLibvipsVersion,electronVersion,ffmpegRevision,+ sourceCommits,},) {+ const context = {+ commit: (component, version) => resolveReviewedCommit(component, version, sourceCommits),+ };const specs = [];- for (const [name, builder] of Object.entries(sourceBuilders)) {- const version = versions[name];- if (!version) throw new Error(`Sharp native payload does not identify a ${name} version.`);+ // Only the components actually present in the selected payload's versions.json are+ // required, and every one of them must have a reviewed source builder.+ for (const [name, version] of Object.entries(versions ?? {})) {+ const builder = sourceBuilders[name];+ if (!builder) {+ throw new Error(+ `Sharp native payload component "${name}" (${version}) has no reviewed source ` ++ "builder. Review its upstream source and add one to scripts/compliance.mjs.",+ );+ }+ if (!version) {+ throw new Error(`Sharp native payload does not identify a ${name} version.`);+ }specs.push({- id: `sharp-native-${name}`,+ id: `sharp-native-${name}@${version}`,+ component: name,version,reason: "Source and license material for the Sharp/libvips native payload.",- ...builder(version),+ ...builder(version, context),});}@@ -360,6 +478,8 @@ export function buildNativeSourceSpecs();if (platform === "win32") {+ // The Windows payload is repackaged from a libvips/build-win64-mxe release, whose+ // build scripts and every applied patch live inside this archive.specs.push({id: "libvips-windows-build",version: versions.vips,@@ -369,56 +489,51 @@ export function buildNativeSourceSpecs(`v${versions.vips}.tar.gz`,reason: "Windows build scripts and patches for the libvips payload.",});+ } else {+ // Patches that sharp-libvips fetches from outside its own repository while building+ // the POSIX payload. Windows applies its patches from the in-repo archive above.+ specs.push(+ {+ id: "sharp-patch-glib-without-gregex",+ version: "bdad5489a61c217850631571caf57f5db6ea8b2c",+ fileName: "glib-without-gregex.patch",+ url:+ "https://gist.github.com/kleisauke/284d685efa00908da99ea6afbaaf39ae/raw/" ++ "bdad5489a61c217850631571caf57f5db6ea8b2c/glib-without-gregex.patch",+ reason: "Patch applied by the Sharp/libvips POSIX build.",+ },+ {+ id: "sharp-patch-mozjpeg-simd-fdct",+ version: "f90668e0e4fb79c81e1f24a0ccc0e2090af761bf",+ fileName: "mozjpeg-saturating-simd-fdct.patch",+ url:+ "https://github.com/mozilla/mozjpeg/commit/" ++ "f90668e0e4fb79c81e1f24a0ccc0e2090af761bf.patch",+ reason: "Patch applied by the Sharp/libvips POSIX build.",+ },+ {+ // sharp-libvips fetches this as the mutable pull/383.patch; it is pinned here to+ // the pull request's single immutable commit.+ id: "sharp-patch-uhdr-platform-detection",+ version: "e2daed8da97d8857dcec2fd68d2f6f3326170f67",+ fileName: "libultrahdr-remove-platform-detection.patch",+ url:+ "https://github.com/google/libultrahdr/commit/" ++ "e2daed8da97d8857dcec2fd68d2f6f3326170f67.patch",+ reason: "Patch applied by the Sharp/libvips POSIX build.",+ },+ {+ id: "sharp-patch-libvips-soversion",+ version: "3988223c7dfa4d22745d9392034b0117abef1446",+ fileName: "libvips-cpp-soversion.patch",+ url:+ "https://gist.githubusercontent.com/lovell/313a6901e9db1bf285f2a1f1180499e4/raw/" ++ "3988223c7dfa4d22745d9392034b0117abef1446/libvips-cpp-soversion.patch",+ reason: "Patch applied by the Sharp/libvips POSIX build.",+ },+ );}- specs.push(- {- id: "sharp-patch-glib-without-gregex",- version: "bdad5489a61c217850631571caf57f5db6ea8b2c",- fileName: "glib-without-gregex.patch",- url:- "https://gist.github.com/kleisauke/284d685efa00908da99ea6afbaaf39ae/raw/" +- "bdad5489a61c217850631571caf57f5db6ea8b2c/glib-without-gregex.patch",- reason: "Patch applied by the Sharp/libvips build.",- },- {- id: "sharp-patch-aom",- version: "6d2b7f71b98bfa28e372b1f2d85f137280bdb3de",- fileName: "aom-mxe-nasm.patch",- url:- "https://github.com/m-ab-s/aom/commit/" +- "6d2b7f71b98bfa28e372b1f2d85f137280bdb3de.patch",- reason: "Patch applied by the Sharp/libvips build.",- },- {- id: "sharp-patch-highway",- version: "ad48f2bf298bac247288c8399a5c0e9a40ed8246",- fileName: "highway-gcc-sve.patch",- url:- "https://github.com/google/highway/commit/" +- "ad48f2bf298bac247288c8399a5c0e9a40ed8246.patch",- reason: "Patch applied by the Sharp/libvips build.",- },- {- id: "sharp-patch-libvips-soversion",- version: "3988223c7dfa4d22745d9392034b0117abef1446",- fileName: "libvips-cpp-soversion.patch",- url:- "https://gist.githubusercontent.com/lovell/313a6901e9db1bf285f2a1f1180499e4/raw/" +- "3988223c7dfa4d22745d9392034b0117abef1446/libvips-cpp-soversion.patch",- reason: "Patch applied by the Sharp/libvips build.",- },- {- id: "sharp-patch-libvips-heif",- version: versions.vips,- fileName: "libvips-heifsave-disable-hbr-support.patch",- url:- "https://raw.githubusercontent.com/libvips/build-win64-mxe/" +- `v${versions.vips}/build/patches/vips-8-heifsave-disable-hbr-support.patch`,- reason: "Patch applied by the Sharp/libvips build.",- },- );-return specs.sort((a, b) => a.id.localeCompare(b.id));}@@ -432,6 +547,15 @@ export async function prepareCompliance({const policy = readJson(path.join(rootDir, "third_party", "compliance-policy.json"));const lock = readJson(path.join(rootDir, "package-lock.json"));+ const manifest = readJson(path.join(rootDir, "package.json"));+ const target = `${process.platform}-${process.arch}`;+ assertWasmExcludedFromPackaging(manifest.build);+ if (includeSources && !releaseTargets.includes(target)) {+ throw new Error(+ `${target} is not a supported release target (${releaseTargets.join(", ")}). Run ` ++ "compliance:licenses instead of preparing a redistributable bundle.",+ );+ }const packages = collectProductionPackages(rootDir, lock);validateReviewedVersions(packages, lock, policy);await removeStalePartialFiles(path.join(rootDir, ".compliance-cache"));@@ -462,16 +586,21 @@ export async function prepareCompliance({unresolved: [],});- const native = collectNativeComponents(packages);+ const native = collectNativeComponents(packages, lock, {+ platform: process.platform,+ arch: process.arch,+ });await writeFile(path.join(outputDir, "NATIVE-THIRD-PARTY-NOTICES.md"),native.notices,"utf8",);await writeJson(path.join(outputDir, "NATIVE-COMPONENTS.json"), {- schemaVersion: 1,+ schemaVersion: 2,platform: process.platform,architecture: process.arch,+ releaseTarget: releaseTargets.includes(target),+ excludedFromArtifacts: excludedWasmPackages,packages: native.packages,versions: native.versions,});@@ -590,6 +719,7 @@ export async function verifyComplianceDirectory(sharpLibvipsVersion: policy.sharpLibvips.version,electronVersion: policy.electron.version,ffmpegRevision: policy.electron.ffmpegRevision,+ sourceCommits: policy.sourceCommits,});assertExactManifestIds(sources.sources,@@ -769,6 +899,12 @@ function buildLicenseInventory(rootDir, packages, policy) {return packages.map((pkg) => {const files = findPackageLicenseFiles(pkg.directory);+ // Sharp's platform packages declare compound SPDX expressions but ship at most the+ // permissive half, so they are resolved term by term before the file-based path.+ if (pkg.name.startsWith("@img/sharp-")) {+ return reviewedSharpLicenseEntry(pkg, policy, files);+ }+if (files.length > 0) {return {name: pkg.name,@@ -811,10 +947,6 @@ function buildLicenseInventory(rootDir, packages, policy) {);}- if (pkg.name.startsWith("@img/sharp-libvips-")) {- return reviewedSharpLibvipsLicenseEntry(pkg, policy);- }-if (pkg.name.startsWith("onnxruntime-")) {onnxRefForVersion(pkg.version, policy);return overrideEntry(@@ -836,30 +968,109 @@ function buildLicenseInventory(rootDir, packages, policy) {});}-export function reviewedSharpLibvipsLicenseEntry(pkg, policy) {- if (pkg.version !== policy.sharpLibvips.version) {- throw new Error(`No reviewed Sharp/libvips license override exists for ${pkg.version}.`);- }- if (pkg.license !== "LGPL-3.0-or-later") {+/** Splits an SPDX expression such as `A AND B AND C` into its individual terms. */+export function splitSpdxAnd(license) {+ const expression = String(license ?? "").trim().replace(/^\((.*)\)$/s, "$1");+ return expression+ .split(/\s+AND\s+/)+ .map((term) => term.trim())+ .filter(Boolean);+}++const lgplPointerText = [+ "This platform package contains the libvips runtime under LGPL-3.0-or-later.",+ "The complete canonical LGPL-3.0 text accompanies the generated compliance",+ "bundle at licenses/LGPL-3.0.txt. Native dependency notices and corresponding",+ "source are identified separately in the same bundle.",+].join("\n");++const canonicalMitText = [+ "MIT License",+ "",+ "Permission is hereby granted, free of charge, to any person obtaining a copy",+ 'of this software and associated documentation files (the "Software"), to deal',+ "in the Software without restriction, including without limitation the rights",+ "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",+ "copies of the Software, and to permit persons to whom the Software is",+ "furnished to do so, subject to the following conditions:",+ "",+ "The above copyright notice and this permission notice shall be included in all",+ "copies or substantial portions of the Software.",+ "",+ 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR',+ "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",+ "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",+ "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",+ "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",+ "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",+ "SOFTWARE.",+].join("\n");++/**+ * Resolves every term of a Sharp platform package's SPDX expression to concrete license+ * text, failing closed when a declared term has no reviewed material.+ */+export function reviewedSharpLicenseEntry(pkg, policy, files = []) {+ const isLibvips = pkg.name.startsWith("@img/sharp-libvips");+ const expectedVersion = isLibvips ? policy.sharpLibvips.version : policy.sharp;+ if (pkg.version !== expectedVersion) {throw new Error(- `${pkg.name}@${pkg.version} has unexpected license metadata: ${pkg.license}.`,+ isLibvips+ ? `No reviewed Sharp/libvips license override exists for ${pkg.version}.`+ : `No reviewed Sharp license override exists for ${pkg.name}@${pkg.version}.`,);}++ const terms = splitSpdxAnd(pkg.license);+ if (terms.length === 0) {+ throw new Error(`${pkg.name}@${pkg.version} declares no license metadata.`);+ }++ const shipped = files.map((file) => ({+ file,+ text: readFileSync(path.join(pkg.directory, ...file.split("/")), "utf8").trim(),+ }));+ const sections = [];+ const sources = [];++ for (const term of terms) {+ if (term === "Apache-2.0") {+ const match = shipped.find(({ text }) => text.includes("Apache License"));+ if (!match) {+ throw new Error(+ `${pkg.name}@${pkg.version} declares Apache-2.0 but ships no Apache license text.`,+ );+ }+ sections.push(`----- Apache-2.0 (${match.file}) -----\n${match.text}`);+ sources.push(match.file);+ } else if (term === "LGPL-3.0-or-later") {+ sections.push(lgplPointerText);+ sources.push("licenses/LGPL-3.0.txt");+ } else if (term === "MIT") {+ sections.push(`----- MIT -----\n${canonicalMitText}`);+ sources.push("canonical SPDX MIT text");+ } else {+ throw new Error(+ `${pkg.name}@${pkg.version} has unexpected license metadata: ${pkg.license}.`,+ );+ }+ }+return {name: pkg.name,version: pkg.version,license: pkg.license,packagePath: pkg.lockPath,- licenseSource: "licenses/LGPL-3.0.txt",- text: [- "This platform package contains the libvips runtime under LGPL-3.0-or-later.",- "The complete canonical LGPL-3.0 text accompanies the generated compliance",- "bundle at licenses/LGPL-3.0.txt. Native dependency notices and corresponding",- "source are identified separately in the same bundle.",- ].join("\n"),+ licenseSource: sources.join(", "),+ text: sections.join("\n\n"),};}+/** @deprecated Retained as the libvips-specific entry point into {@link reviewedSharpLicenseEntry}. */+export function reviewedSharpLibvipsLicenseEntry(pkg, policy, files = []) {+ return reviewedSharpLicenseEntry(pkg, policy, files);+}+function overrideEntry(pkg, file) {if (!existsSync(file)) throw new Error(`Missing reviewed license override ${file}.`);return {@@ -912,50 +1123,147 @@ function renderLicenseInventory(inventory, lock, rootDir) {].join("\n");}-function collectNativeComponents(packages) {- const candidates = packages.filter(+/**+ * Selects the one native payload package that is actually packaged for a platform and+ * architecture, and fails closed on anything unexpected.+ */+export function selectNativePayload(+ packages,+ { platform = process.platform, arch = process.arch, libc } = {},+) {+ const target = `${platform}-${arch}`;+ const expected = nativePayloadCandidates[target];+ if (!expected) {+ throw new Error(+ `${target} is not a reviewed Sharp native platform. Add it to nativePayloadCandidates ` ++ "or remove it as a distribution target.",+ );+ }++ const installed = packages.filter(({ name, directory }) =>name.startsWith("@img/sharp-") && existsSync(path.join(directory, "versions.json")),);- if (candidates.length === 0) {- throw new Error("No installed Sharp native package exposes versions.json.");+ const unexpected = installed.filter(+ ({ name }) => !expected.includes(name) && !excludedWasmPackages.includes(name),+ );+ if (unexpected.length > 0) {+ throw new Error(+ `Unexpected Sharp native payload installed for ${target}: ` ++ `${unexpected.map(({ name }) => name).join(", ")}.`,+ );}- const versionSets = candidates.map((pkg) => ({- pkg,- versions: readJson(path.join(pkg.directory, "versions.json")),- }));- const canonical = JSON.stringify(versionSets[0].versions);- for (const item of versionSets.slice(1)) {- if (JSON.stringify(item.versions) !== canonical) {- throw new Error("Installed Sharp native packages disagree about embedded library versions.");- }+ let selected = installed.filter(({ name }) => expected.includes(name));+ if (selected.length > 1 && platform === "linux") {+ const wantsMusl = (libc ?? detectLinuxLibc()) === "musl";+ selected = selected.filter(({ name }) => name.includes("-linuxmusl-") === wantsMusl);+ }+ if (selected.length === 0) {+ throw new Error(+ `No Sharp native payload is installed for ${target}; expected ${expected.join(" or ")}.`,+ );+ }+ if (selected.length > 1) {+ throw new Error(+ `More than one distributable Sharp native payload is installed for ${target}: ` ++ `${selected.map(({ name }) => name).join(", ")}.`,+ );}- const notices = [];- for (const { pkg } of versionSets) {- const readme = path.join(pkg.directory, "README.md");- if (!existsSync(readme)) {- throw new Error(`${pkg.name}@${pkg.version} is missing its native licensing README.`);+ const payload = selected[0];+ if (!payload.name.endsWith(`-${arch}`)) {+ throw new Error(`Sharp native payload ${payload.name} does not target ${arch}.`);+ }+ return payload;+}++/**+ * The WASM payload may only be ignored as a native input while every Electron artifact+ * explicitly excludes it; otherwise it would ship without static-LGPL treatment.+ */+export function assertWasmExcludedFromPackaging(buildConfig) {+ const fileLists = [+ ["files", buildConfig?.files],+ ["win.files", buildConfig?.win?.files],+ ["mac.files", buildConfig?.mac?.files],+ ["linux.files", buildConfig?.linux?.files],+ ].filter(([, list]) => list !== undefined);+ if (!Array.isArray(buildConfig?.files)) {+ throw new Error("Electron Builder configuration must declare a global build.files list.");+ }+ for (const [label, list] of fileLists) {+ if (!Array.isArray(list)) {+ throw new Error(`Electron Builder configuration ${label} must be an array.`);+ }+ for (const name of excludedWasmPackages) {+ if (!list.includes(`!node_modules/${name}/**`)) {+ throw new Error(+ `Electron Builder ${label} does not exclude ${name}; the unused WASM payload would ` ++ "be distributed without corresponding source and notices.",+ );+ }}- const text = readFileSync(readme, "utf8").trim();- if (!text.includes("third-party libraries") || !text.includes("LGPL")) {- throw new Error(`${pkg.name}@${pkg.version} has an unexpected native licensing README.`);+ }+}++function nativePayloadBinaries(directory) {+ const binaries = [];+ function visit(current, relative = "") {+ for (const entry of readdirSync(current, { withFileTypes: true })) {+ const next = relative ? `${relative}/${entry.name}` : entry.name;+ if (entry.isDirectory()) {+ visit(path.join(current, entry.name), next);+ } else if (entry.isFile() && nativeBinaryPattern.test(entry.name)) {+ const file = path.join(current, entry.name);+ binaries.push({ file: next, sha256: sha256FileSync(file), bytes: statSync(file).size });+ }}- if (!notices.includes(text)) notices.push(text);+ }+ visit(directory);+ return binaries.sort((a, b) => a.file.localeCompare(b.file));+}++function collectNativeComponents(packages, lock, { platform, arch }) {+ const payload = selectNativePayload(packages, { platform, arch });+ const versionsFile = path.join(payload.directory, "versions.json");+ const versions = readJson(versionsFile);++ const readme = path.join(payload.directory, "README.md");+ if (!existsSync(readme)) {+ throw new Error(`${payload.name}@${payload.version} is missing its native licensing README.`);+ }+ const notices = readFileSync(readme, "utf8").trim();+ if (!notices.includes("third-party libraries") || !notices.includes("LGPL")) {+ throw new Error(`${payload.name}@${payload.version} has an unexpected native licensing README.`);+ }++ const binaries = nativePayloadBinaries(payload.directory);+ if (binaries.length === 0) {+ throw new Error(`${payload.name}@${payload.version} contains no native binaries.`);}return {- packages: versionSets.map(({ pkg }) => ({ name: pkg.name, version: pkg.version })),- versions: versionSets[0].versions,+ packages: [+ {+ name: payload.name,+ version: payload.version,+ packagePath: payload.lockPath,+ lockIntegrity: lock.packages?.[payload.lockPath]?.integrity ?? null,+ versionsSha256: sha256FileSync(versionsFile),+ binaries,+ },+ ],+ versions,notices: ["# Native Third-Party Notices","","The following upstream notices describe libraries embedded in the Sharp/libvips",- "native payload. Full source archives and license files accompany this application",- "under `sources/`; canonical copyleft license texts are under `licenses/`.",+ `native payload \`${payload.name}@${payload.version}\`. Full source archives and`,+ "license files accompany this application under `sources/`; canonical copyleft license",+ "texts are under `licenses/`.","",- ...notices,+ notices,"",].join("\n"),};@@ -1046,6 +1354,7 @@ async function prepareSources({sharpLibvipsVersion: policy.sharpLibvips.version,electronVersion: policy.electron.version,ffmpegRevision: policy.electron.ffmpegRevision,+ sourceCommits: policy.sourceCommits,});const sources = await mapLimit(specs, 4, async (spec) => {const relative = `sources/${spec.fileName}`;@@ -1299,8 +1608,7 @@ export function renderRelinking(native, sourceManifest, policy, platform = proce};const hasWindowsBuildSource = sourceManifest.sources.some(({ id }) => id === "libvips-windows-build",- );- const nativeLocation =+ ); const nativeLocation =platform === "darwin"? "Contents/Resources/app.asar.unpacked/node_modules/": "resources/app.asar.unpacked/node_modules/";@@ -1316,6 +1624,9 @@ export function renderRelinking(native, sourceManifest, policy, platform = proceconst ffmpegPatch = sourceFile("electron-ffmpeg-patch-link-with-loader-path");const windowsBuildSource =platform === "win32" ? sourceFile("libvips-windows-build") : undefined;+ const replaceableFiles = native.packages.flatMap(({ name, binaries = [] }) =>+ binaries.map(({ file, sha256 }) => `- \`${nativeLocation}${name}/${file}\` (SHA-256 ${sha256})`),+ );return ["# Replacing and relinking native libraries","",@@ -1326,16 +1637,38 @@ export function renderRelinking(native, sourceManifest, policy, platform = proce"The packaged application keeps Sharp, libvips, and related native modules outside",`the ASAR archive under \`${nativeLocation}\`. Installed native packages:`,`\`${nativePackageList}\`. Electron's FFmpeg library is at \`${ffmpegLocation}\`.`,- "You may replace these",- "files with ABI-compatible modified builds and reverse engineer the application to",- "the extent needed to debug those modifications.",+ "",+ ...(replaceableFiles.length > 0+ ? [+ "The following files carry the LGPL-covered libvips runtime and may be replaced:",+ "",+ ...replaceableFiles,+ "",+ ]+ : []),+ "You may replace these files with ABI-compatible modified builds. The application",+ "loads them from the plain filesystem locations above; it does not verify their",+ "signatures or hashes at run time and takes no technical measure to prevent a",+ "modified replacement from running. You may also reverse engineer Skill Recorder to",+ "the extent necessary to debug modifications you make to those libraries.","","Exact upstream sources, packaging scripts, and build patches are included under","`sources/`. `SOURCE-MANIFEST.json` records their original URLs and SHA-256 hashes.",+ "",+ "To rebuild and replace the libvips payload:",+ "",+ hasWindowsBuildSource+ ? `1. Unpack \`${sharpBuildSource}\` and \`${windowsBuildSource}\`. The latter contains the`+ : `1. Unpack \`${sharpBuildSource}\`. It contains the`,hasWindowsBuildSource- ? `Use \`${sharpBuildSource}\` and \`${windowsBuildSource}\` to rebuild the libvips`- : `Use \`${sharpBuildSource}\` to rebuild the libvips`,- "payload, then replace the matching unpacked native libraries in an installed copy.",+ ? " MXE cross-build definitions and every patch applied to the Windows payload."+ : " POSIX build scripts; externally fetched patches are included beside it in `sources/`.",+ "2. Unpack the matching upstream archives from `sources/` into the build tree, keeping",+ " the versions recorded below and in `NATIVE-COMPONENTS.json`.",+ "3. Run the packaging build for this platform and architecture as documented by the",+ " unpacked scripts.",+ `4. Copy the rebuilt libraries over the files listed above under \`${nativeLocation}\`,`,+ " keeping the same file names, then start Skill Recorder normally.","",`For Electron FFmpeg, start from \`${ffmpegSource}\`, apply \`${ffmpegPatch}\`,`,`and use the Electron build integration in \`${electronSource}\`. Replace the`,diff --git a/scripts/compliance.test.mjs b/scripts/compliance.test.mjsindex d02b012..7fcf547 100644--- a/scripts/compliance.test.mjs+++ b/scripts/compliance.test.mjs@@ -8,51 +8,82 @@ import { fileURLToPath } from "node:url";import {assertReviewedCopilotCliVersions,+ assertWasmExcludedFromPackaging,buildNativeSourceSpecs,deterministicGitConfigArgs,+ detectLinuxLibc,+ excludedWasmPackages,findPackageLicenseFiles,hasExpectedFileHeader,+ isCommitToken,isLicenseFileName,legalTextSpecs,+ nativePayloadCandidates,onnxRefForVersion,+ releaseTargets,+ resolveReviewedCommit,reviewedSharpLibvipsLicenseEntry,+ reviewedSharpLicenseEntry,reviewedMaterialHash,renderRelinking,+ selectNativePayload,+ splitSpdxAnd,verifyComplianceDirectory,} from "./compliance.mjs";const nativeVersions = {- aom: "3.13.1",- archive: "3.8.2",+ aom: "3.14.1",+ archive: "3.8.7",cairo: "1.18.4",- cgif: "0.5.0",- exif: "0.6.25",- expat: "2.7.3",+ cgif: "0.5.3",+ exif: "0.6.26",+ expat: "2.8.1",ffi: "3.5.2",- fontconfig: "2.17.1",- freetype: "2.14.1",+ fontconfig: "2.18.1",+ freetype: "2.14.3",fribidi: "1.0.16",- glib: "2.86.1",- harfbuzz: "12.1.0",- heif: "1.20.2",- highway: "1.3.0",+ glib: "2.89.0",+ harfbuzz: "14.2.1",+ heif: "1.23.0",+ highway: "1.4.0",imagequant: "2.4.1",- lcms: "2.17",+ lcms: "2.19.1",mozjpeg: "0826579",- pango: "1.57.0",+ pango: "1.57.1",pixman: "0.46.4",- png: "1.6.50",+ png: "1.6.58","proxy-libintl": "0.5",- rsvg: "2.61.2",- spng: "0.7.4",- tiff: "4.7.1",- vips: "8.17.3",+ rsvg: "2.62.3",+ tiff: "732665c",+ uhdr: "13a058f",+ vips: "8.18.3",webp: "1.6.0",- xml2: "2.15.1",- "zlib-ng": "2.2.5",+ xml2: "2.15.3",+ "zlib-ng": "2.3.3",+};++const sourceCommits = {+ "mozjpeg@0826579": "08265790774cd0714832c9e675522acbe5581437",+ "tiff@732665c": "732665c2c8785cec3e1f46ba9908575f0f3a8059",+ "tiff@d01a94b": "d01a94be176f5f6a87f7ee1c0b32e65416aa2b4d",+ "uhdr@13a058f": "13a058f452d846e43d4691f6885eeeaa8b0ea8d0",+ "uhdr@1acdbed": "1acdbed8c712e6923ebf9de4e7c8d8dda06509e9",+};++const specOptions = {+ platform: "win32",+ sharpVersion: "0.35.3",+ sharpLibvipsVersion: "1.3.2",+ electronVersion: "43.1.1",+ ffmpegRevision: "ad41607c61898cf7150e0fb20fe4bbabd44922a3",+ sourceCommits,};const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");+const repoPolicy = JSON.parse(+ await readFile(path.join(repoRoot, "third_party", "compliance-policy.json"), "utf8"),+);+const repoManifest = JSON.parse(await readFile(path.join(repoRoot, "package.json"), "utf8"));test("license filenames include common suffixed forms", () => {assert.equal(isLicenseFileName("LICENSE"), true);@@ -94,17 +125,11 @@ test("nested package legal files are discovered", async () => {});test("native source manifest covers dependencies, build scripts, and patches", () => {- const sources = buildNativeSourceSpecs(nativeVersions, {- platform: "win32",- sharpVersion: "0.34.5",- sharpLibvipsVersion: "1.2.4",- electronVersion: "43.1.1",- ffmpegRevision: "ad41607c61898cf7150e0fb20fe4bbabd44922a3",- });+ const sources = buildNativeSourceSpecs(nativeVersions, specOptions);const ids = new Set(sources.map(({ id }) => id));- for (const dependency of Object.keys(nativeVersions)) {- assert(ids.has(`sharp-native-${dependency}`), `missing ${dependency}`);+ for (const [dependency, version] of Object.entries(nativeVersions)) {+ assert(ids.has(`sharp-native-${dependency}@${version}`), `missing ${dependency}`);}for (const required of ["sharp",@@ -113,7 +138,6 @@ test("native source manifest covers dependencies, build scripts, and patches", ("electron-ffmpeg","electron","electron-ffmpeg-patch-link-with-loader-path",- "sharp-patch-glib-without-gregex",]) {assert(ids.has(required), `missing ${required}`);}@@ -129,6 +153,151 @@ test("native source manifest covers dependencies, build scripts, and patches", (assert.doesNotMatch(ffmpeg.url, /\+archive/);});+test("source ids are version qualified so both platform payloads coexist", () => {+ const windows = buildNativeSourceSpecs(nativeVersions, specOptions);+ const posix = buildNativeSourceSpecs(+ { ...nativeVersions, archive: "3.8.8", tiff: "d01a94b", uhdr: "1acdbed" },+ { ...specOptions, platform: "darwin" },+ );+ assert(windows.some(({ id }) => id === "[email protected]"));+ assert(posix.some(({ id }) => id === "[email protected]"));+ const shared = new Set(windows.map(({ id }) => id));+ assert(+ posix.some(({ id }) => id.startsWith("sharp-native-") && !shared.has(id)),+ "platform payloads must be able to pin different component versions",+ );+});++test("only components present in the payload manifest are required", () => {+ const trimmed = { ...nativeVersions };+ delete trimmed.aom;+ const ids = new Set(buildNativeSourceSpecs(trimmed, specOptions).map(({ id }) => id));+ assert.equal(ids.has("[email protected]"), false);+ assert.equal([...ids].some((id) => id.startsWith("sharp-native-spng")), false);+});++test("an unknown payload component fails closed", () => {+ assert.throws(+ () => buildNativeSourceSpecs({ ...nativeVersions, brandnew: "1.0.0" }, specOptions),+ /has no reviewed source builder/,+ );+});++test("commit-identified components resolve to reviewed immutable revisions", () => {+ assert.equal(isCommitToken("732665c"), true);+ assert.equal(isCommitToken("4.7.1"), false);+ assert.equal(+ resolveReviewedCommit("tiff", "732665c", sourceCommits),+ "732665c2c8785cec3e1f46ba9908575f0f3a8059",+ );+ assert.throws(+ () => resolveReviewedCommit("tiff", "abcdef1", sourceCommits),+ /no reviewed 40-character upstream commit/,+ );+ assert.throws(+ () => resolveReviewedCommit("tiff", "732665c", { "tiff@732665c": "f".repeat(40) }),+ /does not extend the manifest token/,+ );++ const sources = buildNativeSourceSpecs(nativeVersions, specOptions);+ for (const [id, repository, revision] of [+ ["sharp-native-tiff@732665c", "https://gitlab.com/libtiff/libtiff.git", "732665c2c8785cec3e1f46ba9908575f0f3a8059"],+ ["sharp-native-uhdr@13a058f", "https://github.com/google/libultrahdr.git", "13a058f452d846e43d4691f6885eeeaa8b0ea8d0"],+ ["sharp-native-mozjpeg@0826579", "https://github.com/mozilla/mozjpeg.git", "08265790774cd0714832c9e675522acbe5581437"],+ ]) {+ const spec = sources.find((entry) => entry.id === id);+ assert(spec, `missing ${id}`);+ assert.equal(spec.gitRepository, repository);+ assert.equal(spec.gitRevision, revision);+ assert.doesNotMatch(spec.url, /archive\/refs/);+ }+});++test("commit-identified components fall back to tagged tarballs", () => {+ const sources = buildNativeSourceSpecs(+ { ...nativeVersions, tiff: "4.7.1", uhdr: "1.4.0", mozjpeg: "4.1.5" },+ specOptions,+ );+ assert.equal(+ sources.find(({ id }) => id === "[email protected]").gitRepository,+ undefined,+ );+ assert.match(+ sources.find(({ id }) => id === "[email protected]").url,+ /archive\/refs\/tags\/v1\.4\.0\.tar\.gz$/,+ );+});++test("build patches match the platform that applies them", () => {+ const windows = new Set(buildNativeSourceSpecs(nativeVersions, specOptions).map(({ id }) => id));+ const posix = new Set(+ buildNativeSourceSpecs(nativeVersions, { ...specOptions, platform: "darwin" }).map(+ ({ id }) => id,+ ),+ );++ // Windows patches all live inside the build-win64-mxe archive.+ assert(windows.has("libvips-windows-build"));+ assert.equal([...windows].some((id) => id.startsWith("sharp-patch-")), false);++ assert.equal(posix.has("libvips-windows-build"), false);+ for (const required of [+ "sharp-patch-glib-without-gregex",+ "sharp-patch-libvips-soversion",+ "sharp-patch-mozjpeg-simd-fdct",+ "sharp-patch-uhdr-platform-detection",+ ]) {+ assert(posix.has(required), `missing ${required}`);+ }+ for (const removed of [+ "sharp-patch-aom",+ "sharp-patch-highway",+ "sharp-patch-libvips-heif",+ ]) {+ assert.equal(posix.has(removed), false, `${removed} is no longer applied upstream`);+ }+});++test("every source specification uses an immutable revision or release", () => {+ for (const platform of ["win32", "darwin"]) {+ for (const spec of buildNativeSourceSpecs(nativeVersions, { ...specOptions, platform })) {+ assert.doesNotMatch(+ spec.url,+ /\/(?:master|main|HEAD)(?:[/.]|$)|pull\/\d+\.(?:patch|diff)|patch-diff\.githubusercontent/,+ `${spec.id} must not reference a mutable upstream ref`,+ );+ if (spec.gitRevision) assert.match(spec.gitRevision, /^[0-9a-f]{40}$/);+ }+ }+});++test("every reviewed source material is still referenced by a payload", () => {+ const referenced = new Set([+ ...buildNativeSourceSpecs(nativeVersions, {+ ...specOptions,+ sharpVersion: repoPolicy.sharp,+ sharpLibvipsVersion: repoPolicy.sharpLibvips.version,+ electronVersion: repoPolicy.electron.version,+ ffmpegRevision: repoPolicy.electron.ffmpegRevision,+ sourceCommits: repoPolicy.sourceCommits,+ }).map(({ id }) => id),+ ...buildNativeSourceSpecs(+ { ...nativeVersions, archive: "3.8.8", expat: "2.8.2", ffi: "3.6.0", glib: "2.89.1", heif: "1.23.1", pango: "1.58.0", rsvg: "2.62.90", tiff: "d01a94b", uhdr: "1acdbed" },+ {+ ...specOptions,+ platform: "darwin",+ sharpVersion: repoPolicy.sharp,+ sharpLibvipsVersion: repoPolicy.sharpLibvips.version,+ electronVersion: repoPolicy.electron.version,+ ffmpegRevision: repoPolicy.electron.ffmpegRevision,+ sourceCommits: repoPolicy.sourceCommits,+ },+ ).map(({ id }) => id),+ ]);+ const orphaned = Object.keys(repoPolicy.sourceMaterials).filter((id) => !referenced.has(id));+ assert.deepEqual(orphaned, [], "compliance-policy.json retains unused source hashes");+});+test("git archives ignore host line-ending and global attribute settings", () => {assert.deepEqual(deterministicGitConfigArgs, ["-c",@@ -199,6 +368,163 @@ test("platform Sharp/libvips packages use the reviewed LGPL text", () => {);});+test("compound SPDX expressions are split into individual terms", () => {+ assert.deepEqual(splitSpdxAnd("Apache-2.0 AND LGPL-3.0-or-later AND MIT"), [+ "Apache-2.0",+ "LGPL-3.0-or-later",+ "MIT",+ ]);+ assert.deepEqual(splitSpdxAnd("(MIT AND Apache-2.0)"), ["MIT", "Apache-2.0"]);+ assert.deepEqual(splitSpdxAnd("MIT"), ["MIT"]);+ assert.deepEqual(splitSpdxAnd(undefined), []);+});++test("every declared Sharp license term resolves to concrete text", async () => {+ const root = await mkdtemp(path.join(tmpdir(), "skill-recorder-sharp-license-"));+ try {+ await writeFile(+ path.join(root, "LICENSE"),+ " Apache License\n Version 2.0, January 2004\n",+ );+ const policy = { sharp: "0.35.3", sharpLibvips: { version: "1.3.2" } };+ const pkg = {+ name: "@img/sharp-win32-arm64",+ version: "0.35.3",+ license: "Apache-2.0 AND LGPL-3.0-or-later",+ lockPath: "node_modules/@img/sharp-win32-arm64",+ directory: root,+ };+ const entry = reviewedSharpLicenseEntry(pkg, policy, ["LICENSE"]);+ assert.equal(entry.licenseSource, "LICENSE, licenses/LGPL-3.0.txt");+ assert.match(entry.text, /Apache License/);+ assert.match(entry.text, /licenses\/LGPL-3\.0\.txt/);++ const wasm = reviewedSharpLicenseEntry(+ { ...pkg, name: "@img/sharp-wasm32", license: "Apache-2.0 AND LGPL-3.0-or-later AND MIT" },+ policy,+ ["LICENSE"],+ );+ assert.match(wasm.licenseSource, /canonical SPDX MIT text/);+ assert.match(wasm.text, /MIT License/);++ // The permissive half alone is never enough for a compound expression.+ assert.throws(+ () => reviewedSharpLicenseEntry(pkg, policy, []),+ /declares Apache-2\.0 but ships no Apache license text/,+ );+ assert.throws(+ () => reviewedSharpLicenseEntry({ ...pkg, license: "Apache-2.0 AND GPL-3.0" }, policy, ["LICENSE"]),+ /unexpected license metadata/,+ );+ assert.throws(+ () => reviewedSharpLicenseEntry({ ...pkg, version: "0.35.4" }, policy, ["LICENSE"]),+ /No reviewed Sharp license override/,+ );+ } finally {+ await rm(root, { recursive: true, force: true });+ }+});++test("exactly one architecture-matched native payload is packaged", async () => {+ const root = await mkdtemp(path.join(tmpdir(), "skill-recorder-payload-"));+ try {+ const make = async (name) => {+ const directory = path.join(root, name.replaceAll("/", "_"));+ await mkdir(directory, { recursive: true });+ await writeFile(path.join(directory, "versions.json"), JSON.stringify({ vips: "8.18.3" }));+ return { name, version: "0.35.3", directory, lockPath: `node_modules/${name}` };+ };+ const win64 = await make("@img/sharp-win32-x64");+ const winArm = await make("@img/sharp-win32-arm64");+ const wasm = await make("@img/sharp-wasm32");+ const rogue = await make("@img/sharp-linux-x64");++ assert.equal(+ selectNativePayload([winArm, wasm], { platform: "win32", arch: "arm64" }).name,+ "@img/sharp-win32-arm64",+ );+ assert.throws(+ () => selectNativePayload([wasm], { platform: "win32", arch: "arm64" }),+ /No Sharp native payload is installed/,+ );+ assert.throws(+ () => selectNativePayload([win64], { platform: "win32", arch: "arm64" }),+ /Unexpected Sharp native payload installed/,+ );+ assert.throws(+ () => selectNativePayload([winArm, rogue], { platform: "win32", arch: "arm64" }),+ /Unexpected Sharp native payload installed/,+ );+ assert.throws(+ () => selectNativePayload([winArm], { platform: "freebsd", arch: "x64" }),+ /is not a reviewed Sharp native platform/,+ );++ const musl = await make("@img/sharp-libvips-linuxmusl-x64");+ const glibc = await make("@img/sharp-libvips-linux-x64");+ // npm installs both Linux payloads on every host because package-lock.json cannot+ // record `libc`; the running C library decides which one is authoritative.+ assert.equal(+ selectNativePayload([musl, glibc], { platform: "linux", arch: "x64", libc: "glibc" }).name,+ "@img/sharp-libvips-linux-x64",+ );+ assert.equal(+ selectNativePayload([musl, glibc], { platform: "linux", arch: "x64", libc: "musl" }).name,+ "@img/sharp-libvips-linuxmusl-x64",+ );+ // With only one payload installed there is nothing to disambiguate, so a libc+ // misdetection must not turn a working install into a hard failure.+ assert.equal(+ selectNativePayload([musl], { platform: "linux", arch: "x64", libc: "glibc" }).name,+ "@img/sharp-libvips-linuxmusl-x64",+ );+ assert.throws(+ () => selectNativePayload([musl, glibc], { platform: "darwin", arch: "x64" }),+ /Unexpected Sharp native payload installed/,+ );+ } finally {+ await rm(root, { recursive: true, force: true });+ }++ assert.equal(detectLinuxLibc({ getReport: () => ({ header: { glibcVersionRuntime: "2.39" } }) }), "glibc");+ assert.equal(detectLinuxLibc({ getReport: () => ({ header: {} }) }), "musl");+ assert.equal(detectLinuxLibc(undefined), "musl");++ assert.deepEqual(Object.keys(nativePayloadCandidates).sort(), [+ "darwin-arm64",+ "darwin-x64",+ "linux-arm64",+ "linux-x64",+ "win32-arm64",+ "win32-x64",+ ]);+ assert.deepEqual(releaseTargets, ["win32-x64", "win32-arm64", "darwin-arm64"]);+});++test("the WASM payload is excluded from every Electron artifact", () => {+ assert.deepEqual(excludedWasmPackages, [+ "@img/sharp-wasm32",+ "@img/sharp-freebsd-wasm32",+ "@img/sharp-webcontainers-wasm32",+ ]);+ assert.doesNotThrow(() => assertWasmExcludedFromPackaging(repoManifest.build));+ for (const list of ["files", "win"]) {+ const build = structuredClone(repoManifest.build);+ const target = list === "files" ? build.files : build.win.files;+ target.splice(target.indexOf("!node_modules/@img/sharp-wasm32/**"), 1);+ assert.throws(+ () => assertWasmExcludedFromPackaging(build),+ /does not exclude @img\/sharp-wasm32/,+ );+ }+});++test("only supported release targets are packaged", () => {+ assert.equal(repoManifest.build.linux, undefined, "Linux is not a release target");+ assert.deepEqual(repoManifest.build.mac.target, ["dmg", "zip"]);+ assert.equal(repoManifest.build.win.target, "nsis");+});+test("unreviewed source hashes fail closed", () => {assert.equal(reviewedMaterialHash("source", { source: "a".repeat(64) }, "Source material"),@@ -218,13 +544,18 @@ test("relinking instructions use platform-specific native paths", () => {"electron-ffmpeg-patch-link-with-loader-path",].map((id) => ({ id, file: `sources/${id}.tar.gz` }));const native = {- packages: [{ name: "@img/sharp-libvips-darwin-arm64" }],- versions: { vips: "8.17.3", glib: "2.86.1", cairo: "1.18.4" },+ packages: [+ {+ name: "@img/sharp-libvips-darwin-arm64",+ binaries: [{ file: "lib/libvips-cpp.8.18.3.dylib", sha256: "a".repeat(64) }],+ },+ ],+ versions: { vips: "8.18.3", glib: "2.89.1", cairo: "1.18.4" },};const policy = {electron: { version: "43.1.1", ffmpegRevision: "abc" },- sharp: "0.34.5",- sharpLibvips: { version: "1.2.4" },+ sharp: "0.35.3",+ sharpLibvips: { version: "1.3.2" },};const mac = renderRelinking(native, { mode: "full", sources }, policy, "darwin");assert.match(@@ -232,11 +563,32 @@ test("relinking instructions use platform-specific native paths", () => {/Contents\/Frameworks\/Electron Framework\.framework\/Versions\/A\/Libraries\/libffmpeg\.dylib/,);assert.doesNotMatch(mac, /build-win64-mxe/);+ assert.match(+ mac,+ /Contents\/Resources\/app\.asar\.unpacked\/node_modules\/@img\/sharp-libvips-darwin-arm64\/lib\/libvips-cpp\.8\.18\.3\.dylib/,+ );+ assert.match(mac, /takes no technical measure to prevent a\r?\nmodified replacement from running/);+ assert.match(mac, /reverse engineer Skill Recorder to/);+ assert.match(mac, /- Sharp: 0\.35\.3/);+ assert.match(mac, /- Sharp\/libvips packaging: 1\.3\.2/);+ assert.match(mac, /- libvips: 8\.18\.3/);const linux = renderRelinking(native, { mode: "full", sources }, policy, "linux");assert.match(linux, /libffmpeg\.so beside the Skill Recorder executable/);});+test("distributed notices match the reviewed Sharp and libvips versions", async () => {+ const notices = await readFile(path.join(repoRoot, "THIRD-PARTY-NOTICES.md"), "utf8");+ assert.match(notices, new RegExp(`sharp/tree/v${repoPolicy.sharp.replaceAll(".", "\\.")}`));+ assert.match(+ notices,+ new RegExp(`sharp-libvips v${repoPolicy.sharpLibvips.version.replaceAll(".", "\\.")}`),+ );+ assert.match(notices, /libvips\r?\n\s+\[`v8\.18\.3`\]/);+ assert.match(notices, /@img\/sharp-wasm32/);+ assert.doesNotMatch(notices, /v0\.34\.5|v1\.2\.4|v8\.17\.3/);+});+test("archive validation rejects HTML challenge pages", async () => {const root = await mkdtemp(path.join(tmpdir(), "skill-recorder-archive-"));try {diff --git a/scripts/review-compliance-sources.mjs b/scripts/review-compliance-sources.mjsnew file mode 100644index 0000000..5ff39ce--- /dev/null+++ b/scripts/review-compliance-sources.mjs@@ -0,0 +1,194 @@+#!/usr/bin/env node+/**+ * Reviewer tool that proposes SHA-256 values for `third_party/compliance-policy.json`.+ *+ * `npm run compliance:prepare` is deliberately fail-closed: it will only accept source+ * material whose hash is already recorded in the policy, so it can never be used to+ * bootstrap new hashes. This script performs that bootstrap step separately, under human+ * review, and never writes to the policy itself — it prints a patch for a reviewer to+ * inspect and apply.+ *+ * Usage:+ * node scripts/review-compliance-sources.mjs [--platform win32|darwin|linux]+ * [--versions <versions.json>]+ * [--all]+ *+ * Defaults to the payload installed for the current platform. `--versions` allows a+ * reviewer to generate the hashes for another platform's manifest from one machine;+ * `--all` also re-derives material that already has a reviewed hash.+ */+import { execFile } from "node:child_process";+import { createWriteStream, existsSync, readFileSync, statSync } from "node:fs";+import { mkdir, rename, rm } from "node:fs/promises";+import path from "node:path";+import { Readable } from "node:stream";+import { pipeline } from "node:stream/promises";+import { fileURLToPath } from "node:url";+import { promisify } from "node:util";++import {+ buildNativeSourceSpecs,+ deterministicGitConfigArgs,+ hasExpectedFileHeader,+ nativePayloadCandidates,+ sha256File,+} from "./compliance.mjs";++const execFileAsync = promisify(execFile);+const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");+const reviewDir = path.join(rootDir, ".compliance-review");++function parseArguments(argv) {+ const options = { platform: process.platform, versions: null, all: false };+ for (let index = 0; index < argv.length; index += 1) {+ const argument = argv[index];+ if (argument === "--all") options.all = true;+ else if (argument === "--platform") options.platform = argv[(index += 1)];+ else if (argument === "--versions") options.versions = argv[(index += 1)];+ else throw new Error(`Unknown argument ${argument}.`);+ }+ if (!options.platform) throw new Error("--platform requires a value.");+ return options;+}++function loadVersions({ platform, versions }) {+ if (versions) return JSON.parse(readFileSync(path.resolve(versions), "utf8"));+ const candidates = Object.entries(nativePayloadCandidates)+ .filter(([target]) => target.startsWith(`${platform}-`))+ .flatMap(([, names]) => names);+ for (const name of candidates) {+ const file = path.join(rootDir, "node_modules", ...name.split("/"), "versions.json");+ if (existsSync(file)) return JSON.parse(readFileSync(file, "utf8"));+ }+ throw new Error(+ `No installed native payload for ${platform}. Pass --versions <versions.json> to review ` ++ "a manifest captured on another platform.",+ );+}++async function download(url, target) {+ const temporary = `${target}.partial`;+ let lastError;+ for (let attempt = 1; attempt <= 3; attempt += 1) {+ await rm(temporary, { force: true });+ try {+ const response = await fetch(url, {+ redirect: "follow",+ headers: {+ accept: "application/octet-stream, text/plain;q=0.9, */*;q=0.8",+ "user-agent":+ "Mozilla/5.0 (compatible; SkillRecorderCompliance/1.0; " ++ "+https://github.com/microsoft/skill-recorder)",+ },+ });+ if (!response.ok || !response.body) {+ throw new Error(`HTTP ${response.status} ${response.statusText}`);+ }+ await pipeline(Readable.fromWeb(response.body), createWriteStream(temporary));+ if (statSync(temporary).size < 100) throw new Error("response was unexpectedly short");+ await rename(temporary, target);+ return;+ } catch (error) {+ lastError = error;+ if (attempt < 3) await new Promise((resolve) => setTimeout(resolve, attempt * 1_000));+ }+ }+ throw new Error(`Failed to download ${url}: ${lastError?.message ?? "unknown error"}`);+}++async function runGit(args, cwd) {+ const { stdout } = await execFileAsync("git", args, {+ cwd,+ windowsHide: true,+ maxBuffer: 10 * 1024 * 1024,+ });+ return stdout.trim();+}++async function gitArchive(spec, target) {+ const repository = path.join(reviewDir, "git", spec.id.replaceAll(/[^A-Za-z0-9._-]/g, "_"));+ await rm(repository, { recursive: true, force: true });+ await mkdir(repository, { recursive: true });+ await runGit(["init", "--quiet"], repository);+ await runGit(+ ["fetch", "--depth=1", "--no-tags", "--quiet", spec.gitRepository, spec.gitRevision],+ repository,+ );+ const resolved = await runGit(["rev-parse", "FETCH_HEAD"], repository);+ if (resolved !== spec.gitRevision) {+ throw new Error(`Fetched ${spec.id} revision ${resolved}; expected ${spec.gitRevision}.`);+ }+ await runGit(+ [+ ...deterministicGitConfigArgs,+ "archive",+ "--format=tar",+ `--prefix=${spec.archivePrefix}`,+ `--output=${target}`,+ "FETCH_HEAD",+ ],+ repository,+ );+}++async function main() {+ const options = parseArguments(process.argv.slice(2));+ const policy = JSON.parse(+ readFileSync(path.join(rootDir, "third_party", "compliance-policy.json"), "utf8"),+ );+ const versions = loadVersions(options);+ const specs = buildNativeSourceSpecs(versions, {+ platform: options.platform,+ sharpVersion: policy.sharp,+ sharpLibvipsVersion: policy.sharpLibvips.version,+ electronVersion: policy.electron.version,+ ffmpegRevision: policy.electron.ffmpegRevision,+ sourceCommits: policy.sourceCommits,+ });++ const pending = specs.filter(({ id }) => options.all || !policy.sourceMaterials?.[id]);+ if (pending.length === 0) {+ console.log("Every source material for this manifest already has a reviewed hash.");+ return;+ }++ await mkdir(path.join(reviewDir, "sources"), { recursive: true });+ const results = [];+ const failures = [];+ const queue = [...pending];+ const workers = Array.from({ length: 4 }, async () => {+ for (let spec = queue.shift(); spec; spec = queue.shift()) {+ const target = path.join(reviewDir, "sources", spec.fileName);+ try {+ await rm(target, { force: true });+ if (spec.gitRepository) await gitArchive(spec, target);+ else await download(spec.url, target);+ if (!(await hasExpectedFileHeader(spec.fileName, target))) {+ throw new Error("retrieved material is not a valid archive or patch");+ }+ results.push({ id: spec.id, url: spec.url, sha256: await sha256File(target) });+ } catch (error) {+ failures.push({ id: spec.id, url: spec.url, message: error.message });+ }+ }+ });+ await Promise.all(workers);++ results.sort((a, b) => a.id.localeCompare(b.id));+ failures.sort((a, b) => a.id.localeCompare(b.id));++ console.log(`\nReviewed source material for ${options.platform} (vips ${versions.vips}):\n`);+ for (const { id, url } of results) console.log(` ${id}\n ${url}`);+ console.log("\nProposed third_party/compliance-policy.json sourceMaterials entries:\n");+ console.log(+ results.map(({ id, sha256 }) => ` ${JSON.stringify(id)}: ${JSON.stringify(sha256)}`).join(",\n"),+ );++ if (failures.length > 0) {+ console.error("\nFailed to retrieve:");+ for (const { id, url, message } of failures) console.error(` ${id} (${url}): ${message}`);+ process.exitCode = 1;+ }+}++await main();diff --git a/scripts/verify-packaged-compliance.mjs b/scripts/verify-packaged-compliance.mjsindex 69b0361..4b79862 100644--- a/scripts/verify-packaged-compliance.mjs+++ b/scripts/verify-packaged-compliance.mjs@@ -1,13 +1,27 @@import { existsSync } from "node:fs";-import { copyFile, readFile } from "node:fs/promises";+import { copyFile, readFile, readdir } from "node:fs/promises";import { createRequire } from "node:module";import path from "node:path";-import { sha256File, verifyComplianceDirectory } from "./compliance.mjs";+import { excludedWasmPackages, sha256File, verifyComplianceDirectory } from "./compliance.mjs";const require = createRequire(import.meta.url);const { listPackage } = require("@electron/asar");+async function listUnpackedFiles(root) {+ if (!existsSync(root)) return [];+ const files = [];+ async function visit(directory, relative) {+ for (const entry of await readdir(directory, { withFileTypes: true })) {+ const next = relative ? `${relative}/${entry.name}` : entry.name;+ if (entry.isDirectory()) await visit(path.join(directory, entry.name), next);+ else if (entry.isFile()) files.push(next);+ }+ }+ await visit(root, "");+ return files;+}+export default async function verifyPackagedCompliance(context) {const platform = context.electronPlatformName;const productFilename = context.packager.appInfo.productFilename;@@ -69,6 +83,31 @@ export default async function verifyPackagedCompliance(context) {throw new Error(`Packaged ASAR recursively contains build output: ${nestedOutput}.`);}+ // `node_modules/@img/**` is unpacked from the ASAR, so the unused WebAssembly payload+ // must be checked on disk as well as inside the archive.+ const unpackedEntries = (+ await listUnpackedFiles(path.join(resources, "app.asar.unpacked"))+ ).map((entry) => entry.toLowerCase());+ const allEntries = [...entries, ...unpackedEntries];+ for (const name of excludedWasmPackages) {+ const prefix = `node_modules/${name.toLowerCase()}/`;+ const leaked = allEntries.find((entry) => entry.startsWith(prefix));+ if (leaked) {+ throw new Error(+ `Packaged application contains excluded WebAssembly payload ${leaked}; it would ship ` ++ "without corresponding source and notices.",+ );+ }+ }+ const wasmBinary = allEntries.find(+ (entry) => entry.startsWith("node_modules/@img/") && entry.endsWith(".wasm"),+ );+ if (wasmBinary) {+ throw new Error(+ `Packaged application contains an unreviewed Sharp WebAssembly binary: ${wasmBinary}.`,+ );+ }+console.log(`Verified packaged compliance materials and non-recursive ASAR in ${context.appOutDir}.`,);diff --git a/scripts/verify-windows-package.mjs b/scripts/verify-windows-package.mjsindex 5daf2d4..b90ce30 100644--- a/scripts/verify-windows-package.mjs+++ b/scripts/verify-windows-package.mjs@@ -2,7 +2,7 @@ import { readdirSync, readFileSync, statSync } from "node:fs";import { createRequire } from "node:module";import path from "node:path";-import { verifyComplianceDirectory } from "./compliance.mjs";+import { excludedWasmPackages, verifyComplianceDirectory } from "./compliance.mjs";const require = createRequire(import.meta.url);const { listPackage } = require("@electron/asar");@@ -41,7 +41,10 @@ const expectedPayloads = [},{packagePath: `/@img/sharp-win32-${arch}/`,- executable: `/@img/sharp-win32-${arch}/lib/sharp-win32-${arch}.node`,+ // sharp 0.35 suffixes the native addon with the package version.+ executable: new RegExp(+ `/@img/sharp-win32-${arch}/lib/sharp-win32-${arch}(?:-[0-9][^/]*)?\\.node$`,+ ),},{packagePath: `/onnxruntime-node/bin/napi-v6/win32/${arch}/`,@@ -57,13 +60,33 @@ for (const payload of expectedPayloads) {throw new Error(`Packaged ${arch} application is missing ${payload.packagePath}.`);}- const executableIndex = normalizedFiles.findIndex((file) => file.endsWith(payload.executable));+ const executableIndex = normalizedFiles.findIndex((file) =>+ payload.executable instanceof RegExp+ ? payload.executable.test(file)+ : file.endsWith(payload.executable),+ );if (executableIndex === -1) {throw new Error(`Packaged ${arch} application is missing ${payload.executable}.`);}verifyPeMachine(files[executableIndex], expectedMachine);}+for (const excluded of excludedWasmPackages) {+ const prefix = `/${excluded.toLowerCase()}/`;+ const leaked = normalizedFiles.find((file) => file.includes(prefix));+ if (leaked) {+ throw new Error(`Packaged ${arch} application contains excluded WASM payload ${leaked}.`);+ }+}+const wasmBinary = normalizedFiles.find(+ (file) => file.includes("/@img/") && file.endsWith(".wasm"),+);+if (wasmBinary) {+ throw new Error(+ `Packaged ${arch} application contains an unreviewed Sharp WebAssembly binary ${wasmBinary}.`,+ );+}+const otherArch = arch === "arm64" ? "x64" : "arm64";const wrongArchitecturePayloads = [`/@koromix/koffi-win32-${otherArch}/`,diff --git a/third_party/compliance-policy.json b/third_party/compliance-policy.jsonindex 379fde2..fbe72eb 100644--- a/third_party/compliance-policy.json+++ b/third_party/compliance-policy.json@@ -18,9 +18,9 @@"LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"}},- "sharp": "0.34.5",+ "sharp": "0.35.3","sharpLibvips": {- "version": "1.2.4"+ "version": "1.3.2"},"onnxruntime": {"1.24.3": "v1.24.3",@@ -39,45 +39,60 @@"onnxruntime-1.26.0-dev.20260416-b7804b056c-license": "2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c","onnxruntime-1.26.0-dev.20260416-b7804b056c-notices": "0e07b95f3a8d6230037707c5c4a2b554d12c4cb67369669ac255635528ffcee2"},+ "sourceCommits": {+ "mozjpeg@0826579": "08265790774cd0714832c9e675522acbe5581437",+ "tiff@732665c": "732665c2c8785cec3e1f46ba9908575f0f3a8059",+ "tiff@d01a94b": "d01a94be176f5f6a87f7ee1c0b32e65416aa2b4d",+ "uhdr@13a058f": "13a058f452d846e43d4691f6885eeeaa8b0ea8d0",+ "uhdr@1acdbed": "1acdbed8c712e6923ebf9de4e7c8d8dda06509e9"+ },"sourceMaterials": {"electron": "9fa9a84bc0ee0aab5ec7f46de991dc55904e634fb566a75bb3f93599c861c46a","electron-ffmpeg": "e84618cc968bb2895ad494c86943c020b242a74f905fc412653c1068a37ea640","electron-ffmpeg-patch-link-with-loader-path": "849b0fbef990623b0caf187c75a3f31f53ed4390e5770196d47880056b53dc7e",- "libvips-windows-build": "241e9b486a14eb1a6b531591f703aeb7d3497c762fc209b2de6a3fdaa67ec8fb",- "sharp": "8b4d7e0149fee8d273b1b674ede7886bb7b7b172ebec0398d0b8dbaf816214d2",- "sharp-libvips-build": "d434fe577941e979438431ccbdf59ea86a5d559d6b218d6ec2a8ea466ad7c868",- "sharp-native-aom": "19e45a5a7192d690565229983dad900e76b513a02306c12053fb9a262cbeca7d",- "sharp-native-archive": "db0dee91561cbd957689036a3a71281efefd131d35d1d98ebbc32720e4da58e2",- "sharp-native-cairo": "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb",- "sharp-native-cgif": "d6cb312c7da2c6c9f310811aa3658120c0316ba130c48a012e7baf3698920fe9",- "sharp-native-exif": "62f74cf3bf673a6e24d2de68f6741643718541f83aca5947e76e3978c25dce83",- "sharp-native-expat": "71df8f40706a7bb0a80a5367079ea75d91da4f8c65c58ec59bcdfbf7decdab9f",- "sharp-native-ffi": "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc",- "sharp-native-fontconfig": "82e73b26adad651b236e5f5d4b3074daf8ff0910188808496326bd3449e5261d",- "sharp-native-freetype": "44bd69d1f0750603410cfd4f26f1c5523c5a3a087a2dfa8639b757dc7c6677be",- "sharp-native-fribidi": "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c",- "sharp-native-glib": "119d1708ca022556d6d2989ee90ad1b82bd9c0d1667e066944a6d0020e2d5e57",- "sharp-native-harfbuzz": "0238bf7ada6b1fb92984f69f8b9cd66518af83cf24f7db1cfe60c772c42312d3",- "sharp-native-heif": "68ac9084243004e0ef3633f184eeae85d615fe7e4444373a0a21cebccae9d12a",- "sharp-native-highway": "07b3c1ba2c1096878a85a31a5b9b3757427af963b1141ca904db2f9f4afe0bc2",- "sharp-native-imagequant": "47d2a84b7b1052975c9d50a3d4e3cacbf57b43d84a4c3131210848ead9964dfb",- "sharp-native-lcms": "d11af569e42a1baa1650d20ad61d12e41af4fead4aa7964a01f93b08b53ab074",- "sharp-native-mozjpeg": "b680167bd5d9afebdd576a12f8c49d2c9066a3b92ef96a2b2c5f7829b8600fe5",- "sharp-native-pango": "890640c841dae77d3ae3d8fe8953784b930fa241b17423e6120c7bfdf8b891e7",- "sharp-native-pixman": "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c",- "sharp-native-png": "71158e53cfdf2877bc99bcab33641d78df3f48e6e0daad030afe9cb8c031aa46",- "sharp-native-proxy-libintl": "f7a1cbd7579baaf575c66f9d99fb6295e9b0684a28b095967cfda17857595303",- "sharp-native-rsvg": "4644d83623dd61cc4479c2b3c372e1da2b281552ebc90035c8d1ac502eb1dc00",- "sharp-native-spng": "47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487",- "sharp-native-tiff": "f698d94f3103da8ca7438d84e0344e453fe0ba3b7486e04c5bf7a9a3fabe9b69",- "sharp-native-vips": "41e9a1439cd57dcc6d4435a085e2cfe181d9da1962fa84a484f09e8b536e4b77",- "sharp-native-webp": "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564",- "sharp-native-xml2": "c008bac08fd5c7b4a87f7b8a71f283fa581d80d80ff8d2efd3b26224c39bc54c",- "sharp-native-zlib-ng": "5b3b022489f3ced82384f06db1e13ba148cbce38c7941e424d6cb414416acd18",- "sharp-patch-aom": "9905702d2be0d790ca9a47752f2e6f84b37e085f43c58e1d2dd66896e9fd5694",+ "libvips-windows-build": "05c9f3708ce8afe820d4a401e8b270e30c8bd6270e75a6cfb97f918f2f087962",+ "sharp": "0217f802064e589131536bdac8d1beb5b8a40953d1f066771204a0e5956750e6",+ "sharp-libvips-build": "ac2f07da237416598c5e8b85e6d4c2ff5da87e5c818744daf7634645d2e0f337",+ "[email protected]": "44bf90dbd23e734d50e70a8c41c285193922938bd0d3bc2ee56764d181d55ef5",+ "[email protected]": "d3a8ba457ae25c27c84fd2830a2efdcc5b1d40bf585d4eb0d35f47e99e5d4774",+ "[email protected]": "3873a88801da067d0528a989af06877710529d50ee8fe6f3970cbb4302efb918",+ "[email protected]": "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb",+ "[email protected]": "dcc7731e974ee77db75df26c99aca4d95f11ca2d267d870d42bce1e0d1e1e75f",+ "[email protected]": "4a055ed6575e61ca46c3172be3c753cc16c9becd0f99ec71d58dd0e471476c0c",+ "[email protected]": "10b195ee78160a908388180a8fe3603d4e9a12f4755fbf5f3816b23a9d750da0",+ "[email protected]": "3ad89b8588e6644bd4e49981480d48b21289eebbcd4f0a1a4afb1c29f99b6ab4",+ "[email protected]": "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc",+ "[email protected]": "31ff1fe32deaebfbb388727f32677bb254bf2a41382c51464c0b1837c9ee9828",+ "[email protected]": "e9309564717b6301230112b173f36c288489479d381d2f0add1210ca5b16ba7e",+ "[email protected]": "dc49de6b01a266eef4876a4dd34d9842c475d3e28ff2eff63bd2fb760ab56261",+ "[email protected]": "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c",+ "[email protected]": "205bf5dab175de68f11e33be7bb36d4ad4c5a5097d8c0c88a8682b257b6293dc",+ "[email protected]": "74447129c31afe141810f995626e8b99ab677413dae76ee3cf5a9cc6e75a486e",+ "[email protected]": "3c2a9006a7e1bf58737e557014d7882c554c628fb379a9f00008f5ea53dbbdfb",+ "[email protected]": "4c9182b18897617182eed12ab5eb9f9d855b3aa3a736d6bdb31abc034ec7d393",+ "[email protected]": "0de0327f60fcd47de90d5654c6fe152232738d60d84fe084ec3e0f35e03b166a",+ "[email protected]": "e72241ac9524bb653ae52ced768b508045d4438726a303f10181a38f764a453c",+ "[email protected]": "47d2a84b7b1052975c9d50a3d4e3cacbf57b43d84a4c3131210848ead9964dfb",+ "[email protected]": "bfc54f7bab59fbc921012014a8032e4cba4abd46db47d46b76416a8c0b2815c8",+ "sharp-native-mozjpeg@0826579": "7181e99a96c62a426293c09f37c94e2637a6af86e7729f5ab75891c85e9cfd2a",+ "[email protected]": "e65d6d117080dc3aeeb7d8b4b3b518f7383aa2e6cfce23117c623cd624764c2f",+ "[email protected]": "bc5bad6213ad4886a47d1e80292fd850b64159b50db67917a43d9ea80ee2298a",+ "[email protected]": "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c",+ "[email protected]": "a9d4df463d36a6e5f9c29bd6f4967312d17e996c1854f3511f833924eb1993cf",+ "[email protected]": "f7a1cbd7579baaf575c66f9d99fb6295e9b0684a28b095967cfda17857595303",+ "[email protected]": "7eb449b2722a768021356f66dfee3202c229b54ed4e6a70ce40c090e97ff16f2",+ "[email protected]": "5d108758255c225590d862d94f2591ee1f8cc976dc7b25b06eaba74f21850f08",+ "sharp-native-tiff@732665c": "9266662c24df398fc113d453f8eaf3347e7be47004b0f451b425740ee6dfcec4",+ "sharp-native-tiff@d01a94b": "c040cf975f30f74fa586700ce3b5191bc6543b696ed2c99f62c53399960a4ea2",+ "sharp-native-uhdr@13a058f": "c4855df878f1b2f5a451a4206a9fff555549e14a1dd4c6552d2539e89df965b2",+ "sharp-native-uhdr@1acdbed": "42b7276e3d7387ca0cdfd93da63f31e163f2c521aef5d165c2cd3bf9ed84c976",+ "[email protected]": "f41285b61bfb495605494f074ca341f7791a1d406e2f157dcea606ef1ae1b146",+ "[email protected]": "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564",+ "[email protected]": "78262a6e7ac170d6528ebfe2efccdf220191a5af6a6cd61ea4a9a9a5042c7a07",+ "[email protected]": "f9c65aa9c852eb8255b636fd9f07ce1c406f061ec19a2e7d508b318ca0c907d1","sharp-patch-glib-without-gregex": "b1f2930a11292e529de137c7eb723850e0cc0969b1a2b0358196389312acd272",- "sharp-patch-highway": "6ce65c4a6e90a4293da81cd3e932e81fd7ac77f31058143241ca9b8dd085098c",- "sharp-patch-libvips-heif": "59a547c12915bc2670c37ff88200ebe74fe70aacce6e20b7069157a0d6a098c8",- "sharp-patch-libvips-soversion": "256b7d6f8c973bb53b20cff5171c7117d6b35d3aa4e72d22cb906f4fe1e2c890"+ "sharp-patch-libvips-soversion": "256b7d6f8c973bb53b20cff5171c7117d6b35d3aa4e72d22cb906f4fe1e2c890",+ "sharp-patch-mozjpeg-simd-fdct": "a65f87cadf3a6052e44d6314c906f6e2891352f82646b8a6f0b8fcf2c1891e7c",+ "sharp-patch-uhdr-platform-detection": "e0106f9458626f6745a9a9a3841478b7a42f6905f67373d19f6f9b897c33ada5"}}