Commit Graph

3546 Commits

Author SHA1 Message Date
BearHuddleston
d70b5c1487 fix(releases): list only the AppImage names the Linux build produces
_VALID_ASSETS accepted both linux-x86_64.AppImage, the name
electron-builder gives the x64 AppImage and the one
scripts/releases/linux.py publishes feeds for, and a linux-x64.AppImage
alias nothing produces. Both normalize to the same (linux, x64) row, so
an archive holding both listed whichever name came last.

Drop the alias. The new test feeds both names and expects the produced
one in the row and in the version filter; it failed on the previous head
because the alias overwrote the real file.
2026-11-29 14:13:27 -06:00
BearHuddleston
8e9aaf056c docs(releases): list Linux AppImages in builds tables and document bundle support
Linux x86_64 and arm64 AppImages now build, pass native install-and-chat
smoke, unpack to a stable per-version `$XDG_DATA_HOME/hermes/bundles/`
payload path, and publish updater feeds on daily canaries (`#161336`)
and opt-in `--with linux` stable releases (`#161406`), but the builds
page renderer and documentation still hid them or described them as
unsmoked, unoffered artifacts:

- `scripts/releases/downloads_page.py`: accept real `linux-x86_64.AppImage`
  and `linux-arm64.AppImage` filenames via `_VALID_ASSETS` (normalizing
  `x86_64` to `x64` while rejecting invalid os/arch/ext combinations),
  remove `_UNLISTED_OS = frozenset({"linux"})` so staged Linux AppImages
  render in `Hermes Desktop` download tables, and update `_SMOKE_SCOPE`
  to reflect diagnostic Linux AppImage smokes while preserving the
  unsigned Store notice.
- `tests/scripts/test_render_builds_publication.py`: verify real
  `linux-x86_64.AppImage` and `linux-arm64.AppImage` rows render in both
  release bodies and R2 `index.html`, while YAML feeds and invalid
  os/arch/ext pairs remain hidden.
- `apps/desktop/BUILDING.md`, `tests/install/README.md`, and
  `website/docs/` (`platform-support`, `installation`, `updating`,
  `desktop`, `shared-bundle-builds`, `stable-releases`): document the
  Linux AppImage distro/glibc floors, first-launch payload extraction,
  `AppImageUpdater` differential updates, measured canary sizes, and
  current non-gating canary / opt-in `--with linux` stable status.
2026-11-29 14:13:27 -06:00
BearHuddleston
07c9d399da docs(releases): say what time_budget bounds by the deadline
The docstring promised a bound on total wall time. Reads end by the
deadline, and the retries in `signed_request`, the downloads and
`put_object` skip a sleep the time left cannot cover; `copy_object`'s
retry, which no budgeted caller reaches, still sleeps. Connecting (per
address tried), the TLS handshake (CPython's `do_handshake` takes one
deadline from the socket timeout) and each send run with the timeout
the connection opened with, which is at most the per-request cap and
the time left at open. So each of those steps is bounded but can still
run that long past the deadline. Say so, so a caller sizes the
per-request cap knowing it is also the possible overrun.
2026-11-29 13:06:26 -06:00
BearHuddleston
7e5f505087 fix(releases): let the time budget skip put_object's retry sleep
`put_object` retries a retryable R2 status in its own loop with an
unconditional `time.sleep(1.0)`, so under `time_budget` it slept past a
deadline that `signed_request` had already declined to retry into, and
the next attempt then failed on the spent budget instead of the 503.
`_reconcile_linux` reaches it through `linux.publish_stable_record`.

Use `_retry_sleep(1.0)` like the other retry loops: outside a budget it
sleeps as before; inside one it re-raises the PUT's own error once the
time left cannot cover the sleep.

Test: a loopback endpoint answering 503 under a 0.5 s budget recorded
three 1 s sleeps and three PUTs on the previous head; now none and one,
and the error is the 503.
2026-11-29 13:06:26 -06:00
BearHuddleston
594add2fc0 fix(releases): hold trickled R2 responses to the time budget
A socket timeout bounds one wait, not one read. `res.read(n)`, the
whole-body `read()` in `signed_request` and the status/header
`readline()` loop recv until they have their bytes, so a peer that sends
a byte every few milliseconds kept a single call going past the
`time_budget` deadline: the budget was only checked between 1 MiB
chunks, and `signed_request` and `read_public_receipt` never checked it
while reading.

Under an active budget, `_connection` now gives the connection a
response class whose socket reader sets each wait's timeout to what the
budget has left (`_effective_timeout`) and raises once it is spent. That
covers the status line, headers and every body read in all four
readers, so the per-loop `_clamp_socket_timeout` / `_check_budget` calls
go away and the chunk loops read as they did before. Connections opened
outside a budget keep the stock response class.

Sends are unchanged: each `sendall` is bounded by the timeout the
connection opened with, which the budget already clamps, and the
reconcilers only PUT small JSON bodies.

Tests: a loopback server that sends headers or a body one byte every
20 ms holds each of `signed_request`, `read_public_receipt`,
`download_public_object` and `verify_remote_artifact` for the whole
10 s trickle on the previous head (8 failed); all raise `TimeoutError`
at the 0.5 s budget now. A trickle that stops at 2.5 s under a 3 s
budget pins the per-wait clamp: without it the last wait runs the
connection's full 3 s.
2026-11-29 13:06:26 -06:00
BearHuddleston
3562efb348 fix(releases): bound R2 time inside post-publication reconcilers
Post-publication reconcilers (`_reconcile_store`, `_reconcile_linux`)
run after durable channels have already moved, inside `reconcile`'s
30-minute timeout. Previously they inherited `r2.py`'s 600-second
per-request socket timeout and unbounded retries, so a stalled R2
request could outlast the workflow timeout and fail the run after
publication. `_reconcile_store` also caught only `(StoreError,
ValueError, OSError)` and did not handle `r2.R2RequestError` or
`http.client.HTTPException` when reading the archived candidate
manifest.

