Commit Graph

3492 Commits

Author SHA1 Message Date
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
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
BearHuddleston
bcf917ab2d fix(desktop): harden macOS DMG signing, notary budget, and release/smoke gates
Address CI failure and validated review findings on outer macOS DMG
signing, notarization, recording, and smoke verification:

- Update tests/ci/test_protected_canary_publication.py's darwin transport
  fixture to write a real gzipped .dmg.blockmap and parse_mac_feed-valid
  canary-mac.yml matching the recorded ZIP and DMG bytes.
- Reuse the exact certificate identity and keychain selected for the .app
  by recording them in apps/desktop/scripts/mac-sign.mjs (getAppSigningResult)
  instead of re-querying security find-identity in notarize-dmg.mjs.
- Share one combined 300-minute notarization budget across afterSign and
  notarize-dmg.mjs (with a 15-minute reserve for verification/metadata) so
  DMG waiting cannot outlast the 330-minute CI step.
- Require .dmg.blockmap presence and validate tagged *-mac.yml feeds via
  parse_mac_feed (exact ZIP + single DMG entries) in
  scripts/bundles/release_artifacts.py, keeping the no-feed path explicit
  for commit and channel builds.
- Align commit-claim outer DMG verification across release_artifacts.py
  and tests/install/macos-bundle-smoke.sh via a sealed signedDmg: true
  field in darwin bundled install-stamp.json: releases, canaries,
  channels, and signedDmg commit claims enforce outer DMG verification,
  while older pre-PR and legacy commit claims still verify the inner .app.
2026-11-25 00:42:59 +00:00
Bear Huddleston
949afabbe7 Merge pull request #159469 from NousResearch/feat/stable-mac-dmg-url
feat(release): publish stable macOS DMG alias and downloads page on promotion
2026-11-24 18:14:31 -06:00
unsupportedpastels
1337532afc fix(solstice): reach the stream helpers through the discovered gemini plugin
The Solstice transport imported three core internals: the SSE event iterator and the
bounded streaming error-body reader from the native Gemini adapter, and the model-id
prefix rule. The plugin guide allows only published names, ctx methods or discovery,
and the lint baseline carried the three as exceptions.

The model-id rule now comes from its published home, agent.reasoning_effort. The two
stream helpers come from the gemini plugin's own client module, found the same way as
its interactions wire (the package the registered gemini profile was loaded from), so
the transport uses exactly the helpers the gemini client streams with. Their baseline
lines are gone. The base client and its error type stay as imported on main: Solstice
subclasses the client at import and raises the error when no gemini plugin is loaded.
2026-11-24 13:51:07 -05:00
unsupportedpastels
8d737a2fcc fix(solstice): send one stateless request from Solstice's own path
The Solstice client turned long decode off through three class flags on the
gemini provider's GeminiClient (LONG_DECODE, SAMPLING_PARAMS,
REQUIRE_COMPLETED_STREAM). It capped max_tokens before the shared request
builder ran, so the builder still decided whether the request was stored, and
the gemini continuation loop carried Solstice-only branches.

GeminiClient is back to its pre-Solstice code path. SolsticeClient now
subclasses GeminiNativeClient and has its own single-request path: it builds
the request with the shared Interactions builder, caps the final
max_output_tokens at one request's (65536), forces store: false on the built
request, sends one request and reads one stream with no checkpoint, resume or
hop logic. A stream that ends before interaction.completed still raises
GeminiAPIError; temperature/top_p are still dropped; URL, headers, timeout
and the key-guidance-free Interactions error mapper are unchanged.

Adds a test that a request the shared builder would store (a 262144 cap and a
long-decode budget) still goes out with store: false and a 65536 cap.
2026-11-24 13:51:07 -05:00
unsupportedpastels
35ee312df8 feat(solstice): move inference to the stateless Interactions API
Solstice called the v1alpha generateContentPerUserQuota methods. It now
posts every request to the per-user-quota Interactions method on v1beta
(interactions:createPerUserQuota) with store: false. This brings thought
summaries, per-request thinking levels and signed thought-step replay.

SolsticeClient now subclasses the gemini plugin's GeminiClient and always
uses its Interactions wire, through new hooks whose defaults keep the
gemini provider unchanged:

- every request posts to <host>/v1beta/interactions:createPerUserQuota,
  replacing any stored version segment (credential rows minted earlier
  hold the v1alpha base);
- long decode is off: one request capped at 65536 output tokens, never
  stored and never continued, because this method rejects stored
  interactions;
- temperature and top_p are never sent;
- headers are the bearer token, content type and a hermes-agent
  User-Agent only, never an API key, user-project or DPoP header;
- requests default to a 3600 s read timeout; an explicit per-call timeout
  still wins;
- a stream that ends before interaction.completed raises instead of
  returning the partial turn, because nothing stored can resume it;
- HTTP errors go through the Interactions error mapper without API-key
  remedies.
2026-11-24 13:51:07 -05:00
unsupportedpastels
2d74d9409d fix(solstice): map reasoning through the published Gemini helper
The Solstice profile imported agent.reasoning_effort.gemini_top_thinking_level and the private
agent.transports.chat_completions._build_gemini_thinking_config, neither on the published plugin API;
the boundary-lint baseline carried both as exceptions.

Switch Solstice to agent.reasoning_effort.gemini_thinking_config, published for provider plugins in
the preceding seam commit, and drop its two baseline entries. The helper keys the mapping on the id
the native client sends, so a gemini/ or google/ prefixed model id keeps its effort too.
test_solstice_published_api.py checks that the profile imports only published names and sends what
the helper returns.
2026-11-24 13:41:47 -05:00
unsupportedpastels
dbb3088d82 fix(solstice): send Gemini thinking_config so efforts and titles reach the model
The Solstice profile had no build_extra_body, so reasoning fell through to
the generic extra_body.reasoning, which the native Gemini client drops. No
thinkingConfig ever went on the wire: the title pass's thinking-off never
applied, Gemini 4 Neon thought at its default level, and that thinking used
up the 512-token title cap in about two of three calls, leaving an empty
reply and the truncated first-message title. Main-turn reasoning efforts
were ignored the same way.

Translate reasoning to native thinking_config with the shared Gemini helpers,
as the gemini and vertex profiles do. Log a warning when a title reply comes
back empty at the output cap, which was previously silent.

The boundary-lint baseline records the profile's imports of the shared Gemini thinking helpers
(gemini_top_thinking_level, _build_gemini_thinking_config), which the gemini and vertex profiles
also import, so Solstice maps efforts the same way.
2026-11-24 13:41:47 -05:00
xxxigm
1b39ecabee fix(bundles): don't archive a runtime tree the revision lacks
A sealed snapshot still puts the WhatsApp bridge back when the revision has it. Fixture repos without that path were failing git archive, and the new archive helper had no timeout.
2026-11-24 09:23:50 -05:00
xxxigm
79c00f3aa2 fix(bundles): ship the WhatsApp bridge in the sealed payload
Excluding scripts/ also dropped scripts/whatsapp-bridge, so Store and desktop builds parked WhatsApp. Archive that runtime tree back in after the exclude.
2026-11-24 09:23:50 -05:00
BearHuddleston
ef2c66d5dc docs(release): point channel_releases help at the publication workflow
34e19902d0's help named the bare `python -m scripts.releases.sequencer`
command. Run directly, that skips the workflow's stable-release lock. The
help now names the Stable Release Publication workflow.
2026-11-24 09:53:58 +00:00
BearHuddleston
34e19902d0 fix(release): list only canary in the channel_releases CLI help
537e99ed6e refused the stable role after parsing, so --help still offered
`stable` as a choice. The role now accepts only `canary`, and its help
says stable publication runs only through the Stable Release Publication
sequencer. `stable` still exits 2 before publish_release
(test_channel_releases_cli_publishes_canary_and_refuses_stable).
2026-11-24 09:52:25 +00:00
BearHuddleston
12849ad777 fix(release): don't read back a stable page the promotion left alone
When the stable page already described a newer release, b1469d1641 left
it in place but still read it back through the public origin. If the
public copy was still catching up, the read-back failed after the feeds
and DMG alias had moved and before the head advanced, over a page this
promotion never wrote.

_check_stable_page_state now returns None for the page bytes in that
case. publish_page then neither writes nor reads back. A page this
promotion writes, or finds already in place, is still verified. In
test_stable_promotion_rejects_stale_order_for_dmg_and_page the
page-ahead case now serves a stale public page; it failed on 86ba6e6244
with "Channel read-back differs" and passes now.
2026-11-24 09:51:26 +00:00
BearHuddleston
537e99ed6e fix(release): refuse the stable role in the channel_releases CLI
`python -m scripts.releases.channel_releases stable` called
publish_release("stable-release") directly. That skipped advance_stable's
check of the candidate digest against the final release receipt and ran
outside the stable-release concurrency group. It reached the same stable
feeds, and with this PR the DMG alias and downloads page, that
ff616309d5 closed off in the release_artifacts CLI. No workflow, test or
doc uses that role; stable-release.yml calls only `channel_releases
canary`.

