62 Commits

Author SHA1 Message Date
Maciej Lisiewski
4d5c6cfb0c chore(node): require Node >=26
Root and desktop engines.node move from '^22.22.0 || ^24.11.0 || >=26.0.0' to '>=26', and the
website's from '>=20.0' to '>=26.0' (PM already pins Node 26.12.1). The lockfile workspace engine
mirrors, the CONTRIBUTING prerequisite, the tests-js engine-policy table and the
bootstrap-installer release workflow's setup-node pin (24.11.1 -> 26.12.1, which engine-strict
would now reject) follow.
2026-10-23 22:41:04 +02:00
Maciej Lisiewski
b3100962a4 chore(deps): bump typescript-eslint to 8.71.1
typescript-eslint: 8.64.0 -> 8.71.1 (pins edited: 1; also: {'@typescript-eslint/eslint-plugin': "['8.64.0']->['8.71.1']", '@typescript-eslint/parser': "['8.64.0']->['8.71.1']", '@typescript-eslint/project-service': "['8.64.0']->['8.71.1']", '@typescript-eslint/scope-manager': "['8.64.0']->['8.71.1']", '@typescript-eslint/tsconfig-utils': "['8.64.0']->['8.71.1']", '@typescript-eslint/type-utils': "['8.64.0']->['8.71.1']", '@typescript-eslint/types': "['8.64.0']->['8.71.1']", '@typescript-eslint/typescript-estree': "['8.64.0']->['8.71.1']", '@typescript-eslint/utils': "['8.64.0']->['8.71.1']", '@typescript-eslint/visitor-keys': "['8.64.0']->['8.71.1']"})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
875d91acaa chore(deps): bump nanoid to 6.0.2
nanoid: 6.0.0 -> 6.0.2 (pins edited: 1; also: {})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
3ce775cc2d chore(deps): bump mermaid to 11.17.2
mermaid: 11.16.1 -> 11.17.2 (pins edited: 2; also: {})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
1f101d84bf chore(deps): bump lefthook to 2.2.1
lefthook: 2.1.14 -> 2.2.1 (pins edited: 1; also: {'lefthook-darwin-arm64': "['2.1.14']->['2.2.1']", 'lefthook-darwin-x64': "['2.1.14']->['2.2.1']", 'lefthook-freebsd-arm64': "['2.1.14']->['2.2.1']", 'lefthook-freebsd-x64': "['2.1.14']->['2.2.1']", 'lefthook-linux-arm64': "['2.1.14']->['2.2.1']", 'lefthook-linux-x64': "['2.1.14']->['2.2.1']", 'lefthook-openbsd-arm64': "['2.1.14']->['2.2.1']", 'lefthook-openbsd-x64': "['2.1.14']->['2.2.1']", 'lefthook-windows-arm64': "['2.1.14']->['2.2.1']", 'lefthook-windows-x64': "['2.1.14']->['2.2.1']"})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
5d10f34e92 chore(deps): bump katex to 0.19.0
katex: 0.18.4 -> 0.19.0 (pins edited: 3; also: {'commander': "['8.3.0']->['15.0.0']"})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
0d2d524c89 chore(deps): bump globals to 17.13.0
globals: 17.7.0 -> 17.13.0 (pins edited: 1; also: {})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
11cc7bf3da chore(deps): bump @playwright/test to 1.64.0
@playwright/test: 1.62.1 -> 1.64.0 (pins edited: 2; also: {'playwright': "['1.62.1']->['1.64.0']", 'playwright-core': "['1.62.1']->['1.64.0']"})
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
eb81b383b0 chore(deps): move the remaining esbuild copy to 0.28.2
The esbuild 0.28.2 pin left tsx's ~0.28.0 range on a hoisted 0.28.1 copy, so the
lock carried both versions and the new nested copies had no allowScripts decision.
Updating within tsx's range collapses them to one 0.28.2 and moves the allowScripts pin.
2026-10-23 22:00:12 +02:00
Maciej Lisiewski
f97729bcdc chore(deps): bump eslint-plugin-perfectionist to 5.12.1
eslint-plugin-perfectionist: 5.10.0 -> 5.12.1 (pins edited: 1; also: {})
2026-10-23 22:00:12 +02:00
ethernet
21693bdf29 fix(deps): pin Electron 44.9.3 and drop the 40.10.2-era install config
Retargets the 44.4.5 bump to 44.9.3, the newest 44.x. Per #142533,
44.9.1+ carries the eMudhra root distrust, and 44.9.3 adds upstream
Chromium/V8 security backports. The aging-gate exclusion now names
44.9.3 and its release date.