Add a `ContextVar`-backed `r2.time_budget(total_seconds, *,
per_request_timeout=None)` context manager wired through
`signed_request`, `read_public_receipt`, `_download_url`, and
`_stream_and_hash` (clamping open socket reads and retry sleeps to the
remaining deadline, strictly tightening nested budgets). Wrap
`_reconcile_store` and `_reconcile_linux` in a 300 s budget with 60 s
per-request caps, and widen `_reconcile_store`'s advisory catch tuple
to log a structured Microsoft Store warning on R2/HTTP errors.
2026-11-29 13:06:26 -06:00
Teknium
a3d5f87f01 fix(slash): retired names stay commands on input; discovery offers only what runs
Retiring a name in the registry turned it into chat at the adapter boundaries: Slack `/hermes topup`
became the plain text `topup`, and Slack `!topup` / Matrix `!commands 2` were never rewritten, so the
model read them. Every adapter normalizer now asks one rule, hermes_cli.commands.is_command_on_input
(registry names and aliases, plugin commands, RETIRED_COMMANDS keys), and slack_subcommand_map (the
native and relayed `/hermes` input map) carries the retired names, so the gateway answers the rename
notice. Menus still list only the registry. The Matrix guide recommends `!help`.

Desktop's /hatch fallback for older backends runs only when the session's loaded catalog lists
/hatch; an unloaded catalog sends the command to the backend. On the shared gateway Ink offers only
the /pet arguments it runs itself (no `hatch`). Restricted /help drops the usage-hint parts a folded
form owns from its parent's line unless the caller holds that folded grant.
2026-11-29 03:22:20 -08:00
Teknium
f2b19fd37c refactor(slash): retire the folded command names
The folds Teknium approved are on main (/verbose focus, /statusbar battery|indicator,
/status's egress block, /model --runtime, /pet hatch, /goal add, /help <page>,
/billing topup|upgrade, TUI /verbose details|density), but the old names still ran.
They are now retired with RETIRED_COMMANDS: typing /focus, /battery, /indicator,
/egress, /codex-runtime, /hatch, /generate-pet, /subgoal, /commands, /topup,
/subscription or /upgrade (either _ or - spelling) runs nothing on the CLI, gateway,
TUI and Desktop and answers "`/old` is now `/new`.". The TUI answers its own /details,
/detail and /density the same way (slash.retired), since they never existed elsewhere.

The old names leave help, menus, completion, the Telegram menu priority, the Slack
/hermes-only set, the Desktop registry and description keys, and the docs tables (the
Renamed commands table lists each). Handlers only the old names reached are removed;
the umbrella commands still call the shared handlers.

Slash access: the folded forms check their own user_allowed_commands keys (goal-add,
model-runtime, status-egress, help-pages) instead of the retired names, and an
operator list that still names subgoal, codex-runtime, egress, commands or topup
grants what replaced it, so no existing config loses or gains access.
2026-11-29 03:22:20 -08:00
BearHuddleston
9d23ed3542 fix(releases): let no Linux feed failure fail the stable sequencer
_reconcile_linux runs after the release and its channels are durable,
and the Linux lane promises never to gate publication. Its except
clause listed the error types it expected, and review kept finding ones
it missed. A truncated R2 read raised http.client.HTTPException
(820a4262ab). A malformed live stable-linux.yml raises ruamel's
ParserError from parse_linux_feed. A handoff receipt with a non-string
sha256 raises TypeError in handoff.validate. Each of them failed
sequencer.main after the release was public.

The lane now catches Exception at its single call, with a BLE001
waiver that says why. It logs the traceback and warns with the
exception's type name, the same form sequencer.main uses for its own
::error::. An unexpected bug therefore still shows up in the job log
and as an annotation, but it no longer turns a finished publication
red. SystemExit and KeyboardInterrupt still propagate.

The new test serves a stable-linux.yml that is not valid YAML from the
loopback R2. On the previous head ParserError escaped _reconcile_linux.
Now it warns, the feed is unchanged and no PUT is made.

Found by a Sol review round on #161406.
2026-11-29 01:31:39 -06:00
BearHuddleston
e3164075e9 refactor(releases): share the Linux identity and smoke checks with admission
record_evidence's _arch_evidence_reasons was a copy of the commit, tag
and per-arch smoke checks in admit_publication. A rule change would have
needed the same edit in both places. admit_publication now starts from
the helper and adds only its ChannelAuthority checks, and the helper
moves above it.

The only observable change is reason order: authority refusals now come
after the evidence refusals. Nothing reads that order. The 92 tests in
test_release_linux.py and test_release_sequencer.py pass on the previous
head and on this one. Dropping the helper call from admit_publication
fails 9 of them.

Reported by Greptile on #161406.
2026-11-29 01:31:39 -06:00
BearHuddleston
bcc8a32444 fix(releases): warn when a published Linux release has no smoke receipt
When linux-evidence.json was missing, publish_stable_record returned
published=False. _reconcile_linux then logged a plain line, so a skipped
or failed recorder left the stable Linux feeds stale with no annotation,
although the PR promises a :⚠️: for missing receipts. A refusal
now warns the same way an R2 error does.

The warning goes through a new progress.warning, next to notice and
error, so it lands on stderr like the other annotations. The sequencer's
stdout stays the JSON step list that progress.py documents. The earlier
print put the R2-error warning on stdout, and the two tests that read it
now read stderr.

The new test runs _reconcile_linux against an empty loopback R2. On the
previous head it saw only the plain log line.

Reported by Greptile on #161406.
2026-11-29 01:31:39 -06:00
BearHuddleston
3d2acfa982 fix(releases): keep a truncated R2 read from failing the stable sequencer
r2.signed_request retries an IncompleteRead and then re-raises it.
IncompleteRead is an http.client.HTTPException, not an OSError, so it
escaped _reconcile_linux's catch. The sequencer job then failed after
the release and its channels were already live, which breaks the Linux
lane's non-gating promise. The catch now includes HTTPException, the
same tuple channels.py already uses for R2 transfers.

The test has the loopback R2 fixture send a short body for
linux-evidence.json on every attempt. On the old head it raises
IncompleteRead out of _reconcile_linux.