The CLI now refuses `stable` with the reason (exit 2) and publishes
canary as before. test_channel_releases_cli_publishes_canary_and_refuses_stable
did not raise on f4785e7bee and does now.
2026-11-24 09:41:20 +00:00
BearHuddleston
f4785e7bee fix(release): keep only a newer stable page, not a canary page at the stable key
b1469d1641 left the stable downloads page alone whenever supersedes()
said the promoted tag could not replace it. supersedes() also says no
when the page at the stable key records a canary build, so that wrong
page was kept, with only a warning, while the stable head advanced.

The skip now applies only to a newer stable release, the renderer's
page-ahead case. A canary marker at the stable key fails closed before
any write. test_stable_promotion_refuses_a_canary_page_at_the_stable_key
did not raise on a906c2b033 and does now.
2026-11-24 09:39:56 +00:00
BearHuddleston
a906c2b033 fix(release): refuse a stable DMG copy source without an ETag
copy_source kept whatever ETag the source HEAD returned, and copy_object
sent x-amz-copy-source-if-match only when there was one. A HEAD without
an ETag therefore made the copy unconditional, and a same-size
replacement of the source would pass the destination's size check.

copy_source now refuses a source with no ETag. CopySource.etag is always
set, and copy_object always sends the condition. The no-ETag case in
test_copy_object_sends_signed_server_side_copy_and_verifies_destination
did not raise on b1469d1641 and does now.
2026-11-24 09:35:13 +00:00
BearHuddleston
b1469d1641 fix(release): let an older pending advance pass a stable page already ahead
The stable downloads page has a second writer on main: render-builds-table
in stable-release.yml's `complete` step renders a full-desktop release's
page before the ordered publication pass runs. If an older published
release's advance was still pending, that step put the page ahead of it.
The sequencer advances oldest first, so StableDownloads.prepare for the
older release then refused with "Refusing to move the stable downloads
page backward", on every rerun. Since the standalone CLI no longer
promotes stable, nothing could clear it.

Feed order is checked before promotion, so a page describing a newer
release can only be that renderer's. _check_stable_page_state now leaves
it as it is with a warning, as the renderer's own write_channel_page does,
and returns the bytes that should be live plus the write conditions (None:
no write). The older advance moves the feeds and the DMG alias, and the
public read-back checks the page that is actually live. The page is still
never moved backward.

In test_stable_promotion_rejects_stale_order_for_dmg_and_page, the
page-only-ahead case raised on 274bc33a78 and now promotes the older
release while leaving the newer page alone. stable-releases.md no longer
says the page changes only with promotion.
2026-11-24 09:33:59 +00:00
BearHuddleston
e68a1d67e2 fix(desktop): sign, notarize, staple, and verify outer macOS DMG
Sign, notarize, staple, and Gatekeeper-verify the outer macOS .dmg
container in an electron-builder artifactBuildCompleted hook while
keeping inner .app notarization (afterSign) intact for Squirrel.Mac .zip
updates.

