Commit Graph

320 Commits

Author SHA1 Message Date
BearHuddleston
ca8e736130 docs: describe the diagnostic Linux AppImage builds
The workflow README, platform support page, bundle and stable release
guides, desktop README/BUILDING and the install smoke README said the Linux
desktop legs were disabled. They now say what the workflow does: canary
tags build Linux AppImages as diagnostic artifacts that stage to the tag
archive, gate nothing, have no smoke or feed, and are offered by no
release; commit builds skip them. The PM Bundle Linux legs stay listed as
disabled.
2026-11-19 02:35:54 -06:00
Teknium
f7cd1f45b2 fix(gateway): a non-forced restart or update never stops a gateway still doing work
The gateway side already restarts when idle, but every CLI caller still
escalated when its own wait budget ran out: the pre-swap update pause stopped
supervised survivors through their supervisor and SIGKILLed bare ones, the
systemd and launchd restart commands fell through to a forced service
restart, and the post-update fleet restart, the stale-survivor pass and manual
gateways got a kickstart, a unit restart or SIGTERM. Each killed exactly the
live work the wait existed to protect.

Now, when the wait expires on a gateway that is alive, was reached by the
restart request and is not provably wedged (the existing wedged-loop
escalation is unchanged: a dead loop is not ongoing work), nothing stops it.
It already holds a pending restart and exits 75 at its first idle moment, so
its supervisor relaunches it from the new checkout. One line names what it is
still running (the drain report) and points at `hermes update --force`.

- update_cmd_drain_report: restart_left_pending / leave_restart_pending /
  report_restart_left_pending; progress lines no longer promise a forced
  restart.
- posix pause: survivors that took the drain leave the token (the rollback
  neither restarts nor replays a twin beside them) and the pause rolls back;
  the post-commit fleet restart does not wait on them a second time.
- fleet restart (systemd units, launchd siblings, invoking launchd job,
  manual gateways) and the stale-survivor pass count them restart-pending in
  the fleet matrix instead of stopping them.
- external supervisor restart returns instead of exiting 1.
Default timeouts are unchanged; they now bound the wait, not the work.
2026-11-14 02:23:19 -08:00
Teknium
579565e0e1 fix(gateway): restart when idle — keep serving, never kill live work on a timer
A requested graceful restart (SIGUSR1, /restart, pause-for-update) no longer
sets the admission-refusing drain state up front. The gateway keeps serving
normally and restarts at the first moment no work is in flight; background
delegations, notify-watched background processes and queued delegation
completion notices count as work. agent.restart_after_turn_timeout now only
warns (naming each unit) and keeps waiting. pause-for-update {"force": true}
is the explicit force: stop now with no drain. The wait names real units
(session id/route, mutation task, side-agent thread, delegation id + parent
session, process id) instead of {'kind':'managed','pid':<gateway pid>} pads.

Builds on the delegation accounting salvaged from #115190 (Glucksberg) and
2026-11-14 02:23:19 -08:00
Teknium
a484b9de1c fix(update): --force sweeps a killed gateway's background processes and aborts on an unsettled stop
A gateway SIGKILLed after the force deadline never runs its own stop(), so the
process_registry.kill_all(source="gateway_shutdown") that would have stopped its
terminal(background=true) children never happens; those live in their own systemd
scopes or sessions and survived the kill (a detached `sleep 900` stayed up). After the
kill, every host process the gateway's processes.json checkpoints name (its home, plus
each profile the host multiplexer serves) is tree-terminated when its PID still carries
the recorded start time, and its scope is stopped; a recycled PID is never signalled.
Persisted jobs are included, as gateway_shutdown includes them.

A force stop that had not settled (the supervisor's stop job still running, or the
gateway alive after SIGKILL) raised PauseRefused, whose rollback queued a start behind
the live stop job and then let the checkout move anyway. It now raises StopUnsettled:
the commit point refuses before git writes a file, this process starts nothing, and the
pause record stays owed so the next launch's recovery restarts the set once its
processes have exited. The refusal names the unit or PID and what to check. Non-force
pauses are unchanged.
2026-11-14 01:11:55 -08:00
Teknium
0913dd0f22 fix(update): --force stops gateways concurrently through their supervisors
Review fixes on #155524:
- systemd/launchd gateways are stopped through their supervisor from the start, so
  Restart=/KeepAlive cannot respawn one while another is still being killed, and a
  system unit gets the sudo path instead of a silently refused SIGTERM.