Reported by Greptile on #161406.
2026-11-29 01:31:39 -06:00
BearHuddleston
a41f3b77aa ci(releases): reconcile opt-in Linux AppImage stable updater feeds 2026-11-29 01:31:39 -06:00
BearHuddleston
1df8bf5c5b fix(releases): verify both Linux AppImages before a retry writes either feed
_preflight_feed returned "noop" for an arch whose live feed already
matched the plan before it checked that arch's AppImage. A retry after a
partial publish (x64 written, arm64 PUT failed) therefore verified only
the arm64 AppImage and wrote the arm64 feed, even if the x64 AppImage the
live feed names had gone missing or corrupt since. That breaks the
all-or-nothing rule publish_admitted states: both AppImages are checked
before the first PUT.

The live-feed checks (downgrade, conflicting same version) still refuse
first, without a download. The AppImage size and SHA-512 check then runs
for every arch, whether its feed is already live or not. A rerun where
both feeds are already live now downloads both AppImages and writes
nothing, the same transfer cost as the first publish.

Test: test_retry_after_partial_publish_reverifies_the_already_live_arch_appimage
seeds a live x64 feed, corrupts the x64 AppImage and retries. It
expects a checksum refusal, no PUT and no arm64 feed. It fails on the
previous head (DID NOT RAISE: the arm64 feed was written) and passes now.
Found by the sol-loop review on #161336.
2026-11-29 00:19:46 -06:00
BearHuddleston
61cb3898fd refactor(releases): fetch staged Linux feeds through handoff.fetch
Greptile on #161336: load_feeds_from_dir had no caller, because
fetch_staged_feeds read both staged feeds itself, with a hand-rolled
copy of the receipt-bound transfer that handoff.fetch already does for
every other leg (read and validate the receipt, then GET each row and
check size and sha256), plus a read of r2.Response's private `_body`.

Keep the loader and drop the copy instead: publish_from_env now
downloads each arch's feed with handoff.fetch into a temporary
directory, one receipt per call with only that arch's feed name
included, and reads both with load_feeds_from_dir. Each feed can still
come only from its own arch's receipt, and a missing or tampered feed
still refuses before the first PUT. A transfer whose bytes disagree with
the receipt now gets the shared download's retries before it fails, and
the error reads "Artifact checksum mismatch".

New test: test_publish_from_env_takes_each_feed_only_from_its_own_arch_receipt
moves the x64 feed's receipt row into the arm64 receipt and expects a
refusal with no PUT. It passes on the previous head too (that code
looked the row up per receipt); it fails on a mutant that fetches both
arches in one handoff.fetch call, which is the shape this change has to
avoid.
2026-11-29 00:19:46 -06:00
BearHuddleston
0d523559c9 refactor(releases): drop the Linux publisher's unused fetcher copies of the R2 helpers
Greptile on #161336: linux.py threaded an optional `fetcher` through
every R2 call and, when one was set, ran its own copies of
r2.verify_remote_artifact and r2.put_object (checksums, request
hashes, Cache-Control, error checks). Nothing passes a fetcher: the
workflow runs `python -m scripts.releases.linux publish` and the tests
drive the real transport against the loopback R2 fixture. The copies had
already drifted (the artifact check read `response.data`, which
r2.Response doesn't have), so the first caller would have hit an
AttributeError instead of a checksum verdict.

Remove the parameter and its branches. Artifact verification and the
conditional feed PUT now go only through r2.verify_remote_artifact and
r2.put_object, and _get_live_feed keeps only the 404 handling that
r2.signed_request can actually raise. No behaviour change on the real
path, so the existing loopback tests are the proof: the same 36 test ids
in tests/scripts/test_release_linux.py pass before and after.
2026-11-29 00:19:46 -06:00
BearHuddleston
a7d0f2a301 ci(releases): wire diagnostic Linux AppImage updater feed publication 2026-11-29 00:19:46 -06:00
BearHuddleston
ce7373edc5 feat(releases): add Linux AppImage feed planner, admission gate, and R2 prune protection 2026-11-29 00:19:46 -06:00
Erosika
4927b5b277 fix(termux): stage the bionic Python to load its own libpython
Termux links its interpreter with RUNPATH $PREFIX/lib, so the launcher put
the payload's Python lib folder first on LD_LIBRARY_PATH. Every child
inherited that, and a Termux Python of the same minor then loaded Hermes's
libpython: `import array` failed in terminal commands, pip and venv.

Staging now rewrites the interpreter's RUNPATH to $ORIGIN/../lib ahead of
the Termux prefix, in place, and the launcher names neither libpython
folder. The value has no version in it, and a .deb whose interpreter cannot
take it fails the build instead of reaching a phone.

Fixes #158261

(cherry picked from commit 5af4d277dea7877b738da23dedba4dea3602f906)
2026-11-28 23:42:32 -06:00
Teknium
853e51b4f6 feat(catalog): default: ">=X" makes a plugin a default from Hermes X on
A plugin replacing a platform that released cores still bundle cannot use
`default: true`: v0.23.4 and v0.23.5 read it and install the plugin in every
home (it stands down there; each install still costs a clone and, before the
base-deps change, a dependency generation per home). A `requires_hermes`
floor avoids that but gates every install, so it also refuses the move of an
existing Weixin/QQ setup on main and canary builds that dropped the platform
but still report 0.23.5.

`default` now also takes a version spec. Cores before this read only
`default: true`, so they skip such an entry; cores with it make it a default
when the running version satisfies the spec (judged like requires_hermes, an
unknown version passes), while `requires_hermes` keeps the plugin's real
floor for every other install. The validator accepts the spec form and the
catalog CI's default-plugin venv-rebuild lint covers it.
2026-11-28 20:59:22 -08:00
Teknium
f1c9031a61 refactor(slash): /resume is the one session picker; /sessions, /session, /switch retire
Bare /resume lists sessions on every surface (CLI table, TUI switcher overlay,
Desktop picker, messaging listing); /resume <number|name|id> switches. The
messaging /sessions forms move under /resume: all, full, search|find <q>; a
listing number resumes that row (with the same all/full words), the current
session is listed unnumbered, rows rank by lineage activity. /resume --all and
--cross-room keep working.

/sessions, /session and /switch answer "`/x` is now `/resume`." via
RETIRED_COMMANDS. The TUI submits a typed retired name as-is instead of
accepting the first fuzzy completion, so its notice shows.

Depends on #161271 (RETIRED_COMMANDS).
2026-11-28 20:48:40 -08:00
Teknium
a30074a733 fix(tui): offer only commands that run, keep typed registry names on Enter
- Client checks move from TypeScript-parsing pytest to vitest. A generated dump of the
  owner's verdicts (apps/shared/src/slash-exec-verdicts.json,
  scripts/dump_slash_exec_verdicts.py) is the owner truth. The Python test checks only the
  catalog's slash_exec against command_verdict and that the dump is fresh.
