Commit Graph

3101 Commits

Author SHA1 Message Date
alt-glitch
658f942e3d fix(paths): the lint counts import-time sys.path edits in classes, match cases and inverted guards
Class bodies and match cases run at import, and the import branch of
an 'if __name__ != "__main__"' guard is the body, not the else. Removals
(remove, pop, clear, del) change the search path too.
2026-11-07 01:17:21 -05:00
alt-glitch
d010f5c93c ci(paths): baseline the install-root climb main added in left_core_migration 2026-11-07 01:17:21 -05:00
alt-glitch
f733de8041 refactor(paths): fifteen install-root definitions call the one owner
hermes_cli.config.get_project_root, uninstall.get_project_root, the
PROJECT_ROOT constants of status, cron, gateway, setup, tools_config and
web_server, code_skew and runtime_downgrade_exit _PROJECT_ROOT,
runtime_cwd._PACKAGE_ROOT, shared_metrics_catalog._REPO_ROOT,
desktop_update_verify.checkout_root and host_supervisor._repo_root now
return hermes_cli._startup_fast.project_root_str() instead of their own
__file__ arithmetic. Names, values and test seams are unchanged.

Still separate, on purpose: pm.paths (Docker's tool stage ships pm without
hermes_cli._startup_fast), hermes_constants and hermes_bootstrap (they load
before any package), main.py's script-mode bootstrap, the recovery closure
and stub-tree modules (_early_recovery, update_lock, update_pause_record,
venv_sync: tests and recovery load them as lone files), the lexical
linux_desktop_entry root and self_repo_guard's .git probe. The lint baseline
drops by the 15 sites.
2026-11-07 01:17:21 -05:00
alt-glitch
0e17aedc6d ci(paths): ratchet new __file__ install-root climbs and import-time sys.path edits
scripts/install_root_lint.py scans the shipped packages and root modules. It
counts __file__ path expressions that climb as many directories as the file
is deep (.parent, .parents[n], os.path.dirname, os.path.join with pardir),
and sys.path edits that run at import. Today's 106 climbs and 13 import-time
edits are the baseline; a file whose count rises fails, and the message names
hermes_cli._startup_fast.project_root_str() as the call to make instead.
Wired into scripts/check (install-root) and the lint workflow.
2026-11-07 01:17:21 -05:00
Teknium
0acc079a01 refactor: move the Yuanbao optional skill out of core with the platform
The skill drives the yb_* tools, which now ship in the yuanbao Labs plugin; the plugin carries
the skill (ctx.register_skill). Regenerated the skill pages, catalogs and sidebar with
website/scripts/generate-skill-docs.py, dropped yb_* from the ACP TOOL_KIND_MAP as the Home
Assistant move did for ha_*, and the boundary baseline's stale Yuanbao entries
(scripts/boundary_lint.py --update).
2026-11-06 20:39:14 -08:00
alt-glitch
b58dbb1985 test(upgrade): start from real releases; the next release moves a file
The upgrade suites chose their start version with a tag pattern that
matches only calendar-version tags, so after releases moved to v0.x
every run started from v2026.9.24, five releases behind. Three copies
of that resolver and a fourth tag scan are replaced by one:
upgrade_base() picks the newest release before HEAD, a ref, or the
newest release of a named updater generation (by-path, handoff,
pre-handoff), from HERMES_E2E_UPGRADE_BASE. scripts/run_tests.sh now
forwards that variable and its older name HERMES_E2E_N1_REF.

