@rubytech/create-maxy-code 0.1.606 → 0.1.607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { execFileSync, spawn, spawnSync } from "node:child_process";
3
3
  import { existsSync, mkdirSync, writeFileSync, cpSync, readFileSync, rmSync, readdirSync, appendFileSync, openSync, closeSync, chmodSync, statSync, realpathSync, accessSync, constants as fsConstants } from "node:fs";
4
4
  import { clearBrandAgentRoot } from "./brand-agent-root.js";
5
5
  import { seedBypassPermissionsSettings, assertBypassPermissionsSeed } from "./permissions-seed.js";
6
- import { resolve, join, dirname } from "node:path";
6
+ import { resolve, join, dirname, basename } from "node:path";
7
7
  import { randomBytes } from "node:crypto";
8
8
  import { resolveInstallPortFromFs, buildMaxyUnitFile, buildClaudeSessionManagerUnitFile, buildEmailSamplerUnitFile, buildClaudePtysSliceUnitFile, buildCloudflaredSliceUnitFile, buildDarwinServiceEnvPath } from "./port-resolution.js";
9
9
  import { buildBrandCronBlock, mergeBrandCronBlock } from "./cron-registration.js";
@@ -570,6 +570,7 @@ function ensureNonSnapChromium() {
570
570
  }
571
571
  RESOLVED_CHROMIUM_BIN = decision.resolvedPath;
572
572
  }
573
+ RESOLVED_CHROMIUM_BIN = preferUnwrappedChromium(RESOLVED_CHROMIUM_BIN);
573
574
  // Defensive: never persist a snap-confined path. If realpath of the resolved
574
575
  // binary still lands under /snap/ (e.g. apt landed a snap package by mistake
575
576
  // on a misconfigured device), throw before writeChromiumBinaryPathFile sees
@@ -622,6 +623,44 @@ function runChromiumPostInstallGate(chromiumBin) {
622
623
  console.log(" Chromium post-install gate passed.");
623
624
  logFile(` [snap-chromium] post-install gate ok: ${chromiumBin} exit=0`);
624
625
  }
626
+ /**
627
+ * Prefer the real Chromium ELF binary over a distro shell wrapper.
628
+ *
629
+ * Debian and Raspberry Pi OS ship `/usr/bin/chromium` as a POSIX shell script
630
+ * that appends its own flags and then `exec $LIBDIR/$APPNAME "$@"`, where
631
+ * `LIBDIR=/usr/lib/$APPNAME` — so the real binary is derivable from the
632
+ * wrapper's own layout rather than guessed.
633
+ *
634
+ * On aarch64 with a page size above 4096 that wrapper adds
635
+ * `--js-flags=--no-decommit-pooled-pages` (its workaround for Debian #1089647).
636
+ * Current Chromium's V8 has removed that flag, so V8 exits "unrecognized flag",
637
+ * the GPU process dies with it, and the installer's CDP check then correctly
638
+ * finds nothing listening and aborts the upgrade. Measured on the beacons Pi
639
+ * 2026-08-14: Chromium 148.0.7778.167, `getconf PAGESIZE` 16384, and
640
+ * `chromium --js-flags=--no-decommit-pooled-pages` reproduces it directly.
641
+ *
642
+ * Execing the binary skips the wrapper and every flag it would inject. The
643
+ * wrapper is returned unchanged whenever the shape does not match — not a
644
+ * script, no binary at the derived path, or that path is not ELF — so a distro
645
+ * laying Chromium out differently is untouched.
646
+ */
647
+ function preferUnwrappedChromium(binPath) {
648
+ const fileType = (p) => {
649
+ const r = spawnSync("file", ["-b", p], { encoding: "utf-8", stdio: "pipe", timeout: 5_000 });
650
+ return r.status === 0 ? (r.stdout ?? "").trim() : "";
651
+ };
652
+ if (!/shell script/i.test(fileType(binPath)))
653
+ return binPath;
654
+ const appName = basename(binPath);
655
+ const real = `/usr/lib/${appName}/${appName}`;
656
+ if (!existsSync(real) || !/^ELF/.test(fileType(real))) {
657
+ logFile(` [chromium-wrapper] ${binPath} is a wrapper but ${real} is not a usable binary — keeping the wrapper`);
658
+ return binPath;
659
+ }
660
+ console.log(` Chromium wrapper bypassed: ${binPath} → ${real}`);
661
+ logFile(` [chromium-wrapper] bypassed wrapper=${binPath} binary=${real}`);
662
+ return real;
663
+ }
625
664
  /**
626
665
  * write the resolved Chromium absolute path to
627
666
  * `<INSTALL_DIR>/platform/config/chromium-binary.path` so vnc.sh and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy-code",
3
- "version": "0.1.606",
3
+ "version": "0.1.607",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy-code": "./dist/index.js"
@@ -9,6 +9,10 @@ Invoked by the admin agent directly.
9
9
 
10
10
  This is the platform's release timeline, newest first. Each entry shows the date it shipped and the version it shipped in, so you can tell the operator how current their install is. To compare, read the installed version from `capabilities-here` and match it against the versions below. Keep answers high level and in plain English; this is a summary, not a full commit log.
11
11
 
12
+ ## 2026-08-14 (0.1.607)
13
+
14
+ - Upgrades no longer fail on a Raspberry Pi with a 16K page size. The system's own Chromium launcher adds a setting that current Chromium has removed, so the browser exited on startup and the install stopped when it could not reach it. The installer now runs Chromium directly, skipping that launcher.
15
+
12
16
  ## 2026-08-14 (0.1.606)
13
17
 
14
18
  - Conversations start after an install again. The installer marked only your home folder as trusted, and the assistant now asks about the folder each account actually runs from, so a session would stop at a trust prompt nobody could answer.
@@ -22,8 +22,8 @@
22
22
  <link rel="modulepreload" crossorigin href="/assets/wrench-nDMQ6x-6.js">
23
23
  <link rel="modulepreload" crossorigin href="/assets/page-B72XigcU.js">
24
24
  <link rel="stylesheet" crossorigin href="/assets/jsx-runtime-hPFGo4rC.css">
25
- <link rel="stylesheet" crossorigin href="/assets/useMediaQuery-DXAuc8G-.css">
26
25
  <link rel="stylesheet" crossorigin href="/assets/AdminLoginScreens-CWMpccrR.css">
26
+ <link rel="stylesheet" crossorigin href="/assets/useMediaQuery-DXAuc8G-.css">
27
27
  <link rel="stylesheet" href="/brand-defaults.css">
28
28
  </head>
29
29
  <body>