- Ink: a handler that forwards its bare form to slash.exec (`forwardsBare`, bare /pet) no
  longer earns the local exemption. A vitest runs every offered registry command and asserts
  none is refused.
- Ink: Enter keeps a fully typed registry name instead of accepting the completer's top row
  (/platform no longer becomes /platforms); tested through the real composer and submit.
2026-11-28 19:42:51 -08:00
Teknium
050c423499 fix(ci): no '::' survives in a capped entry's printed report
Review (Greptile P2 4729422888): indentation alone was not the guard for
plugin-controlled report text; every '::' is now broken up as well, so no
part of a printed check or warning can be parsed as a workflow command.
2026-11-28 16:51:56 -08:00
Teknium
49dc8004ca fix(ci): a capped entry's validate report and warnings reach the log
Review (Greptile P2 4729395304): the --json run kept only the failed check
names, so a capped pin's caution scan findings and private-import/Desktop
warnings never reached the reviewer. Each check and warning is printed, one
indented line each so plugin-controlled text cannot start a workflow command.
2026-11-28 16:51:56 -08:00
Teknium
c843f4c930 fix(ci): a capped entry still runs every admission check that does not load it
Review (Greptile P1 4729331907): skipping hermes plugins validate outright
for a pin capped below this core also skipped its file-based checks
(manifest, loadable entrypoint, install scanner, core overrides, private
imports, Desktop SDK use), and none of the other gates replaces them. For a
capped entry the gate now runs validate --json --install-deps and refuses
the entry when any check other than the capability probe (the one that
imports the pin on this core) fails, or when no report can be read.
2026-11-28 16:51:56 -08:00
Teknium
1af980732d fix(ci): pinned-source gate skips loading an entry capped below this core
`pinned-source-validate` ran `hermes plugins validate` for every changed
entry on the PR's own Hermes, even when the entry's own requires_hermes
excludes that Hermes. An entry can legitimately be capped below main: its
pin imports core modules a newer release dropped, and only the older Hermes
it names will ever install it. hermes-tag is the case: its pin imports
plugins.platforms.dingtalk, which left core with #159638. Loading that pin
on main can only fail.

The gate now reads requires_hermes through the isolated field reader. A
malformed value is refused the same way the structural validator refuses
it. When the spec excludes the running core (as an install by catalog name
compares it), the load step is skipped, with a ::notice and the reason on
the PASS line. Clone, reachability, confinement, self-updater, attestation
and payload gates still run on the pin, because older Hermes installs it.
2026-11-28 16:51:56 -08:00
Teknium
cad3ea20c7 feat(feishu): Feishu / Lark leaves core for the feishu Hermes Labs plugin
The Feishu / Lark gateway platform and its feishu_doc / feishu_drive document-comment tools move to
NousResearch/hermes-labs-plugins (`feishu/`, history kept): built by Nous Research, not supported.

- Removed: plugins/platforms/feishu/**, tools/feishu_{doc_tool,drive_tool,lark}.py, the adapter's tests,
  Platform.FEISHU, the hermes_cli/platforms.py row, toolsets feishu_doc / feishu_drive / hermes-feishu
  and the hermes-gateway include, platform.feishu.* locale strings in every locale, env/config-key list
  entries, the dashboard env fallback rows, the cron home-target / webhook deliver / startup allowlist /
  /update allowlist / messaging order rows, the ACP kind-map tool names.
- Name-keyed core tables become PlatformEntry traits the plugin sets: binds_port_fn (port binding only in
  webhook mode, was PORT_BINDING_CONDITIONAL_MODES), listen_port (dashboard topology readout),
  thread_reply_anchor (reply-in-thread anchors for replies, progress and interim sends), opus_voice
  (auto-TTS .ogg). gateway.platform_registry.registered_trait reads them.
- Migration: LEFT_CORE row `feishu` built with platform_in_use: env FEISHU_APP_ID + FEISHU_APP_SECRET
  (core's EnvCred row) or a platforms.feishu block carrying app_id (core's is_connected), or the
  feishu_doc / feishu_drive / hermes-feishu toolset selected elsewhere; plugins.disabled
  platforms/feishu / feishu-platform is not use. secret_env/private_env keep the child-process strip set
  identical to main (9 FEISHU_* names); legacy_toolsets keep a disabled hermes-feishu / hermes-gateway
  disabling the tools; off_platforms derived.
- Telemetry: feishu_* tools and feishu_doc / feishu_drive / hermes-feishu toolsets are retired names.
- Docs: messaging/feishu.md (+ zh-Hans) is a short "moved to the Labs plugin" page; tool/toolset
  references and the messaging index mark it as a plugin.
2026-11-28 15:59:41 -08:00
BearHuddleston
21ae8b62c7 fix(ci): forward CLOUDFLARE_R2_PUBLIC_URL into linux x64 build container 2026-11-28 17:46:44 -06:00
BearHuddleston
4e812017de feat(ci): add diagnostic Linux AppImage install-and-chat bundle smoke 2026-11-28 17:45:54 -06:00
Teknium
449a353522 refactor: move QQ Bot out of core into the qqbot Hermes Labs plugin
The bundled QQ Bot platform (plugins/platforms/qqbot) leaves core for the
`qqbot` plugin in NousResearch/hermes-labs-plugins. Its platform name, every
QQ_*/QQBOT_* env var, the platforms.qqbot keys and QQBOT_HOME_CHANNEL stay
the same; the plugin's PlatformEntry carries the env bridge, authz env names,
cron home env and the default allow_update_command.

