Sync upstream v3.2.4: slim install refs, a crash-safe installer, Change project restarts the agent (v3.2.4)

AI Assisted
This commit is contained in:
jparkerweb committed 2026-12-03 15:17:47 -08:00
1 parent 50319aa332
commit f997a82c4d
45 files changed
+7851 -306

No files matched your search

+10 -4
View File
@@ -14,12 +14,18 @@ const skillNames = () => fs.readdirSync(SKILLS).filter((name) => !name.startsWit
/* ================================================================ install */
test("npm test runs every scripts/test-*.mjs file, and names none that is missing", () => {
const command = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8")).scripts.test;
const listed = [...command.matchAll(/scripts\/(test-[\w-]+\.mjs)/g)].map((m) => m[1]).sort();
test("npm test and npm run test:games together run every scripts/test-*.mjs file once, games only in test:games", () => {
const scripts = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8")).scripts;
const files = (command) => [...String(command || "").matchAll(/scripts\/(test-[\w-]+\.mjs)/g)].map((m) => m[1]);
// The Activities games are an add-on: their tests run only on request (npm run test:games), never in npm test.
const isGame = (f) => /^test-web-console-(activities[\w-]*|page-activities)\.mjs$/.test(f);
const main = files(scripts.test);
const games = files(scripts["test:games"]);
assert.deepEqual(main.filter(isGame), [], "npm test runs no game tests");
assert.deepEqual(games.filter((f) => !isGame(f)), [], "test:games runs only game tests");
// test-fast.mjs runs the fast lane (npm run test:fast); it is a runner, not a test file.
const onDisk = fs.readdirSync(path.join(ROOT, "scripts")).filter((f) => /^test-[\w-]+\.mjs$/.test(f) && f !== "test-fast.mjs").sort();
assert.deepEqual(listed, onDisk);
assert.deepEqual([...main, ...games].sort(), onDisk, "every test file is named once, in one of the two");
});
test("every skill with scripts ships common.mjs and version.json; the dashboard ships only Learning's", () => {