- Each gateway is stopped on its own thread against its own 12 s deadline, so the
  bound no longer grows with the fleet.
- The kill of a supervised survivor goes through systemctl kill.
- Help and docs: the immediate stop is Linux/macOS (Windows keeps its drain), and
  --force is chosen when starting an update, not to interrupt one already waiting.
- Tests gate on platforms("posix").
2026-11-14 01:11:55 -08:00
Teknium
e038cce570 feat(update): hermes update --force stops the gateways at once instead of draining
`hermes update` waits up to agent.restart_after_turn_timeout (30 min by default) for every
gateway's in-flight work before it moves the checkout. --force is the explicit "stop
everything now": the POSIX pre-swap pause names what each gateway was running, asks it to
stop immediately (the force control-socket verb when the gateway answers it, else the
planned-stop marker + SIGTERM, which enters stop() at once), SIGKILLs anything still alive
after 12 s, then the update runs and the paused set restarts on the new code as before.

The Windows meaning (proceed past a concurrent hermes.exe) is kept under the same flag;
--force-venv is unchanged.
2026-11-14 01:11:55 -08:00
alt-glitch
8ad89d45ac fix(nix): the dev shell keeps hermes as the installed Hermes
The dev shell put the checkout's launcher and the dev venv's console scripts
ahead of the user's install on PATH, so running Hermes from any checkout or
worktree ran that checkout instead. The project commands now live in the dev
venv's libexec, and `hermes-checkout` runs the checkout explicitly. The libexec
name stays `hermes`, so gateway identity and relaunch keep working.
2026-11-09 14:22:06 +05:30
Maciej Lisiewski
28ad7672fe Merge pull request #150419 from NousResearch/fix/termux-pnpm-android-arm64
fix(pm): pin pnpm's android-arm64 executable for linux-arm64-bionic
2026-11-07 23:38:20 +01:00
alt-glitch
807b3f1081 fix(update): rewrite gateway launch files before any gateway starts
`hermes update` started paused gateways (and restarted the fleet) from the
service definitions the previous release wrote. A systemd user unit was only
regenerated by the new gateway at boot, after systemd had already started it
with the old unit's environment, and that boot-time rewrite ran while the
Node dependency step was recreating node_modules/.bin, so the unit it wrote
was already outdated.

Add hermes_cli/update_launch_files.py: one step that regenerates every
profile's launch files that differ from what the updated checkout generates
(systemd user units with daemon-reload, the system unit when run as root,
the plist of a launchd job that is not loaded, Windows .cmd/.vbs launcher
scripts compared by content). Each file is independent; a failure is
reported as the `launch_files` follow-up and the rest are still rewritten.

The update calls it once, from a new `after_dependencies` hook in
build_update_products: after the Python and Node dependencies are prepared
and before the paused-gateway restart and the product builds. A tail that
ends before that hook, and the historical-takeover finish, run it before the
fleet restart. Generated file contents are unchanged.
2026-11-07 00:01:43 -05:00
alt-glitch
85b43c1f0b fix(update): refuse a target that lacks a startup file it declares
The pre-move syntax preflight and the post-move check skipped any listed
startup file the target did not contain. A change that moved or dropped
one of those files therefore passed both checks, and the next launch
failed on the import.

The list of startup files now lives in the tree it describes:
pyproject.toml [tool.hermes] update-startup-files. Both checks read the
target's own list, so a commit that moves a startup file updates its
path there and updates to it are judged by the new path. A declared
file the target lacks refuses the update before anything moves, and
rolls the pull back after it.

A target that declares no list (every release before this one) is still
judged by the running updater's list with absent files skipped, so
rollbacks and channel switches to older releases keep working: releases
up to v2026.9.24 lack five of the nineteen listed files.

