Commit Graph

360 Commits

Author SHA1 Message Date
Teknium
749cb638ff fix(config): an unreadable config never serves the TUI's cached empty config; review fixes
- tui_gateway _load_cfg_raw: only FileNotFoundError means "no config".
  config_version_or_none folded every stat error into None, so after a
  cached absent config a transient EACCES matched the cached {} and the
  next config.set could save it over the now-existing file. Any other
  stat error is a FailedConfigRead again, which _save_cfg refuses.
- ConfigBackend.read_user_doc replaces read_user_layer/UserLayer: no
  caller used the version it stat'ed on every uncached read; cached
  loaders already ask config_version first.
- Reader lint scopes follow Python: a self.<attr> bound in one method is
  seen by every method of the class, and a comprehension's target no
  longer leaks into the enclosing function. The class rule found
  pm/publication.py's compare-and-swap re-read of self.path, now marked
  like its twin in __init__.
2026-10-25 18:54:09 -07:00
kshitijk4poor
8c63d46098 fix(config): address Greptile's third review of the config backend seam
- pm read_home_selection: only a missing config.yaml means "no config". A symlink loop or
  permission error used to look like "no file" (config_exists is Path.exists), so PM published a
  dependency generation without that home's plugins; it now refuses like any unreadable config.
  The stat runs before the YAML stack (FileBackend.version_path stats before importing utils),
  so PM's bare runtime tree still needs no YAML for a home without config.
- check_config_yaml_readers: alias bindings iterate to a fixed point instead of two passes, so
  `first = home / "config.yaml"; second = first; third = second` binds `third` too.
- ConfigIssue/_issue move to hermes_cli/config_issues.py, imported by the facade and its check
  siblings, so config_value_checks.py / config_home.py no longer import the facade at all.
2026-10-25 18:54:09 -07:00
kshitijk4poor
ab3e4affd6 fix(config): meet the code-health ratchet and keep pm's runtime tree off the YAML stack
CI on the salvage was red on the code-health ratchet (over-cap facades grew; two blind excepts)
and on the pm observer fixture, whose isolated source tree carries pm/ + hermes_cli/ but no utils.

- config_backend imports become module-level in the facades (it imports only stdlib); gateway,
  auth and telegram take config_exists through the hermes_cli.config import they already have.
- Pure helpers move to topical siblings, offsetting the growth: _csv_or_list_to_set ->
  gateway/run_common.py, the dotted config-path pair -> hermes_cli/backup_restore.py, the
  voice/timezone/web-backend checks -> hermes_cli/config_value_checks.py, _load_config_dict ->
  hermes_cli/profile_memory_config.py (both callers are memory-provider code).
- _load_config_dict catches YAMLError/OSError/UnicodeError instead of Exception.
- _load_config_cache_hit probes readability with config_backend.probe_config_readable (a 1-byte
  read through the backend's open) instead of a full parse plus a blind except.
- pm/plugins_state.read_home_selection checks config_exists before importing the YAML stack, so
  a home with no config never needs utils.
- developer-guide/config-backend.md describes this build (file backend only).

Same approach as @benbarclay's 74421be709 in #122509, which does not cherry-pick onto current main.
2026-10-25 18:54:09 -07:00
kshitijk4poor
b7cd1f084b fix(config): reader gate tracks every binding form and scans pm/
The reader gate only bound plain `name = <config path>` assignments and never scanned pm/, so
direct local-file reads still passed it: `env_path, config_path = ...` then
`config_path.exists()` in tools/send_message_tool.py, and pm/plugins_state.read_home_selection
reading config.yaml with read_text().

The gate now binds tuple-unpacked elements, `self.<attr>` targets and for-loop targets; flags
unbound `Path.<method>(p)`, shutil copies and pm's byte readers (read_bytes_or_none,
file_digest); and scans pm/.

Routed through the backend: send_message_tool's missing-config check and
read_home_selection (same FileNotFoundError / OSError / YAMLError -> ValueError contract).
Marked as file tooling: pm's byte-level compare-and-swap publication/eviction rewrite and the
LKG backup copy, which operate on the local file itself.

Known limit: bindings flow into nested scopes, not across sibling methods, so a `self.x` bound in
`__init__` is not tracked in another method (pm/publication.PluginSelection.publish).
2026-10-25 18:54:09 -07:00
Teknium
7abb9cc0fa feat(vault): opt-in OS-keychain storage for the vault key, with a verified migration
The local vault key sat in vault.key next to vault.json.enc, so any backup, synced
folder or copied ~/.hermes carried the ciphertext together with its key.