Removed from core: the plugin dir and its tests (they moved to the plugin),
Platform.QQBOT (Platform("qqbot") resolves once the plugin registers), the
hermes-qqbot bundle and its hermes-gateway include, the platforms.py,
tools_config, dump, setup home-channel and web messaging rows, the QQ_*
OPTIONAL_ENV_VARS / _EXTRA_ENV_KEYS entries, the webhook deliver and startup
allowlist entries, /update's built-in list entry, the shipped
platform_toolsets row, the compat required-name rows for the deleted folder
and the qqbot boundary-baseline lines. Tests that exercised the deleted
adapter drop only those cases.

Kept: the shared own-policy helpers (comments only), cron's home-target order
and the QQ_HOME_CHANNEL legacy alias, doctor's rename warning, the QQ_ env
prefix alias for profile channel ownership, the session_rules route enum,
desktop/TUI source lists. hermes-qqbot stays a valid retired telemetry
toolset value for rows older releases saved.
2026-11-28 15:31:26 -08:00
Teknium
b4f52550a4 refactor(left-core): split left_core_migration.py into a package by job
hermes_cli/left_core_migration.py (1951 lines) was at the 2,000-line file cap with two approved
platform moves (QQ Bot, Feishu) still to add rows to it. Per the root AGENTS.md rule, the topic
becomes a folder: the facade (__init__.py) names each module's job and re-exports the public
surface in __all__; the code moves unchanged into homes, platform_use, feature_use, provider_use,
rows, hints, locks, notices and migrate. Topic modules import one another, never the facade.

Pure move: every top-level def/assign is AST-identical to the original except that hints and
migrate read the table as table.LEFT_CORE (rows imported as table), so one patch of
rows.LEFT_CORE reaches every reader. Private-name importers (default_plugins, catalog_platforms,
catalog_platform_listing) import from the owning module; tests patch where a name is looked up
(migrate._install_into, migrate._attempted, rows.LEFT_CORE, ...). The module path
hermes_cli.left_core_migration keeps working (it is the facade), so running updaters that import
migrate_all_homes from it are unaffected.
2026-11-28 14:59:59 -08:00
Teknium
005526cd19 fix(plugin-catalog): fail the directory gate on stray .yml entries
Dropping the *.yml glob made the CI structural job (which validates the
whole plugin-catalog/ directory) silently skip a .yml entry, so it still
passed admission and never loaded at runtime — the #160206 symptom.
Directory mode now collects *.yml again so validate_file rejects it with
"catalog entry files must use the .yaml extension".
2026-11-28 14:53:58 -08:00
nicaftx
52d3db4f16 fix(plugin-catalog): align admission with yaml-only discovery (#160206) 2026-11-28 14:53:58 -08:00
Teknium
fdba7e748c refactor(plugins): move Google Meet and the Teams meeting pipeline to official catalog plugins
plugins/google_meet and plugins/teams_pipeline leave core for the opt-in
official plugins google-meet and teams-pipeline (hermes-official-plugins).

- LEFT_CORE rows: a home whose plugins.enabled names the bundled key
  (google_meet; teams_pipeline or teams-pipeline) and whose plugins.disabled
  does not gets the catalog plugin installed and enabled on `hermes update`
  and at agent/gateway start. Keys alone are not use (both were opt-in).
  The old keys stay aliases (plugin_key), so pinned lists keep working.
- Core's by-name wiring of the pipeline is gone (gateway/run.py
  _teams_pipeline_plugin_enabled / _wire_teams_pipeline_runtime and the
  runner fields): the plugin binds itself to the msgraph_webhook adapter
  through ctx.register_platform_handler, which msgraph_webhook.connect()
  already runs inside the owning profile's scope.
- The Teams platform's summary writer no longer imports another plugin: it
  takes a graph_client_factory (the pipeline passes its Graph client) and,
  without one, Graph delivery fails with a message naming the plugin while
  incoming-webhook delivery keeps working.
- The google-meet extra (playwright, websockets) is removed; uv.lock drops
  playwright, pyee and greenlet. nix checks use the mistral group instead.
- Profile export keeps excluding teams_pipeline_store.json and
  workspace/meetings/node_token.json: no plugin-declared secret-file seam
  exists and migrated homes still hold those stores.
- Docs (en + zh-Hans) point at the catalog plugins.
2026-11-28 13:40:56 -08:00
Teknium
880c95e7fa refactor(weixin): Weixin leaves core for the official weixin plugin
Weixin (personal WeChat via iLink) now ships as the `weixin` plugin in
NousResearch/hermes-official-plugins (official, installed by default). The
platform name, WEIXIN_* env vars and platforms.weixin config keys are
unchanged; Platform("weixin") resolves once the plugin registers it.

