Skip to content

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.

Keep the lockfile installable on Linux and macOS

Giorgio Ughinide176980e775
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
index 4098733..45ddb6b 100644
--- a/THIRD-PARTY-NOTICES.md
+++ b/THIRD-PARTY-NOTICES.md
@@ -78,7 +78,8 @@ Those components remain under their own terms; the generated
- 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.
+ and its WASM-only runtime dependency `@emnapi/runtime` from every packaged
+ artifact, so neither is 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 as
diff --git a/package-lock.json b/package-lock.json
index ab5eb90..ee3cdcc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -308,6 +308,7 @@
"dev": true,
"license": "BSD-2-Clause",
"optional": true,
+ "peer": true,
"dependencies": {
"cross-dirname": "^0.1.0",
"debug": "^4.3.4",
@@ -329,6 +330,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
@@ -338,6 +340,29 @@
"node": ">=14.14"
}
},
+ "node_modules/@emnapi/core": {
+ "version": "1.11.3",
+ "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@emnapi/core/-/core-1.11.3.tgz",
+ "integrity": "sha1-XpU0ikLNHgbwuao4DNdAkdqk1SA=",
+ "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://ms-feed-12.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@emnapi/runtime/-/runtime-1.11.3.tgz",
+ "integrity": "sha1-hCV647BTHrKuwf+iPXBwDaAHupU=",
+ "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",
@@ -345,6 +370,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"dependencies": {
"tslib": "^2.4.0"
}
@@ -2109,7 +2135,6 @@
"integrity": "sha1-3MrDZbqg8XNOwnD/S1HIlGXo3H8=",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"csstype": "^3.2.2"
}
@@ -3021,7 +3046,6 @@
"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": "*"
},
@@ -3631,7 +3655,8 @@
"integrity": "sha1-uJlZnzClOJ9Z54wVDhn5V60Wo3w=",
"dev": true,
"license": "MIT",
- "optional": true
+ "optional": true,
+ "peer": true
},
"node_modules/cross-spawn": {
"version": "7.0.6",
@@ -3846,7 +3871,6 @@
"integrity": "sha1-PQy/HT3GumvxmDaOW9rPGnNLYPw=",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"app-builder-lib": "26.15.6",
"builder-util": "26.15.3",
@@ -4046,6 +4070,7 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@electron/asar": "^3.2.1",
"debug": "^4.1.1",
@@ -4066,6 +4091,7 @@
"integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
@@ -4081,6 +4107,7 @@
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"license": "MIT",
+ "peer": true,
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
@@ -4091,6 +4118,7 @@
"integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">= 4.0.0"
}
@@ -4118,6 +4146,16 @@
"integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=",
"license": "MIT"
},
+ "node_modules/encoding": {
+ "version": "0.1.13",
+ "resolved": "https://ms-feed-12.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",
@@ -5942,6 +5980,7 @@
"integrity": "sha1-fe8D0kMtyuS6HWEURcSDlgYiVfY=",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"minimist": "^1.2.6"
},
@@ -6423,7 +6462,6 @@
"integrity": "sha1-UepXoX2G9gX4EDlZX7xA7QalX6s=",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=12"
},
@@ -6531,6 +6569,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"dependencies": {
"commander": "^9.4.0"
},
@@ -6548,6 +6587,7 @@
"dev": true,
"license": "MIT",
"optional": true,
+ "peer": true,
"engines": {
"node": "^12.20.0 || >=14"
}
@@ -6702,7 +6742,6 @@
"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"
}
@@ -7357,6 +7396,7 @@
"integrity": "sha1-zSCoWAy2NjXQ5OnUvZidRChudiA=",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"mkdirp": "^0.5.1",
"rimraf": "~2.6.2"
@@ -7383,6 +7423,7 @@
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"dev": true,
"license": "ISC",
+ "peer": true,
"dependencies": {
"glob": "^7.1.3"
},
@@ -7635,7 +7676,6 @@
"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.json
index a6e7ff6..7aa16a2 100644
--- a/package.json
+++ b/package.json
@@ -78,7 +78,8 @@
"THIRD-PARTY-NOTICES.md",
"!node_modules/@img/sharp-wasm32/**",
"!node_modules/@img/sharp-freebsd-wasm32/**",
- "!node_modules/@img/sharp-webcontainers-wasm32/**"
+ "!node_modules/@img/sharp-webcontainers-wasm32/**",
+ "!node_modules/@emnapi/runtime/**"
],
"extraResources": [
{
@@ -120,7 +121,8 @@
"!node_modules/get-windows/**",
"!node_modules/@img/sharp-wasm32/**",
"!node_modules/@img/sharp-freebsd-wasm32/**",
- "!node_modules/@img/sharp-webcontainers-wasm32/**"
+ "!node_modules/@img/sharp-webcontainers-wasm32/**",
+ "!node_modules/@emnapi/runtime/**"
],
"target": "nsis",
"artifactName": "${productName}-${version}-windows-${arch}.${ext}"
diff --git a/scripts/compliance.mjs b/scripts/compliance.mjs
index 8c5f019..dc11769 100644
--- a/scripts/compliance.mjs
+++ b/scripts/compliance.mjs
@@ -93,13 +93,15 @@ 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.
+ * wrappers do. It is never loaded by the packaged application, so it and its
+ * WASM-only runtime dependency are 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",
+ "@emnapi/runtime",
];
/**
@@ -550,6 +552,7 @@ export async function prepareCompliance({
const manifest = readJson(path.join(rootDir, "package.json"));
const target = `${process.platform}-${process.arch}`;
assertWasmExcludedFromPackaging(manifest.build);
+ assertLockfileClosure(lock);
if (includeSources && !releaseTargets.includes(target)) {
throw new Error(
`${target} is not a supported release target (${releaseTargets.join(", ")}). Run ` +
@@ -1207,6 +1210,52 @@ export function assertWasmExcludedFromPackaging(buildConfig) {
}
}
+/**
+ * `npm install` on Windows can silently drop entries that only other platforms need,
+ * which leaves a lockfile that fails `npm ci` on Linux and macOS. The documented
+ * source-install path depends on `npm ci`, so an incomplete lockfile is a release
+ * blocker rather than an inconvenience.
+ */
+export function assertLockfileClosure(lock) {
+ const packages = lock?.packages;
+ if (!packages || typeof packages !== "object") {
+ throw new Error("package-lock.json must declare a packages map.");
+ }
+
+ const resolveFrom = (from, dependency) => {
+ let current = from;
+ for (;;) {
+ const candidate =
+ current === "" ? `node_modules/${dependency}` : `${current}/node_modules/${dependency}`;
+ if (candidate in packages) return candidate;
+ const boundary = current.lastIndexOf("/node_modules/");
+ if (boundary === -1) {
+ if (current === "") return null;
+ current = "";
+ } else {
+ current = current.slice(0, boundary);
+ }
+ }
+ };
+
+ const gaps = [];
+ for (const [from, entry] of Object.entries(packages)) {
+ const required = { ...entry?.dependencies, ...entry?.optionalDependencies };
+ for (const dependency of Object.keys(required)) {
+ if (!resolveFrom(from, dependency)) {
+ gaps.push(`${from || "<root>"} -> ${dependency}`);
+ }
+ }
+ }
+
+ if (gaps.length > 0) {
+ throw new Error(
+ "package-lock.json is missing entries that npm ci needs on other platforms: " +
+ `${gaps.join(", ")}. Regenerate it with an empty node_modules directory.`,
+ );
+ }
+}
+
function nativePayloadBinaries(directory) {
const binaries = [];
function visit(current, relative = "") {
diff --git a/scripts/compliance.test.mjs b/scripts/compliance.test.mjs
index 7fcf547..c10f9cc 100644
--- a/scripts/compliance.test.mjs
+++ b/scripts/compliance.test.mjs
@@ -7,6 +7,7 @@ import test from "node:test";
import { fileURLToPath } from "node:url";
import {
+ assertLockfileClosure,
assertReviewedCopilotCliVersions,
assertWasmExcludedFromPackaging,
buildNativeSourceSpecs,
@@ -501,11 +502,41 @@ test("exactly one architecture-matched native payload is packaged", async () =>
assert.deepEqual(releaseTargets, ["win32-x64", "win32-arm64", "darwin-arm64"]);
});
+test("the lockfile resolves every dependency npm ci needs on other platforms", async () => {
+ const lock = JSON.parse(await readFile(path.join(repoRoot, "package-lock.json"), "utf8"));
+ assert.doesNotThrow(() => assertLockfileClosure(lock));
+
+ // npm on Windows drops entries that only Linux and macOS install, which breaks the
+ // documented `npm ci` source-install path.
+ const pruned = structuredClone(lock);
+ delete pruned.packages["node_modules/@emnapi/runtime"];
+ assert.throws(
+ () => assertLockfileClosure(pruned),
+ /@img\/sharp-wasm32 -> @emnapi\/runtime/,
+ );
+
+ assert.doesNotThrow(() =>
+ assertLockfileClosure({
+ packages: {
+ "": { dependencies: { a: "^1.0.0" } },
+ "node_modules/a": { version: "1.0.0", dependencies: { b: "^1.0.0" } },
+ "node_modules/a/node_modules/b": { version: "1.0.0" },
+ },
+ }),
+ );
+ assert.throws(
+ () => assertLockfileClosure({ packages: { "": { dependencies: { a: "^1.0.0" } } } }),
+ /<root> -> a/,
+ );
+ assert.throws(() => assertLockfileClosure({}), /must declare a packages map/);
+});
+
test("the WASM payload is excluded from every Electron artifact", () => {
assert.deepEqual(excludedWasmPackages, [
"@img/sharp-wasm32",
"@img/sharp-freebsd-wasm32",
"@img/sharp-webcontainers-wasm32",
+ "@emnapi/runtime",
]);
assert.doesNotThrow(() => assertWasmExcludedFromPackaging(repoManifest.build));
for (const list of ["files", "win"]) {