The handoff suite's synthetic next release only added a file. It now
also moves a module the gateway imports at boot and rewrites the
importer, so the relaunched gateway serves a turn only if the update
applied the move.
2026-11-06 23:23:32 -05:00
alt-glitch
5f2bd7588b fix(ci): public-surface judges a moved file by the kind it had before the move
A source module moved under tests/ was skipped, and a test file moved
out of tests/ was compared as source. The base path now decides which
comparison applies. The cap and src/ canaries no longer follow the
values they check.
2026-11-06 23:02:54 -05:00
alt-glitch
81b30fede9 fix(ci): public-surface reads NUL-separated paths and judges a rename by either side
A renamed file whose path git quotes (non-ASCII) was dropped by the
.py suffix test, and a move out of the source roots was skipped because
only the new path was classified.
2026-11-06 23:02:54 -05:00
alt-glitch
e8d908b1c9 fix(ci): guards fail instead of passing when they cannot see a change
Three guards could report success while they checked nothing:

- The public-surface check listed only modified files, so a moved
  file (git reports a rename) was never compared. It now pairs each
  renamed file with its old path, and treats src/hermes_agent/ as
  source.
- The change classifier read file names from the compare API, which
  stops at 300 files without saying so and drops the old path of a
  rename. A list at the cap now runs every lane, and a rename counts
  under both of its paths.
- Tree guards skipped a scan root that did not exist. The config
  reader and writer checks, the subprocess stdin check and two guard
  tests now fail when a root they scan is missing.
2026-11-06 23:02:54 -05:00
alt-glitch
ee376ff9f0 chore: delete the unused SWE runner and dataset compression scripts
mini_swe_runner.py and scripts/sample_and_compress.py have no importer
and no launcher. Each is reachable only as `python <file>` from a
checkout, and neither command appears in website/docs, docs/, skills/,
README, CONTRIBUTING or any AGENTS.md file.

Evidence (git grep over the whole tree, excluding the files themselves):
- mini_swe_runner: tests/test_mini_swe_runner.py (deleted here) and one
  docstring line in trajectory_compressor.py (removed here).
- sample_and_compress: no reference.
- No Dockerfile, nix/, flake.nix, setup.py, pyproject [project.scripts],
  .github/ or apps/ui-tui/web reference to either name.
- Neither appears in tests/compat/old_updater_surface.json or in the
  plugin API (hermes_cli/data/plugin_api.json).
- No release tag from v2026.8.13 to v2026.9.24 imports either module
  from outside the files themselves.
2026-11-06 23:02:03 -05:00
alt-glitch
940dc11d9b fix(update): a failed dropped-file listing retries; prune stays inside the checkout
When git could not list the files dropped since the recorded commit, the
prune returned 0 and the caller stamped the new fingerprint, so no later
sweep looked at that commit again and the old folder stayed. It now
raises, the launch sweep keeps the old fingerprint and the update
completion records the bytecode_sweep follow-up. A recorded commit that
no longer exists in the repository still counts as nothing to prune.

A folder reached through a symlinked parent is skipped, so an empty
folder outside the checkout is never removed.

