Commit Graph

2913 Commits

Author SHA1 Message Date
Teknium
7fb93521a6 refactor(acp): one route table serves editor commands and documents them
The parity generator kept its own ACP_ROUTES list beside the membership
checks in run_command, so an ACP route could change while the documented
cell (and its drift check) stayed the same. acp_adapter/gateway_commands.py
now holds ROUTES (command -> documented cell, handler): run_command
dispatches through it, anything else is the owner's slash.exec, and the
generator reads the same table. The rendered parity doc is unchanged.

Review finding on #140190 (Greptile)
Refs #134889 (ACP-17)
Refs #140138
2026-10-16 21:13:47 -07:00
Teknium
69f80031de fix(acp): registry commands the editor path does not serve get a named reply, not Internal error
On the gateway ACP path every registered Hermes command outside the adapter's
small allowlist (/title /yolo /retry /undo /skills /clear /bg ...) raised
GatewayClientError('unsupported_command'), which the ACP SDK turned into a
JSON-RPC -32603 "Internal error" for the whole prompt, while /help said
unrecognized commands go to the model.

Map them the way the classic transport client (gateway_chat_commands.py) does:
/title <name> is session.mutate rename, /undo [N] and /retry the rewind
mutation, /clear the reset, and every other registry command goes to the
owner's slash.exec, which runs what it serves for a local session (/yolo,
/skills, bare /title, /plan's turn...) and refuses the rest. That refusal
(and /branch's pointer to session/fork) is the command's reply with
stop_reason end_turn, using the shared "not available on the shared gateway
yet" wording. The parity table's ACP column now reads those routes.

Red on main: tests/acp_adapter/test_gateway_registry_commands.py (real
acp_adapter.entry stdio process + real gateway.run daemon) failed with
{'code': -32603, 'message': 'Internal error', 'data': {'details': 'unsupported_command'}}
on /title.

Refs #134889 (ACP-17)
Refs #140138
2026-10-16 21:13:14 -07:00
Teknium
620f3b3b45 feat(plugin-catalog): add a Nous-granted verified tier
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.
2026-10-16 14:31:11 -07:00
unsupportedpastels
b65e078cdc fix(install): keep "git is required" on macOS when git is not on PATH
stage_prerequisites sent every Mac whose git_runs failed into
install_macos_git, and git_runs is also false when git is missing from
PATH. So a Mac with no git got the Command Line Tools message instead of
"git is required", contradicting the "no git on PATH: unchanged" row and
failing test_real_install_sh_ladder_leaves_only_closed_tokens on macOS.
Gate the macOS path on git being on PATH.

That ladder test was gated with a bare skipif, so the macOS lane never
imported it; give it platforms("posix") per tests/AGENTS.md.

Also from review:
- Check the developer tools' git before Homebrew, so a git that fails
  with the tools present (unaccepted Xcode license, broken ~/.gitconfig)
  reports git's own error instead of running brew install git first.
- Log why xcode-select --install failed (e.g. no GUI session over SSH)
  before the wait, instead of discarding its output.
- Parametrize the dialog-then-continue and fail-fast cases.
2026-10-16 09:05:04 -04:00
unsupportedpastels
e6bfe7a5f1 fix(install): treat macOS developer tools as present only when they hold git
A macOS upgrade can leave /Library/Developer/CommandLineTools behind with its contents gone; xcode-select -p still names it, so the folder-exists check skipped the install dialog for the most common broken-git Mac. Require $dev/usr/bin/git instead, which both the CLT folder and Xcode's Contents/Developer hold.

When xcode-select --install refuses over such a leftover folder, no dialog opens: fail at once with the reinstall remedy instead of waiting 15 minutes.
2026-10-16 09:05:04 -04:00
unsupportedpastels
9b3d61732a fix(install): report git errors when macOS developer tools are already present; wait under Hermes-Setup
When xcode-select -p names an existing developer directory (e.g. Xcode installed, license never accepted), no install dialog will open: skip the dialog and the wait and fail with git's own error instead of waiting 15 minutes and suggesting the wrong fix.

Hermes-Setup drives stages with --non-interactive --json; it has no stage timeout, a Cancel button, and streams log lines as progress, so wait for the Command Line Tools there too. Only a plain headless --non-interactive run fails fast.

Run Homebrew with HOMEBREW_NO_AUTO_UPDATE=1 (auto-update runs the broken git and can take minutes) through run_logged instead of discarding its output.
2026-10-16 09:05:04 -04:00
unsupportedpastels
5aaedc178b fix(install): install git on macOS again when /usr/bin/git is the CLT stub
Restore the pre-pm installer's macOS git path that the pm bootstrap rewrite dropped: try Homebrew first, else open Apple's Command Line Tools dialog and wait up to 15 minutes for git to run, then continue the install in the same run.

Without a terminal (--non-interactive, Hermes-Setup) the installer still opens the dialog but fails right away with the remedy instead of hanging.
2026-10-16 09:05:04 -04:00
unsupportedpastels
ca9b5f04fd fix(install): stop at prerequisites when macOS git is the CLT stub
macOS ships /usr/bin/git as a stub until Apple's Command Line Tools are installed. It passes 'command -v git', so the installer reported prerequisites ok and then died at the clone with 'git clone failed; no checkout published: ... see man xcode-select'.

Check that git actually runs. On macOS, open the CLT installer and fail with the remedy; elsewhere, fail with git's own error. Both keep the git_missing failure class.

Regressed in 3d12e86ef1, which replaced attempt_install_git() (CLT install + git --version check) with a PATH-only check.
2026-10-16 09:05:04 -04:00
Teknium
275b15fc35 ci: catalog-only PRs run the catalog tests instead of the full suite
A PR that changes only plugin-catalog entry YAML (plus contributor email
maps) ran all 23k Python tests on Linux, macOS and Windows, ~25 min, and
unrelated core flakes kept blocking one-file catalog additions.

The classifier now has a `catalog` lane. A diff made only of catalog entry
data turns `python` off and `catalog` on; ci.yaml then runs
catalog-tests.yml (every test file that reads the catalog or the email
maps, discovered by scripts/ci/catalog_test_files.py), plus the contributor
check. The lane is required by all-checks-pass whenever detect selects it.
plugin-catalog/README.md keeps the full suite (a docs-page test mirrors
it), and any non-catalog file in the diff brings the suite back. The
structural and pinned-source admission gates in plugin-catalog-ci.yml are
unchanged.
2026-10-16 04:37:07 -07:00
Mikhail Tarasov
c1f19acb7f fix(tui): ship runtime Python helpers with the built product
(cherry picked from commit 699555cebc116c50d8fab0d7d0e0dc604840bca6)
2026-10-16 01:54:58 -07:00
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
4cfa3ecd97 fix(install): an unreachable release fails a fresh install instead of publishing an empty one
Review (jquesnelle, Greptile) on #139311: when the release lookup succeeded
but its tag could not be fetched, a fresh install had already cloned with
--no-checkout, the fallback cleared the release, and no step wrote the files:
the installer published an empty checkout and exited 0. A rerun in the same
state jumped to main's tip, against the PR's own keep-the-checkout rule.

Stable that applies but cannot be reached now fails a fresh install with a
retryable message (naming --channel main), and keeps a rerun's checkout,
unless stable was asked for by name, which fails. Lookup gains a third
source, origin's highest vX.Y.Z tag over the same transport the clone uses
(the publication run pushes final tags), so a lookup failure with git
working is no longer a separate case. The pytest upgrade harness, whose
origin carries no release tags, pins its fresh installs to main the way the
install E2E harnesses already do.
2026-10-15 12:09:14 -07:00
Teknium
363504a0ba fix(install): the bad -Channel refusal carries a failure class
The install receipt contract requires every install.ps1 Fail call site to
name a class (tests/hermes_cli/test_shared_metrics_install_run.py).
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
fe45cf6684 ci(release): start the Windows bundle when both arches are built, not after their smokes
Stable builds each Windows arch in its own desktop-bundled-release call and
assembles the universal bundle in a third call that needs both. Each per-arch
call also ran that arch's MSIX install-and-chat smoke, so assembly waited for
the slower arch's smoke after its build: on rc.2-v0.22.2 the bundle sat behind
the arm64 smoke from 07:16 to 07:28.

A new windows-smokes-with-bundle input moves both MSIX smokes into the
win32-bundle call. The smokes already fetch the staged package from the R2
handoff, so they run there beside assembly. The per-arch calls then only
build, the bundle call's phase result requires both smokes, and the candidate
manifest records the Windows smoke results from the bundle call, so a failed
smoke still blocks the release. Callers that build everything in one call
(canary, channel, commit builds) leave the input off and are unchanged.
2026-10-15 02:06:01 -07:00
emozilla
74b644aaa4 fix(windows): only the home new consoles use may write the User PATH
A Hermes process whose HERMES_HOME, LOCALAPPDATA or USERPROFILE override
points at a throwaway folder (a review preview, a lab run, a test home)
prepended that folder's bin to the real HKCU User PATH during dependency
sync and update. Every console opened afterwards ran the sandbox's
launcher.

expose_cli and the update-tail PATH migration now ask Windows for the
environment a new console receives (CreateEnvironmentBlock, which ignores
this process's environment). They edit the User PATH only when that
environment resolves the same Hermes root, and leave it alone when Windows
cannot say. Other homes still publish launchers into their own bin.

hermes_root_for_environment resolves the root from a given environment and
shares its root rules with get_default_hermes_root. It expands %NAME%,
${NAME}, $NAME and a leading ~ from that environment alone, so a sandbox
that inherits a stored HERMES_HOME such as %LOCALAPPDATA%\data and
overrides LOCALAPPDATA does not match the console's root. The environment
block reader advances by UTF-16 units, so a stored value holding an emoji
does not hide the variables after it.
2026-10-14 22:36:14 -04:00
Teknium
eb75627faf Merge pull request #106742 from NousResearch/feat/unified-gateway-runtime
One gateway owns every local session: CLI, TUI, Desktop (local), API, ACP, bots and cron attach to the same live conversation
2026-10-14 13:20:01 -07:00
ethernet
9686d55ca8 ci(release): admit stable releases from release/* branches, not just main
The release entrypoint and the stable gate both required the claimed commit
to be an ancestor of main. Both now accept an ancestor of main or of any
release/* branch, via one shared git query (stable.release_line_contains).
The entrypoint prunes its mirror of release/* so a deleted branch stops
admitting commits. The termux previous-package ancestry check follows the
same rule. Workflows still dispatch from main.
2026-10-14 16:04:20 -04: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
a8cc19ebfd fix(release): a Store-only Windows build gets no signing vars; Store-plus-macOS smokes record only macOS
- The Windows build step passes AZURE_* empty when skip-signed is set.
  after-pack and electron-builder sign whenever the vars exist, and the
  Azure login is skipped with the signed lane, so a Store-only build with
  the vars configured would sign without credentials.
- candidate_manifest records a smoke result only for calls whose package is
  a target. `--without windows` runs the Windows candidate calls for the
  Store bundle; their success is not a smoke, and counting it made assemble
  refuse the manifest.
2026-10-14 14:59:28 -04:00
ethernet
f9d8a74035 feat(release): split the Microsoft Store bundle into its own windows-store lane
`windows` used to build the signed MSIX, the universal bundle and the Store
bundle together, so skipping the signed pipeline meant skipping the Store too.
Now `windows` is the signed pipeline and `windows-store` the unsigned Store
bundle; both default on and the shared per-arch builds only make what the
lanes ask for.

- lanes: new `windows-store` lane and derived `windows-build` (either lane),
  which gates the shared candidates-win32-* jobs and handoffs.
- desktop-bundled-release: `skip-signed` builds only the Store variant and
  needs no Azure login, signing, metadata, smoke or receipt; `skip-store`
  builds and submits no Store bundle (replaces the old `store` input).
- manifest: a Store-only release has no package rows, only the Store bundle
  file; assemble() now takes the claim's lanes and checks each Windows bundle
  against its lane.
- claims record `lanesRevision: 2`. A lanes claim without it was cut when
  `windows` also meant the Store bundle (rc.2-v0.22.1), so it reads as
  windows + windows-store.
- release_artifacts: drop the unused `assemble` CLI command, which could not
  name the lanes.
2026-10-14 14:39:03 -04:00
ethernet
6743ab711a fix(release): termux-only claims finish and partial releases keep the shared downloads page
Two review findings on the lanes change:

- candidate-manifest judged only the desktop calls, and when a claim built
  none (--only termux) it called require_success with an empty list and could
  never finish. It now requires every candidate call the claim built, Termux
  included, and judges smoke results only for the desktop calls that have one.
- `complete` rendered the shared releases/stable/index.html for any release
  with bundles, so a windows-only release replaced the previous full release's
  macOS links. admit now emits a derived `desktop-channel` flag and the
  renderer takes --no-channel-page, leaving the tag page and release table
  alone while the shared page waits for a release that serves the channel.
2026-10-14 11:24:03 -04: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
0715474bfd Merge origin/main into feat/unified-gateway-runtime
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.
2026-10-14 05:52:49 -07:00
ethernet
cf3f423c3e Merge pull request #138028 , fixes for bundles
fix(pm): `hermes update` no longer aborts on plugin pyprojects with no project version (salvage #122302)
2026-10-14 00:07:01 -04:00
ethernet
a4aeb141af Merge pull request #138159 from NousResearch/ci/stable-release-dispatch-from-main
feat(release): dispatch Stable Release from the default branch
2026-10-14 00:05:26 -04:00
Teknium
df8c3ca54e fix(release): publish replaces the stable head instead of create-only
The channel advance wrote releases/stable/release-candidates.json with no
ETag, which the store sends as If-None-Match: *. After the first bundled
release the head always exists, so every later publish failed with R2 412
(ChannelConflict) after making the GitHub release public: v0.22.0 went
public while the stable head, desktop feeds and Docker aliases stayed on
v0.21.7. Read the head and write under its current ETag.
2026-10-13 20:24:59 -07:00
ethernet
231cb757a4 fix(deps): bump the WhatsApp bridge lock past its npm-audit findings
`hermes doctor` audits scripts/whatsapp-bridge as its own row. Its lock
carried sharp 0.35.4 (high, bundled librsvg CVE-2026-96889) and
music-metadata 11.15.0 (moderate, EBML parser memory exhaustion). Lock-only
bump to sharp 0.35.5 (+ its @img/* platform packages and libvips 1.3.4) and
music-metadata 11.16.1; package.json is untouched. Every moved version was
published 2026-09-24 or earlier, so none is inside the 14-day window.

Audit count on this tree: 2 -> 0.
2026-10-13 22:51:07 -04:00
ethernet
667e6639af feat(release): dispatch Stable Release from the default branch
Stable ran on its claim tag, so its Actions caches lived in a scope no
later claim could read. Every attempt rebuilt wheels and re-signed every
Windows payload file. Canary already runs from the default branch with the
tag as an input. Stable now does the same.

- `check_claim` reads the commit from the claim tag. It requires the
  default-branch dispatch of stable-release.yml instead of GITHUB_REF and
  GITHUB_SHA.
- The protected publisher accepts stable-release.yml on the default branch.
- `release.py` and the release entrypoint dispatch on the default branch.
- Runs are matched to a claim by their run name. Every run now has the same
  head branch. Runs that started on the tag still match.
- `release_artifacts` reads RELEASE_COMMIT before GITHUB_SHA. The publish
  and Store jobs now set it to the admitted commit.
2026-10-13 21:22:30 -04:00
ethernet
c11002329b fix(release): publish the final vX.Y.Z Docker tag again
After #135054 the images are pushed under the attempt ref (rc.N-vX.Y.Z),
and promote_stable only moved stable/latest, so :vX.Y.Z and
:vX.Y.Z-desktop were never created. The publication pass now tags both
variants with the final release tag alongside the stable/latest aliases,
from the attempt's digest, and reads each back. The final tag still only
appears at publish, so an earlier attempt cannot collide with it.
2026-10-13 20:02:43 -04:00
alt-glitch
303b70f75b chore(release): retire HERMES_GUEST_ONBOARDING from bundles, build tooling and the updater
The Microsoft Store variant forced HERMES_GUEST_ONBOARDING=1 into its bundle env,
and commit/channel builds could bake it with --bundle-env. Nothing reads it now.

- scripts/bundles/desktop_inputs.py: the Store bundle env is just the request's.
- bundle_env.py / bundle-env.mjs: the key is no longer allowed for new builds.
- channel-protocol.ts: the key moves to RETIRED_BUNDLE_ENV_KEYS, so preview
  manifests already published with it still decode (the HERMES_SKIP_INTRO
  precedent).
- BUILDING.md example uses HERMES_PREVIEW_FULL_CONNECTORS.
- Build tests use another allowed key as their sample; both validators reject the
  retired key and the decoder drops it.
- msix-virtualization.test.mjs: every generated MSIX manifest (store, release,
  canary, channel) keeps filesystem and registry write virtualisation disabled,
  and the builder config declares unvirtualizedResources. The machine marker and
  the shared %LOCALAPPDATA%\hermes root depend on that.
2026-10-14 00:32:21 +05:30
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
e36fa7ba6b fix(update): --version, the dashboard and a remote backend name a stable rollback too (#137714)
`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.
2026-10-13 04:42:06 -07:00
Teknium
bb35d7a282 fix(install): a rerun keeps an install on the update channel it chose (#137714)
Hermes-Setup and install.sh/install.ps1 reruns switched every existing
checkout to the installer's branch (Hermes-Setup bakes `main`), so an
install the user had set to `stable` landed on main while config.yaml
still said stable, and the next check offered the release as an update.

A checkout whose config.yaml record names a non-main channel now keeps
its position (`hermes update` owns moving it); an explicit --commit pin
still outranks the choice, and installs with no record or `main` keep
the plain branch behaviour. Hermes-Setup's update mode also forwards the
`--channel` the Desktop checked against instead of dropping it for
`--branch main`.
2026-10-13 04:42:06 -07:00
Teknium
cba45e8a66 fix(plugin-catalog): only plain UTF-8 data may ship compressed
Code compressed out of sight skips every text gate (self-updater, credential
reads, reviewer greps). A single .gz/.bz2/.xz must now decompress to valid
UTF-8 text under a data suffix (txt/tsv/csv/json/jsonl/ndjson), capped at
64 MiB; code ships uncompressed or not at all.
2026-10-13 04:39:47 -07:00
teknium1
0a711e141b fix(plugin-catalog): rule 17 gate reads a single gzipped file instead of failing it
The payload scan only opened zip and tar archives, so a compressed single file such as
holographic 0.13.0's dictionaries/de_compounds.tsv.gz ("archive could not be opened for
review") failed pinned-source-validate although it is plain text a reviewer can read.
A .gz/.bz2/.xz that is not a tar is now judged by what it decompresses to: the inner name
must be source and its first bytes must not be a compiled binary.

No entry that passed before can newly fail: the new path only runs for files the old scan
already rejected.
2026-10-13 04:39:47 -07:00
calvinnwq
ec82a5643b ci: open an issue when Hermes Desktop cannot read the plugin catalog
Desktop's hermes://plugin/install?catalog= links fetch /docs/api/plugins.json cross-origin. The docs host answers with a 301 to GitHub Pages, and a browser fails the fetch at that hop unless it carries Access-Control-Allow-Origin. The skills-index watchdog probes with curl -L, which never checks CORS, so it stayed green while every catalog link failed.

scripts/ci/check_catalog_cors.py fetches the catalog hop by hop with Origin: null (what a packaged Desktop renderer sends) and fails when any response lacks the header. A new check-catalog-cors job in skills-index-freshness.yml runs it every 4 hours and files its own [plugin-catalog-cors-watchdog] issue, so its reports never land on a skills-index issue.

Refs #136483
2026-10-13 03:49:29 -07:00
Teknium
88d56fcd87 fix(gateway): /skills review verbs run the messaging handler for a local session
Desktop exposes exactly the write-approval review slice (desktop_subcommands
pending/approve/reject/diff/approval) and sent it as slash.exec, which the
owner refused; Ink's bare/pending forms hit the same refusal. The gateway's
own _handle_skills_command already serves that slice (the hub stays
CLI-only and answers its "Search/install are CLI-only" line), and its
`approval on|off` writes skills.write_approval to the profile's config.yaml,
which is where main's CLI wrote it too. Admitted: bare/pending/diff as reads,
approve/reject/approval as controls; anything else (install, search, ...)
stays unsupported_command.

Proof: test_session_read_commands runs /skills pending, /skills reject and the
refused /skills install on a real daemon; parity table regenerated.
2026-10-13 02:51:42 -07:00
Teknium
0d93ab57fa docs(gateway): the parity table's Classic CLI column is main's HermesCLI
`hermes chat` is main's HermesCLI with a gateway-backed agent and session
store (hermes_cli/gateway_agent.py, gateway_session_store.py); the column
still described the retired thin client (gateway_chat_commands.VIEW_ROUTES),
which now only fronts --stream-json and the safe-mode bypass. The generator
reads HermesCLI._slash_handler for every registry command and names the main
handler it runs in-process; gateway-only commands read "messaging-only:
unknown command". The header says which client is which, and the
/approve /deny control verdict cites its test. Table regenerated.
2026-10-13 02:51:03 -07:00
Teknium
d3cd685fb6 fix(gateway): per-session setting commands run their messaging handler for a local session
slash.exec admits /reasoning /voice /approvals /codex-runtime /footer /busy /verbose /yolo /fast
/personality and runs the same _handle_<name>_command a messaging chat runs. Only what made that
handler wrong for a LOCAL session changes (gateway/session_setting_commands.py finds its LiveSession):

- /reasoning <level>: the session override now reaches a local turn (current_reasoning_config honours
  it before the frozen policy), config.get reasoning and session.info; `--global` saves AND applies to
  this frozen session; show/hide sets the session's streamed reasoning; a session.mutate reasoning
  pick clears a typed override.
- /fast: the session's tier is read from its policy; `--global` applies to this session too.
- /busy: applied to the session (config.get busy) besides the saved default.
- /verbose: no messaging opt-in gate for a local session; cycles its own tool-progress mode
  (off/new/all/verbose, no messaging-only `log`).
- /footer: parsed its argument from a field MessageEvent does not have, so `status|on|off` toggled.

Proof: tests/gateway/test_session_setting_commands.py runs every handler on a real local session
against a loopback model, reads back through config.get and the next turn's request
(reasoning_effort high, then low after --global).

(cherry picked from commit 64e27e54954b5c5a80ca781d7fabcc7b8ea78df7)
2026-10-13 02:43:13 -07:00
Teknium
88056a7556 docs(gateway): parity table rows for the admitted authoring and goal-family commands
Regenerated by scripts/gen_gateway_command_parity.py: /plan /learn /init /initiate-setup /moa
/blueprint /egress /goal /subgoal /loop /heartbeat /review /refine /debug /curator /login are
``control`` on slash.exec, so the classic CLI, Ink and Desktop columns reach them. The stale
"/curator has no gateway handler" note is gone (``_handle_curator_command`` exists now).
2026-10-13 01:58:38 -07:00
Teknium
2efe028116 fix(tui,gateway): /status, /context and /cron read as main's TUI on the shared owner
A TUI session's slash.exec reached the messaging gateway's handlers:
/status printed "📊 **Hermes Gateway Status**" markdown, /context the
gateway's gauge instead of the category table, and /cron was refused
(FINDINGS rows 17 / 19 / 21).

For a session created with source 'tui' the owner now renders main's
TUI text itself (gateway/session_tui_reads.py), inside the owning
profile's scope and the session's workspace:
- /status: main's session.status lines (status_report.build_status_fields)
  from the stored row and the live agent;
- /context: main's _format_live_context_output, the conversation counts,
  then render_context_breakdown_lines(grid=False) off the live agent;
- bare /cron and /cron list [--all]: the classic CLI's text, now built by
  cron_overview_lines / cron_list_lines in cli_commands_mixin (the CLI
  prints the same lines). Every /cron write stays refused.
Other surfaces keep the gateway handlers. The parity table records the
TUI reads.

Live (tmux, fake provider): all three pages match MAIN line for line,
apart from the session id format.
2026-10-13 00:35:44 -07:00
Teknium
a89f374d7c Merge origin/main (#45: 255 commits to 3b63f7b0a4) into feat/unified-gateway-runtime
Conflicts (2 files, 1 hunk each); every main-side change is kept, ported to
where the branch moved the code:

hermes_cli/kanban_db.py (build_worker_context helpers _ctx_cap .. _ctx_comments)
  main:   f5a6651231c/d56e357556f coerce foreign/text timestamps on read; in
          _ctx_role_history the "Recent work" stamp became
          _ctx_stamp(_to_epoch(row['ended_at']) or 0, now) instead of int().
  branch: moved the whole _ctx_* helper block into hermes_cli/kanban_db_context.py
          (kanban_db.py imports it back), deleting it from kanban_db.py.
  merged: kept the branch's deletion in kanban_db.py and applied main's change in
          kanban_db_context.py::_ctx_role_history as
          _ctx_stamp(_kb._to_epoch(row['ended_at']) or 0, now). Main's other
          timestamp coercions in kanban_db.py (Task/Run/Comment/Attachment/Event
          from_row, _TASK_EPOCH_COLUMNS, release_stale_claims,
          _extend_live_stale_claim, task_age) auto-merged unchanged.

hermes_cli/web_server.py (_lifespan)
  main:   d7830c6f42 reworded one comment in the free-tier bootstrap block
          ("the ONE place its identity is created" -> "the one boot-time creator
          of its identity"; guests are now also created on first connector use).
  branch: moved _lifespan's body into hermes_cli/web_server_app.py::app_lifespan.
  merged: kept the branch's relocation and applied main's comment rewording in
          web_server_app.py.

Merge-induced health fix (no conflict marker; the combination tripped the ratchet):
apps/desktop/src/app/session/hooks/use-cwd-actions.ts::changeSessionCwd
  main:   63ed3caa4ba/dbc538547fc grew the function (statusbar cwd change for the
          focused chat / tile runtime ids) to CC 20.
  branch: added the session_busy refusal mapping (sidebar.projects.moveBusy) in
          its catch, +1 branch -> CC 21 > target 20 (scripts/check health blocking).
  merged: both behaviours kept; the busy-error mapping moved verbatim into a
          module-level cwdChangeError(err) helper. Health back to 0 blocking.

Check: every line main added between 1fd1827726 and 3b63f7b0a4 (317 files) is
present in the merged tree.
2026-10-12 16:55:20 -07:00
Teknium
3b63f7b0a4 fix(install): Windows installs under a long profile path no longer fail "Clone succeeded, but checkout failed"
install.ps1 clones into %LOCALAPPDATA%\hermes\.hermes-clone-<pid>-<random>\tree
before publishing, which puts the deepest tracked file (a 159-character zh-Hans
docs path) past MAX_PATH once LOCALAPPDATA is longer than ~55 characters. Git
for Windows then refuses the file ("Filename too long"), every clone attempt
and the deferred checkout fail the same way, and the user sees "fatal: unable to
checkout working tree" from both the PowerShell one-liner and Hermes-Setup.

Clone with --config core.longpaths=true so the setting lands before the first
checkout and stays in the repo for `hermes update`; an installer rerun over an
existing checkout sets it too.

Salvages the long-path half of #72744 by @Imagineer99, written against the
pre-rewrite installer.

Co-authored-by: Lee Jackson <samleejackson0@gmail.com>
2026-10-12 16:42:41 -07:00
Teknium
119fbcf84e fix(plugin-catalog): rule 17 gate no longer fails every Python entry on bytecode validate wrote
The pinned-source gate runs `hermes plugins validate --install-deps` (which
imports the plugin) before scan_plugin_payloads.py, so the scan walked the
untracked __pycache__/*.pyc that import just wrote and reported it as
"committed Python bytecode". In a git checkout the scanner now judges the
tracked set, i.e. what the pinned commit ships; committed bytecode still fails.
Non-checkouts and untracked trees keep the full walk.
2026-10-12 03:18:02 -07:00
ethernet
4b050f6731 fix(release): stable advance trusts receipts instead of downloading ~33 GB
The 0.21.7 publication pass downloaded every package twice (~13 GB of
native handoffs, then all 20.5 GB of candidate files including the Store
packages the feeds never reference) to recompute digests the receipts
already bind, then died in the macOS feed merge:

  ModuleNotFoundError: No module named 'ruamel'

- The sequencer steps run under python_packages with ruamel.yaml (the
  node toolchain has no project deps), as the canary finalize already does.
- Stable advance fetches only metadata-*.json and the per-arch *-mac.yml
  legs. assemble(local_bytes=False) binds each artifact by its receipt
  sha256 and takes the macOS sha512s from the receipt-bound feed legs,
  cross-checked against receipt sizes.
- promote() materializes only non-package files (feed legs, APT indexes).
- finalize(verify_bytes=False) checks remote sizes with HEAD instead of
  streaming the zip/dmg back down.

Canary (no accepted candidate) keeps the full download path unchanged.
2026-10-12 02:18:43 -04:00
ethernet
bfa4f5098c feat(release): the stable sequencer narrates what it is doing
A publication run sat silent for 8+ minutes while it downloaded ~20 GB,
with no way to tell which phase it was in or why a claim was held.

scripts/releases/progress.py logs to stderr (stdout stays the JSON steps)
with GitHub ::group::/::notice::/::error:: markers:

- every git/gh/docker command the sequencer runs, with its time and result
- discovery counts, and each claim's state with the reason (run attempt
  and conclusion, draft location, abandon marker, receipt/release match)
- the plan: why each version advances, is skipped, or is held
- each step as a timed group: publish (receipt digests) and advance
- the channel advance's phases, plus per-file progress for the handoff
  fetch and candidate materialize downloads (the slow part)
- the head before and after, and a top-level ::error:: on failure
2026-10-12 02:13:17 -04:00
ethernet
36efcb8c87 fix(release): a fresh flip advances the head with the receipt it just wrote
Publishing 0.21.7 made the release public, then failed the channel
advance in the same pass with

  ChannelError: Stable candidate manifest differs from the final release receipt

discover() builds each record before the vX.Y.Z receipt tag exists, so a
green claim's record has candidate_manifest_sha256 = None.
publish_attempt() writes the receipt but returned only the Docker digest,
so the advance compared the archive's real digest against None. Every
first-pass publish of a bundle release failed here; only a rerun (which
rediscovers the receipt) could advance the head.

publish_attempt() now returns both receipt digests and the sequencer
applies them to the record before the advance. The sequencer fixture can
now stage a fresh green claim (no receipt tag, draft on the attempt ref,
one successful run); the new test fails on main with the production error.
2026-10-12 02:00:07 -04:00
ethernet
310e05c027 fix(release): the final stable tag push authenticates with GH_TOKEN
The publication reconcile checks out with persist-credentials: false, so
when the sequencer reached ensure_final_tag() its `git push origin
refs/tags/vX.Y.Z` died with

  fatal: could not read Username for 'https://github.com'

GH_TOKEN authenticated gh but never git. The push now carries its own
auth: when GH_TOKEN is set it resets inherited credential helpers and
uses `gh auth git-credential`, so the token stays out of argv and out of
.git/config, and the checkout keeps persisting nothing.
2026-10-12 01:36:01 -04:00
ethernet
576012d329 fix(release): stable advance checks native metadata against the payload tag
Stable Release Publication for 0.21.7 failed in advance_stable with

  ChannelError: Native metadata release identity mismatch

publish_release() passes the attempt ref (rc.15-v0.21.7) to
read_native_receipts(), which is right for the handoff receipts: they are
staged under releases/tag/<attempt>/. But record() stamps each
metadata-<platform>-<arch>.json with the payload tag (v0.21.7), so the
row check compared v0.21.7 against rc.15-v0.21.7 and refused every
stable release. Canary never noticed because its tag == payload_tag.

read_native_receipts() now takes payload_tag for the metadata row check
while receipts keep binding the attempt ref. The existing fixture used a
plain vX.Y.Z tag for both, which is how this stayed hidden; the new test
stages attempt-ref receipts with payload-tag rows.
2026-10-12 01:26:03 -04:00