vault.key_storage: keychain (default stays `file`) puts a NEW vault's key in the OS
keychain via keyring (new lazy `keychain` extra, keyring==25.7.0), one entry per
profile, named by a non-secret vault.keyref. No reachable keychain (headless Linux,
extra not installed, plaintext/null keyring backends) falls back to the 0600 file.

`hermes vault key` shows where the key is; `hermes vault key migrate --to keychain|file`
writes the destination, proves it decrypts the vault, and only then removes the
source, so an interrupted move leaves a working vault and a rerun finishes it.

A vault whose key is missing (file or keychain entry) now raises a recovery message
and never mints a new key over existing ciphertext (before, a deleted vault.key was
silently replaced and the vault reported "key mismatch or corruption").

Opt-in rather than default: macOS can prompt for keychain access after Hermes'
Python changes, locked Linux keyrings prompt or are absent over SSH, cron while
logged out cannot read the key, and backups stop being self-contained.
2026-10-25 05:45:51 -07:00
Teknium
d6b868b7ab Merge pull request #141864 from NousResearch/feat/webapp-on-gateway
feat(webapp): serve the Desktop workspace from the gateway
2026-10-25 04:45:48 -07:00
Teknium
a2a602af69 fix(gateway): an auto-started gateway that cannot load a lazy install retires for a fresh one
A lazily installed SDK extra (anthropic, bedrock, ...) that the running process cannot adopt
raises "installed; restart Hermes to activate it". In the CLI-spawned `gateway run --idle-exit`
backend nothing ever restarts it: the next `hermes chat` (or the next prompt in the same session)
reattached to the same process and failed the same way until the idle window
(gateway.unmanaged_idle_exit_seconds, default 600 s) ran out.

pm.extras.ensure_import now records that pending restart (pm.environments_adopt.note_restart_pending),
and the unmanaged idle-exit watcher retires the backend within about a second once no agent work,
background work, admission, cron/kanban duty or messaging adapter holds it. Attached clients do not
hold it: they are the ones who need the fresh gateway, and they already wait out the `idle_exit`
drain and start a new owner, which boots into the new dependency generation.