The post-pull guard now always goes through tree_syntax_error, which
already chose the interpreter by requires-python, so the separate
same-interpreter path (_validate_critical_files_syntax) is removed.
2026-11-06 23:00:58 -05:00
Maciej Lisiewski
3581b52e5e docs(nix): note the dev-shell hook rewrites the lock but not the hash
mkPnpmDevShellHook runs pnpm install --lockfile-only when a manifest
changes, which leaves nix/pnpm-deps-hash stale like the other two paths.
2026-11-07 02:44:24 +01:00
Maciej Lisiewski
e97bd85859 docs(nix): say how to refresh nix/pnpm-deps-hash after a lock change
`hermes pm update --pnpm` rewrites pnpm-lock.yaml but not the flake's
fixed-output store hash, and no doc named the second step. Document
`nix run .#update-pnpm-lockfile` (what it does and the CI fallback) in the
Nix setup guide, its zh-Hans translation, and the PM maintainer commands.
2026-11-07 02:44:23 +01:00
Maciej Lisiewski
1c47ed14a9 fix(pm): pin pnpm's android-arm64 executable for linux-arm64-bionic
The pnpm package declared a bionic gap ("Termux ships a prebuilt TUI;
nothing installs JS workspaces on device"), but the dashboard still builds
web/ on the device. Before the pnpm switch that build used the npm the
Termux package ships. With the gap, `hermes dashboard` on Termux stops with
"pnpm: unavailable on linux-arm64-bionic".

pnpm publishes a bionic-linked build as @pnpm/exe.android-arm64
(/system/bin/linker64, API 28, libc/libm/libdl only). Map the bionic
target to it and pin it beside the shared launcher archive.
2026-11-07 02:31:23 +01:00
Maciej Lisiewski
29e78b124e docs: pnpm commands for the JS workspaces
READMEs, contributor guides, AGENTS.md files, skills and the website (with
the zh-Hans translations) give pnpm commands for the workspaces; the
website itself is still an npm project.
2026-11-06 04:08:45 +01:00
Teknium
401bd3fd01 docs(security): list Docker Hub and raw GitHub as official sources
Review finding: the "anywhere else is untrusted" rule disowned two
install routes our own docs use: the Docker Hub nousresearch/hermes-agent
image (published by docker.yml) and install.ps1 fetched from
raw.githubusercontent.com/NousResearch/hermes-agent (windows-native.md).
List both, name the NousResearch GitHub org, and scope the "not
nousresearch.com" bullet to exclude the accounts listed above.
2026-11-04 21:37:26 -08:00
Teknium
28404e4db4 docs(official-domains): list every Nous host Hermes uses; scope the rule to nousresearch.com
The page called five addresses the "only" official ones, but Desktop
packages, Desktop updates, Hermes-Setup and the Termux APT repository are
served from hermes-assets.nousresearch.com, so a reader following the page
would distrust a genuine download. It also labelled install.sh for Termux,
which the README and Termux guide say not to use there.

- State the rule: nousresearch.com and its subdomains; list the ones Hermes
  uses (docs, assets, portal, inference API, website) with what each serves.
- Add the Discord invite to the account list (README/docs-site form).
- Point Termux and Nix at their own official routes; drop Termux from the
  install.sh comment.
- Replace "any other domain containing hermes" with the subdomain rule plus a
  lookalike-suffix example, so a future Nous subdomain is not called a scam.
- Drop sidebar_position: sidebars.ts orders the category explicitly.
2026-11-04 21:37:26 -08:00
Teknium
5522747885 docs: add Official Domains & Phishing Safety page
An active impersonation campaign (hermes-agent.icu, HERMES-TOKEN GitHub
mass-mention spam — issues #87068, #87133, #87155) is targeting users and
contributors. Add a getting-started page listing the only official domains,
what is NOT official (lookalike domains, tokens, mass-mention shortlinks,
credit-offer emails), and what to do with suspicious messages. Registered
in sidebars.ts.
2026-11-04 21:37:26 -08:00
Maciej Lisiewski
0ff303c37a docs: no release builds an Intel macOS desktop bundle 2026-11-03 20:58:05 +01:00
Teknium
fdf0f0eb42 docs(pm): say how a plugin's hermes-agent requirement is judged
Round-2 review P3 #2: the two version gates compare differently. Document that a
hermes-agent requirement uses PEP 440 with its marker, requires_hermes compares
major.minor.patch and passes what it cannot parse, and that a misfit of either
sits out and is refused at enable/install instead of being disabled.
2026-11-03 00:28:04 -08:00
Austin Pickett
67d47601bc docs(website): official search titles on docs home and install page 2026-10-29 14:37:04 -04:00
unsupportedpastels
3f2b1722b1 feat(nix): ship the Webapp in the Nix package
The Nix package had no Webapp bundle, and `hermes webapp` could not build
one in the read-only store. nix/webapp.nix builds it in the npm workspace
the hook prepares (no native rebuild, no Electron), exposed as
`.#webapp`. The agent assembler takes it as a `webapp` frontend: the
wrapper sets HERMES_WEBAPP_DIST to it, as HERMES_WEB_DIST is set for the
dashboard.

hermes_cli/webapp.py serves a HERMES_WEBAPP_DIST bundle as shipped: no
freshness check, no build lock, never rebuilt or marked stale, and
`--force-build` says it cannot rebuild it.
2026-10-27 09:42:22 -04:00
Teknium
ee3bcbbbc1 docs: GitHub Copilot is the github-copilot labs plugin; document the provider seams
Provider pages (en + zh-Hans) replace the built-in Copilot sections, table
rows and env rows with a pointer: `hermes plugins install github-copilot`
(labs: built by Nous Research, not supported), auto-installed for profiles
that already use copilot/copilot-acp, sign-in with `hermes auth add copilot`
or COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN (gh and Copilot CLI logins are
no longer read). The model-provider plugin guide gets one table of every
ProviderProfile field and hook in providers/base.py, and its examples point at
the labs plugin. The hermes-agent skill references and the
cli-config.yaml.example provider list drop the built-in Copilot rows.
2026-10-25 20:47:11 -07:00
Teknium
3f29cc2c2b fix(git): lock sweep keeps every lock unless it can see no git of any form
Review finding (#144647, P2): the object-store lock sweep removed a live
writer's lock. _git_proc_running matched only processes named exactly
`git` (git-core's dashed executables, e.g. a `git-commit-graph` writer,
ran unseen) and answered "no git running" whenever pgrep was missing or
failed. A writer stopped after taking commit-graph.lock, its lock aged
past ten minutes, lost the lock to the sweep; once resumed the repo was
left with no commit graph while Hermes had stamped it fresh.

The guard now fails closed: on POSIX it scans with psutil (pgrep with a
`^git(-.*|\.exe)?$` pattern in the dependency-free bootstrap), on Windows
it reads every tasklist image name; both match git, git-<sub> and .exe
through _early_recovery._git_program. A probe that cannot tell (pgrep
missing or erroring, tasklist failing, a psutil read denied) keeps every
lock. This covers every sweep that shares the guard (update-path
shallow/index/HEAD locks, tmp-pack debris), not only the graph refresh.

The freshness stamp is written only when a graph is on disk after a
successful write (a split chain whose layers all exist, or a monolithic
graph): a write that exits 0 with no graph, as in a commitless repo,
no longer marks the repo fresh.
2026-10-25 17:51:21 -07:00
Teknium
25db2df103 fix(git): graph refresh honours global core.commitGraph, serializes its slot and covers linked worktrees
Review round on the commit-graph refresh (Greptile + re-review):

- Global graph setting is ignored: core.commitGraph=false is read with the
  user's global/system git config, which the writer's isolated env blanks.
- Expired slots allow duplicate writers: check and claim of the maintenance
  slot run under one flock/msvcrt lock on the slot file, which is never
  unlinked; a failed spawn gives back only a claim holding its own pid.
- Linked worktrees and submodules (a .git file) were skipped: the common git
  dir is resolved once (update_lock._git_common_dir) and used for the object
  store, slot, debris sweep and fresh stamp, on the update spawn and on the
  `hermes -w` pass alike.
- Timeouts were silent: the kill is logged at WARNING, with the timeout
  unrounded.
- kill_process_tree(grace>0) returned once the leader exited on SIGTERM,
  orphaning a group member that ignores it: the rest of the group it led is
  SIGKILLed. grace=0 is unchanged.
- The child's failure line was lost when <home>/logs did not exist: the log
  dir is created at failure time via mkdir_under_hermes_home (a deleted
  profile is not resurrected), and a log that cannot be opened no longer
  raises out of the logger.
2026-10-25 17:51:21 -07:00
Teknium
a80b413cd6 fix(git): graph refresh sweeps only object-store debris and lets git clean up
Review round on #144647 (head d016f04694d):

- CI routing: the refresh (slot claim, bounded runner, stale check, detached spawn) moves to
  hermes_cli/git_commit_graph.py, routed to e2e_upgrade with the update pipeline. The update path
  imports it instead of all of worktree_ops; worktree_ops keeps its repack seams and imports the
  shared slot claim and runner from it (no cycle).
- W1: the -w pass runs in whatever repo it was launched from, so its refresh sweeps only the
  object-store locks (clear_stale_git_locks(names=OBJECT_STORE_LOCK_NAMES)); index.lock / HEAD.lock
  there belong to the user's git. The install checkout's update sweep is unchanged.
- W2: timeout/exit reaping SIGTERMs the git tree first and SIGKILLs only after a 5 s grace
  (kill_process_tree(grace=), default unchanged for every other caller), so git deletes
  commit-graph-chain.lock and tmp_graph_*. The age-gated tmp sweep now also takes
  objects/info/commit-graphs/tmp_graph_*.
- N1: a breakaway-forbidding Windows job gets the no-breakaway retry, and a spawn that fails gives
  the 6 h slot back.
- N2: the detached child logs a failed write (git's fatal line) to the home's agent.log/errors.log.
- core.commitGraph=false in the target repo skips the write.
- N3: a successful no-op write stamps hermes-commit-graph.fresh, so an idle repo is not rewritten
  every slot.
- N4: test_update_finish's completion child and every in-process hermes_cli test stub the
  detached spawn; no writer outlives a test run.
- Greptile: the refresh test now runs on a treeless clone over a Bloom graph and asserts the
  write adds no pack (red when --no-changed-paths is dropped).
2026-10-25 17:51:21 -07:00
Teknium
0c81251886 fix(update): refresh the install checkout's commit-graph after each update
The commit-graph refresh only ran on the `hermes -w` background pass, for the repo
that launch came from. An install checkout that never hosts a `-w` launch never got
a graph, so its startup banner version lookup and `hermes update`'s ancestry checks
kept walking the uncovered history.

_run_post_update_maintenance (post-pull code, run by both the current completion
and the historical finish) now calls worktree_ops.spawn_commit_graph_refresh right
after the release-history fetch: the same missing-or-day-old check and 6 h slot,
then a detached child running the same niced runner (process tree killed at 600 s,
--split --no-changed-paths, GIT_NO_LAZY_FETCH). Detached so the write neither
delays the update nor dies with it; best-effort, so a spawn failure is a debug line,
never a follow-up. ZIP installs have no .git and skip.
2026-10-25 17:51:21 -07:00
Teknium
825c509d36 docs(update): say Hermes keeps the commit-graph fresh and sweeps its stale locks 2026-10-25 17:51:21 -07:00
Teknium
431c5af781 docs: doctor reports plugins an older update left in both lists 2026-10-25 03:59:27 -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
e9c2ad4abb docs: update-disabled plugins keep memory.provider and are retried each update 2026-10-25 03:01:26 -07:00
Teknium
44b57c8af1 docs(nix): extraDependencyGroups adds to the package's shipped groups
Module and .override extras now append to the selected package's
defaultDependencyGroups. Say so in nix-setup.md (en + zh-Hans) and the
option description, point smaller builds at .#minimal or
defaultDependencyGroups = [ ], and replace examples that named groups the
default already ships ("messaging", "voice") or that no longer exist
("honcho").
2026-10-24 17:09:39 -07:00
ethernet
be82958af5 fix(nix): the dev shell's HERMES_PYTHON carries its own dependencies
The shell pointed HERMES_PYTHON at the bare pm-pinned interpreter and reached
the uv2nix site-packages only through PYTHONPATH. Every consumer that replaces
PYTHONPATH (Ink's gateway bootstrap, image attachments, run_tests.sh's env -i)
got an interpreter with no dependencies, so 'hermes --tui' in the shell failed
with 'No module named ruamel'.

devVenv re-homes uv2nix's editable venv onto the pinned interpreter: a real
pyvenv.cfg whose home is the lock's python, devPython's site-packages, and
console scripts re-shebanged onto it. HERMES_PYTHON, VIRTUAL_ENV, python,
pytest and pm are now one interpreter and the shell sets no PYTHONPATH.

The shipped package and the shell share one tool list: runtimeDeps takes
ripgrep and ffmpeg from pm/lock.json too. Reverts the run_tests.sh PYTHONPATH
passthrough, which leaked a caller's PYTHONPATH into every HERMES_PYTHON run.
The dev-venv-self-contained check runs the venv under env -i.
2026-10-23 17:20:39 -04:00
Teknium
0b69853adf docs(browser): browser_exec is the only browser path; Camofox is a plugin
Rewrite the browser feature page, configuration, tools/toolsets/env-var/pm
references, docker, windows, bot-screen, termux/installation and the secondary
developer-guide/integration/feature pages (EN + zh-Hans): drop agent-browser,
the built-in browser_* tools, browser.backend and /browser use; document
browser.executable_path / browser.user_data_dir / browser.chromium_args and the
AGENT_BROWSER_* migration; point Camofox users to 'hermes plugins install camofox'.
2026-10-23 01:41:25 -07:00
Teknium
d7db4d109d refactor: OpenClaw migration leaves core too; first-time setup offers the agent-importers plugin
`hermes claw` (hermes_cli/claw.py) and the openclaw-migration optional skill
moved into the agent-importers plugin (hermes-official-plugins #140/#141), which
keeps `hermes claw migrate|cleanup` as the older spelling of
`hermes import-agent openclaw`. Core drops them with their tests (ported to the
plugin) and the eval leg that loaded the skill's script.

Setup: hermes_cli/setup_agent_import.py replaces setup_migration's OpenClaw
offer. On a first-time `hermes setup` it checks ~/.openclaw (or ~/.clawdbot /
~/.moltbot), ~/.claude, ~/.codex and ~/.cursor; when any is found it asks
"Import your setup from <found>?" (default yes), shows a checklist when more
than one was found, installs agent-importers through the normal catalog install
(or enables it when present), then runs `hermes import-agent <agent>` for each
pick in a child process, which previews and asks first. OpenClaw gets
--migrate-secrets, as core's step did. Nothing found, a no, or
HERMES_NONINTERACTIVE: no prompt, nothing installed. The skip-configured-section
offer now follows any import that changed config.yaml or .env.

LEFT_CORE: `claw` joins the agent-importers row as old_cli, so `hermes claw`
without the plugin names the install. No automatic install for it: an OpenClaw
migration is one-shot and leaves no state that needs the plugin later.

Docs: import guide, OpenClaw guide, cli-commands, quickstart, bundled
cli-reference; locale tips and README pointers.
2026-10-22 11:22:12 -07:00
Teknium
3a9d585e4f fix(update): diagnose a damaged checkout from the checkout, not the stderr
git prints the same "fatal: not a git repository" line when the REMOTE
has a dangling .git file, so the line alone sent users with a healthy
checkout to reinstall. The diagnosis now also requires the checkout to
fail to resolve as its own top level.

The repair command names the failing checkout (--dir / -InstallDir):
a bare one-liner rebuilt the default directory and left a custom-dir
install broken.
2026-10-21 16:57:37 -07:00
Teknium
b70aa089e4 docs(update): repairing a checkout whose .git git rejects 2026-10-21 16:57:37 -07:00
witcheer
2093f6c3e3 docs(quickstart): link User Stories from Next Steps
New users who finish setup often ask what to use Hermes for first. The
User Stories page answers that but no docs page links to it; it is only
reachable from the sidebar. Adds one Next Steps bullet. No other changes.
2026-10-21 14:17:49 +05:30
witcheer
f68863b86a docs: fix two dead anchors and list three orphaned guides in the sidebar
- platform-support: the Intel Mac CLI link pointed at
  #linux--macos--wsl2--android-termux, which no heading produces; the
  installation page heading is "Linux / macOS / WSL2" (#linux--macos--wsl2).
- bot-mode: "Every profile owns its credentials" pointed at an anchor that
  profiles.md does not have. Point it at the "OAuth logins are shared, not
  copied" note under "Clone everything (--clone-all)", which covers the
  same copy rule.
- sidebars: which-file-does-what, secure-hermes-on-a-work-machine and
  troubleshooting-agent-quality are live but appear in no sidebar and are
  linked from no other docs page. Add each next to its closest neighbour.
2026-10-21 14:17:49 +05:30
Teknium
6d63140782 fix(install): a rerun moves a checkout only forward onto the release
Review (unsupportedpastels) on #139311: a rerun over a main checkout moved
it to v0.22.2, which was cut on release/0.22.1 and diverged from main, so
the move crossed the gateway runtime cutover backwards without the downgrade
guard `hermes update` runs before the same move (update_downgrade_guard
refuses when a state.db holds session_admissions rows). The linear test
history could not show it: there, "does not contain the release" always
meant "behind it".

A rerun now moves only when the release descends from HEAD. A checkout that
contains it, has diverged from it, or cannot tell (shallow) stays, and
`hermes update` decides that move with its guard; an explicit
--channel stable is saved and left to `hermes update` the same way. The
stable-default tests gain the release-branch shape (v0.22.2's): a rerun
from main's tip keeps HEAD, a rerun from before the fork still moves.
2026-10-15 12:09:14 -07:00
Teknium
3857c7b8ee fix(install): new installs land on the latest stable release
`hermes update` has followed the stable channel for official source checkouts
since #135847, but install.sh and install.ps1 still cloned main's tip, so every
new user (CLI one-liners and Hermes-Setup, which bakes `-Branch main`) started
on unreleased code and only reached stable at the next release.

For the official repository's main line, with no explicit --commit:
- a fresh install resolves the latest published vX.Y.Z release (GitHub API,
  then the github.com /releases/latest redirect, which needs no API quota),
  fetches its tag (releases can sit on release/* branches) and checks it out
  detached, where `hermes update` puts a stable checkout;
- a rerun with no recorded channel moves forward to that release and keeps a
  checkout that already contains it (forward-only, like the update default);
  if the lookup fails a rerun keeps its checkout instead of jumping to main;
- `--channel main` / `-Channel main` / HERMES_INSTALL_CHANNEL=main installs
  main's tip and saves the choice with `hermes update --set-channel`, so later
  updates keep following main. Forks, mirrors and other branches are unchanged.

The install E2E harnesses that serve unreleased commits from a tagged local
mirror pin themselves to main through the same variable.
2026-10-15 12:09:14 -07:00
Teknium
2c01eb5958 Merge origin/main into feat/unified-gateway-runtime
48 commits from main (e8c8e46471). One conflict: hermes_cli/runtime_provider_custom.py, where both sides
added the `config=` keyword to _get_named_custom_provider; main's signature (config + resolve_credentials)
is taken whole.
2026-10-14 12:41:58 -07:00
ethernet
36a8ee18cd feat(release): choose what a stable release builds and tests with lanes
The skip and opt-in flags (--skip-bundles, --skip-tests, --include-macos-intel,
--include-termux) were four booleans in the claim, and every consumer
re-derived what they meant. A release is now a set of lanes, defined once in
scripts/releases/lanes.py: five build lanes (docker, windows, macos-arm64,
macos-intel, termux) and ten test lanes (ci, nix, docker-tests, pm-bundle,
windows-live, install-e2e, bootstrap-version, termux-checks, smoke, upgrade).
The default is every lane except macos-intel and termux.

  release.py release --only windows,docker      # the Store bundle + image, untested
  release.py release --with macos-intel --without install-e2e

- The claim records `lanes`. A claim cut before lanes existed still parses:
  skipBundles/skipTests/include* translate to the lane set that gated the
  same jobs, because the sequencer reads every claim tag ever cut.
- `admit` emits `lanes` and `jobs` (a run flag per lane-controlled job). Each
  job's `if` reads its own `jobs` entry and the gates derive their expected
  skips from the same table, so the workflow and the gates cannot drift.
  tests/ci/test_stable_release_graph.py evaluates every `if` against 37 lane
  sets.
- A release may build any subset: the candidate manifest carries exactly the
  claim's targets, and the final tag records null for the docker digest or the
  manifest digest when the claim built neither.
- The protected desktop channel, feeds, APT index and upgrade baseline move
  only when the claim built windows and macos-arm64. A partial set is staged,
  verified and (with windows) submitted to the Store, and leaves the channels
  on the previous release. A release that moves no channel is finished once
  public.
- publish-bundles passes `store` so a claim without windows submits nothing
  to the Microsoft Store.

Not exercised end to end: no real release was cut with a partial set.
2026-10-14 11:03:26 -04:00
Teknium
2cd0ec8686 Merge origin/main into feat/unified-gateway-runtime
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).
2026-10-13 05:15:48 -07:00
Teknium
65c40e5e9e test+docs: installer reruns and rollbacks on a chosen update channel (#137714) 2026-10-13 04:42:06 -07:00
Teknium
cc5928bd73 Merge origin/main (#44: 15 commits to 1fd1827726) into feat/unified-gateway-runtime 2026-10-11 14:02:25 -07:00
Teknium
0d3b11c21c ci(release): refuse Intel-less retirement targets and define opt-in platforms once
- Retiring a preview channel now requires the stable head to carry every
  package the preview ships. An Intel preview could otherwise be pinned to an
  arm64-only stable head it has no package in, and its client would fail to
  resolve the retirement for good.
- The docs and release.py's next-steps text said Intel Macs stay on the last
  Intel release's feed. They do not: promote rewrites the one shared macOS
  stable feed with the arm64 leg, so Intel Macs get no update until a release
  opts Intel back in. Only the Termux APT channel stays on its previous release.
- New scripts/releases/optional_platforms.py holds the claim flag, jobs,
  handoff, target and smoke of each opt-in platform; stable.py, channel
  releases, release artifacts and the entrypoint read from it. stable.py is
  back under 1,000 lines. No behavior change.
- Test: a macOS Intel receipt against a baseline without Intel plans no
  upgrade arm (baseline=none); against a baseline with Intel it plans one.
2026-10-11 11:38:33 -07:00
Teknium
5f9b77cce0 ci(release): stop building macOS Intel and Termux in stable releases by default
Stable releases no longer build the macOS Intel (darwin-x64) desktop bundle
or the Termux APT package unless the release is cut with an opt-in flag.
Intel macOS is not supported on main, and its macos-15-intel bundle leg
takes 76-88 minutes, which is most of the release's wall time.

    python scripts/release.py release --commit SHA --include-macos-intel
    python scripts/release.py release --commit SHA --include-termux

The flags are written into the signed claim as includeMacosIntel and
includeTermux, like skipBundles/skipTests. admit emits them, and the
candidates-darwin-x64, transitions-darwin-x64 and macos-packaged-x64 jobs
(Intel) and candidates-termux and termux-checks (Termux) run only when
their flag is on. The gate requires those jobs to report skipped when the
flag is off; the skip flags keep their meaning.

Claims cut before these keys existed (every rc.* tag so far) have neither
key. validate_claim treats a missing key as false and still refuses a
non-boolean value or any unknown key, so sequencer discover/reconcile keep
working over the historical tags.

Without the opt-in platforms the candidate manifest, receipts, mac feed,
protected R2 head, APT promotion and downloads table all work with those
rows absent: the macOS feed carries the arm64 leg alone, the APT indexes
are left on the previous Termux release, and the unbuilt smoke is recorded
as skipped (a passed smoke for an unbuilt target is refused). A release
that opts Intel back in after one that left it out has no Intel baseline,
so its Intel upgrade arm is skipped like a first release.

Preview channels, canary and the PM bundle artifacts are unchanged.
2026-10-11 11:38:33 -07:00
Teknium
cfaafec502 Merge origin/main (#35: 133 commits to f925b01791) into feat/unified-gateway-runtime
Three conflicts:
- apps/desktop/electron/updater/checkout-source.test.ts: main's 354fe11d7e is the
  same releases/latest fixture fix this branch carried as c300c295c1 (#135944); main's
  version (it also drops the unused release-candidates route) is taken.
- agent/context_compressor.py: both sides added one import line; both kept.
- gateway/run_turn.py: main's 4c7ab8b2a0 added trigger="gateway_hygiene" to the hygiene
  _compress_context call this branch moved to gateway/run_turn_hygiene.py; the branch side
  of run_turn.py is kept and the trigger is carried onto the moved call.
2026-10-10 06:49:02 -07:00
Teknium
6a92a2aa49 feat(update): source installs default to the stable release channel
`hermes update` and the Desktop update button on an official source
checkout now move between published vX.Y.Z releases instead of tracking
main commit by commit, and `hermes update --set-channel stable` works.

- stable resolves through R2 when a record exists; until one is published
  it falls back to the latest published GitHub release (non-draft,
  non-prerelease, strict vX.Y.Z, origin tag verified). It used to fail
  with "Channel object not found: releases/channels/stable.json".
- default_channel(): an official-origin source checkout defaults to
  stable; forks, mirrors and checkout-less trees keep main. Package
  installs (MSIX, Store, bundled, electron-updater) are untouched.
- An install that never chose a channel only moves forward: a checkout
  already newer than the latest release (every install that tracked main)
  stays put until a newer release ships. --set-channel stable is the
  explicit consent to land exactly on the release commit.
- Same rule in --check, the apply path and the passive source_check the
  Desktop and banner use.
2026-10-09 19:46:19 -07:00
Teknium
97ec76fa7e docs: rollback section the downgrade refusals link to; regenerate the command-parity table
The store trigger and the updater refusal both point at updating.md#rolling-back-to-an-older-release,
which did not exist yet. The parity table picks up the Ink /status /save /bg /btw routing.
2026-10-09 02:13:02 -07:00