Removed: plugins/platforms/weixin/**, the four weixin-only test files,
Platform.WEIXIN and its PLATFORM_TOKEN_ENV_NAMES row, the hermes_cli/platforms
row, the hermes-weixin bundle and its hermes-gateway include, the
platform.weixin.voice_as_attachment locale strings, the WEIXIN_* env/config-key
list entries (config, dump, run, run_startup, webhook_targets, cron delivery,
dashboard order/env fallbacks, TUI source list), the weixin special cases in
gateway/outbound/send.py (.env pconfig synthesis, WEIXIN_HOME_CHANNEL read,
weixin-first standalone route; the plugin's EnvCred env_overrides with
home=WEIXIN_HOME_CHANNEL and its StandaloneSendPolicy cover them), the three
plugins/platforms/weixin rows in hermes_agent/compat/required_names.py, and the
weixin boundary-baseline lines. Docs: weixin.md (+ zh-Hans) is a short
moved-to-plugin page; messaging index and toolset references mark it a plugin.

Kept: session_rules/route_entries.Platform.WEIXIN (no plugin lookup there;
YUANBAO stayed too), hermes_cli/profiles.py weixin/accounts export path (the
plugin writes the same dir), Desktop references, shared helpers (comments
only). Telemetry: hermes-weixin is a retired toolset name.

The WEIXIN_* child-env strip set shrinks with the config.py entries; the
LEFT_CORE row's secret_env/private_env restores it (tests/tools/
test_local_env_blocklist.py and the MCP identity test stay red until then).
2026-11-28 13:13:07 -08:00
Teknium
1cf261a8cd refactor(wecom): WeCom leaves core for the wecom Hermes Labs plugin
Both WeCom platforms (AI Bot `wecom`, self-built-app `wecom_callback`) move to
NousResearch/hermes-labs-plugins `wecom/`. Two LEFT_CORE rows (one per
platform, one shared plugin, installed once) whose platform_in_use predicates
replicate core's enable gates per mode. Stacked on the DingTalk removal
(#159638): the platform lists both PRs edit are resolved once here.

Folded from the earlier branch (one commit per step, in order):

  331094ca15a3 Teknium test(gateway): a named profile's port-binder is served only on a default listener, live reconcile too
  The live reconcile builds a named profile's platforms through the same prepare step as startup, so the
  "not served" refusal holds there as well: a LINE secondary with neither api_server nor webhook on the
  default stays unstarted and names the remedy instead of reading as connected. The two LINE named-profile
  reconcile tests now give the default a webhook listener, so their LINE is served at /p/b/ as in a real
  setup; their assertions are unchanged.

  bedc93176b93 Teknium fix(left-core): off-platforms derive from the LEFT_CORE rows; left-core routes name the install
  Same hunk as the QQ Bot (#159640) and Feishu (#159651) PRs, so merge order cannot leave a stale entry.

  - A row whose tools lived in its own hermes-<platform> bundle only (Yuanbao) sets own_platform_only;
    _derive_off_platforms fills off_platforms with every platform core knows plus every platform a
    LEFT_CORE row moved out. The hand list _YUANBAO_OFF_PLATFORMS (which this PR had extended with
    wecom/wecom_callback) is gone. The WeCom rows carry no toolsets (hermes-wecom and
    hermes-wecom-callback bundled core tools only), so they need no off-platforms.
  - Webhook routes: is_known_platform accepts any platform a LEFT_CORE row moved out, so a saved wecom or
    wecom_callback route stays loaded before a secondary profile's plugin registers; without the plugin
    the send fails naming the install.
  - Cron: a deliver route naming a left-core platform whose plugin is not loaded reports the install
    command (delivery error and preflight). tests/cron/test_cron_left_core_platform_route.py runs for
    wecom and wecom_callback.

  05d04a49ccc3 Teknium refactor(wecom): drop the one-install-per-home copy; the installer-race PR carries it generically

  296e4a152f99 Teknium fix(gateway): a secondary port-binder with no default listener is not served, not "connected"
  Under multiplex a secondary profile's port-binding adapter (WeCom callback, LINE, SMS, Teams, ...)
  binds nothing: its app is published for /p/<profile>/ on the default profile's api_server or
  webhook listener. With neither running on the default, connect() still returned True and the
  runner logged "✓ wecom_callback connected (profile: b)" while nothing listened anywhere.

  - Runner: such an adapter is not started; it is stamped `<profile>:<platform>` disabled with
    error_code multiplex_no_shared_listener and a WARNING naming the remedy.
  - Migration preflight: a secondary whose own gateway serves a port-binder today is refused when
    the default enables neither listener (it would be served nowhere after the fold); a secondary
    with no gateway gets the same text as a notice.
  - bind_listener publishes the port it actually bound (`listener_base`); the dashboard topology
    reads that instead of resolving a plugin platform's listen_port in the profile's plugin
    registry, so a parked or cold profile's callback port is reported and no deferred loader runs.

  26cde0b03cdc Teknium refactor(wecom): WeCom moves to the Hermes Labs wecom plugin, opt-in
  WeCom is now a Hermes Labs plugin (NousResearch/hermes-labs-plugins), not an
  official default one. Only homes that used WeCom get it installed, once; a new
  home installs nothing.

  - Both LEFT_CORE rows (bot and callback) carry the labs notice, like Yuanbao
    and DingTalk, merged with the plugins.disabled 'wecom' sentence.
  - Docs pages say "moved to the wecom Hermes Labs plugin" with the labs
    warning (en + zh-Hans); no default-install wording is left.
  - The one-automatic-install-per-plugin seam between default_plugins and the
    left-core migration stays: it is general (any plugin that is both a catalog
    default and a LEFT_CORE row) and now has its tests in test_default_plugins
    with a stand-in plugin instead of the wecom-named ones.

  9c82896ffee9 Teknium fix(wecom): migration preflight and dashboard read plugin capabilities in the owning profile
  - platform_serves_profile_prefix(value, home) reads the adapter class in the
    owning profile's plugin scope, like platform_binds_port: a port-binding
    plugin only a secondary installed is a URL-change notice, not a blocker.
  - A parked profile's plugins are never discovered for either check, nor for the
    dashboard's port readout (read-only probe).

  deb0661c69ea Teknium fix(wecom): review findings on the core removal
  - One automatic install per plugin across both installers: left-core
    `_pending` skips a plugin `_default_plugins_installed` records, and
    default_plugins skips one `_left_core_installed` records, so a removed
    WeCom stays removed whichever ran first.
  - `listen_port` is read in the owning profile's plugin scope: a multiplexed
    secondary (shared-listener routing), migration preflight (per profile home)
    and the dashboard topology (discovers that home's plugins; preflight never
    does, a parked profile's plugins must not run here).
  - `hermes-wecom-callback` keeps resolving: a `hermes-<a-b>` bundle falls back
    to platform `a_b`, and toolset validation accepts it.
  - StandaloneSendPolicy.media_via_adapter moves after reply_file_over so
    positional callers keep their meaning.
  - cron home-target priority keeps wecom (the plugin platform keeps it).
  - `_BUNDLED_ENV_SIBLINGS` removed with its readers' prefix branch.

  c3ec8edb3cc4 Teknium refactor(wecom): WeCom leaves core for the official wecom plugin
  Both WeCom platforms (AI Bot `wecom`, self-built-app `wecom_callback`) move to
  NousResearch/hermes-official-plugins `wecom/`, installed by default on every
  home (catalog `default: true`). Existing users get it automatically: two
  LEFT_CORE rows (one per platform, one shared plugin, installed once) whose
  platform_in_use predicates replicate core's enable gates per mode.

  Generic seams added for the plugin, never a name check left in core:
  - PlatformEntry.listen_port: a plugin platform that binds a host port
    (platform_binds_port, multiplex shared listener, migration blockers,
    dashboard topology). Replaces the wecom_callback rows.
  - StandaloneSendPolicy.media_via_adapter: send_message media through the live
    adapter route. Replaces the _CHUNKED_ROUTES["wecom"] row.
  - cron: a registered plugin platform without a cron env var (home channel from
    config.yaml only) is a valid delivery target. Replaces the wecom_callback row.

  Child-env strip set unchanged: _ADAPTER_SECRET_ENV also carries the
  left-core platform rows' secret_env.
2026-11-28 07:35:40 -08:00
Teknium
69330b0988 refactor: move DingTalk out of core into the dingtalk Hermes Labs plugin
DingTalk (Stream Mode adapter, AI Cards, the QR device-flow login in
hermes_cli/dingtalk_auth.py) now ships as the `dingtalk` plugin in
NousResearch/hermes-labs-plugins: built by Nous Research, not supported.
Same platform name, DINGTALK_* env vars and platforms.dingtalk keys.

Removed: plugins/platforms/dingtalk/**, hermes_cli/dingtalk_auth.py and
its tests, Platform.DINGTALK, the hermes_cli/platforms.py row, the
hermes-dingtalk toolset and its hermes-gateway include, the dingtalk PM
extra (+ uv.lock, nix groups), the platform.dingtalk.emotion locale
strings, builtin-list entries (update allowlist, allowlist env platforms,
webhook/cron deliver sets, dump, dashboard env rows) and the shim rows
for a folder that no longer exists. Comments that named DingTalk as a
core adapter now describe the capability flag instead; no core code
branched on the name. Docs: messaging/dingtalk.md (+ zh-Hans) is a
"moved to the Labs plugin" page.

Kept: DINGTALK_CLIENT_ID/SECRET on the hermes-owned env list (a plugin
manifest cannot claim them), tip t159 (tips are numbered contiguously),
the desktop/TUI session-source names (the plugin keeps the platform name).
hermes-dingtalk stays valid as a retired telemetry toolset name.
2026-11-28 07:11:48 -08:00
Teknium
8542222e56 feat(memory)!: remove the ByteRover and RetainDB memory providers
Nobody took over NousResearch/hermes-plugin-byterover or hermes-plugin-retaindb by the
Oct 15 2026 deadline (D12), so both bundled providers are deleted instead of moved to the
catalog.

- Delete plugins/memory/byterover/, plugins/memory/retaindb/ and the tests that only
  exercised them (provider, multiplex contract, thread-profile and identity-scope files whose
  every case was one of the two; the retaindb secret-scope pair; the two bundled-precedence
  tests that used byterover as the bundled sample).
- memory_provider_migration: a `_REMOVED` name -> label table. A home whose memory.provider
  names one gets "<Label> was removed from Hermes because no one took over maintaining it.
  External memory is off; run `hermes memory setup` to choose another provider." at agent
  start (CLI, Desktop notice, chat platform first reply), on `hermes update`, in
  `hermes memory status`, `hermes memory setup <name>` and `hermes doctor`. No catalog lookup
  and no install for those names; memory.provider is never rewritten. Both names leave
  _LEFT_CORE (no unattended install consent for a plugin that does not exist).
- Drop RETAINDB_API_KEY / RETAINDB_BASE_URL / BRV_API_KEY from OPTIONAL_ENV_VARS, the
  "Bundled providers" help line, ~/.brv-cli/bin from the memory-setup PATH, the two
  boundary-lint baseline lines, and the docs (EN + zh-Hans).
- Kept: agent/redact.py's retaindb_/brv_ key patterns (a leaked key is still a secret).

The empty `honcho: {}` config root was already removed on main (6933155eaf).
2026-11-28 06:39:41 -08:00
Alexander Russell
1b52bdd705 fix(ci): prompt surface render masks its home under a symlinked temp dir
render() hands the child HOME as tempfile returns it, while the child
masks the resolved home. Where the temp dir sits behind a symlink (on
macOS both /tmp and $TMPDIR do), prompt text built from the unresolved
HOME is left unmasked, so the render never matches the committed
snapshot.

Resolve the temp dir once in render() so both sides use one spelling.

(cherry picked from commit 982d5ddbf686c3721d17df5cb04de0e39be57608)
2026-11-27 13:47:48 -06:00
unsupportedpastels
5ba14569d4 fix(pm,ci): preserve core-satisfied constraints on retry, consolidate assessment, fix macOS CI marker
Addresses Greptile review feedback and the macOS CI test failure on PR #160796:

- pm/plugin_eviction.py: keep the full fitting package-declaring plugin set in _EvictingUpdate.kept and derive workspace members via select_workspace_members() across the full proposed set (enabled + statically rejoining + retried plugins) at each trial and commit, fingerprinting against the surviving package-declaring baseline so retried plugins cannot drop core-satisfied enabled constraints.
- pm/plugin_declarations.py & scripts/ci/catalog_default_plugin_lint.py: introduce WorkspaceMembershipAssessment + assess_workspace_membership() as the single source of truth, derive needs_workspace_member() directly from it, and move catalog platform sampling and rebuild warning guidance into scripts/ci/catalog_default_plugin_lint.py.
- tests/ci/test_catalog_default_plugin_rebuild_lint.py: mark the subprocess tests that invoke catalog_validate_pinned_entries.py (GNU timeout/grep/xargs) as platforms('linux') to match test_plugin_catalog_ci_confinement.py, while keeping unit tests and GHA escape tests cross-platform.
2026-11-27 10:40:08 -05:00
unsupportedpastels
aff976794f fix(pm,ci): address pre-push review findings for core-satisfied plugin skip 2026-11-27 10:40:08 -05:00
unsupportedpastels
e4e693f95f feat(pm,ci): skip venv rebuild for core-satisfied plugins and lint default catalog entries 2026-11-27 10:40:08 -05:00
Teknium
f34692a6df chore(ci): allow spellcheck-plus's dictionary build script through the catalog self-updater gate
The script is a by-hand author build step that regenerates desktop/plugin.js;
Hermes never runs it. Row pinned to the reviewed sha and file hash (PR #160009).
2026-11-26 13:20:42 -08:00
Teknium
9ea477a027 fix(release): validate an admitted channel request once per process
channelBuildRequest re-ran the authoritative Python validator (a fresh
interpreter importing hermes_cli.release_channels and
scripts.bundles.desktop_prepare) on every call, including repeated calls with
byte-identical request JSON. verifyBundleStamp admits the channel request on
each call, so the tests-js "channel smoke binds the complete admitted request"
test started 59 Python interpreters; on a loaded runner that alone passed its
15 s budget (CI run 45707403899: 17.2 s, timed out on a PR with no JS changes).

Remember the exact (interpreter, request bytes) pairs the validator accepted
in this process and skip only those repeats. Rejections are never cached, and
every distinct request (and every fresh CLI process) is still validated.

Measured locally, tests-js/bundle-smoke-metadata.test.mjs, channel smoke test:
  idle:                         3426 ms -> 811 ms
  taskset -c 0 + 4 cpu0 spinners: 16705-18642 ms (timeout) -> 3708 ms

The new contract test proves one validator run per distinct accepted request
and one per rejected attempt; it fails on the base (2 runs for 2 identical
admissions).
2026-11-26 00:11:23 -08:00
Bear Huddleston
010f119d48 Merge pull request #159146 from NousResearch/fix/salvage-146657-windows-tests
fix(tests): make tests/ci and tests/scripts pass on Windows arm64 (salvage #146657)
2026-11-25 22:31:52 -06:00
Bear Huddleston
ccd8fab2fa Merge pull request #159834 from NousResearch/fix/mac-clt-git-guard
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
Catalog core imports index / refresh (push) Has been cancelled
Canary Release / Tag, draft, and start the canary build (push) Has been cancelled
Canary Release / Prune canaries older than 14 days (push) Has been cancelled
fix(platform): guard macOS /usr/bin/git CLT stub across runtime and doctor callers
2026-11-25 21:33:38 -06:00
unsupportedpastels
5829608b49 refactor(providers): combine gemini and solstice into bundled google plugin with native adapter
Moves `plugins/model-providers/gemini/`, `plugins/model-providers/solstice/`, and the three
core Gemini adapter modules (`agent/gemini_native_adapter.py`, `agent/gemini_schema.py`,
`agent/gemini_long_decode.py`) into one bundled `plugins/model-providers/google/` package:

- `google/__init__.py` registers `gemini` then `solstice` directly (import-light; keeps
  transport modules lazy and ensures repeated `bundled_profiles()` passes register both).
- `account_client.py` imports the sibling Interactions wire and native adapter directly,
  removing runtime cross-plugin discovery (`interactions_wire()` / `gemini_plugin_module()`).
- `solstice` keeps its exact picker/registry positions (`picker_after="router"`,
  `registry_after="router.com"`).
- Every core import inside `plugins/model-providers/google/` uses the published plugin API
  (`private_import_findings` = 0; boundary-lint baseline drops 33 private crossings).
- Adds `tests/providers/test_google_cutover_surface.py` AST guard preventing core from
  re-importing the moved adapter modules.
2026-11-25 18:16:54 -05:00
Bear Huddleston
33522e6dee Merge pull request #159835 from NousResearch/fix/mac-dmg-sign-notarize
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
fix(desktop): sign, notarize, staple, and verify outer macOS DMG
2026-11-25 12:55:52 -06:00
BearHuddleston
2bba9022d2 Merge origin/main (b7ee21c14e) into fix/salvage-146657-windows-tests
Conflict:
- scripts/bundles/payload.py: main (79c00f3aa2, 1b39ecabee) moved the git
  archive call out of snapshot() into _write_git_archive(). That lets it
  archive scripts/whatsapp-bridge back in after the exclude, and it adds a
  timeout. This PR (fea697d62c) had added -c core.autocrlf=false
  -c core.eol=lf to the old inline call, so that a Windows builder's
  autocrlf doesn't rewrite the payload's bytes. Main's snapshot() body is
  taken as is, and the PR's flags and comment move into _write_git_archive().
  That also covers main's new runtime-tree archive, which ships to the same
  payload.

Auto-merged without conflict: scripts/render-builds-table.py (the PR's
shutil.which("gh") lookup survives main's rewrite and still feeds both
gh calls), tests/ci/test_stable_release_graph.py,
tests/scripts/test_bundle_payload.py, tests/scripts/test_release_artifacts.py
and tests/scripts/test_render_builds_publication.py. Every line the PR added
in those files is present in the merge.
2026-11-25 04:30:28 +00:00
BearHuddleston
0919743d07 fix(desktop): refuse a macOS record whose outer DMG is missing
_verify_macos_dmg returned early when the root held neither a DMG nor a
*-mac.yml, so a tagged, channel or signedDmg commit-claim record whose
root carried only the update ZIP passed with no outer DMG check at all.
The workflow's own guards (the feed rename's test -s, the commit-claim
DMG count) keep that shape out of CI today, but the recorder is the gate
publish trusts, so it now fails closed on its own inputs: whenever the
outer check applies, exactly one *-mac-<arch>.dmg must be present.

The feed stays required only for tagged releases. Channel builds write
latest-mac.yml, but their staging step never stages or publishes a feed,
so requiring one would gate on a file nothing downstream reads; a feed
that is present is still checked.

The existing ZIP-only fixtures gain the DMG, blockmap and (tagged) feed a
real build produces. _write_mac_feed now streams its hashes, since the
Squirrel-limit fixture is a sparse 1 GiB ZIP.
2026-11-25 04:05:36 +00:00