Supervised gateways (systemd/launchd/Desktop's `gateway ensure`) never arm this watcher, so they
are unchanged: no self-restart without a supervisor that restarts them.
2026-10-25 04:16:14 -07:00
Bear Huddleston
b5eb5ee7a8 feat(webapp): carry the browser-hosted Desktop's server pieces from #93508
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>
2026-10-25 03:22:14 -07:00
Teknium
1d258cc6c2 fix(pm): a retry fingerprint covers the enabled plugins beside the retried one
A plugin disabled for conflicting with an enabled one now comes back once
that plugin changes or leaves: the fingerprint is taken against the members
the update leaves enabled, and compared against the enabled members of the
next update.
2026-10-25 03:01:26 -07:00
Teknium
d178550247 fix(pm): retries never displace an enabled plugin and cost nothing while unchanged
Independent review findings on update-disabled plugins:
- Recorded plugins are tried only after the enabled plugins have built, one
  at a time on top of them; an update that has to disable an enabled plugin
  re-enables nothing, so a download failure can never swap two plugins.
- A resolver or build verdict records a fingerprint of what was tried (core's
  dependency inputs plus the plugin's) and is not built again until one side
  changes; a download failure is retried by the next update, and those go
  first because they fitted beside the rest before.
- The update publishes against the config snapshot it decided from, and a
  rejoin needs the record to still be there, so a user's mid-update choice
  stands.
- Recorded reasons keep their readable start, not the tail of a uv error.
- An installed provider that fails to import is reported as such instead of
  running recovery, and the startup notices dedupe per kind.
2026-10-25 03:01:26 -07:00
Teknium
8c7cbd37d4 fix: review findings on update-disabled plugins
- A provider-only record is retried only while memory.provider still names
  it, so a rejoin never installs a provider the user switched away from.
- An installed provider that still fails to load after startup recovery is
  reported even when recovery printed an install notice.
- One spelling reader: plugin_spellings uses the shared native manifest
  reader (plugin.yaml or plugin.yml), and the memory loader uses it too.
2026-10-25 03:01:26 -07:00
Teknium
ffe2f6411c fix(pm): an update that disables a plugin keeps memory.provider and retries it
When an update had to disable a plugin it also cleared memory.provider, so
the memory provider stayed lost even after the plugin was re-enabled, and
nothing ever retried the plugin: one transient failure (a TLS proxy, a mirror
outage, a since-fixed resolver bug) left it off for good.

- The dependency union now honours plugins.disabled for memory.provider the
  same way the provider loader already does, so eviction no longer has to
  blank the selection. Re-enabling the plugin brings the provider back.
- The eviction is recorded in the home's config under
  plugins.disabled_by_update (was it enabled, and why). Every later update
  retries recorded plugins after the enabled ones and undoes exactly the
  edit once a plugin fits again.
- A user's own enable/disable/remove takes the decision back: PM's selection
  publication forgets the record for the plugin the user settled, and
  `hermes plugins disable` on an update-disabled plugin now writes that.
- Spellings come from the plugin's own manifest instead of a plugin scan of
  the PM process's home, so a profile's plugins are matched in that profile.
- A parked provider is reported, not re-installed: agent init tells the
  user once why external memory is off (naming the update's reason), and
  `hermes memory status` and `hermes doctor` show it instead of "plugin not
  found" or "All checks passed". Doctor lists every update-disabled plugin.
2026-10-25 03:01:26 -07:00
Charan Rathore
d7382ef014 perf(pm): scan the plugin tree once per eviction instead of once per evicted plugin
Review follow-up on #131220: _spellings re-ran _discover_all_plugins for every evicted name. Scan once, lazily, and pass the entries to _plugin_aliases.
2026-10-25 03:01:26 -07:00
Charan Rathore
4941a296bb fix(pm): only fall back on import/IO errors when discovering plugin aliases 2026-10-25 03:01:26 -07:00
Charan Rathore
36e67a1957 fix(pm): drop a dependency-evicted plugin from plugins.enabled and tell the operator how to re-enable it 2026-10-25 03:01:26 -07:00
Teknium
db5b65607e fix(pm): solve plugin workspaces only for the interpreter that installs them
uv fails the whole workspace lock when any platform fork lacks wheels for a
dependency (uv >= 0.12.14). The generated plugin workspace inherited core's
environments, which admit every platform, so a Linux or macOS update evicted
mnemosyne (onnxruntime) and any torch-backed plugin over Android, a platform
the install never runs on, and cleared memory.provider with it.

Generalize the Android exclusion to the whole class: the generated workspace's
environments are narrowed to the sys_platform and platform_machine of the
interpreter uv installs into (emscripten, other OSes and other arches drop out
too). The interpreter is probed rather than this process, because PM can run
under a bootstrap Python whose sys.platform differs (older Termux interpreters
report linux). Core's committed lock keeps full platform coverage; it never
passes through the generator. Admission and update eviction both build through
lock_and_sync, so both are covered.

Replaces the unit tests over the dict rewrite with one invariant test on a real
generated workspace.
2026-10-24 19:27:03 -07:00
Warren
91c86af055 fix(pm): exclude Android from generated workspace solves
uv 0.13.5 (pm/lock pin) solves every platform named by tool.uv.environments,
Android included. A plugin-carried native transitive (torch behind nerve's
optional laya extra) has no Python 3.14 Android wheels, so the whole workspace
lock fails and hermes update evicts the plugin instead of installing it.

Generated workspaces install on one host, so narrow the solve to non-Android
platforms on non-Android hosts (Termux keeps today's behaviour). The core's
own lock is untouched and keeps full platform coverage.
2026-10-24 19:27:03 -07:00
akfoster
8607c509f0 fix(pm): avoid delaying available mirrors 2026-10-24 18:47:41 -07:00
akfoster
938be3a6d4 fix(pm): tolerate failed periodic checkpoints 2026-10-24 18:47:41 -07:00
akfoster
e5470c9888 feat(pm): preserve progress across interrupted downloads 2026-10-24 18:47:41 -07:00
Ben Barclay
a3dc841707 fix(pm): keep the tool store out of each dependency generation's workspace
The container image keeps PM's tool store inside the `tools` Python package
directory (/opt/hermes/tools: interpreter, Chromium, ffmpeg, node, uv). The
build snapshot copies every package root whole, so each generation built on
the data volume (a plugin enable, a lazy extra, the boot-time refresh) carried
~1.5 GB of binaries nothing builds from, and an enable briefly held two such
generations (~3 GB) before the old one was collected.

Skip the entries a store's facts.json records as published (plus hash-keyed
fetch caches) when copying core inputs. A directory with no store facts is
copied as before.
2026-10-23 10:01:05 -07:00
Maciej Lisiewski
8edc5ea255 Merge pull request #143456 from NousResearch/bulk-update
chore(deps): bump Python dependencies to latest minor/patch releases
2026-10-23 12:25:56 +02:00
Teknium
7152bf009a fix(install): browser opt-out uses the name every PM release accepts
install.sh --skip-browser / --no-playwright and install.ps1 -SkipBrowser
now hand PM `--without agent-browser` again instead of `--without chromium`.

The downloaded installer is the newest script, but by default it installs
the stable tag, whose PM (v0.22.5) rejects `--without chromium` with
"--without accepts only optional default packages (agent-browser,
cua-driver)" and exits 1, failing the whole install. The new PM already
reads `agent-browser` as `chromium` (pm.defaults.RETIRED_DEFAULTS), so the
legacy spelling works against both the stable tag and main. Direct
`hermes pm install --without chromium` stays valid on the new PM.
2026-10-23 01:43:17 -07:00
Teknium
492482209b fix(pm): ensure() re-records an installed package's env from the current package code, so upgraded stores drop AGENT_BROWSER_EXECUTABLE_PATH 2026-10-23 01:43:16 -07:00
Teknium
67ca44160b fix(pm): re-record a reused entry's env when the package code changed it
An entry's env is derived from the package code, not its bytes, but pm
recorded it once at install time and served it from then on. A store built
before Chromium stopped exporting AGENT_BROWSER_EXECUTABLE_PATH kept the old
env, and build admission (verified_tools) compares the recorded env with the
code's, so the Desktop bundle job refused the restored cache: "chromium: tool
source failed verification: binary or environment".

prepare/_install's already-current branch now re-records the env when it
differs. The recorded digest still vouches for the bytes, so nothing is
re-fetched.
2026-10-23 01:41:26 -07:00
Teknium
1ac18d2b12 refactor(pm): drop the agent-browser package; Chromium is a default package in its own right
- pm: AgentBrowser class + lock entry gone; Chromium default=True and its env
  exports only PLAYWRIGHT_BROWSERS_PATH (Playwright launches without an
  executable path still need it). A recorded or passed --without agent-browser
  maps to chromium (pm.defaults.RETIRED_DEFAULTS), and pm gc forgets the stale
  agent-browser fact so its store entry is reclaimed.
- install.sh --skip-browser/--no-playwright and install.ps1 -SkipBrowser pass
  --without chromium; undo hint is hermes pm install chromium.
- Docker bakes /etc/hermes/chromium-executable-path; stage2-hook validates it
  and exports nothing; the sandbox-desktop image drops the agent-browser npm
  install and keeps its Playwright Chromium.
2026-10-23 01:41:25 -07:00
Maciej Lisiewski
fb945d0e61 chore(deps): bump truststore to 0.10.5
truststore: 0.10.4 -> 0.10.5 (pins edited: 2; also: {})
2026-10-23 09:23:58 +02:00
Maciej Lisiewski
8309f37f33 chore(deps): bump packaging to 26.3
packaging: 26.0 -> 26.3 (pins edited: 2; also: {})
2026-10-23 09:23:43 +02:00
ethernet
293472d19f fix(pm): pm update repairs stale installer pins when nothing needs re-pinning
The lock is saved before the fragments regenerate. If that generation failed,
the retry found every pin current and returned before regenerating.
2026-10-22 17:25:38 -04:00
ethernet
e31fa4cab9 fix(deps): update python to 3.14.9 2026-10-22 17:25:38 -04:00
ethernet
75a8d6fcf4 fix(deps): update uv to 0.13.5 2026-10-22 17:25:38 -04:00
ethernet
562c9df251 feat(pm): pm update and pm lock --bump regenerate the installers' bootstrap pins
The curl|sh and irm|iex installers bootstrap uv (and, on Windows, git)
before any checkout exists, so they carry those pins as fragments that
scripts/gen-bootstrap-pins.py derives from pm/lock.json. Both re-pin
paths wrote only the lock: `pm update uv` left the installers on the old
uv, and the bootstrap-installer drift check failed until someone ran the
generator by hand.

Run the generator after either path saves the lock. It keys off the
saved lockfile's own checkout, so a fixture lock outside a checkout
regenerates nothing.
2026-10-22 17:25:38 -04:00
ethernet
e09f04499a fix(deps): update node to 26.12.1 2026-10-22 17:25:38 -04:00
Teknium
6661080238 fix(pm): a plugin whose pyproject installs nothing no longer rebuilds the dependency environment
Enabling or updating a plugin whose pyproject.toml declares `dependencies = []` (the official
agent-importers plugin) ran "Resolving / Installing Python dependencies" and built a new
environment generation although nothing gets installed, and every update of the plugin did it
again.

Workspace membership keyed on "has a pyproject", so such a plugin became a uv workspace member,
and members_stamp hashes a member's whole tree into the venv stamp: enabling it, or any change to
its files, made the recorded environment stale. A plugin is now a member only when it installs
packages (`PythonDeclaration.installs_packages`, the predicate dependency consent already uses
since the sibling fix for the empty consent step), so membership, requires-python checks and the
stamp all follow what the plugin actually puts in the environment.

Test fixtures that used a dep-less pyproject as a cheap stand-in for a member now declare a real
dependency (a local wheel through tool.uv.sources, resolvable offline, or a requirement where no
resolution runs); their assertions are unchanged. New: enabling a `dependencies = []` plugin
through the real admission path keeps the selected generation and recorded stamp, a later change
to its files keeps the venv current, and a plugin with a real dependency still joins.
2026-10-22 11:12:32 -07:00
Maciej Lisiewski
2b31d12ade fix(pm): apply lock overrides to requirements builds; read pip check uncoloured
Requirements builds (Termux deb assembly and wheelhouse gate, PM runtime
wheelhouse install) install the lock's export with uv pip install, which
re-resolves and rejects the overridden graph. Pass the lock: its manifest
overrides become --overrides and the closing check accepts them.

FORCE_COLOR/CLICOLOR_FORCE made uv pip check emit ANSI the report parser
cannot read, failing every install with an expected override mismatch.
2026-10-22 17:36:39 +02:00
Maciej Lisiewski
776496e3bd fix(pm): judge overrides only against a complete pip-check report
An environment created with an output sink streams uv and keeps only
the last 2,000 characters, so a long `uv pip check` report could lose
its head: the "Found N" total and any unrelated failure printed before
2,000+ characters of override-covered lines. unexpected_incompatibilities
skipped the count check when the total was missing, so the surviving
lines read as fully explained and check() accepted a broken environment.

check() now runs pip check captured (it is a quiet step, so streaming
showed nothing anyway), and override exceptions are accepted only when
uv's "Found N" total is present and matches the lines parsed.
2026-10-22 03:58:17 +02:00
Maciej Lisiewski
27c6146381 fix(deps): bump Pillow 12.3.0 → 13.0.0 (critical, GHSA-8g5g-8vmr-9782)
Pillow 13.0.0 fixes 28 advisories open against 12.3.0, three critical:
GHSA-8g5g-8vmr-9782 (heap overflow in ImagingJpegDecode),
GHSA-332p-7hrc-92wf (heap overflow saving TIFF to a buffer) and
GHSA-w889-685w-c8fh (Ghostscript argument injection), plus 16 high and
9 medium decoder/encoder memory-safety and DoS fixes. None has a 12.x
backport.

browser-harness 0.1.13, a core dependency and its latest release, pins
pillow==12.3.0 exactly, so the bump needs a uv override. The override
equals the direct pin (the existing contract for direct overrides).
browser-harness only opens, converts, composes, thumbnails and draws
images; its contact-sheet, masked-frame, thumbnail and click-overlay
output is pixel-identical under 12.3.0 and 13.0.0. pillow-heif stays
at 1.6.0 (requires pillow>=11.1.0); its HEIC round trip is identical
too. uv.lock changes only pillow.

An override installs a version the dependent's own metadata rejects, so
PM's install-time `uv pip check` failed every install (activate, pm
install/repair, fresh and bundle builds) with "browser-harness requires
pillow==12.3.0, but 13.0.0 is installed". check() now takes the uv.lock
the environment was installed from. pm/pip_check.py accepts a report
line only when that lock's [manifest] overrides name the dependency and
it is installed at the version the lock resolved. Missing packages,
other mismatches and any report it cannot fully parse still fail.
pm/pip_check.py is stdlib-only (with a tomllib-less fallback) because
the bootstrap runner loads pm.environment on older system pythons.

test_direct_overrides_preserve_the_declared_exact_version compared the
declared spelling (Pillow) with uv.lock's normalized names, so it found
no locked rows for the first capitalised override; it now compares
canonical names.
2026-10-22 03:39:21 +02:00
ethernet
3fa571a51a feat(pm): pm update --skip-target leaves a target's pins alone
The termux pool lags nodejs.org, so one bionic 404 blocked a node bump for
every shipped target even though termux is off by default in release.py.
--skip-target drops the target from resolution; _pin_artifacts already
keeps rows for targets the decision does not cover, so the old pin stays.
2026-10-21 17:13:56 -04:00
ethernet
24573527b1 fix(pm): name the URL when an update pin fails with an HTTP error
str(HTTPError) is just "HTTP Error 404: Not Found", so a failed pin did
not say which upstream (nodejs.org, the Termux pool, a mirror) was
missing the file. Append e.url to the printed line and the receipt step.
2026-10-21 17:13:56 -04:00
Maciej Lisiewski
5aa2f1b56c fix(deps): bump certifi 2026.5.20 → 2026.10.19 (critical, GHSA-6q48-6c7w-9gw2)
certifi 2026.10.19 drops the emSign roots whose intermediate CA keys
were compromised. It was published 2026-10-20, inside the 3-day
`exclude-newer` lock quarantine, and holding a CA revocation for the
quarantine keeps the compromised root trusted for those days.

CA trust stores therefore get the one per-package exemption
(`exclude-newer-package = { certifi = false }`). The packaging contract
test now allows exemptions only for CA-trust packages and only as a
full opt-out, so any other package or a dated exemption still fails.
The pm/AGENTS.md and package-management docs state the exemption.
2026-10-21 20:59:52 +02:00
Teknium
6f59555536 fix(plugins): no dependency consent for a pyproject that installs nothing
A plugin whose pyproject.toml declares `dependencies = []` reached the
Python-dependency consent question with nothing to list. Non-interactive
`hermes plugins install --enable` refused it ("dependency install skipped
(non-interactive)"), and in a terminal a default answer left it installed
but disabled, so official plugins had to drop their pyproject.toml.

The gate keyed on workspace membership, which every pyproject has. Ask
only when admission would put packages in the shared environment
(`PythonDeclaration.installs_packages`): applicable dependencies, a
buildable plugin package, extras, or dependency groups (uv sync
--all-packages installs a member's default groups). The install gate,
the active-replacement veto at publication and the update re-consent
all read it. PM membership and requires-python handling are unchanged.

Consent-test fixtures that used an empty pyproject to stand for "declares
Python dependencies" now declare one; their assertions are unchanged.
2026-10-21 08:26:29 -07:00
Teknium
f14a599576 fix(pm): any 5xx from an upstream host falls back to the pinned mirror
Every pinned tool artifact already has a content-addressed copy on
hermes-assets.nousresearch.com, and the downloader falls back to it when the
upstream is unavailable. That fallback was gated on the retry set
{408, 429, 500, 502, 503, 504} plus 401/403/404/410 and DNS failures, so a
CDN's origin-down codes (520-527) failed the install outright. On 2026-10-21
macOS ffmpeg's only upstream (ffmpeg.martin-riedl.de) returned 521 for an hour:
every macOS install/update leg died in setup, and so would every Apple Silicon
user's install, while the mirror held the identical bytes.

Any 5xx is the host failing, not its bytes changing, and the sha256 still
guards whatever the mirror serves. Retries against the same host are unchanged.
2026-10-21 02:51:03 -07:00
ethernet
ee8f05a48a Merge pull request #141651 from NousResearch/fix/desktop-prepare-caches
fix(desktop): Windows prepare reuses its restored wheel, vcpkg and npm caches
2026-10-20 16:03:44 -04:00
Teknium
a1cc85f3e2 fix(pm): refuse a registry gap in the caller, never through a PM worker
Every checkpoint git child runs selected_git_env() -> pm.ensure("git"). On
POSIX git is a declared registry gap ("uses system git by choice"), but the
client only learned that by spawning a PM worker, which raised
InstallError(..., "none") so the caller fell back to system git: ~1.1 s per
git call (plus ~8 s preparing PM's runtime in a fresh home). One
ensure_checkpoint made 15 such calls, one rollback.diff made 5. On a loaded CI
runner that pushed the gateway's /diff, /rollback and checkpoint-limit tests
past their RPC bounds. Main went red at cc6b1f299b, and the same sha is
green on a dispatched rerun.

_missing_or_refuse now answers a missing package's registry gap with the
worker's own refusal, without spawning one. Gaps are static registry data;
installed, non-gap, explicit and in-runtime paths are unchanged, and nothing
is cached (a selected managed git still applies per call).

Also pin the clock in test_room_log_pages_are_bounded_by_serialized_event_bytes:
it sizes the page budget from one event's JSON, and a wall-clock created_at's
float repr varies by a few bytes between events.
2026-10-19 22:19:31 -07:00
ethernet
5d8bf6eaf0 chore(desktop): time each native payload staging phase
prepare showed 79-197 s of silence between the repo snapshot and the
pm-runtime venv (snapshot extract, pinned tool preparation, the copy +
re-digest of every tool into the payload store, store pruning). Name each
phase with its duration, and each copied tool, so the next run says which.
2026-10-19 12:30:43 -04:00
emozilla
a677757834 Merge commit '848fc0ad8be766b9dc10fe42bd80b5fc2d45d95c' into feat/local-bolt-dflash 2026-10-16 14:31:53 -04:00
Teknium
b2b85bdf71 fix(tui): make only a missing dependency generation a terminal bootstrap failure
gateway_bootstrap.py mapped every RuntimeError and OSError from
activate_dependencies to `gateway unavailable: bootstrap_dependencies`, the
verdict gatewayClient.ts stops retrying on. A one-off I/O error on the install
state (the dependency lock, the facts file) therefore ended the TUI's gateway
for the life of the process.

pm.environments now raises NoCommittedEnvironment (a RuntimeError subclass, so
every existing caller is unchanged) from _require_own_dependencies, and the
bootstrap maps only that to the terminal verdict. Other errors reach the
ordinary failure path the client retries.

Review: alt-glitch on #139661, follow-up 2.
Refs #134889 (TUI-22)
Refs #139574
2026-10-16 01:54:58 -07:00
emozilla
bc293c40b0 feat(local-runtime): pin llama.cpp b11671
b11671 loads Nemotron 3.5 Bolt and its LiLiCorr draft. On an RTX 5090 it
decodes the Qwen3.8 27B at 103-104 tok/s against b11370's 97-98, with the
same memory, tool calls and image input. Every pinned release asset
exists, and no flag Hermes passes was removed.

The GGUF reader learns the block sizes of types 40-42 (NVFP4, Q1_0,
Q2_0); Bolt's file uses NVFP4.
2026-10-16 02:30:47 -04:00
unsupportedpastels
adc9e2d1eb fix(gateway): never overlay a foreign-ABI legacy venv onto the Windows gateway
_ensure_windows_gateway_venv_imports() addsitedir'd <root>/venv (or
VIRTUAL_ENV) whenever PM had no committed generation, without checking
which Python that venv was built for. PM launchers and
activate_dependencies pop VIRTUAL_ENV, so the fallback was the leftover
pre-PM <root>/venv: a cp311 tree loaded into a 3.14 gateway, which died
importing pydantic_core as soon as the Group Chat worker imported
tui_gateway.server. #122183's guard only covered the committed case.

Skip a venv whose pyvenv.cfg version differs from the running
interpreter. venv_python_version() now also reads `version_info`, the
key uv and virtualenv write, so a matching uv-built venv still overlays.

This stops the overlay from adding an incompatible venv. It does not remove a
foreign-ABI path put on sys.path from outside Hermes, and it has not been run on
native Windows, so #139085 stays open until a Windows retest.

The same check is proposed in #122330 by @janviernine (the earliest, which
also reads version_info), #122333, #122376, #123129, #123332, #123358,
#123409, #123974 and #123981.

Refs #134889 (KB-4)
Refs #139162
Refs #139085

Co-authored-by: janviernine <janviernine@users.noreply.github.com>
2026-10-15 16:33:28 -04:00
Teknium
300228d24c fix: drop the VPN/proxy advice from the CDN-block message
The message names the host's CDN and says the install is fine; "retry from
another network" is the only next step it suggests.
2026-10-14 08:50:46 -07:00