The /api proxy rewrote a WebSocket upgrade's Origin to HERMES_DASHBOARD_URL.
Pointed at a port forward (http://127.0.0.1:8000 forwarded to the backend on
9119), that Origin names neither the backend's bound port nor the Host the
proxy keeps (localhost:5173), so the backend refused the dev page's sockets.
The proxy sets no changeOrigin, so Host stays the page's own authority and
the browser's Origin already names it, which the backend admits as
same-origin. Drop the rewrite and its helper, pin the proxy options, and
pin both header pairs in the backend test.
_TRUSTED_LOCAL_ORIGIN_PORTS (9119, 5173, 5174, 4174) was trusted on every
backend, including packaged Desktop backends on an ephemeral port. A Vite app
on 5173, or on 5174 when 5173 is taken, could still read the session token
from / and open /api/ws. _is_trusted_local_origin() now accepts only the bound
port and the desktop dev renderer this backend was spawned for
(HERMES_DESKTOP_DEV_SERVER). `hermes dashboard` keeps working on 9119 because
that is its bound port.
The dashboard's Vite dev server was the only client that relied on a fixed
port: the browser's Origin on proxied /api upgrades is Vite's. The /api proxy
now presents upgrades from Vite's own page (Origin host equals Host) with the
backend's origin, and passes every other Origin through for the backend to
refuse, so it does not launder foreign pages the way Vite's rewriteWsOrigin
would. Vite's default CORS grants every localhost port and would hand another
local page the token hermesDevToken() injects into index.html, so it is off.
(cherry picked from commit 66de028a3ce39ec49a32205855dc269d30bf3942)
Review on #145357 (@unsupportedpastels):
M1: a failed chunk request reloaded even when nothing was rebuilt (a
network abort, offline). Before reloading, fetch the page's index.html
with cache: no-store and reload only when it names a different built
entry than the running one; skip while offline and in dev. Otherwise
the import rejects as before.
M2: the single tab-wide 5-minute timestamp suppressed recovery for a
later build (A -> B -> C inside the window). The session guard now
records the entry the tab reloaded away from, so a repeat on the same
build (or a reload that lands on it again) is suppressed while a newer
build can still recover.
The tests called reloadForChunkLoadError directly, so a broken listener in
startChunkLoadRecovery would stay green. startChunkLoadRecovery now takes the
storage and reload seams, and the tests dispatch the event itself: one reload
then suppression, chunk CSS / Safari / Firefox messages, and throwing storage.
Renaming the listened event turns 4 of the new cases red.
A web UI tab (Webapp / gateway web UI / dashboard) opened before
`hermes update` keeps referencing the old hashed page chunks. The update
rebuilds web_dist with emptyOutDir, so the first page the stale tab opens
404s on its chunk; there is no error boundary, so React unmounts the whole
app and the tab goes blank until the user reloads by hand.
Listen for vite:preloadError (fired for every failed lazy import and chunk
CSS preload) and reload once; index.html is served no-store, so the reload
picks up the new build. A sessionStorage timestamp limits it to one reload
per 5 minutes per tab, and only build chunks under /assets/ qualify, so a
broken plugin bundle never triggers it.
Review on #145574:
- The Settings summary labelled the unsaved memory.provider draft "Active
memory provider" even when GET /api/memory named another one. The draft
now shows as "Selected memory provider" (not active yet, naming what
sessions keep using), and the active row and recall copy come only from
status.active. A config autosave that touches `memory` refetches.
- Readiness refreshes after an inline credential save, a full-config modal
save and OAuth completion ($memoryStatusRevision); a failed status read
shows "Memory status unavailable" with Retry instead of dropping the badge.
- The built-in row reflects memory.memory_enabled / user_profile_enabled in
Settings ("On by default" where the config isn't loaded), and recall is
claimed only for a ready provider. Web dashboard copy drops "always on".
- isExternalMemoryProvider matches the backend's full sentinel set,
including `default`.
Refs #144648 (WA-22)
Refs #145175
The dashboard Memory card moves into its own MemorySection and the
Settings slot decides its own visibility, so SystemPage and
ConfigSettingsInner end no larger than on main (code-health ratchet).
Refs #144648 (WA-22)
An external memory provider is additive: MEMORY.md / USER.md stay loaded
in every session. The Memory surfaces did not say so, and Desktop/Webapp
Settings > Memory & Context showed only the provider select plus the
built-in toggles, so a working provider read as "not in effect".
- Desktop + Webapp: new MemoryLayersSummary (Settings > Memory & Context >
Persistent memory, and Command Center > Maintenance) names the active
provider with its readiness from GET /api/memory (or "None - built-in
memory only") and labels MEMORY.md / USER.md as the built-in layer,
"Always on". On Settings it follows the live memory.provider draft.
- Dashboard System page: "Active memory provider" and a "Built-in layer -
always on" label with the additive note, through web i18n.
- MemoryStatusResponse now types the per-provider status the server
already returns; getMemoryStatus takes the Settings scope profile.
No endpoint change: GET /api/memory already returns active + status.
Refs #144648 (WA-22)
Refs #145546Fixes#145175
A passive-effect cleanup on the outgoing page runs after the incoming page's
layout effects, so leaving Sessions (the landing route) or Files still erased
the next page's header action, e.g. Channels' Restart gateway. Move the
remaining passive header writers (Sessions, Files, Plugins and Chat's title)
to useLayoutEffect, document the rule on usePageHeader, and cover leaving
Files and Sessions.
Reset per-page header slots during the route render, before child layout
effects populate them. The parent layout effect previously erased the
Channels restart action on direct load and replacement slots on navigation.
Adapt the provider-reset portion of #45652. The separate hidden ChatPage
writer was already addressed by #72234. Add real Channels and route lifecycle
coverage, including delayed mounting and clearing every previous slot.
Co-authored-by: WompaJango <WompaJango@protonmail.com>
The installed map listed each ClawHub lock row under its bare slug as well
as clawhub/<slug>. A bare id carries no source, so with @alice/foo
installed, a `foo` from any other source would also read installed.
HubLockFile.by_identifier now keys a ClawHub row by its lock id and the
source-qualified clawhub/<slug> card id only. Desktop cards install that
id, so they need no change. The dashboard's hub search and featured list
carry a ClawHub skill's bare slug, so web/src/lib/skill-hub-installed.ts
looks a hit up under its own id, then under the id a catalog card would
install for it (skillCatalogInstallIdentifier), which differs only for
ClawHub.
Co-authored-by: unsupportedpastels <theoldwizard123@pm.me>
Carried from BearHuddleston's #93508 onto main. The Webapp relay and the
profile-incarnation fence stay out: carried code follows main's
named-profile rule and refuses a missing or deleted profile home.
- Webapp routes: one-use launch tickets, window handoff, and gateway
WebSocket tickets minted for the signed-in browser
- Browser surface policy and the SPA document policy
- A host terminal for the browser that survives reconnects
- Staged browser uploads and file tickets; file.attach takes a staged upload
- hermes sessions adopt
- Webapp bundle build helpers and the renderer freshness check
- Regenerated gateway contracts
Co-authored-by: emozilla <emozilla@nousresearch.com>
@nous-research/ui declares peer three ^0.180.0 (>=0.180.0 <0.181.0), so the 0.186.1 pin in web
left a second three: 0.180.0 hoisted for @nous-research/ui and 0.186.1 under web/node_modules,
both bundled into the dashboard. Back to the version the UI kit accepts until it widens its peer.
Resolves hermes_cli/auth_model_picker.py against 7a8569baa9 (the picker
takes a title, public as prompt_model_selection): keeps this branch's
description_lines()/menu_title() split, with menu_title(title=...) and the
title= parameter on _prompt_model_selection carried over from main.
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).
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.
The first-run offer on Desktop, the dashboard and the terminal had a
third answer ("Keep on this computer" / "Collect locally only" / "Local
only") that collected stats nobody reads: no surface shows them to the
user, and data from before an opt-in is never sent. Every surface now
offers "Share with Nous" or "No thanks", and each answer sets `enabled`
and `send` together. Desktop Settings > Privacy and `hermes setup
telemetry` become one on/off choice to match.
Profiles that already chose collect-only keep that answer and are not
asked again: they saw the question and declined to send. Nothing is sent
for them; the Desktop switch reads off and the `hermes tools` row says
"collecting locally".
Copy that described collection as a separate local choice is rewritten
in every locale that carries it (de, es, fr, ja, ru, zh, zh-hant, ar).
- Dashboard: the update route answered a scan block with a bare HTTP 400,
so the browser page could not show the findings or send force. It now
passes scan_blocked through (update route only; install is unchanged),
and the page's update button runs the same consent-then-scan flow as
Desktop through web/src/lib/plugin-update.ts. AgentPluginUpdateResponse
moves to web/src/lib/api-plugins.ts (api.ts is over the size cap).
- Saved update checks now record the install they were checked against
(source, revision, pin). A result is dropped once any of those changed,
so a --ref pin or a reinstall from another source no longer shows an
Update button that update refuses. An update_url feed's version target
is offered too (the old match compared it to a commit and never hit);
the row field is update_target, a commit or a version.
- Each finding in the Desktop dialog shows its description.
- Tests: a real subdirectory install exercises the re-clone path (caution
needs force, dangerous refused even with it, refusals leave the tree and
record alone); the dashboard route returns findings and applies with
force; the saved signal drops on update, new source and pin.
- locales/_keys.desktop.json regenerated for the new Desktop strings.
On a gateway serving several profiles, dashboard plugins were discovered
from the launch home only and mounted once in the gateway process. A plugin
installed only in a secondary profile answered 404 from that profile's
Desktop window, its plugins.isolation was ignored, and the interim rule ran
the launch profile's copy for it when both profiles enabled the name.
A request scoped to a secondary profile (its native grant or a ?profile=
selection) now gets that profile's own plugins, served through its own
plugin host (the existing per-profile host and its asgi op, bound to that
profile's home and secrets) whatever its isolation setting says. Their code
is never imported into the gateway.
- Discovery: the profile's own plugins/, then the root ~/.hermes/plugins
(as a standalone `hermes --profile X serve` scanned before the cutover),
then bundled; the profile's own copy wins a name clash. Root plugins also
run in that profile's host.
- Consent: the requesting profile's plugins.enabled/disabled decide; the
launch profile's consent no longer gates them. Disabled, not enabled and
unknown names get identical answers (404 on HTTP, a 1008 close before
accept on a websocket).
- Bundled plugins are Hermes code: a secondary profile uses the in-process
router only when it is that profile's own bundled copy (the imported
module's file, or for a cold mount the copy that would be mounted), and
the cold mount binds the request's ?profile= before deciding. Otherwise,
for example when a launch-profile user plugin shadows the bundled name,
the request goes to the profile's host.
- Credentials: the session token, native grants, the Authorization and
Cookie headers, and the gateway's query keys (token, ticket, internal,
display_ticket, attach, profile; URL-decoded, every repeat) are removed
before the request reaches the host. Ordinary plugin parameters pass.
- Assets: /dashboard-plugins/@<profile>/<name>/<file>, and
/dashboard-plugins/... with ?profile=, bind that profile for the lookup
and consent check (traversal and file-type checks unchanged; an unknown
profile answers like an unknown plugin). The dashboard builds the path
form, so files a stylesheet or bundle loads by relative URL come from
the same profile. Its plugin loader binds its list request, asset URLs
and loaded plugins to the selected profile and drops a list that lands
after a switch; leaving a profile always removes that profile's
stylesheets and bundles, even after its list became empty. A ?profile=
rescan refreshes that profile's own cache.
- Plugin SDK: fetchJSON and authedFetch scope /api/plugins/ requests to
the selected profile with ?profile=, and plugin sockets carry it too; a
profile the plugin passes itself wins.
- The launch profile is unchanged.
The host protocol is request/response, so an authenticated websocket to a
secondary profile's hosted plugin gets a named refusal (HTTP 501 before
accept) instead of running in-process.
Tests that relied on a secondary profile reaching the launch copy now use
that profile's own copy (through a real host) or a bundled probe, and a
consent and refusal matrix covers both ways of selecting a profile.
Refs #134889 (PLG-3)
Refs #139523
- `hermes plugins search/browse` labeled every non-official entry
"community" and sorted verified with community; it now prints the real
tier and orders official, verified, community (review finding).
- Dashboard `CatalogEntry.tier` allows "verified" (review finding).
- Desktop tier pill: official in the accent colour, verified green with a
check, community stays neutral, so verified reads differently from the
other two at a glance.
Verified entries come from the company that makes what the plugin integrates,
confirmed by the Nous team. Only maintainers set official/verified (CODEOWNERS
review; no CI check inspects the value). Tier order everywhere: official,
verified, community. Desktop's installed-plugin pill now reads the same
catalogInstall.tier map as the install card, dropping the duplicate
skills.plugins.tierOfficial/tierCommunity keys.
375 commits from main (0e427d788d). 24 files conflicted; the resolutions that carry a decision:
- /initiate-setup: main removed the command (25bf722063). Its gateway rewrite, CLI handler and the
Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
(gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
_without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
kickoff; this branch's prepared-submission slash path, request_id on session.create and
PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
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
215 commits from main (c70332f888). One textual conflict: the generated
apps/shared/src/gateway-contract.generated.ts, regenerated with scripts/gen_gateway_contracts.py
rather than hand-merged. Brings main's fix for the dated shared-metrics install-receipt test
(783637e370).
The statusbar rows share one versionItem builder and depend on the status
objects, the version tooltip moves its "what is waiting" lines into
pendingLines, the overlay status line into availableLine, and the dashboard
badge/toast into helpers; the dashboard payload carries one `rollback_to`
version instead of two fields.
`hermes --version` printed "Update available", the dashboard badged
"update available" and the Desktop overlay for a remote backend said a
new update was ready, all for a stable release the checkout already
contains. Each now names the move back to that release. Also keeps the
install.ps1 if/else on one line.
fetchJSON now throws ApiError with a humanized message, so the
widget's legacy `msg.startsWith("401:")` check never matched and a
401 from /api/auth/me rendered "auth status unavailable" instead of
nothing. Read the status off the error object.
Part of GH issue 66223 (loopback /api/auth/me).