Electron 42+ ships no install script, so the electron allowScripts entry
has nothing left to allow. Nothing depends on yauzl any more, so the
override #47792 added for Electron's old JS extractor goes too. The
Windows attach E2E launched the binary the postinstall used to unpack;
it now prepares the runtime explicitly, like the other desktop lanes.
2026-10-22 16:17:57 -04:00
Brooklyn Nicholson
7455123d2a fix(deps): bump Electron 40.10.2 to 44.4.5
Clears the electron advisories (GHSA-r4w5-6pfg-jxp5, GHSA-9f4c-93c8-jc8g) and,
via electron 44's @electron-internal/extract-zip, GHSA-jmr9-qjv8-65gv and
GHSA-7pqw-9j4j-h8q3. The pin stays in the 14-day aging gate's exclusion list
until 44.4.5 is two weeks old (2026-10-06), matching the .npmrc house
convention; the allowScripts entry follows the exact pin. mac packaging raises
minimumSystemVersion to 13.0 because Electron 44 dropped macOS 11/12 support.

Co-authored-by: Adihaliem <316252127+Adihaliem@users.noreply.github.com>
(cherry picked from commit 66b59c8389db9fa8e23cbda16c1f155574b6132d)
2026-10-22 16:17:57 -04:00
Maciej Lisiewski
c82bdd01ae chore(deps): bump vitest to 4.1.12
Latest 4.1.x patch: mocker hardening for manual and redirect mocks
(vitest-dev/vitest#11580 backport to v4). Also bumps @vitest/mocker.

vitest 4.1.12 is 7 days old, below the min-release-age=14d guard, so
.npmrc gains a dated exclude entry (remove when > 2wks old).
2026-10-22 21:20:10 +02:00
Maciej Lisiewski
132d283966 fix(deps): bump katex 0.16.47 → 0.18.4 (low, GHSA-238p-pmpm-9mq7)
KaTeX < 0.18.2 lets existing prototype pollution bypass the `trust`
restriction; 0.16.x and 0.17.x get no fix. 0.18.4 is the newest release
that keeps commander ^8: 0.18.5+ requires commander 15 (Node >= 22.12),
which the website's declared Node >= 20 cannot install under
engine-strict. 0.18.11/0.19.0 also change strict-mode behaviour.

Bumps the direct pins in apps/desktop and apps/bootstrap-installer and
adds a `katex` override in the root and website projects so the ^0.16
consumers (rehype-katex, micromark-extension-math, @streamdown/math,
mermaid 11.16.1) share the fixed copy; mermaid's own move to ^0.18 was a
package.json-only change.

The only breaking changes in range are 0.17.0's internal
__defineFunction API (unused here) and 0.18.0's `katex-` prefix on 20
internal CSS classes (base, strut, tag, underline, ...). The repo
targets only `.katex*` selectors, ships KaTeX's own stylesheet, and
Streamdown runs the math plugin after its sanitizer, so nothing strips
or restyles the renamed classes. The prefix also stops the app's
Tailwind `.underline` rule from restyling KaTeX's internal underline
spans.
2026-10-22 00:53:44 +02:00
Maciej Lisiewski
3ae19a0352 fix(deps): bump postcss-selector-parser → 7.1.6 (medium, GHSA-rj75-hqrm-r3gf)
7.1.6 parses flat selectors in linear time, closing GHSA-rj75-hqrm-r3gf
(quadratic-complexity CPU exhaustion). Overrides pin one version in both
locks:

- root: 6.0.10 → 7.1.6. The only consumer, @tailwindcss/typography
  0.5.20 (desktop styles.css @plugin), pins 6.0.10 exactly.
- website: the hoisted 6.1.4 → 7.1.6. postcss-calc (^6.0.11) and the
  cssnano 6 selector plugins (postcss-merge-rules, postcss-minify-
  selectors, postcss-unique-selectors, postcss-discard-unused, stylehacks;
  ^6.0.16) move onto 7; the 15 nested 7.1.6 copies the csstools /
  postcss-preset-env plugins already used dedupe into it.

The only 7.0.0 breaking change makes node insertion during each()/walk()
iteration safe, which can change what a mutating plugin visits; the
compiled CSS below is byte-identical to main's. 7.1.7 (latest) is one
day old, inside the 14-day npm gate, and carries no security fix.
2026-10-22 00:35:45 +02:00
Maciej Lisiewski
420812bc80 fix(deps): bump nanoid 3.x to 3.3.20 (high, GHSA-2v37-7h3g-55p8)
The website override pinned the vulnerable 3.3.17 (which npm audit also
reports through postcss). Root and website overrides now both pin 3.3.20,
so every nanoid 3.x copy in both locks is the same version. The 5.x and
6.x copies are other majors and not affected.
2026-10-21 22:45:40 +02:00
Maciej Lisiewski
ba9534c157 fix(deps): bump vite 8.2.0 → 8.2.4 (high, GHSA-587h-7wmj-h5pm)
vite 8.2.4 bundles launch-editor fixes for GHSA-587h-7wmj-h5pm,
GHSA-r825-w8mm-5pxw and GHSA-698v-4r3x-3vcv. Bumped in all three
workspaces that pin it (web, apps/desktop, apps/bootstrap-installer),
leaving one hoisted copy.

Forced by vite 8.2.4's ranges:
- rolldown ~1.2.4: 1.2.1 → 1.2.13 (@oxc-project/types =0.153.0)
- postcss ^8.5.26: root override 8.5.23 → 8.5.29; website lock moved
  to the same 8.5.29

The .npmrc age-gate excludes for vite/rolldown/@rolldown/*/@oxc-project
were marked "remove once vite 8.2.0 is > 2wks old" (it is 82 days) and
let a same-day rolldown 1.2.15 into the lock, so they are removed; every
version above is past the 14-day gate. The website postcss exclude
("remove when 8.5.23 is > 2wks old") is removed for the same reason.
2026-10-21 21:14:06 +02:00
Maciej Lisiewski
c6c087d258 fix(deps): bump dompurify 3.4.13 → 3.4.17 (low, GHSA-6688-9rhm-gjv2)
Direct dep in root (override), apps/desktop and website; 3.4.17 is the
latest release older than 3 days (4 days old, covered by the existing
min-release-age-exclude entry with the comment refreshed).
2026-10-16 17:32:43 +02:00
Maciej Lisiewski
1e230033e2 fix(deps): bump ip-address 10.3.1 → 10.7.4 (medium, GHSA ip-address alerts)
Override pin bump (socks' ^10.1.1 range admits it); 10.7.4 is the
latest release older than 3 days — 5 days old, so it gets a
min-release-age-exclude entry, removable after 2 weeks.
2026-10-16 17:30:49 +02:00
sajidhaleem
732f0f1769
fix(deps): bump pinned npm packages to clear npm audit findings
Bumps the version pins (root package.json overrides/dependencies, plus
direct devDependencies in web/ and ui-tui/) that were holding several
transitive packages on versions with known advisories:

- brace-expansion 5.0.9 -> 5.0.12 (ReDoS/stack-exhaustion advisories)
- js-yaml 4.3.1 -> 4.3.2 (merge-key CPU DoS)
- minimatch: unaffected directly, cleared via brace-expansion bump
- undici (^6 line) 6.28.0 -> 6.29.0, (^7 line) 7.29.0 -> 7.30.0
  (WebSocket/retry-interceptor/TLS-validation advisories); ui-tui's
  own direct undici dependency synced to 6.29.0 to match
- yaml 2.8.1 -> 2.9.1 (stack overflow on deeply nested collections)
- vitest / @vitest/mocker 4.1.10 -> 4.1.11 (path traversal in mock
  redirect); web and ui-tui devDependencies synced to match

Verified: npm audit findings across the three doctor-checked trees
go 3/8/6 -> 0/1/1. The one remaining finding in web and ui-tui is
source-map-js 1.2.1 (fix: 1.2.2, GHSA event-loop DoS) -- its patched
release is still inside this repo's npm install quarantine window
(time-pinned installs), so it intentionally was not forced; it will
clear on its own once the release ages past that window.

Full test suites re-run clean: web 429/429 passing, ui-tui 1624/1626
passing (the 2 non-passing are a pre-existing terminalParity.test.ts
failure reproduced identically on unmodified upstream/main, unrelated
to this change -- looks like a terminal/IDE-detection env dependency).

Reported by `hermes doctor`:
  Browser tools (agent-browser): 3 -> 0
  web workspace: 8 -> 1
  ui-tui workspace: 6 -> 1
2026-10-13 22:51:07 -04:00
Maciej Lisiewski
9b4551d824 chore: pin specific js dependency versions 2026-10-10 23:58:48 +02:00
Maciej Lisiewski
f8b76dd69b ci: add js linting to pre commit hook 2026-10-10 23:58:48 +02:00
ethernet
0668184e59
fix: don't fail npm install when lefthook can't install hooks
lefthook refuses to install when core.hooksPath is set globally and
exits non-zero. prepare forwarded that status, so npm ci failed and
took down hermes update's node-deps step (desktop, tui and web).
Hooks are a contributor convenience; lefthook already prints its own
remediation, so let it warn and keep the install going.
2026-10-09 12:59:45 -04:00
ethernet
a50c4ba7c9
fix: skip lefthook install when there is no .git
Docker builds copy the source without .git. npm ci runs the root
prepare script, and lefthook install exits 128 there, so the image
build failed in node-deps.mjs. Install the hooks only when .git
exists. Use node so the check also works with cmd.exe on Windows,
and so it needs no extra file in the Docker build context.
2026-10-08 13:39:31 -04:00
Maciej Lisiewski
f6258f6cfb ci: add lefthook git hook manager to dev dependencies 2026-10-08 17:22:24 +02:00
ethernet
e7af654b31 fix(signing): bound binary scanning during macOS packaging
The osx-sign dependency accepts protobuf-like file lengths beyond its
512-byte sample and keeps allocating after EOF. That crashes the native
macOS signing walk before codesign can finish.

Pin the scanner used by osx-sign to the fixed version already in the
build closure. Keep signature checks enabled. A real signing-walk test
reproduces the allocation failure before the override and passes after it.
2026-09-08 00:45:29 -04:00
ethernet
da236308fd feat(desktop): wire macOS bundle updates and guarded feed publication
Route packaged macOS bundles and Light through the updater strategy.
Use electron-updater 6.8.9 and wait for native signature acceptance before
backend teardown. Keep checkout and Store ownership separate.

Share Darwin feed paths between packaging, runtime and publication.
Validate both native feeds, verify streamed artifact hashes, prevent
same-tag artifact replacement, and conditionally update the channel
pointer. Protect live feed references during canary retention.

Use one notarization owner. Require publishing credentials and validate
the stapled app. Keep Windows, Linux and Termux jobs unchanged.

Verified with updater/feed unit and transport tests, release-helper tests,
desktop typechecks, the desktop JS build, and workflow lint. No E2E,
native macOS install, release dispatch or public publication was run.
2026-09-06 21:27:58 -04:00
Teknium
15eb5caf7a fix(install): Node 24.0–24.10 no longer passes the gates only to die at npm EBADENGINE
The locked dependency tree now carries @babel/* 8.x, which requires
node ^22.18.0 || >=24.11.0. Our engines.node arm said ^24.0.0 and the
installer gates (node_satisfies_build / Test-NodeVersionOk) accepted any
Node 24 — so a system Node 24.0–24.10 cleared every gate we own and then
failed 'npm install' with EBADENGINE under engine-strict=true.

- Raise the 24 arm to ^24.11.0 in root + desktop package.json and the
  package-lock.json mirrors
- Tighten node_satisfies_build (install.sh) and Test-NodeVersionOk
  (install.ps1) to 24.11+; update user-facing wording
- Add invariant tests: every engines.node arm floor must satisfy every
  locked dependency's engines.node, and the installer gates must encode
  the same floors as the manifest — so the next babel-style floor bump
  turns into a CI red instead of a user install outage
- docs: correct stale 'Node.js v22' provisioning claim
2026-08-28 12:20:40 -07:00
fangliquan
4a7df1d070 fix(dashboard): align supported Node engine lines 2026-08-28 05:12:33 -07:00
Teknium
8fdda828a8 fix(deps): bump the nanoid@^3 override past GHSA-2v37-7h3g-55p8 (#91931)
The repo's own override pinned nanoid@3.3.17 — the exact version
GHSA-2v37-7h3g-55p8 / CVE-2026-67213 flags (custom generators loop
indefinitely on size 0) — so every fresh install and every npm audit
shipped/reported the vulnerable pin no matter what transitives wanted.
3.3.18 is the patched release on the same major. Lockfile re-resolved;
npm audit now reports zero nanoid findings, and 3.3.18's zero-size
generator returns instead of hanging (verified live).

Addresses the upstream-pin quarter of #91931 (mechanism 1 of the
reporter's four); the updater-side skip/verify mechanisms and the
uv.lock staleness half (#91424) remain tracked there.
2026-08-26 16:14:51 -07:00
Zak B. Elep
5f5f8d5b62 fix(cli): drop agent-browser/@streamdown-math from root npm deps
`hermes update` was pruning root-level Node dependencies (agent-browser)
because npm ci always wipes and reifies node_modules according to its
active filter -- no root-first/workspace-first ordering or flag
combination (--workspaces=false, --include-workspace-root, etc.) can
reliably keep a root-only package.json dependency from being pruned by
a subsequent workspace-scoped npm ci. Confirmed empirically and via
npm/cli source (isArboristCmd hardcodes includeWorkspaceRoot=false for
ci/install), so no amount of install-order juggling fixes this for good.

Instead of chasing install order, remove the root-only dependencies
that made the npm step fragile in the first place:

- agent-browser is no longer a root package.json dependency. It
  resolves lazily via `npx agent-browser` (tools/browser_tool.py
  already had this as a fallback; it's now the primary path).
  warm_agent_browser_npx_cache() is called fire-and-forget from both
  `hermes update` and `hermes doctor --fix` to keep npx's cache warm,
  preserving the "available before any session starts" property
  agent-browser had as an eager dependency without re-entangling it
  with the npm workspace graph.
- @streamdown/math moves to apps/desktop/package.json, where it's
  actually imported (markdown-text.tsx, katex-memo.ts) -- it was
  never used anywhere else and was subject to the same pruning risk.
- _update_node_dependencies() collapses to a single
  `npm ci --workspace ui-tui --workspace web` call now that root has
  no dependencies of its own to protect, and keeps its original spot
  ahead of `_build_web_ui()` at both call sites in update_cmd.py --
  with no root-only dependencies left to protect, there's no reason
  for the Node refresh and the web build to run in any particular
  order relative to each other.
- hermes_cli/tools_config.py's post-setup Chromium-install path and
  hermes_cli/doctor.py's agent-browser check both now resolve through
  the same PATH -> Homebrew/Hermes-managed-node -> npx cascade
  (_find_agent_browser / _resolve_npx_bin) instead of hand-rolling
  their own node_modules/.bin lookups, so they can't diverge from what
  browser tools actually invoke at runtime.
- tests-js/package-json-lazy-deps.test.ts gets a lockfile-level check
  mirroring the existing camofox one, so a future regression that
  reintroduces agent-browser into package-lock.json fails this test
  directly instead of relying on manual review to catch it.

Fixes #43564.
2026-08-13 02:38:28 -07:00
ethernet
8789cf9f0c fix(sec): patch the npm advisories main left open
Main (7537de9e7) moved most of the vulnerable locked versions, but some
fixes live only in the lockfiles and some advisories stayed open. This
commit closes the rest:

website/package.json gets durable overrides for js-yaml 4.3.1,
dompurify 3.4.13, mermaid 11.16.1, and tar 7.5.22. The root workspace
gets the same tar override, which moves the tar 6.2.1 copies under
get-windows and @mapbox/node-pre-gyp past twelve open advisories.
Without an override, a reinstall can pull an old transitive copy back
in.

image-size <=2.0.2 has two infinite-loop DoS advisories and no fixed
release upstream. An override points it at @nous-research/image-size
2.0.3, our maintained fork of the real repo. The OSV scanner resolves
the aliased fork cleanly, so no ignore entries are needed.

The photon sidecar moves @opentelemetry/core to 2.10.0. The
whatsapp-bridge gets a body-parser 1.20.6 override, so the lockfile-only
fix from main cannot regress on reinstall.

website/.npmrc gets matching min-release-age exclusions for the fix
releases that are less than two weeks old.

electron stays at 40.10.2. The 41.x fix for GHSA-9f4c-93c8-jc8g brings
back the install failure that bb8280b75 reverted: install.js in 40.10.3+
extracts with an MSVC native binding, which fails on Windows machines
without the VC++ Redistributable. Upstream tracks this in
electron/electron#52481, with no fix released.
2026-08-10 13:49:37 -04:00
teknium1
bb8280b753 revert(desktop): roll Electron back to 40.10.2
Reverts the Electron portion of 7537de9e74 (40.10.2 -> 40.10.6,
GHSA-r4w5-6pfg-jxp5). The bump broke fresh Windows installs: 40.10.3+
swapped install.js's extraction to @electron-internal/extract-zip, an
MSVC-built native binding that ERR_DLOPEN_FAILEDs on machines without
the VC++ Redistributable (field report Aug 9, fresh VM, confirmed).

Security impact of reverting is nil for our code paths:
- GHSA-r4w5-6pfg-jxp5 (Moderate 5.9): requires the legacy
  ProtocolResponse.url API with session-partition isolation; desktop
  only uses the modern protocol.handle() and no cross-session
  isolation. Not exposed.
- GHSA-9f4c-93c8-jc8g (High 7.2): affects ALL of 40.x with no fixed
  40.x release (fix is 41.10.3+); 40.10.2 vs 40.10.6 is a wash. Real
  mitigation is hardening our setWindowOpenHandler (follow-up PR).

allowScripts version-keyed entry moved to electron@40.10.2 so the
postinstall (dist download) still runs; allow-scripts-sync vitest
suite passes. Electron 41.x major remains deferred/on hold.
2026-08-08 23:24:02 -07:00
Brooklyn Nicholson
7210db5646 fix(build): allow get-windows install script, refresh stale allowScripts pins
get-windows was added to apps/desktop without a root allowScripts entry, so
npm blocked its node-pre-gyp install script and the win32 prebuilt binding
was never downloaded. Every Windows desktop build then died in
stage-native-deps, including the updater's headless rebuild, leaving Windows
users unable to update the app.

The same manifest had drifted twice more: the CVE sweep in 7537de9e74 moved
Electron to 40.10.6 and left the electron@40.10.2 pin behind, and website's
allowlist still names core-js-pure, which its lockfile no longer resolves,
while fsevents runs an install script with no entry at all.

Co-authored-by: gsy324 <gsy324@users.noreply.github.com>
Co-authored-by: elbukott1 <elbukott1@users.noreply.github.com>
Co-authored-by: Brian Franco <BrianFranco@users.noreply.github.com>
2026-08-08 21:23:16 -05:00
Teknium
a1e4fee33d fix(deps): enforce 14-day aging + exact pins on all bumped versions
Audit of every changed version across all 4 npm locks + uv.lock
against the >=2-week supply-chain aging rule:

- ip-address: 10.4.0 (8d, and a minor feature release) -> 10.3.1
  (exactly 14d, the CVE-fix patch for GHSA-mwp4-54f8-5fhr)
- nanoid: floating resolutions pulled 3.3.18/6.0.1 (1d/5d, post-fix
  releases) -> scoped overrides nanoid@^3=3.3.17 (the CVE-fix
  version) and nanoid@^6=6.0.0 (27d)
- js-yaml/undici: scoped overrides pin the exact CVE-fix versions
  so transitive copies can't float to newer releases
- postcss: 8.5.25/8.5.26 (2d, npm update drift) -> pinned 8.5.23 (15d)
- @electron/get 5.1.0 (12d) -> 5.0.0 (108d),
  @electron-internal/extract-zip 1.0.5 (10d) -> 1.0.4 (45d) —
  electron 40.10.6's carets resolved to sub-14d releases; both were
  incidental drift, not CVE fixes
- website: nanoid override 3.3.17

Remaining sub-14d versions are exclusively documented CVE-fix
exceptions (.npmrc min-release-age-exclude entries with removal
dates): brace-expansion 5.0.9, dompurify 3.4.13, js-yaml 4.3.1,
mermaid 11.16.1, nanoid 3.3.17, fast-uri 3.1.5, h2 4.4.1 (pyproject
exclude-newer exception).

Rescan: 18 findings (blocked-upstream only). npm run check green.
2026-08-08 14:06:48 -07:00
Teknium
7537de9e74 fix(deps): patch 31 known CVEs across Python and npm lockfiles
OSV weekly scan reported 50 known vulnerabilities in pinned deps.
This bumps everything with a released, semver-compatible fix:

Python (uv.lock):
- aiohttp 3.14.1 -> 3.14.3 (GHSA-cq5v-8q36-5273, GHSA-mfx4-hv73-q22v,
  GHSA-mq44-7p77-q5h7)
- h2 4.3.0 -> 4.4.1 (CVE-2026-71554 request smuggling; exclude-newer
  exception documented in pyproject, remove after 2026-08-17)

npm (root workspace):
- brace-expansion 5.0.8 -> 5.0.9, undici 6.27->6.28 / 7.28->7.29,
  js-yaml 4.3.1, nanoid 3.3.17/3.3.18, ip-address 10.4.0,
  mermaid 11.16.1 + dompurify 3.4.13 (root overrides so the
  streamdown transitive copy is pinned too)
- electron 40.10.2 -> 40.10.6 (GHSA-r4w5-6pfg-jxp5; the 41.x major
  for GHSA-9f4c-93c8-jc8g is deferred to its own PR)

npm (website): mermaid, dompurify, js-yaml, nanoid, fast-uri 3.1.5,
postcss 8.5.23, undici 7.29.0
npm (photon sidecar): @opentelemetry/core 2.8.0 via override, undici
npm (whatsapp-bridge): body-parser 1.20.6

min-release-age excludes added to .npmrc/website/.npmrc for the
sub-2wk CVE-fix releases, each with a removal date.

Remaining findings are blocked upstream: cryptography <49 cap
(alibabacloud-tea-openapi), image-size (no fixed release), tar 6.x
transitive majors, electron 41.

Local rescan: 50 -> 19 known vulns, 0 introduced.
2026-08-08 14:06:48 -07:00
Brooklyn Nicholson
63ff4b87b6 fix(install): sync the lockfile engines mirrors with the manifests
`hermes desktop` still failed with EBADENGINE demanding Node >=26 after
#76562, on a machine whose `apps/desktop/package.json` already said
`^20.19.0 || >=22.12.0`. #76562 fixed the manifest but not its mirror in
`package-lock.json`, and `npm ci` reads engines from the lockfile:

    package.json  apps/desktop -> {'node': '^20.19.0 || >=22.12.0'}
    package-lock  apps/desktop -> {'node': '>=26.0.0'}      <- what gated

Chasing that exposed a second, pre-existing problem: the floor #76562
declared was too generous. Running the real `npm ci` against the whole
workspace on Node 22.21.1 fails on a transitive dependency —

    npm error notsup Not compatible with your version of node/npm:
      react-router@8.3.0
    npm error notsup Required: {"node":">=22.22.0"}

react-router 8.3.0 (a direct dependency of both `apps/desktop` and `web`)
declares `>=22.22.0`, which is tighter than Vite's `^20.19 || >=22.12` and
excludes all of Node 20. So `>=20.0.0` promised support the tree cannot
deliver: an install on Node 20 or early 22 passed the installer's gate and
then died inside `npm ci` on someone else's package.

All four engine declarations now state the floor the dependency tree
actually has, `>=22.22.0`: root `package.json`, `apps/desktop/package.json`,
and both of their `package-lock.json` mirrors. The installer gates move with
them (`node_satisfies_build` in install.sh, `Test-NodeVersionOk` in
install.ps1) so a too-old system Node is replaced with the managed one
*before* npm runs, and the failure a user does see names hermes-agent rather
than a transitive package. NODE_VERSION stays 22 — latest-v22.x is 22.23.2,
comfortably above the floor.

The invariant test gains the case that would have caught the mirror drift on
its own: the desktop assertion now pins the tightest floor a dependency
actually declares, and the managed-runtime check compares majors, since
install.sh fetches latest-v{major}.x rather than {major}.0.0.

Verified with real `npm ci --dry-run` over the full workspace:
- node 22.23.2 (what install.sh provisions) -> 1258 packages
- node 26.5.1                               -> 1189 packages
- node 22.21.1 (below the floor)            -> EBADENGINE naming
  hermes-agent, i.e. our own manifest, not react-router
2026-08-01 23:28:28 -05:00
Brooklyn Nicholson
8e08a4a16e fix(install): restore installs — engines floor no shipping toolchain can meet
Fresh installs and `hermes update` both fail at the first `npm ci`:

    npm error code EBADENGINE
    npm error notsup Required: {"node":">=26.0.0","npm":">=12.0.0"}
    npm error notsup Actual:   {"node":"v24.15.0","npm":"11.12.1"}

`.npmrc` sets engine-strict=true, so `engines` is a hard gate on every
install. The floor was raised to npm >=12 — but no Node release bundles
npm 12: Node 26 ships 11.17.0, 24 ships 11.16.0, 22 ships 10.9.8. The
requirement is unsatisfiable by any stock toolchain, so the installer
provisions a Node and is immediately unable to install with it.

engines.npm becomes `<11.10.0 || >=11.17.0`. That still excludes the band
the strictness was actually for: npm 11.10-11.16 honor `min-release-age`
but ignore `min-release-age-exclude`, both set in .npmrc, so they apply the
14-day gate to packages we exempted. Verified rather than assumed — npm
11.12.1 fails `ETARGET ... vite@8.2.0 with a date before 7/18/2026` while
11.17.0 installs it.

engines.node returns to >=20.0.0 and the toolchain floor to Node 22.
Nothing in the tree needs 26: Vite 8.2.0 declares `^20.19.0 || >=22.12.0`
and Electron 40 declares `>=12.20.55`. Requiring 26 force-migrated every
working install for no dependency reason. apps/desktop drops to Vite's own
floor for the same reason; the desktop bundle builds clean on Node 22.

install.sh gained a second gate: a system Node was accepted on version
alone, so a machine with Node 24 + its bundled npm 11.16.0 (the bad band)
passed the check and then failed `npm ci`. npm_supports_npmrc() now rejects
that band and installs the managed Node instead.

CI, Docker and nix are hermetic and keep pinning Node 26 / npm 12 — they
provision their own toolchain, and both satisfy the relaxed range.

tests/test_engines_satisfiable.py encodes the invariants that would have
caught this: the npm floor must be met by an npm some shipping Node
bundles, the node floor by the runtime install.sh provisions, the desktop
floor by its own build toolchain, and the lockfile mirror must match.
Restoring the broken values fails 5 of them with the reason stated.

Verified end-to-end (real downloads, temp HERMES_HOME):
- fresh install: managed node v22.23.2 / npm 10.9.8 -> npm ci, 209 packages
- existing managed tree (v22.22.3 / npm 10.9.8) -> npm ci, 209 packages
- node 26.5.1 + bundled npm 11.17.0 -> npm ci, 208 packages
- system npm 11.12.1 (the reported case) -> EBADENGINE, recovery provisions
  a managed tree and retries green
- apps/desktop `npm run build` on Node 22 -> dist built, assert passes
2026-08-01 22:56:52 -05:00
ethernet
713a983e4a feat(runtime)!: require Node 26 across all installers, heal, and upgrade paths
Hermes now pins its toolchain to Node 26 everywhere. Every path that
installs, accepts, heals, or upgrades a Node runtime moves from the old
22-default / `^20.19 || >=22.12` floor to a single rule: Node >=26.

Installers:
- scripts/install.sh — NODE_VERSION=26; node_satisfies_build() collapses
  the two-branch Vite floor to `major >= 26`; user-facing messages updated.
- scripts/install.ps1 — $NodeVersion=26; Test-NodeVersionOk likewise;
  winget fallback switches OpenJS.NodeJS.LTS -> OpenJS.NodeJS (26 is
  Current, not LTS — the LTS manifest would reinstall a too-old Node).
- Dockerfile — node_source stage node:22-bookworm-slim -> node:26 (digest
  pinned, amd64 sha256:9e6f...bf73).
- nix/ was already on nodejs_26 (lib.nix, npm-12-0-2.nix); the checks.nix
  wrapper check ratchets from `>= 20` to `>= 26`.

Heal/upgrade paths:
- scripts/lib/node-bootstrap.sh — HERMES_NODE_TARGET_MAJOR default 22->26
  and HERMES_NODE_MIN_VERSION default 20->26, so heal_managed_node,
  _nb_install_bundled_node, and the fnm/proto/nvm/brew rungs all target 26
  and stop accepting an on-PATH Node below it. Both remain env-overridable.
- hermes_constants.py — _HERMES_NODE_TARGET_MAJOR fallback 22->26, which
  drives the Windows heal path's latest-v26.x download.

Version gates:
- package.json engines.node >=20 -> >=26; apps/desktop engines
  `^20.19.0 || >=22.12.0` -> `>=26.0.0`.
- CI setup-node: all five workflows 22 -> 26.
- Docs describing Hermes's own toolchain updated (windows-native, docker,
  acp, nix-setup, contributing). Skill docs describing third-party tools'
  own requirements are untouched.

Termux still installs via `pkg install nodejs` best-effort (nodejs.org
ships no Android tarballs); that path was never version-gated.

Verified: bash -n on both shell scripts, PowerShell AST parse of
install.ps1, latest-v26.x index resolves (node-v26.5.1), and the install
test suite — 18 tests across the 5 install/runtime test files — passes.
2026-08-01 21:17:51 -04:00
ethernet
f88ed6c717 fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
ethernet
3975e9d753 fix(npm): npm 11.10-12.0 support min-release-age but NOT min-release-age-exclude.
that would break stuff :)
2026-07-31 13:42:04 -04:00
ethernet
fabc2d7d33 fix(js): hoist eslint shared devDeps to workspace root 2026-07-31 13:42:03 -04:00
ethernet
2158f2a5ad fix(sec): add allowScripts 2026-07-31 13:42:03 -04:00
ethernet
390a1771b2 fix(sec): update npm deps to resolve npm audit warnings
pin brace-expansion to 5.0.8
update concurrently to 10.0.4
update electron-builder to 26.15.3
update eslint to 10.8.0
update eslint-plugin-perfectionist to 5.10.0
update @assistant-ui/react to 0.15.0
update @assistant-ui/react-streamdown to 0.3.8
update radix-ui to 1.6.7
update react-router-dom to react-router@8.3.0 - react-router-dom is no longer a standalone package, it just reexports react-router
remove @radix-ui/react-slot: we import this from `radix-ui`
remove eslint-plugin-react: we imported it, but never actually used it!
2026-07-31 13:42:03 -04:00
峯岸 亮
19c7710174 chore(deps): update protobufjs to 8.7.1
Update root and Photon sidecar npm overrides and lockfile to address protobufjs security advisories.
2026-07-28 22:34:31 -07:00
ethernet
09f8a8268c test: port workspace-level JS tests to a new js-tests workspace package 2026-07-15 17:24:12 -04:00
ethernet
894e62759b feat(fmt): add "npm run fix" in root 2026-07-16 01:42:02 +05:30
Harry Yep
ddd6ad43f0 chore: upgrade @assistant-ui/react 0.12 to 0.14 and react-streamdown 0.1 to 0.3
bumps @assistant-ui/react from ^0.12.28 to ^0.14.23 and
@assistant-ui/react-streamdown from ^0.1.11 to ^0.3.4. this crosses
two minor bumps on each package and unlocks the built-in defer, smooth,
and tail-bounded remend primitives for PR 2.

breaking change from core 0.2.x: MessageRepository.appendOptimisticMessage
was removed (assistant-ui#4162). inline the three steps it did (generateId
+ fromThreadMessageLike + addOrUpdateMessage) in
incremental-external-store-runtime.ts, and set metadata.isOptimistic so
the new off-branch eviction logic cleans up the placeholder correctly.

fromThreadMessageLike and generateId graduated to the public API in
0.14.22 (assistant-ui#4414), so they now import from @assistant-ui/react
instead of @assistant-ui/core/internal. ExportedMessageRepository in the
test file moves to the public import for the same reason. the remaining
internal imports (AssistantRuntimeImpl, BaseAssistantRuntimeCore,
ExternalStoreThreadListRuntimeCore, ExternalStoreThreadRuntimeCore,
hasUpcomingMessage) are runtime construction internals with no public
equivalent and stay on @assistant-ui/core/internal.

the @assistant-ui/store npm override is removed: all transitive ranges
now resolve to 0.2.18 without it.

verified: tsc --noEmit passes, vitest shows zero new failures (15
pre-existing, 792 passing, identical to baseline before the upgrade).
2026-07-15 01:41:03 -04:00
ethernet
7b3f3047ab feat(ci): run JS tests in CI, add npm run check in ws root 2026-07-13 17:22:17 -04:00
xxxigm
33b1d14459
fix(desktop): pin Electron below the broken native extract-zip install (#47792)
* fix(desktop): pin Electron below the broken native extract-zip install

The Windows desktop install fails at "Building desktop app": Electron's
postinstall aborts with `ERR_DLOPEN_FAILED loading
index.win32-x64-msvc.node` / "Cannot find native binding" from
`@electron-internal/extract-zip`.

Root cause is a dependency drift, not the user's machine. Electron changed
its install mechanism mid-patch-series:

  electron 40.9.3 .. 40.10.2  -> @electron/get@^2 + extract-zip@^2 (pure JS)
  electron 40.10.3 / 40.10.4  -> @electron/get@^5 + @electron-internal/extract-zip@^1 (native napi)

apps/desktop declares `electronVersion: 40.9.3` (the tested, JS-extract
build) but pinned the dependency as `electron: ^40.9.3`, so `npm ci`/`npm
install` silently resolved 40.10.3/40.10.4 — onto the brand-new native
extract-zip whose win32-x64 binding fails to dlopen on some Windows hosts.
The committed lockfile already carried 40.10.3, and the installer's mirror
fallback can't help (it re-runs Electron's own `install.js`, which uses the
same broken native module).

Fix:
- Pin `electron` to an exact `40.10.2` — the newest build before the native
  extract-zip switch — and align `build.electronVersion` to match (Electron
  Builder needs electronVersion/electronDist to match the installed binary).
- Add a root `yauzl: ^3.3.1` override so the (re-introduced) JS extract-zip
  path also works on Node >= 24.16 / >= 26.1, where the old yauzl hangs.
  This is the same workaround the wider Electron ecosystem adopted.
- Regenerate package-lock.json: drops @electron-internal/extract-zip and
  @electron/get@5, restores @electron/get@2 + extract-zip@2 + yauzl@3.4.0.

* test(desktop): lock the Electron pin/version/lockfile consistency contract

Guards against the dependency drift that broke the Windows desktop install:
the Electron dependency must be an exact version, must equal
build.electronVersion, and the lockfile must resolve to that same version so
`npm ci` installs exactly what electron-builder packages. Asserts the
relationships, not a specific version number.
2026-06-17 14:42:30 -04:00