- Reuse notarize.mjs auth resolution and 4h LOST_CONTACT / CloudKit
  retry logic in apps/desktop/scripts/notarize-dmg.mjs, signing the
  outer .dmg with Developer ID Application + --timestamp (which
  dmg-builder's built-in dmg.sign omits) using the packager's active
  codeSigningInfo keychain.
- Verify codesign, stapler validate (with LOST_CONTACT retries), and
  spctl -a -vv -t open --context context:primary-signature, then rebuild
  .dmg.blockmap and update event.updateInfo before artifactCreated fires
  so PublishManager writes post-staple sha512/size to *-mac.yml.
- Enforce outer DMG codesign, team match, .dmg.blockmap size, and
  *-mac.yml consistency in scripts/bundles/release_artifacts.py, and
  verify outer DMG signature, stapler ticket, Gatekeeper policy, and
  team match before mounting in tests/install/macos-bundle-smoke.sh.
2026-11-24 09:29:12 +00:00
BearHuddleston
274bc33a78 fix(release): check the stable DMG copy source before any feed moves
StableDownloads.prepare HEADed the source DMG and compared its size, but
the 5 GiB single-copy limit was applied only inside copy_object, which
ran after finalize had moved the macOS feed. A DMG over the limit would
stop promotion with the feed already pointing at the new release.
copy_object also HEADed the source again and copied against that fresh
ETag rather than the object prepare had checked.

r2.copy_source now runs every source check once: the path, the
single-copy limit, existence and receipt size. It returns a CopySource
holding the key, size and ETag. prepare calls it before any write, and
copy_object takes the CopySource and copies on its ETag, so a source
that changed after the check fails with 412 instead of being copied.

With the limit below the staged DMG's size, the new stable promotion
test fails on c1494b2ff2 (feed PUTs were sent before the error) and
passes now.
2026-11-24 09:27:57 +00:00
BearHuddleston
ff616309d5 fix(release): refuse stable candidates in the standalone promote CLI
python -m scripts.bundles.release_artifacts promote checked the pinned
candidate digest but neither required the published release nor ran
inside the stable-release concurrency group. A manual replay could
therefore pass the stable DMG alias's order check and then overwrite a
newer alias that a concurrent controller promotion had just copied. R2's
CopyObject takes no destination If-Match, so the copy itself cannot be a
compare-and-swap. Promoting a staged draft needed no race at all.

The CLI now refuses a stable candidate, payload tag or attempt ref,
before it reads anything. Stable promotion runs only through the Stable
Release Publication sequencer (channel_releases.advance_stable ->
publish_release -> promote_stable_feeds), which already requires the
published release and serializes every stable writer. Canary candidates
still promote through the CLI. The renderer harness test now promotes
through promote_stable_feeds, as the sequencer does, instead of the CLI.
stable-releases.md says only the controller promotes stable, and that a
partial publication is repaired by running Stable Release Publication
again.
2026-11-24 09:03:09 +00:00
BearHuddleston
5777024b16 refactor(release): read the stable page through R2ChannelStore.get
r2.read_object, added for StableDownloads.prepare, repeated the scoped,
authenticated GET that R2ChannelStore.get already makes: it returns the
raw bytes and ETag, None on 404, and refuses a response without an ETag.
prepare now reads releases/stable/index.html through R2ChannelStore.get,
the same reader the protected channel records use before their ETag CAS
writes, and read_object is gone. r2.get_object is left as it is: it
returns text and maps errors differently for the pruner and handoff.
2026-11-24 04:54:58 +00:00
BearHuddleston
43639eec9c refactor(release): stop re-exporting moved page helpers from the renderer
render-builds-table.py imported recorded_build only so three tests could
reach it through the script after it moved to downloads_page.py, and it
still imported smoke_rows, which nothing in the script uses. Both imports
are gone; test_render_builds_binding, test_render_builds_publication and
test_canary_page_history import recorded_build from downloads_page.
2026-11-24 04:48:01 +00:00
BearHuddleston
e2f4d4d6b8 refactor(release): give the stable download surfaces one typed owner
_prepare_stable_downloads returned an 11-key dict that promote unpacked in
two places around the feed writes, which put stable-only R2 details in the
shared promotion path. StableDownloads, a frozen dataclass, now owns them:
prepare() runs every check before finalize, as before, and publish_dmg()
and publish_page() each make one write and read it back. promote calls
them where the writes already happened (the DMG right after the macOS
feed, the page after every feed pointer), so the write order the promotion
tests pin is unchanged. Credentials and page bytes stay out of the repr.
2026-11-24 04:37:27 +00:00
BearHuddleston
dbebd80427 fix(release): gate feed promotion on the head update's own ordering check
publish_release refused a stale release before the feed writes with its
own copy of the ordering rule, read from the live build's request.json.
ChannelPublisher._promote applies the real rule later: the digest-checked
live manifest, the native versions, and the allocation sequence. The copy
had no sequence check, so a newer release allocated before an older one
published (its retry keeps the lower sequence it was pinned to) passed the
early gate, moved the stable feeds, DMG alias and page, and was then
refused by the head update. That leaves the feeds on an archive the
retention pointer does not protect.

ChannelPublisher.require_protected_successor now runs the head update's
ordering check (sequence, then versions against the digest-verified live
manifest) without writing, and _promote calls the same helper, so the
rule lives in one place for both the canary and stable policies.
2026-11-24 04:34:45 +00:00
BearHuddleston
205fdca51b fix(release): give copy_object one retry budget
copy_object retried a 5xx CopyObject three times, and each attempt went
through signed_request's own three tries, so a run of R2 503s sent nine
copies and held the release job for the summed back-off. signed_request
now gets tries=1, as multipart completion does, and copy_object's loop
owns the budget for HTTP errors, error documents sent with HTTP 200, and
dropped connections, which signed_request used to retry on its own.
2026-11-24 04:31:18 +00:00
BearHuddleston
4d4de7efb9 feat(release): publish stable macOS DMG alias and downloads page on promotion 2026-11-24 03:46:07 +00:00
BearHuddleston
7a7e5c5a5c refactor(release): extract shared downloads page renderer 2026-11-24 03:45:48 +00:00
Jeffrey Quesnelle
fe9a4b58ec feat(profiles): never run a profile on the host while a plugin runs it elsewhere (#156725)
* feat(profiles): never run a profile on the host while a plugin runs it elsewhere

One host gateway serves every profile by default and runs each profile's
cron, messaging platforms, Kanban dispatch and Webapp; the CLI, TUI and
desktop build agents on the host too. A plugin that runs a profile's whole
backend somewhere else (for example in a sandbox, through its own host
launcher) had no way to stop the host from also running that profile outside
it, reading config the sandbox can write.

A host-side plugin now marks such a profile in host-only storage under the
Hermes root, never in a profile home:

  <hermes root>/profiles_run_elsewhere/<profile>.json
  {"plugin": "<plugin name>", "since": "<ISO 8601 UTC>"}

The file's presence is the marker, and an unreadable marker still marks the
profile. Writers write a dot-prefixed temp file in the folder and rename it
over <profile>.json. hermes_cli.profiles_run_elsewhere reads it and gives
host-side plugin code mark_profile_run_elsewhere() and
clear_profile_run_elsewhere().

For a marked profile:

- profiles_to_serve() leaves it out, the default profile included, unless
  the caller passes include_run_elsewhere=True. The host gateway stops
  serving it at its next rescan, and the desktop cron ticker, /p/<profile>/
  routing and the dashboard's cron and session fan-outs skip it. Callers
  that only look for live gateways, count installed homes or read which
  worktrees a resumable subagent pins opt in (host attach, the launch
  profile policy, the multiplex counts, the worktree sweep's pin view).
- AIAgent refuses to build an agent for it (ProfileRunsElsewhere), whichever
  frontend asks, including a multi-profile host building a sibling's agent.
- CLI commands that run a turn exit 1 before any banner, TUI or gateway
  contact; `hermes serve` and `hermes dashboard` exit 78 before attaching or
  binding; the gateway process exits 78 before reading config.
- ensure_gateway_runtime() answers inaccessible / profile_runs_elsewhere
  before discovery, so nothing starts or attaches to it on the host.
- The dashboard's cron, session, file and Webapp requests for it answer 409,
  the desktop cron ticker's gate refuses it, and the Kanban dispatcher
  leaves its cards in ready (skipped_nonspawnable).

A process that cannot list the marker folder (permission denied) is the
backend the plugin runs, not the host: it refuses nothing. Any other error
reading the folder fails closed. A profiles folder the process cannot list
shows only the process's own profile instead of raising PermissionError.

_seed_file_if_missing moves to profiles_initialization.py, its only caller,
to keep profiles.py under its size cap.

* fix(profiles): close review gaps in the run-elsewhere marker

Follow-up to "feat(profiles): never run a profile on the host while a
plugin runs it elsewhere", from the first review of #156725.

Checks added where a host process could still run a marked profile:

- cron.scheduler_tick.tick() returns before the tick lock, the due scan or
  any job for a marked profile, so every in-process ticker skips it: the
  gateway's (its launch profile included), the desktop's, and the built-in
  fallback an external provider starts. CronScheduler.claim_fire() claims
  nothing for it, for a provider's inbound fires and the misfire sweep.
- AIAgent.run_conversation() makes the check AIAgent.__init__ makes, so an
  agent built before the profile was marked (a gateway's cached agent, an
  open dashboard or TUI session) runs no further turn.
- The dashboard's deferred agent build refuses first, before it binds the
  profile's scope or starts its MCP servers.
- `hermes gateway run` exits 78 in _prepare_agent_startup, with or without
  --force: before plugin discovery, shell-hook registration and the
  host-gateway attach guards.

The marker module:

- run_elsewhere_for_home() reads the home as written and as resolved, and
  refuses when either reading is marked. A symlink or junction to a profile
  home, a relative or `..` path, or the profile id in another letter case
  now reaches that profile's marker.
- mark_profile_run_elsewhere() publishes a new marker with a hard link,
  which never replaces a file: of two plugins that both found no marker,
  one claims the profile and the other gets the ValueError. Where the
  filesystem has no hard links it renames as before.
  clear_profile_run_elsewhere() returns False without unlinking when it
  finds no marker, so it cannot remove one published after it looked. No
  lock is taken.
- Only a missing marker folder means nothing is marked. A regular file in
  its place refuses every profile, like any other read error.
- The folder reader returns one shape, _MarkerFolder(names, error).
- mark_profile_run_elsewhere, clear_profile_run_elsewhere and run_elsewhere
  are listed in plugin_api.json and public-api.md is regenerated, so
  `hermes plugins validate` accepts a plugin that imports them by name.

Corrections to that commit's message:

- "A profiles folder the process cannot list shows only the process's own
  profile instead of raising PermissionError" now holds only for a process
  whose own home is a named profile under that folder (the backend a
  plugin runs elsewhere). Any other process gets the PermissionError, as on
  main, so activate_multi_profile_hosting_eagerly() fails closed again for
  a default-profile host that cannot list the folder.
- "Any other error reading the folder fails closed" did not hold for a
  regular file at the folder's path, which read as "nothing marked". It
  holds now.
- "Writers write a dot-prefixed temp file in the folder and rename it over
  <profile>.json": the Python API's first write of a marker is the hard
  link above. Its rewrite of an existing marker, and other writers, still
  rename.

Not changed: a gateway or a serve/dashboard backend already running as the
marked profile is not stopped. It runs no further turn and no cron job for
the profile, and stays up until it is stopped.

* fix(profiles): load no env file or secret source from a marked home

Second follow-up to "feat(profiles): never run a profile on the host while
a plugin runs it elsewhere", for the review finding "CLI runs code before
refusing" on #156725.

While a plugin runs a profile elsewhere, the backend it runs writes the
profile's home. Every `hermes` start loads that home when hermes_cli.main
is imported (load_hermes_dotenv), before argparse and before any refusal,
and so does the plugin's own host process. A `secrets:` source that
backend wrote into its own config.yaml therefore ran on the host as the
user: `secrets.command` through /bin/sh on Linux and macOS,
`secrets.onepassword.binary_path` as a program on every OS. A .env it
wrote reached the environment of every such start, overriding what the
process already had.

Now a dotenv load whose home is marked takes nothing from that home:

- load_hermes_dotenv() does not read, rewrite or publish the home's .env,
  does not load .op.env and resolves no `secrets:` source. It asks once
  per load (run_elsewhere_for_home: a path resolve and a listing of a
  folder that is normally not there) and treats the two files as absent,
  so the project .env takes the precedence it has for a home without a
  .env. The project .env, the administrator-managed .env, the
  config-backend boot and the terminal bridge are unchanged.
- The config-backend bootstrap (_bootstrap_env) takes no selector or plane
  credential from a marked home's .env or .op.env, also when it runs
  before the first load. bootstrap_deployment() passes the load's answer
  on, so one load asks once.
- hydrate_profile_secret_sources() resolves nothing for a marked home, so
  a host gateway or dashboard that serves the profile runs none of its
  sources either.

A process that is denied the marker folder is the backend the plugin runs:
its home reads as not marked and it loads its own files as before. A
marker folder that cannot be read for any other reason already refuses
every profile; no profile's env files or secret sources are loaded either
until it can be read, and the log line says so.

What this changes for a marked profile: a host process started under its
home has none of its .env values in the process environment and none of
the keys its secret sources supply. The marking plugin supplies what its
own host process needs.

Not covered: hermes_cli.config.load_env() and the readers built on it
(get_env_value, reload_env) still open the .env file when asked, and the
secret scope a multi-profile host builds for a profile it serves still
reads it. Neither runs anything.

* fix(profiles): start no command and read no env value from a marked home

Third follow-up to "feat(profiles): never run a profile on the host
while a plugin runs it elsewhere" (#156725), on top of "load no env file
or secret source from a marked home".

While a plugin runs a profile elsewhere, the backend it runs writes the
profile's home. Two kinds of host process still acted on what that
backend wrote there (measured under a marked profile with stand-ins that
only append a line to a file):

- Commands that start a command the profile's own files name, without
  building an agent. `hermes hooks test` ran a shell hook from
  config.yaml. `hermes mcp test` started an `mcp_servers` stdio command,
  and sent an HTTP server's request to the address in its entry.
  `hermes secrets onepassword status` and `sync` ran the program
  `secrets.onepassword.binary_path` names. `hermes send` loaded the
  home's .env into the process with a loader of its own.
- Code that reads one env value on demand. The previous commit stopped
  the dotenv load; load_env() and get_env_value() still opened the
  home's .env. So `hermes status` listed keys that backend wrote as
  configured, `status --all` sent a request with a bearer from the file
  to a URL from the file, `status`, `dump` and `auth list` copied its
  keys into the profile's auth.json, and HERMES_REDACT_SECRETS was taken
  from it.

Now, for a home that is marked:

- tools.hosted_tool_policy: the four host features that start a process
  from the profile's files (RUNS_PROFILE_COMMANDS: shell_hooks,
  mcp_stdio, cron_scripts, skill_inline_shell) are off, at the place
  each already asks whether it may run in a hosted scope, and
  host_feature_refusal() answers with the run-elsewhere message. The
  one subprocess site of shell hooks starts nothing (`hooks test`,
  `hooks doctor`, a hook registered before the profile was marked), and
  the MCP stdio transport starts nothing, whoever asks.
- The MCP probe (_probe_single_server: `mcp test`, `mcp add`,
  `mcp configure`, `doctor`, the dashboard and TUI routes) raises
  ProfileRunsElsewhere before it validates, resolves, starts or calls a
  server, stdio or HTTP. `mcp login` and `mcp reauth` refuse first,
  before they drop the stored tokens or the device flow calls the
  entry's server.
- `hermes secrets <source> <verb>` exits 1 with the message of the
  commands that run a turn (one wrapper where the verbs are registered).
- `hermes send` exits 1 the same way, before its own loader reads the
  home's .env and config.yaml credentials into the process.
- agent.secret_scope.load_env_file(), the one .env tokenizer, reads a
  file in a marked home as empty and does not open it. That covers
  hermes_cli.config.load_env(), get_env_value(),
  get_env_value_prefer_dotenv(), reload_env(), the credential pool's
  seeding from .env, and the secret scope a multi-profile host builds
  for a profile. Hermes's own .env writers (save_env_value,
  remove_env_value) do not read through it and still write the file, so
  a key the user saves through the marking plugin's host process lands
  there. A file in any other folder (a plugin's host-only copy) reads as
  before.
- `hermes status --all` does not probe LM Studio at model.base_url: with
  the .env values out of reach, the address in config.yaml still sent a
  request from the host.
- `hermes status` and `hermes config` print one line saying that the
  profile's .env keys are not read on this host, because they now show
  as not set.

The check behind the tokenizer and the features is
profiles_run_elsewhere.home_runs_elsewhere(home): the answer of
run_elsewhere_for_home, kept per process and home. Each call stats the
marker folder and the home's marker file, and asks again when that
differs from the stat taken before the last asking, so a marker written
or removed by any process is seen at the next call. A marker folder that
cannot be read marks every home, as it does for running a profile, and
is asked about again every time. A process that is denied the folder is
the backend the plugin runs: it reads its own .env and runs its own
hooks and MCP servers as before.

This corrects the previous commit's message, which said "Not covered:
hermes_cli.config.load_env() and the readers built on it (get_env_value,
reload_env) still open the .env file when asked, and the secret scope a
multi-profile host builds for a profile it serves still reads it". Both
are covered now.

Not covered: config.yaml of a marked home is still read (`hermes status`
and `hermes config` show it). `quick_commands` of type exec still run in
a chat client, gateway or TUI backend that was already running when the
profile was marked. resolve_home_dotenv() (two config migrations) still
parses the home's .env. Plugins in the home are still discovered.

* fix(profiles): no quick command runs for a profile that runs elsewhere

A quick_commands entry of type exec is a shell command in the profile's
config.yaml, a file the backend the plugin runs writes. The refusals so
far keep a hermes command from starting, on a marked home, a process
that dispatches one. Three cases still reached the three places that
start the command (the classic CLI, the gateway, the TUI / dashboard
backend):

- a chat client, gateway or backend that was already running as the
  profile when it was marked: its turns are refused, its slash commands
  were not;
- a dashboard or `hermes serve` backend on another profile's home, whose
  command.dispatch takes the profile with the request (the `profile`
  parameter, or a session of that profile);
- a multiplexing gateway: its own quick commands are the default
  profile's whichever profile's process started it
  (load_gateway_config_for_runner), so a gateway started from a named
  profile while `default` is marked had them.

Each of the three places now asks run_elsewhere_refusal() before it
starts the command and answers with the run-elsewhere message instead.
The home asked is the one whose config.yaml names the command: the home
bound for the request in the TUI / dashboard backend and for a local
session of the gateway, the process's own in the classic CLI, and for a
gateway's messaging commands the home its config was loaded from
(_hm_quick_commands_home: the default profile's when it multiplexes).

Alias quick commands are unchanged, and so is the backend the plugin
runs, which does not see the marker.

* test(profiles): fire the marker race helper after the module's own look

`_between_look_and_change` runs an action right after the marker module's
next look at a profile's marker, to play the writer that gets in between a
look and a change. It patched `os.listdir`, `os.lstat` and `_read_entry`,
and fired as soon as a call for the marker returned.

The suite's home guard (`tests/home_io_guard.py`) wraps `os.lstat` too, and
resolves the path before it calls the real function. On POSIX
`os.path.realpath` lstats every component of the path through `os.lstat`,
so the helper saw the guard's own lstat of `<profile>.json` first and fired
inside the guard, before the module's lstat had run. In
`test_a_clear_that_found_no_marker_never_removes_one_published_after_it_looked`
the other plugin's marker was therefore already in place when
`clear_profile_run_elsewhere` looked, and the call raised `ValueError`
instead of returning False. On Windows `realpath` does not call `os.lstat`,
so the test passed there and failed on Linux only.

The three wrappers now share a depth counter and fire only when the
outermost patched call returns: a look made inside a look is part of it.
The action runs at the same point on both systems, after the module's own
look and before its change. No product code changes.

* fix(mcp): refuse "mcp add" first for a profile a plugin runs elsewhere

`hermes mcp add` reached the run-elsewhere refusal only inside its probe,
and treated it like any failed connection: it printed "Failed to connect"
and offered "Save config anyway", which wrote the server entry (disabled)
into the marked profile's config.yaml. For an HTTP server it had by then
asked for a bearer token and saved it to the profile's `.env`.

`cmd_mcp_add` now refuses before its first question, the way `send` and
the `secrets` verbs do: the message on stderr, exit 1, nothing asked and
no file of the profile changed.

The probe's other callers leave nothing written when the probe refuses
(`mcp test`, `mcp configure`, the dashboard and TUI test routes, the
connector install, the OAuth flows) and are unchanged.

* test(profiles): gate the Windows letter-case test with the platforms marker

`test_a_profiles_folder_spelled_in_another_letter_case_reads_the_marker_on_windows`
was gated with a bare `skipif(os.name != "nt")`. The Windows lane imports
only files that carry a `platforms(...)` spec covering Windows and selects
with `-m platforms`, so the test ran on no CI host (tests/AGENTS.md: "Use
the marker, never a bare `skipif`"). It now carries
`@pytest.mark.platforms("windows")`. No other test this branch adds gates
on the host with a `skipif`.

* docs(dashboard): say which requests _cron_profile_home() refuses

The helper's docstring said that the host "neither reads nor runs" a marked
profile's "jobs, sessions or files". The helper answers 409 only to the
requests that resolve their profile through it: every cron request (an omitted
profile resolves to the backend's own), and the session and file requests that
name the profile. A session or file request with no profile uses the backend's
own home without asking the helper, as the description's "Not covered" section
says. The docstring now says that. No code change.

Found in review.

* fix(profiles): ask again when a home's link leads to another profile

home_runs_elsewhere() keeps its answer per process and home path, and held it
valid while a stat of the marker files it had worked out was unchanged. Those
files belong to the directory the path led to at the first asking. When the
home is a symlink or junction and the link is pointed at another profile, no
marker is written or removed, so the kept answer stayed: pointed at a marked
profile, run_elsewhere_for_home() refused the home while load_env_file() still
read the marked profile's .env; pointed away from one, the unmarked home's
.env read as empty. Reproduced with a symlink on Linux and with a symlink and
a junction on Windows. A link above the home (the root itself) was already
seen, because the marker paths are read through it.

The kept answer is now also for the directory the path leads to: each call
stats the home and compares device and file id with the stat taken before the
home was resolved. That is one more stat per call. Measured for a plain home,
the cached check goes from 2.5 to 5.4 us on Linux and from 7.0 to 12.3 us on
Windows, and load_env_file() from 17 to 20 us and from 104 to 112 us; through
a link on Windows the check goes from 27 to 71 us. Resolving the home at every
call instead would add 23 us on Linux and 87 us on Windows, more than the
whole check.

Found in review.

* fix(profiles): a second name for a marked profile's home is not served either

Found in review. With profiles/alias a link to profiles/ops (a symlink, or a
junction on Windows), marking ops took only the name ops out of
profiles_to_serve(): the list was filtered by name, so the host gateway kept
alias in its served set, although every check that asks by home refused it.
Two more checks asked by name and let the link through: the Kanban
dispatcher's profile_exists_here(), and the dashboard's profile resolution
_cron_profile_home(), behind the cron, session, history and file requests
that name a profile.

All three now ask by home. The served list and the dispatcher use the kept
answer of home_runs_elsewhere(), which costs stats per profile instead of a
resolve and a folder listing; the dashboard asks run_elsewhere_for_home()
and answers 409 with the marked profile's name. The kept answers hold 4096
homes instead of 256, so a host with several hundred profiles still answers
its list from stats.

* fix(profiles): a clone made under a marked name keeps the keys it was cloned with

Found in review. Creating a profile mirrors the launch profile's .env into
it, but only over the seeded comment-only stub, never over the keys a clone
brought. That check asked the .env tokenizer what the new file holds, and
the tokenizer answers with nothing for a home a plugin runs elsewhere. A
profile cloned under a name whose marker was already there (left behind
when an earlier profile of that name was deleted) therefore looked empty,
and the launch profile's .env was copied over the cloned keys.

The check now reads the destination as the file it is
(load_env_file(..., for_overwrite_check=True)). Nothing else reads a marked
home's .env: every value reader still gets nothing from it. A new profile
whose .env is the stub still receives the launch keys, marked name or not,
as every new profile does.

* fix(profiles): a marker covers its profile's directory under every name

Found in review, as the mirror of the link case fixed before: with
profiles/ops a symlink or junction to profiles/real and ops marked, the
directory's own name real was still listed, served, built and run on this
host, and its .env was read. A home was followed to the profile its path
leads to, but not to the other names that lead to its directory, while the
backend elsewhere runs in that one directory whatever it is called.

run_elsewhere_for_home() and home_runs_elsewhere() are the two functions
every refusal asks. Both now also compare the home's directory (device and
file id) with the home of each profile the root's marker folder marks, so a
marked name that is itself a link marks the directory it leads to, under
that directory's own name too. An error or a filesystem without file ids is
never a match.

The kept answer of home_runs_elsewhere() adds one stat per other marked
profile, which also sees a marked link pointed at another directory. It
learns of a new marker under another name from the marker folder's time, so
a listing taken less than two seconds after the folder changed is not
relied on and is taken again at the next call, without resolving the home
again: two changes can share one tick of a filesystem's clock.

* fix(profiles): home maintenance waits while a plugin runs the profile elsewhere

After an installed revision changes, the first start of each profile runs
home maintenance for its own home (boot_bootstrap): the config migration,
which first copies config.yaml and .env beside themselves as
<name>.bak-<stamp>, the plugin-catalog cache drop, launcher publication and
the default-plugin check. Every hermes command and the gateway process make
that call before any command can refuse. A host start under a marked
profile, the marking plugin's own status and switch-off commands included,
therefore rewrote config.yaml under the backend the plugin runs and left a
byte copy of the keys file in a home that backend reads and writes.

run_boot_bootstrap now asks run_elsewhere_for_home() for this process's
home when maintenance is due (a new revision, or a step still owed), before
it takes the record lock. For a marked home it runs no step and writes no
record, so the maintenance stays owed and the first start after the marker
is gone does it. The question is asked by home: a marked home reached
through a link, and the directory behind a marked link, are covered. The
backend the plugin runs (it is denied the marker folder) and every unmarked
profile, the default one included, are maintained as before. A marker
folder that cannot be read holds maintenance back, as it refuses every
profile.

A start whose record says this revision is done reads its record and
returns as before; nothing is asked on that path.

One log line says why: "home maintenance: the '<plugin>' plugin runs
profile '<name>' elsewhere, so this host leaves its home alone; it is owed
until the profile runs here".

* fix(profiles): the backend migration does not move a profile a plugin runs elsewhere

`hermes gateway migrate --backends --apply` and the dashboard's "move to the
gateway" request (`POST /api/gateway/migrate/backends/apply?profile=`) went
ahead for a profile a plugin runs elsewhere. The move wrote `.env` and
`config.yaml` in that profile's home, installed and started a gateway service
for it and stopped its old backend. The gateway then refused to run the profile
and exited, so the run could only end in its rollback, which put the saved
`.env` and `config.yaml` back over whatever the backend the plugin runs had
written in the meantime.

The refusal a marked profile gets everywhere else is now one of the blockers
the apply path adds before anything changes. The command exits 3 with it, the
dry run and `GET /api/gateway/migrate/backends/plan` list it, and the
dashboard's request answers 409 and starts no run.

* fix(profiles): the config.yaml of a profile a plugin runs elsewhere sets no host environment variable

Importing `gateway.run` copies settings of the launch home's `config.yaml` into
the process environment. Among them is every top-level scalar of the file,
under the scalar's own name when that name is not set yet. `hermes -p <profile>
gateway status` imports the module, and so does the gateway process before it
refuses a marked profile. While a plugin runs the profile elsewhere, the
backend it runs writes that file, so it could choose `LD_PRELOAD`,
`NODE_OPTIONS`, `PYTHONPATH` or a proxy for that host process and for every
program the process starts afterwards. The home's `.env` was already closed for
this reason; `config.yaml` was a second way in.

`load_launch_home_dotenv()` in `env_loader.py` asks once whether a plugin runs
the launch profile elsewhere, runs the dotenv load with that answer
(`load_hermes_dotenv(home_elsewhere=...)`, the keyword the bootstraps already
take) and returns it. `gateway.run` calls it where it called
`load_hermes_dotenv`, and for a marked home it does not read the file for its
bridge. A home without a marker is asked about as often as before, and its
bridge is unchanged.

* fix(profiles): reading an env file under a folder named like ~user no longer raises

`load_env_file()` asks whether the file's folder is the home of a profile a
plugin runs elsewhere. That question expanded a leading `~name` with
`Path.expanduser()`, which raises `RuntimeError` when no user has that name.
So on Linux and macOS, with no marker anywhere, a relative path whose first
folder is named like `~someone` made the tokenizer raise ("Could not determine
home directory."), where it had always read the file as written or returned
`{}`. Windows guesses a folder for any `~name` and did not raise.

The marker question now expands with `os.path.expanduser()`, as its stat of the
home already did: a `~name` that is no user's stays as written, which is the
path the read opens.

* fix(profiles): the refusal says how to get a profile back when its plugin is gone

A marker can outlive the plugin that wrote it: the plugin was removed or
disabled, it no longer loads, or the Hermes root came back from a backup taken
while the profile ran elsewhere. The owner then meets the refusal at every
command that runs the profile, and its advice was to turn this off in a plugin
he no longer has. Core has no command that clears a marker, and the refusal
named neither the file nor another way.

The refusal for a marker that names its plugin keeps its sentences and ends
with one more: if that plugin is no longer installed or no longer loads,
deleting the marker file (named by its path) lets Hermes run the profile on
this computer again, and the file is not to be deleted while the plugin still
runs the profile. The user guide says the same.

* test(profiles): marking a profile leaves the marker folder listable by other local users

On Linux and macOS `mark_profile_run_elsewhere()` sets the marker folder to
0755. A host service that runs as another local user must be able to list the
folder: a listing that is denied reads as "this process is the backend the
plugin runs", and such a process refuses nothing. No test noticed when that
`chmod` was removed. This one marks under umask 077, and marks again after the
folder was made 0700, and expects 0755 both times.

* test(profiles): the quiet-folder test no longer depends on how fast it runs

`test_a_marker_folder_that_has_been_quiet_is_not_listed_again` expects 150
listings of the marker folder "a moment after the marker was written". The
module stops listing once the folder's time is two seconds old, so a test run
that stalls for two seconds between writing the marker and the end of that loop
counts fewer listings and fails. It did once on a loaded machine.

The test now stands the module's clock at the folder's own time before it asks
for the first time, as it already moved that clock forward for its second half.

* test(profiles): the marker question by home does not raise for a folder named like ~user

The dotenv load asks whether a plugin runs a home's profile elsewhere through
`run_elsewhere_for_home()`, which expanded a leading `~name` the way the
tokenizer's question did. The test of a folder named like a user that does not
exist now asks through both, so each of the two expansions has a test that
fails when it raises again.

* fix(profiles): the backend migration plans no step against a profile a plugin runs elsewhere

The block for a marked profile sat among the blockers of the apply path, which
a plan that can only be done by hand never reaches. On Windows every plan is of
that kind, and there the backend a plugin runs is a process of this host
(`hermes serve --isolated` under the profile's home). So `hermes gateway
migrate --backends --apply`, with or without `--dry-run`, found that process as
an old backend of the marked home, exited 6 and printed the steps of a move by
hand: `taskkill /PID <its pid> /T /F`, then installing a gateway for the
profile.

The refusal is now the first answer of the plan's own owner check, which every
form of the plan passes before a step is chosen. A marked home gets a blocked
plan (exit 3) with the run-elsewhere message and no step, on every platform;
the dashboard's plan and apply routes read the same plan.

* test(profiles): the public marker functions are pinned by what the validator does

`test_the_user_guides_marker_example_validates_clean` read the user guide from
the repository, cut its Python example out, parsed it and compared the names
it imports with a list. That is a test of a file's text. What it guarded is
that `hermes plugins validate` calls the three documented marker functions
public, and `test_the_documented_marker_functions_are_public_plugin_api`
already pins that by running the validator on a plugin that imports them:
with one of the three taken out of the public list, that test fails.

The guide-reading test is removed. The other tests of this branch read only
files under their own temporary homes.

* fix(profiles): no form of the backend migration acts on a profile a plugin runs elsewhere

The block for a marked profile sat in the migration's plan, and several
forms of `hermes gateway migrate --backends` never reach the plan or act
before it:

- `--apply --detach` started the run in the background and reported it as
  started; only that run then refused.
- `--restore` undid a move that was made before the profile was marked: it
  stopped and removed the gateway service, wrote `config.yaml` and `.env`
  back from the move's backups and started the old backend.
- A move that did not finish was rolled back the same way by the next
  `--apply` or `--restore`, and the dry run named the command that does it.
- A second `--apply` on a moved home named `--restore`.
- Every form but the dry run made the run lock in the marked home first.

The command now refuses where every form enters: for a marked profile
`--apply` and `--restore`, with any other flag, exit 3 with the
run-elsewhere message before the home's record is read or its lock is made.
Nothing is written, started or stopped, and the record of an earlier move
stays for when the profile runs on this host again. `--status` still reads.

The dashboard's `POST /api/gateway/migrate/backends/apply` and
`.../restore` answer 409 `blocked` with the same message for a marked
profile, start no run and name no command.

* fix(profiles): the lists of old backends say when a plugin runs the profile elsewhere

The backend a plugin runs for a profile can be a `hermes serve` process of
this machine, which the backend migration's scan finds like any other old
backend of that home:

- `hermes gateway migrate --backends` listed it without a word about the
  plugin and ended with the line that offers the dry run of its move.
- After `hermes update`, the notice called it "an old Hermes backend for
  this profile" and offered the same dry run.
- The rows the dashboard's plan route returns said nothing about it either.

A listed backend whose home's profile a plugin runs elsewhere now carries
one more note, in the report's text and JSON and in the dashboard's rows:
"Profile 'ops' runs elsewhere (the 'x' plugin runs its backend): Hermes
does not move this backend to the gateway on this host." The report offers
no dry run when its own profile is marked, and the update prints no notice
for such a profile. The move itself is already refused for it.

* fix(profiles): the blocked plan of a profile a plugin runs elsewhere lists no backend to move by hand

Where a backend can only be moved by hand (on Windows every one), the plan
of a marked profile printed no step but kept the entry above the blocker:
"manual cannot be migrated automatically ... Run the steps below in
PowerShell or Command Prompt ... Steps, in this order", with nothing under
it. The dashboard's card prints "This server cannot be moved from here" and
those instructions for every such entry.

The marker's check is now its own step of the plan, before the checks of
which gateway serves the home, and the plan it blocks lists no backend at
all: the text is the home and the blocker, and the JSON has an empty
`unsupported`. The other reasons a plan is blocked print as before.

* fix(profiles): the refusal's last sentence says "on this host" like the sentences before it

The sentence the refusal gained for a plugin that is gone said that deleting
the marker file "lets Hermes run the profile on this computer again", two
sentences after "Hermes does not run it on this host". The message and the
user guide say "host" everywhere else, so this sentence does too.

* test(profiles): the line for a listed backend says what the marker tells

The line a listed backend of a marked home carries has three forms: the
plugin by name, "a plugin" when the marker file cannot be read, and "Hermes
cannot read <folder>" when the marker folder cannot be read. The tests of
the report covered the first. This one reads all three from real markers.

* fix(ci): a change to the run-elsewhere marker module starts the update suite

The notice `hermes update` prints about an old backend
(hermes_cli/update_backend_notice.py) now asks whether a plugin runs the
profile elsewhere, so it imports hermes_cli/profiles_run_elsewhere.py. The
change classifier did not route that module to the upgrade E2E lane, and
tests/ci/test_update_ci_routing.py failed for it:

    e2e_upgrade: imported by the update path but not routed to it:
    {'hermes_cli/profiles_run_elsewhere.py': ['hermes_cli/update_backend_notice.py']}

The module joins the lane's owner list, beside the backend-migration marker
the same notice reads.

* fix(profiles): a marked profile's key_cmd is not run on this host

`providers.<id>.key_cmd`, and a custom provider's `key_cmd`, is a shell
command line in the profile's own `config.yaml`. Hermes runs it to get the
provider's key, with the profile's environment and credentials. For a
profile a plugin runs elsewhere, the backend there writes that file, and
nothing on this path asked the marker: the dashboard's
`GET /api/model/options?profile=<name>` ran a marked profile's command once,
as it does for any profile.

`_mint`, the one place every `key_cmd` runs, now raises `CommandTokenError`
with the run-elsewhere message for a marked profile. The model picker turns
that error into a probe without a key, so it still answers; the same request
now runs the command zero times.

The fix and its test are the reviewer's patch from the review of
6a60a75a669, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): a dashboard file request never dials a marked profile's SSH workspace

A file request that names a profile is answered 409 when a plugin runs that
profile elsewhere. For a profile whose workspace is on an SSH host the
request went another way first: `_fs_backend` read `terminal` from the
profile's `config.yaml` and dialed the host named there before the route
reached the refusal. `GET /api/fs/list?profile=<name>` and
`GET /api/fs/default-cwd?profile=<name>` dialed the host a marked profile's
config names.

`_fs_backend` now resolves the profile first, which answers 409 for a marked
one before its config is read. Every file route that can go to an SSH host
passes through it. A request that names no profile behaves as before. Two
existing tests call the real `_fs_backend` with a profile that is not on
disk; they now stand in for the lookup.

The fix and its tests are the reviewer's patch from the review of
6a60a75a669, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): gateway ensure and attach refuse a marked profile whose directory is a link out of the root

A marker covers the profile's directory whatever path leads to it. But
`ensure_gateway_runtime` made the home canonical before it asked the marker.
When `profiles/ops` is a link to a directory outside the Hermes root, the
canonical path has no Hermes root above it and so no marker: `gateway ensure`
went on to discovery for a marked profile and did not answer
`profile_runs_elsewhere`. `attach_gateway` resolves the home before it calls
`ensure`, so it went the same way.

Both now ask about the home as it was given too. In `ensure` the check sits
inside the existing assignment, which keeps the function at the complexity
cap; `attach_gateway` checks before it resolves. The answer for a marked
profile is the one `ensure` already gave: `inaccessible`,
`profile_runs_elsewhere`, the refusal in `detail`.

The fix and its test are the reviewer's patch from the review of
6a60a75a669, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): marked profiles still count when an external cron registry may be shared

An external cron provider keeps one remote registry that is not scoped to a
profile, so Hermes uses it only on a host with a single profile. Two callers
decide that by counting the served profiles, and a profile a plugin runs
elsewhere is no longer in that list:

- The gateway chose its scheduler with the number of profiles it ticks. On a
  host with `default` and a marked `ops` that number is 1, so the gateway
  kept the external provider, which reconciles the registry toward
  `default`'s jobs when it starts.
- The dashboard skips an external reconcile when it counts more than one
  profile. With the other profiles marked, the reconcile ran.

On main both counts included `ops`. If the backend elsewhere arms that
profile's jobs through the same provider account, such a reconcile can
cancel them.

Both callers now count the marked profiles where the question is who may
share the registry. The profiles the gateway ticks and the dashboard lists
are unchanged. Three existing stand-ins for `_cron_profile_dicts` accept the
new keyword.

The fix and its tests are the reviewer's patch from the review of
6a60a75a669, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): a marked profile's speech command is not run on this host

`tts.providers.<name>.command` and `stt.providers.<name>.command` are shell
command lines in the profile's own `config.yaml`, and one runner starts
both. The dashboard reaches it for a named profile without building an
agent: `POST /api/audio/speak?profile=<name>` ran a marked profile's TTS
command, and `POST /api/audio/transcribe?profile=<name>` ran its STT command
and returned what it printed. The backend a plugin runs elsewhere writes
that file, so this is the host starting a command line that backend wrote,
as with a provider's `key_cmd`.

`run_command_provider`, the one place both kinds run, now raises
`RuntimeError` with the run-elsewhere message for a marked profile. The
callers already turn a `RuntimeError` of the runner into their own failure
answer, so the speak request answers 400 with the message and the
transcribe request answers that the transcription failed.

* fix(profiles): the gateway's clients ask about a linked profile's home before they resolve it

`gateway ensure` and `gateway attach` now ask the marker about the home as
it was given. Two callers resolve the home before those functions see it,
so a marked profile whose directory is a link out of the Hermes root still
got past them:

- `connect_gateway`, which `hermes sessions discard` and `adopt` and the
  cron and Kanban clients call. None of them passes the command line's own
  refusal first, and for such a profile it went on to discovery and could
  start a gateway.
- The TUI's bootstrap script, which an open TUI runs again whenever its
  gateway is gone. A TUI that was open before a plugin took the profile
  over started a gateway for it again.

`connect_gateway` asks about this process's home before it resolves it and
raises the error it already raises for a gateway it may not attach to
(`inaccessible`, `profile_runs_elsewhere`). The bootstrap script passes the
home to `attach_gateway` as the environment names it; `attach_gateway`
resolves it after its own check.

* fix(profiles): the plugin host takes no launcher and no package from a marked profile's home

With `plugins.isolation: host` every plugin of the profile loads in a child
process. Its command line began with `plugins.host.launcher` from the
profile's own `config.yaml`, and the child started in the profile home with
that folder first on its import path. For a profile a plugin runs elsewhere
the backend there writes both: `hermes -p <name> status` started the launcher
that file named, and a `hermes_cli` package placed in the home ran in the
child instead of Hermes's own.

For a marked profile `host_launcher()` now reads the launcher from the
managed overlay only, which that backend cannot write; with none set there,
the child starts without a launcher. The child is started with `-P`, as the
profile extraction already was, so the folder it starts in is no longer on
its import path. That part applies to every profile: a module that sits in
the profile home can no longer be imported by name from a hosted plugin.
Hermes's own packages still come from `PYTHONPATH`, and a plugin's own
package is loaded by its path as before.

The fix and its tests are the reviewer's patch from the review of
cd58d712aa6, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): a marked profile's password manager binary is not run on this host

`vault.bitwarden.binary_path` and `vault.onepassword.binary_path` name a
password manager's command line program in the profile's own `config.yaml`.
The Settings dialog's `vault.unlock` request hands that program the master
password the person typed, without building an agent. For a profile a plugin
runs elsewhere the backend there writes that file, and nothing on this path
asked the marker: the request ran a marked profile's program and gave it the
password.

`_bw` and `_op`, the one place each manager's program is looked up for
unlock, list and fill, now raise `RuntimeError` with the run-elsewhere
message for a marked profile. `vault.unlock` answers with its usual error
5095 carrying that message. The local vault does not pass either function.

The fix and its test are the reviewer's patch from the review of
cd58d712aa6, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): a marked profile's browser executable is not started on this host

`browser.executable_path` names the Chromium a local browser session starts,
in the profile's own `config.yaml`. `hermes doctor --live` launches it to
check that a browser can start, without building an agent. For a profile a
plugin runs elsewhere the backend there writes that file, and nothing on this
path asked the marker: `hermes -p <name> doctor --live` started the program a
marked profile named.

`launch_chromium`, the one place a local Chromium is started, now returns its
usual `(None, error)` with the run-elsewhere message for a marked profile.
`doctor --live` reports the browser probe as failed with that message.

The fix and its test are the reviewer's patch from the review of
cd58d712aa6, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): the cron registry count sees a marked default beside a standalone gateway

Whether an external cron provider's registry may be shared was decided from
the larger of two counts: the profiles the gateway ticks and the installed
ones. A gateway that runs as a standalone profile ticks only itself, and the
installed list leaves a standalone profile out. With `default` marked and the
gateway running as a standalone `ops`, both counts were 1, so the gateway
took the external provider and reconciled its registry toward `ops`'s jobs
alone, although the marked `default`'s backend may arm jobs there too.

The count is now the number of different profile names in the two lists
together. With no marker every profile in the installed list is one the
gateway ticks, so the count is the number of profiles it ticks, as before.

The fix and its test case are the reviewer's patch from the review of
cd58d712aa6, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): a managed launcher expands its env refs for a marked profile too

For a profile a plugin runs elsewhere the plugin host's launcher is read
from the managed overlay alone. That read took the overlay's file as
parsed, so a ${VAR} in plugins.host.launcher reached the child's command
line unexpanded, while every other profile got the expanded value.
host_launcher() now asks apply_managed_overlay({}), which expands refs
against the process env the way the config loader does.

* fix(profiles): a marked profile linked out of the root does not get its own launcher

`hermes -p ops` names the home `<root>/profiles/ops`. When that is a link
to a directory outside the Hermes root, the plugin manager is keyed by the
directory the link leads to, and the plugin host asked the marker about
that directory, which has no marker folder above it. So the host child of
such a profile still started under the `plugins.host.launcher` its own
`config.yaml` names.

The manager now keeps the home as it was named (`owner_home`), and the
host passes it to `host_launcher()`, which asks the marker about that
home. Other callers of `host_launcher()` are unchanged.

The fix and its test are the reviewer's patch from the review of
b3d3693bb6a, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

* fix(profiles): an empty PYTHONPATH entry does not put the profile home on the host's path

The plugin host's child starts in the profile home, with `-P` so that
folder is not on its import path. `-P` drops only Python's own first
entry: an empty entry in `PYTHONPATH` (`PYTHONPATH=:/x`, or a trailing
separator) still means the current directory, and the child inherited
such entries as they were. A module placed in the profile home then ran
in the host child again, ahead of the standard library.

The inherited entries are now made absolute against the parent's working
directory before the child gets them, so an empty or relative entry means
for the child what it means for the parent. This applies to every
profile, like `-P` itself.

The fix and its test are the reviewer's patch from the review of
b3d3693bb6a, taken as posted.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>

---------

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-23 21:37:40 -05:00
calvinnwq
29cfe1d201 feat(shared-metrics): count group chats in the daily install snapshot
Opt-in shared metrics could not say how many group chats an install has,
how many are in use, or how many involve bots on another computer.

- hermes.install.snapshot gains four size buckets: group chats that exist
  (not disbanded), ones with a message posted in the last 7 days, ones
  created in the last 7 days, and ones with a member served by another
  gateway (a negotiated room link).
- A gateway keeps the group chats it hosts in its profile's state.db, so
  each profile's snapshot counts those. The root profile's also counts a
  standalone backend's in the root shared-state.db that its gateway has not
  taken over: rooms already handed over are fenced and skipped, and a room
  an upgraded install holds in both stores counts once.
- The stores are only read: a missing one reads 0 and is never created, one
  no process has open is read immutable so it gains no -wal/-shm files, and
  the path is URI-encoded. A store that cannot be read leaves the fields out
  rather than reporting a false 0, and never costs the rest of the snapshot.
  Only bucketed counts leave the machine.
- Pre-upgrade and unreadable-store snapshot shapes stay valid (legacy field
  sets), and the v4 schema is extended in place with optional fields.
- install_snapshot_fields moves from the contract (at the 2,000-line cap)
  to the snapshot module, its only caller.
2026-11-23 19:15:41 -05:00
BearHuddleston
5ac48bbadd fix(release): keep the dispatch log from raising on a malformed build commit
The pre-build dispatch log must not fail the build: admission, the next
step, refuses bad inputs with its own error. Since 19f57f1649 a tagless
commit dispatch off main builds its replay through
tagless_dispatch_command, whose require_commit raises on a malformed
BUILD_COMMIT, so the log step failed first with a less useful message.
Channel replays had the same exposure through channel_build's
dispatch_command.

release_command now returns no replay when building it raises
ValueError, for both kinds.

Found by the Sol review loop on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
296e2c0a2f fix(release): log the release.py command for a tagless commit build off main
Since 36d5ae1303, release.py --build-commit dispatches the tagless
desktop-bundled-release.yml build when the repository's default branch
isn't main. The pre-build dispatch log still called every tagless commit
dispatch a legacy one that no release.py command recreates, so the run
started by that fallback printed no replay command.

dispatch_log.release_command now returns commit_build's
tagless_dispatch_command for a tagless commit dispatch whose default
branch isn't main (same all-jobs, no-upgrade, no-upload conditions as a
channel replay), and report prints its release.py and workflow lines.
From main it still says the run is one release.py no longer sends.

Found by the Sol review loop on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
4aa54c5f5e docs(release): correct the commit-build comments the review found stale
- stable-release.yml concurrency: commit builds do publish (their claim
  archive and builds page) and do read shared caches; they write none.
- "publishes nowhere" in lanes.py, stable.py, update_channel.py and
  stable-release.yml's publish-commit: no channel, feed, GitHub release,
  Docker tag or Store, but the claim archive.
- desktop-bundled-release.yml and commit_build.main on the removed
  receipt: the tagless build_commit run still exists and has no claim.
- build_builder_image.sh usage: --no-push still uses an already
  published image and falls back to the base image only on a miss.

Comment-only. Reported by @kshitijk4poor on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
b8821ed297 refactor(release): pass the commit page's fields to render_page by name
_write_tag_page built a mixed-type dict and splatted it into
render_page, which ty reports as three invalid-argument-type errors
(the file has one diagnostic on main and four on the PR head). The
three keyword arguments now pass by name, None for every non-commit
page, which is what render_page's defaults gave before, so the
rendered pages are unchanged.

Reported by @kshitijk4poor on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
98ea47f590 fix(release): build tagless when the default branch isn't main
372116c747 answered Greptile's renamed-branch finding by refusing
--build-commit outright when the repository's default branch isn't the
Stable Release controller branch, so a fork defaulting to develop lost
the commit build that main gave it.

On such a repository --build-commit now dispatches the tagless
desktop-bundled-release.yml build on the default branch, exactly what
main did (commit_build.admit accepts the default branch there). No
claim is created, because Stable Release would refuse its run.
--only/--with/--without need Stable Release, so they are still refused
there before anything is dispatched. The page is the tagless
releases/commit/<sha>/index.html.

Reported by @kshitijk4poor on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
46ff6a3bc6 fix(release): read a declared claim-build contract, not the claim readers' text
commit_supports_claim_tag chose the claim path when a commit's tree had
the three claim-tag readers (is_commit_tag, COMMIT_TAG_RE, the
canary|commit pattern). The PR's own first commit, bd507fa031, has all
three but none of the packaging: its desktop_inputs still pops
HERMES_BUILD_COMMIT for every tag and desktop_prepare reads only
canary_timestamp, so a claim on it failed its native builds with
"stable preparation requires its exact claim tag" instead of taking the
tagless path. Any git show failure also returned "legacy", so a failed
read looked like an old commit.

A claimed tree now declares the contract its packaging honours in
scripts/releases/commit_claim_build.txt, read with git (never by running
the tree). No file means the tagless path; a contract outside
stable.CLAIM_BUILD_VERSIONS, or any failed read, raises and stops the
run in stable verify. Every commit of this PR before this one now builds
as legacy, which works for all of them.

Reported by @kshitijk4poor on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
4d4917fa9c fix(release): fall back to digest-pinned Termux base image on GHCR miss
In no-push commit mode, a GHCR miss previously built and passed a
job-local image tag (hermes-termux-builder-local:<short>) to
termux_build.sh, which unconditionally runs `docker pull` and inspects
`RepoDigests[0]`. Both fail on a local-only tag.

Fall back directly to the checkout's digest-pinned base image
(termux/termux-docker@<digest>) on a GHCR miss in both
scripts/termux/build_builder_image.sh (--no-push /
TERMUX_BUILDER_NO_PUSH=1) and .github/actions/build-termux-deb/action.yml
(for pre-PR checkouts). termux_build.sh pulls that pinned image, records
its RepoDigests[0], and provisions the container build toolchain when
clang/git are absent.

Add end-to-end replay tests through the real termux_build.sh wheelhouse
step for both current and pre-PR checkouts.

Addresses Sol S9 on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
293db9741b fix(release): block GHCR builder-image push and narrow Termux commit permissions
termux-deb-commit previously inherited the workflow-wide permissions
(including packages: write and contents: write), inherited job-level
GH_TOKEN and R2 credentials from termux-deb-release, and handed
GITHUB_TOKEN to the claimed checkout's build_builder_image.sh, letting
unreviewed commit code overwrite the shared GHCR builder image that
trusted release builds consume.

- Give termux-deb-commit explicit read-only permissions (contents: read,
  packages: read) and keep GH_TOKEN and R2 secrets out of its job-level
  env.
- Add --no-push / TERMUX_BUILDER_NO_PUSH=1 support to
  scripts/termux/build_builder_image.sh so registry misses build and
  smoke a job-local image (hermes-termux-builder-local:<short>) without
  docker login or docker push.
- Run termux-deb-commit's builder-image step with no GITHUB_TOKEN and a
  local-only fallback for pre-PR checkouts lacking TERMUX_BUILDER_NO_PUSH.

Addresses Sol S2 on #158714.
2026-11-22 22:17:58 -08:00
BearHuddleston
ced86a7ea8 fix(release): refuse a commit claim that builds no bundle
A commit build's only output is the page of the bundles it built, but
--build-commit --only smoke (or --without both desktop lanes) selected
no bundle lane. The CLI still pushed a claim, dispatched a run in which
no job ran, and printed a builds-page URL that never appears.

require_allowed now refuses a commit lane set with no bundle lane. It
backs both lanes.select (the CLI, before any tag exists) and
stable.stamped_claim (admission), so a hand-written claim is refused
too. Termux alone still counts as a bundle.
2026-11-22 22:17:58 -08:00
BearHuddleston
075bb3ac21 fix(release): refuse a commit build before claiming when its branch can't run
--build-commit dispatches Stable Release on the repository's default
branch, but stable.check_controller admits only the main-branch
controller. In a repository whose default branch is not main, the CLI
pushed the claim tag and the run then failed admission, leaving the
claim behind.

Refuse before the claim exists, naming both branches. Stable and canary
claims already require main; commit claims now share that controller.
2026-11-22 22:17:58 -08:00
BearHuddleston
96a3fcc194 fix(release): accept the tagless Termux version of a legacy commit claim
A claim of a commit from before claims builds Termux through that tree's
tagless --commit path, whose build_deb.sh stamps X.Y.Z+commit<sha12>
(since 063cf4428a, the first tree with a commit mode). The recorder and
the candidate validator both expected X.Y.Z-1, so every legacy claim
that selected Termux failed at staging.

Expect X.Y.Z+commit<sha12> in both. The recorder test builds a real .deb
with dpkg-deb, and the validator fixture now carries that version.
2026-11-22 22:17:58 -08:00
BearHuddleston
9e3247de8a fix(release): recognize commit-claim support in this tree's deb_version.py
commit_supports_claim_tag looked for a quoted "commit" literal in
scripts/termux/deb_version.py, which the file never contains: it reads
claim tags through the canary|commit alternation in _TAG_RE. Every claim
of a current commit therefore came out legacy and built through the
tagless --commit path with plain versions.

Look for the alternation instead, and test the check against the real
HEAD tree rather than invented source strings, so a later rename of any
marker fails here instead of silently turning claims legacy.
2026-11-22 22:17:58 -08:00
ethernet
0c55aa6016 feat(release): wire commit claims into stable-release.yml with read-only native legs
Routes commit. and channel. claims to cache-mode: read native legs (Windows, macOS, and a split termux-deb-commit leg with no APT GPG signing key access), closes main's win32-assembly-v1 prefix restore-keys gap, keeps pre-claim commits buildable via trusted controller checkouts and legacyCommitBuild metadata, and renders every staged commit-claim asset (.msixbundle, .msix, .dmg, .zip, .deb) on the claim page.

Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
2026-11-22 22:17:58 -08:00
ethernet
716937f57f feat(release): bundles+smoke commit policy, claim admission, CLI and 90-day retention
lanes: add the commit policy restricted strictly to bundles + smoke
(COMMIT_ALLOWED = windows, macos-arm64, termux, smoke; default COMMIT =
windows, macos-arm64, smoke; COMMIT_REFUSED excludes ci, docker, nix,
pm-bundle, windows-live, install-e2e, bootstrap-version, termux-checks,
windows-store, linux and upgrade). POLICY_JOBS adds publish-commit for commit
and limits publish-docker to stable/canary.

stable: generalize canary_claim into stamped_claim (validating bundleEnv for
commit claims), require write/maintain/admin actor permission via
commit_actor_permissions, admit commit claims without a GitHub release, emit
bundle-env and refuse mismatched BUNDLE_ENV_JSON in verify.

commit_build / release / dispatch_log / r2 / stable-release-publication:
--build-commit claims an annotated commit.<stamp>-v<version> tag (advancing
past local same-second stamps) and dispatches stable-release.yml; legacy
tagless commit dispatches no longer mint receipts; r2 prune and --prune-canaries
keep commit builds for 90 days; the stable publication reconciler ignores
'Commit release ' runs in both concurrency and reconcile.if.

Salvaged from ca37ec5974, 37ca767d2a, 7e9f76ad80, 0f11098f12 and 4df7a745a0
in #145680, tightening commit policy to bundles + smoke only.

Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
2026-11-22 22:17:58 -08:00
ethernet
825d07e478 feat(release): commit claim packaging, handoff identity and fail-closed publishers
A commit claim versions packages from its tag stamp like a canary
(X.Y.Z+commit.<stamp>, stamped Windows quad and release epoch) while keeping
the Commit<sha7> identity, no feed and source commit-build via HERMES_BUILD_COMMIT.
handoff accepts commit.<stamp>-vX.Y.Z archives without letting the exported
HERMES_BUILD_COMMIT fall back into tagless commit mode.

r2.channel_for_tag, release_artifacts.release_channel and darwin.merge_mac_feeds
fail closed on commit claims so commit builds can never publish to a release
channel or feed; docker stays closed to commit tags as well.

Salvaged from c15b3c7f91, df7ae5e79c, 784aeb43d9, fdcaa79d68, ad1efe0f25 and
f161e6618d in #145680, keeping docker closed to commit claims.

Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
2026-11-22 22:17:58 -08:00
ethernet
4e2648106f feat(release): commit.<stamp>-vX.Y.Z claim tags and their version helpers
A commit build's claim tag has the canary claim shape with the commit kind;
its version is X.Y.Z+commit.<stamp> (Termux X.Y.Z~commit.<stamp>-1; APT repo
staging keeps refusing commit claims). release_version/tag_core/releaseVersion/
releaseTagVersion/deb_version accept it; tag_kind names the kind.

Install stamps and icon generation of a commit build may carry its own claim tag
and still say source commit-build, so every updater keeps refusing it; a commit
tag without HERMES_BUILD_COMMIT is refused by the stamp writers and product
identity rather than falling through to the stable identity and its latest feed.

Salvaged from 98ee7de7c6, f8a42b0cc9, d9ead4e507, f161e6618d and 0f11098f12
in #145680, keeping stage_apt_repo closed to commit claims.

Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
2026-11-22 22:17:58 -08:00
Teknium
8635a6f556 docs(ci): the self-updater allowlist also holds files the grep misreads
The Rollstack and pstack-hermes rows exempt files that fetch nothing or
only fetch a pinned tool through mise, so the comment above
_SELF_UPDATER_ALLOWLIST now says the list covers both kinds.

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-22 00:56:30 -08:00
Teknium
c67d68169f chore(ci): allow pstack-hermes's statechart runner through the catalog self-updater gate
skills/statechart/scripts/run.ts in khaeransori/pstack-hermes at a977cb5 is
the statechart skill's model-check runner. It asks the user's mise to install
TLA+ tla2tools v1.7.4 (sha256-pinned in the mise spec) and a Temurin JDK into
mise's own store, and writes only temporary .cfg/.tla files under a mkdtemp
directory. It never fetches or replaces plugin code. The gate reads the
releases URL plus writeFileSync in one file as a self-updater, which blocks
the pstack-hermes catalog entry (#158523). Keyed by repo, pin, path and
file sha256 like the Rollstack row.
2026-11-22 00:56:30 -08:00
Teknium
0308b0d6ec chore(ci): allow Rollstack's skill-index builder through the catalog self-updater gate
scripts/build-index.mjs in Rollstack/skills at 9aeb656 only writes
.well-known/agent-skills/index.json from the repo's own SKILL.md files.
The raw.githubusercontent.com string it contains is the URL it records
in that index; it fetches nothing and Hermes never runs it. The gate
reads "GitHub URL + file write" in one script as a self-updater, which
blocks the rollstack catalog entry (#157088). The row is keyed by repo,
pin, path and file sha256, so any edit or re-pin is gated again.
2026-11-22 00:56:30 -08:00