main_web_build.py joins the update-path routing, since the update
completion now imports it.
2026-11-06 23:01:26 -05:00
Maciej Lisiewski
f429994946 fix(ci): key the desktop preparation packages whole, check the Node graph in vitest
The Python import probe parsed production source, which tests may not do.
Key scripts/bundles/*.py, scripts/build/*.py and apps/desktop/scripts/*.py
by glob, as pm/*.py already is, so a new module or late import there needs
no list edit; shared modules outside them stay listed. The Python test now
reads only sys.modules after importing the entry points, and a new test
proves a module added to a globbed package changes the key.

The Node graph check moves to tests-js, where JS-only PRs run it; it calls
desktop_build_cache.py's CLI for the key, and classify_changes routes an
edit of that owner to the JS lane too.
2026-11-07 03:10:04 +01:00
Maciej Lisiewski
1a2720e968 fix(ci): key the desktop input cache on the Python modules preparation imports
The previous change keyed the Node half of the preparation graph only.
desktop_prepare.py and the helpers it calls also import, mostly inside
functions, scripts/bundles/{desktop,payload,bytecode,msix_names}.py,
scripts/releases/{versioning,semver,bundle_env,commit_build}.py,
scripts/termux/deb_version.py, and hermes_cli/hermes_constants/
hermes_platform modules. Key those too.

A new test imports the Python entry points in a subprocess, follows the
late imports of the functions that can run (only the names each importer
takes, so setup_toolchain's archive-inputs subcommand stays out), fails
on a broken repo import, and requires an edit to every repo module that
loads to change the key. The Node probe now converts URLs with
fileURLToPath. Both probes miss dynamic import() in functions that do
not run at import time and PowerShell dot-sourcing; those stay listed
by hand.
2026-11-07 02:44:23 +01:00
Maciej Lisiewski
880cfbde6e fix(ci): key the desktop input cache on every module preparation loads
The desktop dependency-cache digest listed node-deps.mjs and
electron-runtime.mjs but not the modules they import (pnpm-lock.mjs,
frontend-common.mjs, python.mjs, apps/desktop/scripts/utils.mjs,
macos-sysroot.mjs), the Python helpers desktop_build_cache.py and
native_prepared.py import (scripts/ci/pnpm_lock.py, scripts/build/inputs.py),
or scripts/build/windows-deps.ps1, the provider pm/native_build.py runs. An
edit to any of them reused a cache keyed on the old code.

The test resolves the module graph of the preparation programs with Node's
resolve hook and requires an edit to each module to change the key.
2026-11-07 02:44:23 +01:00
unsupportedpastels
7d608e9647 feat(gateway): the control socket answers which gateway serves a profile
A local client that dials the gateway itself had to spawn `hermes gateway
attach --json` (a Python start) for every connect, because only Python
could work out the endpoint, and it is subtle when a multiplexer serves the
profile. The gateway now answers that lookup itself with a new control verb,
`resolve-profile`, and the local control socket is documented as a public
client contract.

- gateway/control_resolve.py: `resolve-profile {home}` returns the verdict
  `discover_gateway_endpoint` gives for that home (state, reason_code,
  detail, endpoint plus ws_url/ws_protocol/ticket prefix), `attachable`,
  `update_fenced` (the set `ensure` checks), `control` (self/host/null),
  the CLI's failure `message`, and `install_code_sha` (read without
  touching the gateway's cached boot identity). Built from the existing
  discovery helpers; a strict envelope; no credential in the reply.
- gateway/control_socket.py: `resolve_handler` (None by default, so a bare
  server keeps the unknown-verb answer) and one dispatch branch.
- gateway/run_bootstrap.py: install the handler over the `identify`
  descriptor.
- hermes_cli/gateway_runtime.py: the missing-owner verdict moves into
  `_missing_owner_verdict` so discovery and the verb share it.
- apps/shared/src/node/control-socket.vectors.json: request/reply vectors
  for `session-ticket` (its current behavior), `resolve-profile` and the
  legacy unknown-verb answer; tests/gateway/test_control_socket_vectors.py
  runs them. tests/gateway/test_control_resolve.py proves parity with
  discovery over real sockets.
- scripts/ci/classify_changes.py: a vectors-only edit runs the Python lane.
- gateway-internals.md: verbs, envelope, errors, rendezvous (POSIX, macOS
  launchd, Windows), security model.

Existing verbs, replies, error strings and `supported_verbs` are unchanged.

Refs #141982
2026-11-06 20:23:34 -05:00
unsupportedpastels
be3d288fa0 fix(gateway): plugin RPC is a detectable contract member and session events work hosted
A client could not tell "no such plugin method" from "this server has no
plugin RPC": runtime.describe advertised nothing, and plugin.* was in no
contract or ledger. Under plugins.isolation: host the module-level
emit_plugin_session_event returned False and sent nothing, and an
in-process ctx.emit_to_session from a plugin's own thread on a multiplexed
gateway looked the session up in the launch profile.

- runtime.describe lists plugin-rpc-v1.
- tui_gateway/contracts gains CANONICAL_NAMESPACES (canonical_namespace):
  plugin.{plugin_id}.{name} with open params, rendered as
  CanonicalRpcNamespaces in the TS contract and x-canonical-namespaces in
  OpenRPC; the serve handler ledger gets one row for it.
- The plugin host forwards emit_plugin_session_event to the gateway process
  (host->parent request session_event), looked up in the host's profile.
- ctx.emit_to_session binds the plugin manager's home before the lookup.

Refs #142005, #141982
2026-11-06 20:22:20 -05:00
Maciej Lisiewski
2d70da667f docs(desktop): reword the get-windows degrade comment for a regular dependency 2026-11-07 01:43:58 +01:00
Maciej Lisiewski
3d9dfffb9c docs(desktop): describe get-windows as the build now installs it
The win32 binding comes from the node-pre-gyp run in stage-native-deps, not
a dependency install script, and a skipped optional install is no longer how
get-windows goes missing. The compiler README now says an absent staged copy
is a degraded build.
2026-11-07 01:43:58 +01:00
Ronald Reis
f59eab9f3c fix(desktop): build without get-windows when pnpm skips it
pnpm >= 11.6 infers `os: [win32]` for optional dependencies whose name
contains "windows" (pnpm/pnpm#17774), so the filtered install that
node-deps.mjs runs drops get-windows on macOS. stage-native-deps already
treats that as a degraded tree and ships without read_window_below, but
validateNativeTree in scripts/build/desktop.mjs still required
get-windows/main on darwin, so every macOS `hermes update` failed with
"Prepared get-windows is missing its macOS helper" and re-owed the
desktop build.

Only refuse a staged get-windows that lacks its macOS helper; an absent
package is the documented degraded build.

Refs #149861

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit a9f644c1c3c85b7e8e6808de2cd643fb27e8637f)
2026-11-07 01:43:36 +01:00
Maciej Lisiewski
728aa2ff0a Merge pull request #150117 from NousResearch/refactor/pm-one-npmrc-reader
fix(pm): one npmrc reader and file rule for the registry lookup and the build bridge
2026-11-07 01:32:01 +01:00
Maciej Lisiewski
81b1cfd0f1 fix(ci): route pm/index_config.py to the desktop update lane
source_build now imports pm.index_config for its npmrc bridge, so
test_update_ci_routing requires the module in the desktop-build
dependency list.
2026-11-07 01:00:03 +01:00
Maciej Lisiewski
c338036bf6 fix(pm): name a missing pnpm pin; keep npm's cache query out of the checkout
node-deps.mjs failed with a raw ENOENT/TypeError when pm/lock.json was
missing or pinned no pnpm; it now names the file and the field.
setup_toolchain.py keeps running `npm config get cache` outside the
checkout: a project package.json or .npmrc in cwd can change or fail it,
not only warn. The alignment test whose pnpm assertion went with
devEngines duplicated PM's lock validation and is gone with its type.
2026-11-07 00:45:52 +01:00
Maciej Lisiewski
7eee902ae0 refactor(pm): keep the pnpm pin only in pm/lock.json
The pnpm version lived in pm/lock.json and in root devEngines, kept equal
by a sync writer on every pnpm re-pin. node-deps.mjs, the only reader of
devEngines, now reads pm/lock.json. That drops root devEngines, the sync
writer and its test, and setup_toolchain's workaround for the
EBADDEVENGINES warning npm printed on every command in the checkout.
2026-11-07 00:45:52 +01:00
Maciej Lisiewski
6740235436 fix(ci): end a pnpm lock section at any top-level key
pnpm round-trips root keys it does not define (Bit's bit: block) and
sorts them between packages and snapshots, so the fixed key list made
such locks unreadable. Comments, conflict markers and tabs still raise.
2026-11-06 22:11:51 +01:00
Maciej Lisiewski
2001291ee9 docs(ci): describe what the lockfile diff counts and compares
The printed count now includes project and edge rows, and the
repo-guards comment still said the script only set-diffs
{package: version} maps.
2026-11-06 22:11:51 +01:00
Maciej Lisiewski
a357a562be fix(ci): report pnpm aliases, new edges and projects as one row
- An npm: alias (my-ms: ms@2.1.3, string-width-cjs: string-width@4.2.3)
  was checked against its alias name, which is not a packages key, so a
  move between locked versions was dropped. Check the real package.
- An edge added to or removed from a package on both sides (a
  packageExtensions dependency) was not compared. Report it.
- Diff the direct dependencies only of projects present on both sides;
  a project that appears or disappears is one "project <path>" row, not
  a row per dependency (a rename went from 240 rows to 2).
- An entry of an unexpected shape raises ValueError rather than
  AttributeError, KeyError or TypeError.
2026-11-06 22:11:51 +01:00
Maciej Lisiewski
9d4df4b7b3 fix(ci): end a pnpm lock section only at a known top-level key
section() and section_keys() stopped at any column-0 line, so a stray
comment, a merge-conflict marker or a tab-indented field inside importers
truncated the section and the diff reported every later project as
removed. Only a pnpm lockfile top-level key or the end of the file now
ends a section; any other unindented line raises.
2026-11-06 22:11:51 +01:00
Maciej Lisiewski
542626ed76 fix(ci): report pnpm dependencies moving between locked versions
The lockfile diff reduced pnpm-lock.yaml to its packages keys, so a
project or package repinned to a version already in the lock (hermes-ink
semver 7.8.5 -> 7.7.4) reported no change. Also diff each importer's
direct dependencies and the snapshot dependency edges, shown only when
the package rows cannot explain the move, so a bump stays one row.
2026-11-06 22:11:51 +01:00
unsupportedpastels
e36d4e5735 fix(boundary): key each accepted crossing by its importing file
Core keys left out the importing file and module keys lumped every file
of a module together, so two PRs adding the same target from different
files both ran --update to the same count, merged cleanly, and left main
one above the baseline.

Key every baseline entry as `<importing file> <target>` (repo-relative
path, line dropped). Additions in different files are now different
JSON lines. A file importing one target twice still counts 2 under one
key. Moving an import to another file now reads as a swap and needs
--update.

Totals are unchanged (830 / 29) across 789 + 21 keys.

Known limit: two PRs adding the same target in the same file still
merge to a count one above the baseline; CI on the merged head
catches it.
2026-11-06 13:39:00 -05:00
unsupportedpastels
c0dc75013f fix(boundary): record each accepted crossing so parallel accepts merge green
The baseline held one count per direction, so two PRs that each accepted
a different new import with --update made the same edit (830 -> 831),
merged cleanly, and left main at 832 against a baseline of 831.

Key the baseline per crossing instead: `<module dir> <target>` for a
module's import, the target alone for core's. Two accepted imports are
now two different JSON lines, moving an import between files of one
module (or between core files) keeps its key, and a swap (one removed,
another added) still fails. --check names the new crossing and says how
to accept an intended one.

Totals are unchanged (830 / 29) across 776 + 16 keys.

Also cover dashboard-manifest modules, relative imports and the core-side
TYPE_CHECKING skip in a tmp-tree test.
2026-11-06 13:39:00 -05:00
unsupportedpastels
92677e0244 fix(boundary): count each module a grouped core import names
A core import line naming several modules (`import plugins.web.exa,
plugins.web.firecrawl`, `from plugins.web import exa, firecrawl`) was
counted once. Collapse spellings per alias instead, so each distinct
module counts. Counts on this tree are unchanged (830 / 29).

Also state the ratchet precisely: CI fails when a direction's total
rises above the committed baseline; reductions stick only after
`--update`.
2026-11-06 13:39:00 -05:00
unsupportedpastels
dfe6d0e2d8 ci(boundary): count core/module import crossings and fail only when they rise
Adds scripts/boundary_lint.py, a report-only import lint in both
directions: bundled modules importing Hermes internals that are not on
the published plugin API (hermes_cli/data/plugin_api.json), and core
code importing a specific bundled module. The current counts are
recorded in scripts/boundary_lint_baseline.json; a test in
tests/scripts fails only when a count rises above it.

Refs HACORE-116
2026-11-06 13:39:00 -05:00
unsupportedpastels
5ec43faa12 test(plugins): flag stale core imports in docs and run the check on plugins/AGENTS.md edits
A docs import of a core module that doesn't exist (a typo, or a module a
refactor moved) is now reported as "<target> (core ships no <module>)", so
a seam entry can't absorb it; only plugins.* modules count as the example
plugin's own package. Fences under JSX/HTML lines and fences indented past
a list item, which the MDX site renders as code, are now scanned. A PR that
only touches plugins/AGENTS.md now runs the Python lane.
2026-11-06 13:03:39 -05:00
Maciej Lisiewski
29e78b124e docs: pnpm commands for the JS workspaces
READMEs, contributor guides, AGENTS.md files, skills and the website (with
the zh-Hans translations) give pnpm commands for the workspaces; the
website itself is still an npm project.
2026-11-06 04:08:45 +01:00
Maciej Lisiewski
7062229090 chore(js): switch the workspaces from npm to pnpm
pnpm 12.15.0 (native executable) installs every JS workspace from one
pnpm-lock.yaml, imported from package-lock.json with the same resolved
versions. website/, the WhatsApp bridge and the photon sidecar stay separate
npm projects.

Configuration moves from .npmrc and the root manifest into
pnpm-workspace.yaml: the 14-day minimumReleaseAge and its excludes,
overrides, allowBuilds (the old allowScripts set, with strictDepBuilds
failing any unlisted build script), engineStrict, sideEffectsCache: false
(in-place rebuilds must not write into the store) and
verifyDepsBeforeRun: false (a `pnpm run` never installs).

The pnpm version is pinned in pm/lock.json and in root devEngines.
pmOnFail: ignore keeps that pin out of pnpm-lock.yaml: a leading pin
document makes osv-scanner read zero packages. scripts/build/node-deps.mjs
enforces the exact version instead, and every lock reader refuses a
multi-document lock. A root preinstall refuses `npm install`; devEngines
onFail is warn so npx (MCP servers, the tsc linter) keeps working inside
the checkout.

User-machine installs run --frozen-lockfile --trust-lockfile (release age is
checked when locking, in CI, not per user). node-deps removes npm-era
node_modules trees before the first pnpm install. Nix builds the store with
fetchPnpmDeps and a hash file that CI checks.
2026-11-06 04:08:24 +01:00
Maciej Lisiewski
215aa7624b fix(ci): end the gate's timing at its verdict, not at the report's steps
close_running_job() counted every finished step of the report's own job. On a PR the PR-only baseline restore finishes before collection, on main it never runs, so a slow cache download inflated the PR's gate time against main's baseline. ci.yaml now passes --own-job-last-step "Evaluate job results" and the gate's time ends there; steps after it are report work.
2026-11-06 03:52:52 +01:00
Maciej Lisiewski
7979dc05af fix(ci): skip the running gate's log download; drop an unseeable test
The timing report's own job has no log until it finishes, so fetching it listed the gate under "Unavailable job logs" in every report. Its timing entry stays; only the log download skips it.

test_status_functions_are_wrapped_so_yaml_keeps_the_negation could not see the case it described: ruamel reads an unquoted `if: !cancelled()` as an empty tagged scalar, which test_every_check_runs_whatever_an_earlier_check_did already catches.

Co-authored-by: BearHuddleston <BearHuddleston@users.noreply.github.com>
2026-11-06 03:42:39 +01:00
Maciej Lisiewski
d2c422f294 fix(ci): name each red step of a failed job in the CI review comment
repo-guards.yml and lint.yml run many checks as steps of one job, so the comment's "Job **X** failed" item no longer said which check went red. split_failed_steps() reports each failed step of a failed job as its own entry, for the comment only: the poller's job counts and transitions stay per job, and a failed job with no failed step (a timeout) keeps its entry. The dependency-bounds failure step carries "supply-chain" in its name so the supply-chain review status still covers it, as the old job name did.

Patch by @BearHuddleston (review of #149786).

Co-authored-by: BearHuddleston <BearHuddleston@users.noreply.github.com>
2026-11-06 03:42:39 +01:00
Maciej Lisiewski
603387951c fix(ci): count the gate job in the timing report it now writes
The timing report moved into the all-checks-pass job, which the jobs API
still lists as in_progress while the report collects. collect_timings
dropped every unfinished job, so the gate vanished from every report and
from main's baseline, and wall time stopped at the last worker.

The job the report runs in (matched by RUNNER_NAME) now counts up to its
last finished step: the verdict, without the report's own steps, as when
the report was a job of its own. Other unfinished jobs stay out.
2026-11-06 02:38:46 +01:00
Maciej Lisiewski
d7244125e9 ci: run every cheap repository guard as steps of one job
Thirteen guard workflows (fifteen jobs) ran on the same 4-vCPU Ubuntu
runner, all started right after detect, each paying a checkout and a full
billed minute for 0-13s of work: infographics, profile archives, case
collisions, blob size, lazy_deps imports, stale icons, unrelated
histories, contributor attribution, uv.lock, prompt-surface and
package-lock diffs, the supply-chain scan and dependency bounds, and the
Docker lint.

repo-guards.yml runs them as steps of one job. Each step keeps its old
lane gate in its `if:`, and runs whatever an earlier step did
(`!cancelled()`), so one red guard never hides another; any failed step
fails the job, which all-checks-pass requires. The review-status-*
artifacts the live PR comment reads keep their names. Files the steps
write go under $RUNNER_TEMP, and the guards that need no toolchain run
before setup-pm, whose dependency phase also checks the lock.

The four PR-only jobs the strict release gate tolerated as skips are now
steps of a job that runs on every event, so the only tolerated release
skip left is the deferred Desktop E2E.
2026-11-06 02:15:36 +01:00
unsupportedpastels
0502fe0597 feat(plugins): one published list of what plugins may import
The public list `hermes plugins validate` checks plugin imports against
was a hardcoded frozenset inside hermes_cli/plugin_validate_private_imports.py,
with no page that showed it to plugin authors.

Move the list, unchanged (89 entries), into hermes_cli/data/plugin_api.json
(already shipped as package data via `data/*.json`) and load it once in the
validator. scripts/gen_plugin_api_docs.py renders
website/docs/developer-guide/plugins/public-api.md from the same file, and a
test fails when the page is stale. Validate output is unchanged for the same
inputs.
2026-11-05 18:47:10 -05:00
unsupportedpastels
4c376610a0 docs(gateway): ledger notes the /api/ws heartbeat has no row
gateway.ping is answered by the ws read loop before dispatch and is in no
handler table, so the generator docstring says so.
2026-11-05 17:47:55 -05:00
unsupportedpastels
d69fb631db fix(gateway): ledger finds route_on gates by code object, not name
The surface-gate lookup matched the inner function by name and read its
first closure cell, so renaming it or capturing another value ahead of
field silently dropped or misrecorded every surface suffix. It now
compares against route_on's code object and reads the cell named field;
a rename of field fails with KeyError. The regenerated ledger is unchanged
(12 gated routes).
2026-11-05 17:47:55 -05:00
unsupportedpastels
b796dc1b7b fix(gateway): ledger keeps account-owned connector calls on legacy fallback
The authority serves connection.respond, connectors.connect and
connectors.operation.status/wake only for a session-owned call; an
account-owned one (the Desktop Connectors page) gets -32601 and ws.py
falls back to the legacy handler. The ledger recorded all four as
authority-owned. They now read "authority (session-owned); account-owned:
legacy fallback" and stay undecided (D3).

The refused set now comes from calling legacy_fallback_allowed with the
interactive capabilities, the same predicate ws.py calls, instead of
re-deriving it from the module's private tables.
2026-11-05 17:47:55 -05:00
unsupportedpastels
0e5ac8012b chore(gateway): keep the serve ledger with its test, not in the docs site
The ledger is working data for the serve cutover, not user documentation, and
is deleted with the serve stack. Move it next to its drift test as
tests/hermes_cli/serve_handler_ledger.json, which Docker, Desktop payloads and
Nix already exclude; the generator and the test only change the path.
2026-11-05 17:47:55 -05:00
unsupportedpastels
1f8b980832 docs(gateway): profile creation stays host-wide in the serve ledger
Creating a profile is host-level work, not session work, so POST /api/profiles
and profiles.create are recorded as keep-host-wide instead of undecided.
2026-11-05 17:47:55 -05:00
unsupportedpastels
e71bf329b4 docs(gateway): ledger of every serve handler and who owns it
Add scripts/gen_serve_handler_ledger.py and the generated
website/docs/developer-guide/serve-handler-ledger.json: one row per
HTTP/WebSocket route of the app `hermes serve` runs and per JSON-RPC
method an /api/ws client can call, with its current path and an owner
decision.

RPC rows are classified with the tables /api/ws dispatch reads: the
authority's served verbs, then ws_legacy_fallback's refused/fallback
rules. A served verb is decided `authority`; every other row is
`undecided` (RPC fallback/refused rows reference D3) until a reviewed
decision is recorded in the script's DECISIONS table. Dashboard-plugin
routes depend on installed plugins and are one row, the hot-mount route.

tests/hermes_cli/test_serve_handler_ledger.py fails when a handler is
added or removed without regenerating the ledger; --check does the same
from the command line.

Refs #145171 (EP-1)
2026-11-05 17:47:55 -05:00
Teknium
52f15ab6a9 fix(release): a Store commit answered 202 Accepted counts as committed
Publishing v0.23.0 committed the Microsoft Store submission, and Partner
Center answered POST .../commit with 202 Accepted and status CommitStarted.
The submission API helper only accepted 200, so the publication pass logged
"commit failed: 202 {'status': 'CommitStarted'}" and told the release owner
to check Partner Center by hand, even though the commit had started.

Any 2xx is now success. The fake Partner Center in the tests answers a commit
with 202, as the live API did, so the six tests that commit a submission fail
on the old check.
2026-11-05 13:47:00 -08:00
Teknium
5819226468 feat(plugins): one switch and one action for unattended plugin updates
main already ships `hermes plugins update` (no name = update all) and the
opt-in `plugins.auto_apply` cadence. This makes both reachable from every
surface and closes the gaps reported on the original PR:

- Catalog installs now ride `plugins.auto_apply` too (it moved only git
  rows, so catalog plugins stayed on their install-day pin). The update
  path still refuses a widened pin or a too-new requires_hermes unattended.
- One updater per plugin: a cross-process lock around update_one and the
  dashboard/Desktop update, so the gateway's auto-apply tick and a manual
  update never run on the same plugin at once; the loser changes nothing.
- `hermes update` names, per profile, the catalog installs its new catalog
  pins left behind and re-arms that profile's plugin check, so an opted-in
  gateway applies them on the next tick.
- New CLI verb `hermes plugins auto-update [on|off]`; `/plugins update` and
  `/plugins auto-update [on|off]` in the classic CLI and the TUI (slash
  worker).
- RPC `plugins.manage` actions `update_all` and `auto_update` (contract +
  regenerated apps/shared outputs) for Desktop.

Off by default (legacy behaviour); all writes are profile-scoped through
get_hermes_home()/the scoped RPC.
2026-11-04 21:58:12 -08:00
Maciej Lisiewski
aac7f1b696 Merge pull request #148651 from NousResearch/ci/desktop-targets-one-source
refactor(release): define the desktop targets once
2026-11-04 05:41:25 +01:00