v0.22.0 ships Electron 40, whose Squirrel.Mac reads the whole update
ZIP into one NSData. From 1 GiB, CFData's growth asks Electron's
allocator for 2 GiB, which refuses, and the app dies with SIGTRAP
partway through the download (electron/electron#55089, fixed in
Electron 44.7). Measured with the real signed v0.22.0 app on macOS: a
1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one crashes it
at 1,076,887,552 bytes. rc.2-v0.23.2 shipped a 1,447,529,425-byte ZIP
and its macos-packaged-arm64 upgrade job crashed exactly this way.
Recording a macOS build now refuses a ZIP of 1,073,741,824 bytes or
more and prints the margin otherwise, so an oversized build fails in
its own job instead of in the upgrade gate or on users' Macs.
v0.22.0 on macOS cannot update in-app to a bundle whose update ZIP is
1 GiB or more: its Electron 40 Squirrel.Mac reads the whole ZIP into one
buffer and dies past 1 GiB (electron/electron#55089). The rc.2-v0.23.2
ZIP is 1,447,529,425 bytes, and its Chromium alone is 177 MB compressed.
Chromium is already an optional default: `install.sh --skip-browser`
declines it, and the browser tool installs PM's pinned build once per
process when none is found (browser_launcher._maybe_autoinstall_chromium,
under security.allow_lazy_installs). On a sealed payload that install
lands in the writable store (tests/pm/test_store_extensions.py).
The macOS payload now leaves it out, so the first browser use downloads
it (195 MB). Windows and Linux bundles still ship it.
v0.22.0 on macOS cannot update in-app to any bundle whose update ZIP is
1 GiB or more. It ships Electron 40, whose Squirrel.Mac reads the whole
ZIP into one NSData; past 1 GiB CFData asks Electron's allocator for
2 GiB, which refuses, and the app dies with SIGTRAP (electron/electron
#55089, fixed in Electron 44.7). Measured with the real signed v0.22.0
app: a 1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one kills
it. The rc.2-v0.23.2 ZIP is 1,447,529,425 bytes.
Most of that is the payload uv cache shipping a second copy of the
venv: 31,771 of its archive-v0 files (297 MB compressed) are byte for
byte the venv's installed files.
Off Windows, staging now replaces each archive-v0 file the payload venv
holds byte for byte with a relative link to the venv copy. Files the
installer rewrote (RECORD) or placed elsewhere (.data) stay. The uv
seed recreates links that stay inside the cache, as before, and copies
the bytes of a link that leaves it, so the machine cache keeps no link
into a payload an update will replace. MSIX packages hold no links, so
Windows is unchanged.
is_safe_callback_url compared the host text against private prefixes, so
integer/hex IPv4 literals (http://2852039166/) and DNS names resolving to
metadata or RFC1918 passed; urlopen then followed redirects the check never
saw and re-resolved the name for the socket.
Non-loopback callbacks now go through tools.url_safety: is_safe_url for the
pre-flight (resolves and checks every answer) and create_ssrf_safe_client for
the POST (connect-time re-validation, dials the vetted IP). Redirects are not
followed. Loopback stays allowed only in localhost-only mode, proxy-free.
create_ssrf_safe_client joins the published plugin API next to its async twin.
Fixes#126755
Drop the never-instantiated _Recording subclass whose assertion could not
fail, end the slots test by dropping alpha's managers and rebinding to beta
(kills the strong-manager-ref and no-cleanup mutants), and say in the plugin
docs that the shared-instance refusal applies on any multi-profile host.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
The Mattermost and Weixin plugins imported tools.url_safety.ssrf_checked_aiohttp_get,
a core name outside the published plugin API, which raised two new module_to_core
crossings in scripts/boundary_lint.py. Move the helper next to platform_http_client
in gateway.platforms.helpers (already published), keep tools.url_safety's
async_is_safe_url as the per-hop check, and document it under the platform-adapter
public helpers. No baseline change.
Plugins that store or upload text (session sharing, edit capture) need Hermes's
own scrubber at its strongest setting, and today the only way is a private
import of agent.redact, which the catalog flags. Add a thin PluginContext
method: non-reusable sentinels for prefixed keys, masked credential
assignments, plugin-registered patterns included, security.redact_secrets
honoured unless force=True.
The redirect-safe opener (drops credential headers when a redirect leaves
the origin) is what plugins sending API keys should use, and the bundled
model providers already do; validate still warned on it as a private
import. List it in plugin_api.json with a short docs section, regenerate
public-api.md, and drop the three now-public crossings from the
boundary-lint baseline.
get_read_block_error is the path check plugins are told to call, but only
read_file consulted the device/proc table, so a plugin following the docs
could still read /proc/<pid>/environ (process secrets) or hang on /dev/zero.
The path-only table and is_blocked_device_path move into agent/file_safety;
get_read_block_error checks the literal and resolved path; read_file keeps
its symlink-hop walk and imports the table from there.
`pnpm run dist:bundled` stages its payload through scripts/bundles/stage.py,
not the prepared desktop builder. Its automatic route compiled only the TUI
and dashboard, so a payload stamped `bundled` shipped no Webapp and
`hermes webapp` stopped at "This desktop app ships no Webapp renderer".
Install the Desktop workspace in the frontend snapshot, compile the Webapp
there and pass it to stage_native. The native staging child takes its
products as flags and only knew --tui/--web, so it also learns --webapp;
without that, handing it the Webapp exits 2 on an unrecognized argument.
The regression test runs stage.main through the real stage_native argv into
native.main and asserts the planted payload: red on the PR head (no
dist-webapp), red with stage.py alone changed (argparse exit 2).
Reported by @kvnloo on #154325, whose b294b532 changed stage.py the same way.
Co-authored-by: Kevin Rajan <7121943+kvnloo@users.noreply.github.com>
`hermes webapp` and the Desktop's Web Access Start reuse a renderer only
when scripts/build/freshness.mjs certifies it, and a bundle's sealed
payload ships no scripts/. Even with the Webapp planted they took the
build lock in the install root (Permission denied inside WindowsApps; a
lock file written into the signed macOS app) and then tried to build
from sources the payload does not have.
A bundled payload (install stamp payload "bundled") now serves its
planted dist-webapp as it is, like the Nix package's HERMES_WEBAPP_DIST:
no freshness check, no lock, no build, and --force-build says it cannot
be rebuilt. The Termux .deb stamps payload "runtime" and is unchanged.
A catalog entry whose repository was deleted, or whose pinned commit was
force-pushed away, can't be installed any more: `hermes plugins install` clones
the repo and checks out the pin, and both fail. Nothing noticed until a user
hit it.
scripts/ci/catalog_dead_repos.py looks up every entry (GitHub in GraphQL batches
of 50, with REST confirming each miss so a renamed or transferred repo is never
taken for deleted; other hosts via git ls-remote). Any unclear answer, or more
than 25 dead at once, aborts with nothing delisted, because that shape is an
outage, not a week of deletions. The weekly workflow deletes the dead entry
files on bot/catalog-dead-repos and opens one PR for review; nothing
auto-merges. It delists (deletes the file) and never touches removed.yaml,
which is the security blocklist.
First run, on today's catalog: 8 of 2,087 entries are dead (7 deleted repos,
1 force-pushed pin). Their files are deleted in a separate commit.
Catalog reviews ask plugin authors to refuse credential paths with
agent.file_safety.get_read_block_error / raise_if_read_blocked and to read
YAML with hermes_yaml (core ships no PyYAML). `hermes plugins validate`
then warned on exactly those imports as "private core imports", so an
author who followed the review got a warning for doing so.
- plugin_api.json lists the four file_safety checks and
hermes_yaml.safe_load/safe_dump; public-api.md regenerated.
- plugins/index.md gains a short section with the table and an example.
- boundary_lint baseline drops the 7 bundled-plugin crossings that are now
public (no other line changes).
- Test: the guide's example validates clean, while a whole-module
`import agent.file_safety` still warns. Red on main.
A plugin whose main purpose is streaming or downloading copyrighted
material from unlicensed sources could pass review on clean code alone;
no rule covered what a plugin is for. Rule 19 declines those while
keeping general-purpose browsers, downloaders and players welcome.
Mirrored into the catalog-submission guide (rules mirror test).
An inline ::preview frame took its width from the first size report its page sent and kept it, capped at 640px. A page that fills its frame reports whatever width it was given, so a preview opened in a narrow window stayed narrow after the window widened, and a chart drawn after load kept the width it had before drawing.
The frame now spans the transcript column up to 960px and CSS follows the column on resize. The injected script reports height only, which still tracks live within the existing 120 to 1200px band. The 960px cap keeps a square graphic drawn at full width inside that height band instead of scrolling inside the frame. Frame and document are transparent with no border, so a small fixed-size widget laid out from the left edge still reads as a small card; a centered one now sits mid-column.
The desktop platform hint described the old width rule to agents; it now gives the frame's width cap and height band, keeps the advice to lay content out flush left with no centering wrappers, and asks for charts sized from the frame's current width and redrawn on resize. The prompt-surface snapshot carries the same change, and the desktop plugin SDK guide's sentence on how the frame sizes itself now says the same.
Round-3 review of the gateway create path found three defects and one
structural duplication.
- A config backend outage mid-create read as "nothing was created".
ConfigBackendUnavailable is a SystemExit, so it escaped the handler's
`except Exception` and the dispatcher answered 4064, which the client
read as refused-before-create, even when the profile had already been
published. The handler now catches it (and builds the receipt inside
the same try) and answers 5062. The client no longer treats a bare
4064 as "nothing was created"; only 4061 (no name) is.
- Every `hermes profile create` loaded gateway.platforms (~225 modules,
about +105 ms median) even with no gateway URL, because the
safe_proxy_url_for_log import sat above _where's early return. It now
loads only when a URL is set; a test pins that a URL-less create loads
neither gateway.platforms nor pydantic.
- A newer gateway that added a key under `mirrored` turned a successful
create into "may have created": the strict check forbade extra keys
there. `mirrored` is now a mapping of known value types, so new keys
are kept and never printed.
The receipt had two definitions: the CreateReceipt dataclass and the
contract's ProfileCreateReceipt pydantic model, kept in step by a
field-name test and a hand-written check that skills_seeded["copied"] was
a list. There is now one: the stdlib dataclass ProfileCreateReceipt in
hermes_cli.profile_provision, which the contract uses directly as
ProfilesCreateResult.receipt (pydantic validates dataclasses), so the
generated TS/OpenRPC still describe it. from_wire validates it strictly
with a TypeAdapter (pydantic only on the gateway path). The receipt
carries what the CLI prints, skills_synced (a count) and
skills_opted_out, instead of the raw sync-result dict, which removes the
`copied` check; RECEIPT_FIELDS and the parity test are gone.
Also:
- The refusal chunk limits are imported from gateway_client
(ERROR_DATA_TEXT / ERROR_DATA_ITEMS, now named there) instead of
copied, so lowering the client cap can't silently drop every part.
- A typed refusal with no text is still a refusal ("nothing was
created"), not "may have created".
- POST /api/profiles uses CREATE_REFUSALS.
- The wrapper check reuses profiles.profile_matches_home.
- The developer guide states the wrapper rule the code enforces.
The gateway route for `hermes profile create` returned a hand-built dict that
three places listed by key (receipt(), receipt_defaults(), the contract), and
dropped which route made the profile, so the CLI re-read
HERMES_TUI_GATEWAY_URL to decide the alias. Several outcomes were also
reported wrongly.
- CreateReceipt (profile_provision) is the one receipt: CreateReceipt.of()
after a local create, to_wire() on the gateway, from_wire() on the client.
A test keeps its fields equal to the contract's ProfileCreateReceipt, and
every contract field is now required.
- create_through_gateway returns a CreateReceipt and writes the
~/.local/bin wrapper itself after a create on this machine: a discovered
local owner or a loopback HERMES_TUI_GATEWAY_URL (the dashboard's chat
terminals). Before, a loopback URL never got a wrapper. write_alias
returns (path, collision) instead of filling a result object, and a
wrapper failure after a gateway create is a warning, not a traceback.
- profiles.create no longer cuts refusal text at 200 characters for every
client (Desktop showed "...create bad-"): error.message carries the whole
redacted text, and error.data repeats it in short parts gateway_client
keeps. The client redacts refusal text and receipt warnings again before
printing.
- Outcomes the CLI can't confirm say "may have created ...; check hermes
profile list" instead of "could not create" or a traceback: an untyped
handler error, any exception after the request went out, a non-dict
answer, and a receipt with missing or malformed fields.
- HERMES_TUI_GATEWAY_URL must be ws:// or wss:// with a host (what
connect_gateway accepts); IPv6 hosts are bracketed in messages.
- One lock per profile name around the core create, not one for every name:
the core create includes the multiplexer rescan (up to 8 s), so creates of
different names waited on each other and held gateway pool workers.
- A gateway create reports why skill seeding failed: seed_profile_skills
collects its failure lines (problems=), and a quiet create's receipt
carries them as warnings.
- GatewayRPCError.unknown_method replaces four copies of
`code == -32601 or str(exc) == "unknown_method"`.
The CLI was the last create surface that made profiles in its own process.
It now asks the gateway that serves its profile, over the same
profiles.create RPC Desktop uses, and prints the receipt the gateway reads
where it made the profile:
- a ready gateway for the terminal's profile (discovery only; one is never
started for this) takes the create; with none, or a local one that
predates these fields (-32601 / 4000), the CLI creates in-process as
before;
- HERMES_TUI_GATEWAY_URL names a gateway: the profile is made there, and
an unreachable or older gateway is an error, never a local create. The
URL's token is never printed;
- a refused create keeps its type (error.data.type), so the CLI prints the
same "already exists" / "does not exist" errors;
- a socket lost after the request was sent is reported as unknown, with a
pointer to `hermes profile list`, never retried.
profiles.create gains optional clone_config (`--clone` with no source:
copy the caller's profile), sync_imports and report. On /api/ws it already
runs in the connection's profile (dispatch_legacy binds the ticket's), so
`hermes -p work profile create x` against the multiplexer copies work's
keys, model and (with --clone) SOUL.md.
provision_profile now holds a per-name lock around the core create. The
gateway takes every terminal's create in one process, and create_profile
stages in profiles/.<name>.staging-<pid>, so two same-name creates there
shared and removed each other's staging dir; the loser failed with a raw
OSError (Errno 66 / ENOENT) instead of "already exists". The staging path
came from b47fb2eba3 (teknium1, 2026-09-13).
Review folds: a retiring gateway (5035) or an older one naming
unknown_method creates locally; a gateway that made the profile without
a receipt is reported, never re-created here; Ctrl-C after the request
says the create may still finish; the ~/.local/bin wrapper is written by
the CLI (this terminal's PATH and hermes), none for a URL gateway; the
gateway URL is named as scheme://host[:port] only (never its token,
userinfo or a hostless path), and recovery hints point at the gateway's
machine; refusals and 5062 carry the gateway's message, redacted (a parse error
can quote a config line); `--clone-from ""` is refused before any create. One
process lock around the core create (not seeding or the alias).
stop_idle moves from the optional to the required hosted operations, so a backend
without suspension support is refused with HostedSandboxRequired when its sandbox is
created, before any tool runs. The idle reaper always takes the suspend path for a
hosted sandbox key. If stop_idle is missing at reap time the call fails and is
logged, and cleanup() is never called instead, so idleness never destroys a
workspace. The docs and the provider docstring say so.
start_process and attach_process returned the backend's raw stdin/stdout/poll, so a
stream acquired under A could be read or written by anyone holding it under B. They
now return ScopedPipe proxies and a scoped poll. Every pipe operation (read, write,
flush, close, fileno, iteration, attribute access) and poll() checks the bound scope
against the sandbox's identity first, and refuses with CrossAgentHandleRefused under
another agent or with no scope bound. The foreign_handle_refused conformance check
drives the real stub process stream under B. A unit test covers start and attach.
browser_exec ran the model's Python in a host subprocess (a cloud browser
moves Chromium, not the interpreter), and it was not the only tool the
sandbox routing never reached. Tools with no route through the agent's
environment yet now fail closed in a hosted scope, before any setup, file or
process, with an error naming why (tools/hosted_tool_policy.py):
- by toolset, at ToolRegistry.dispatch: the browser tools, computer use and
desktop UI, desktop projects, image and video generation, text to speech,
skills, cron jobs, delegation, kanban, catalog and connection management,
onboarding, and every MCP server's tools (they come from the profile's
config and run for it);
- directly, on the paths the registry never sees: the browser_exec entry,
checkpoint take and restore, inline skill shell, @-references, the
workspace git probe in the system prompt, cron scripts, MCP stdio spawns,
media delivery by host path, connector file inputs, document extraction in
read_file, voice transcription and delegate_task's inline dispatch.
Routing each of these through the sandbox is follow-up work; refusing them
keeps the hosted guarantee that nothing tenant-supplied runs or is read here.
Local installs are unchanged (every check is a no-op with no hosted scope),
which a permanent test now pins: env maps and built-in backend constructor
arguments are byte-identical, unscoped and under the local scope, to the
same calls with the hosted machinery switched off.
The developer guide describes the hosted operation interface, what runs in
the sandbox, and what is refused.
Hosted Hermes serves many tenants' agents from one process, and each agent's
commands, code, background processes and files must live in that agent's own
remote sandbox. Until now the environment a tool reached was keyed by task id,
session key or profile path, so nothing tied it to the agent the bound scope
names, and a hosted scope could fall back to running on this host.
The sandbox an operation reaches is now derived from the bound scope's
(tenant, agent) alone (tools/environments/sandbox_scope.py). In a hosted scope:
- every environment key is the agent's sandbox key, whatever task id a call
carries; the terminal.backend provider must declare serves_hosted_scopes
(built-ins are refused) and receives scope= and sandbox= at creation, with
task_id set to the identity's key;
- core wraps the returned environment in ScopedEnvironment, which refuses any
call made under another agent's scope (or none) and passes the bound scope
to execute/fetch_* when the backend declares it; a cached environment that is
not the agent's own is refused at lookup;
- terminal, execute_code (always the remote kernel), background processes and
read/write/patch/search go through that environment; file-tool bookkeeping
never stats or opens the requested path on the host;
- background processes carry the sandbox key they were started under, and
another agent's process is indistinguishable from a missing one (get, list,
prefix lookup, kill sweeps).
Environments gain start_process/attach_process/stop_process with a
bidirectional byte stream (ProcessStream), implemented for the local backend
and exec-prefix backends; a ProcessRef naming another sandbox is refused.
Credentials are typed as broker references only (CredentialRef); no broker
exists yet, so none are passed.
Local installs are unchanged: with no hosted scope bound every branch keeps
today's keying and backends. A conformance module with a recording stub
backend runs the isolation checks through the real tool registry, so a hosted
backend plugin can run the same checks against its own provider.
process_registry.py's handoff handler moves to process_registry_handoff.py to
keep the facade under its size cap.
Who administers an agent is decided where the signed claim is made (in Hermes Cloud: a personal
agent's owner, and the org's owners and admins for an agent owned by the org or a group), so the
scope carries only the result. A personal agent its owner shared runs a teammate's turn as that
teammate, unable to administer it.
A Scope now says who owns the agent and what the activity may do on it, and a TurnScope says
which claim the turn runs under:
- Scope gains keyword-only owner (Principal for a personal agent, Group for a shared one) and
role ("owner" | "manager" | "member"). A personal agent is used only by its owner, so its only
role is "owner"; a group agent's roles are "manager" and "member". can_administer is true for
owners and managers. A hosted scope must name both; a local scope defaults to the local person
as owner with role "owner", so every local caller is unchanged.
- TurnScope gains fence: Fence(epoch, generation), the owner epoch and runtime generation the
admission claim stamped. bind_turn(session, turn, fence) requires it; claim_fence(row) reads it
off a claimed session_admissions row. The authority's turn path, the owner-side cron run and
the managed worker bind the real fence.
- Inside a hosted scope a bind must keep tenant, agent, actor, owner and role; changing any of
them raises ScopeSwitchRefused.
- bind_profile_scope / scope_for_profile drop the unused turn= tuple: a turn is marked only with
bind_turn, which has the fence.
Tests that executed a never-claimed admission row now claim it first, as the drain does
(tests/gateway/session_claims.py); hand-built cron rows carry the claim's columns.
Round-2 review findings:
- A raw terminal mapping could still replace the bound profile's policy with
another profile's. Raw policies now go through bind_terminal_policy(policy,
profile_home=...): inside a bound scope only the bound agent's own policy is
accepted. The four callers pass the session's owning profile.
- A partial bind (home_override=False) inherited the home override from an
earlier change, so resetting that change took it away. A bind now copies the
pieces it keeps, so it is whole on its own.
- bind_state switched directly between hosted agents and tenants. Inside a
hosted scope only a bind of the same tenant and agent is allowed.
- Setters whose tokens are discarded grew the state chain without bound. Changes
that can no longer be reset fold together on the next push.
- A cross-profile install_profile_terminal_scope dropped its env_overlay.
- HX016 flagged a bare 'from . import set_secret_scope', whose module it cannot
know.
- The TUI heap-trim ordering test observes the whole-profile release.
Review found three ways around the guards in the first commit: set_terminal_scope
was unguarded (four production callers), set_secret_scope(None) cleared secrets
alone so get_secret fell back to the launch profile, and a stale or out-of-order
reset token moved one piece back while the others stayed. Guards around three
separate context variables leave every unguarded path able to split them.
The four pieces are now one immutable ScopeState in one context variable. Every
setter is a change to that value; a reset removes its own change and replays the
later ones, dropping those made inside a scope the result no longer has, so any
reset sequence lands on a state whole binds produce. Leaving a hosted agent by
any reset other than the bind that entered it refuses.
- set_terminal_scope narrows a bound local scope's own policy; clearing it, or
setting it in a hosted scope, refuses. set_secret_scope(None) inside a scope
refuses.
- bind_profile_scope and bind_state refuse a local bind inside a hosted scope.
- The TUI turn holds one token instead of four; housekeeping still runs under
the session's whole profile scope and the release resets it at once.
- HX016 sees relative imports and no longer flags a local object named like a
setter's module.
- The historical updater reads the override through get_hermes_home_override
when hermes_constants no longer exposes the raw context variable.
Profile state lived in three independent globals (home override, secret
scope, terminal policy) that every entry point set separately, so they could
describe different profiles. 85 call sites set them by hand.
hermes_scope.Scope(tenant, agent, actor) is now the single value, in one
contextvar; actor is Principal(id) or System(reason), and TurnScope adds
session and turn. agent/runtime_scope.py is the one module that turns a scope
into profile state: bind_profile_scope binds and restores all of it together.
The process's own home keeps its launch semantics; any other home is hydrated
from that profile's sources and stamped as routed.
The legacy setters keep their signatures. Inside a bound scope, a call naming
another profile moves the whole scope (local) or raises ScopeSwitchRefused
(hosted). Gateway turns, cron, the TUI, model switch, kanban spawn and the
managed worker bind once at entry. HX016 blocks new direct setter calls;
existing ones migrate when their function is next edited.
A picker card (/model, /reasoning, /fast, the usage-limit switch offer)
and the /update Yes/No prompt only checked the chat allowlist on a tap,
and a pending /update prompt took the next message ANY admitted member
sent in the session as its answer. In a shared group with
group_allow_admin_from set, a member refused /reasoning or /model could
tap the admin's open card and apply it, and anyone's chat text answered
the admin's "Restore local changes now?".
The gateway now records the opener (sender id, name, chat scope) when it
sends the card (prompt_authority on the selection callback) and in the
/update pending marker. Every renderer refuses another member's tap with
the existing localized "Only <name> can answer this approval." note and
leaves the card open: Telegram mp:/cp:/update_prompt:, Discord
ModelPickerView/ChoicePickerView/UpdatePromptView (one _gate), Slack
model picker (ephemeral), Matrix picker reactions, Feishu choice picker
and update card (toast). A non-opener's typed text during a pending
/update prompt falls through as an ordinary message. The check is
gateway.approval_actor.may_answer, the same rule exec approvals use:
the opener and the chat scope's admins always pass; a sender-less card
(shared observed route) keeps the old anyone-admitted behaviour.
QQBot's update button already accepts only the session's own user.
picker_refusal / update_prompt_refusal join approval_refusal in the
published plugin API so platform plugins can apply the same check.
With `allow_admin_from` set and the default `approvals.approvers: ["*"]`, a non-admin was
refused `/approve` but could still answer an admin's blocked command by typing a bare
`always` (which also writes the profile-wide allowlist), tapping Allow on any adapter, or
answering a `/reset`-style slash confirm.
`gateway.approval_actor.may_answer` now takes the answer's command (`approve` / `deny`, or
the confirmed command) and the chat's full slash policy, so one decision covers every path
main already routes through it: `/approve` and bare words, typed confirm replies, relay,
and the Telegram/Discord/Slack/Matrix/Feishu/Teams/WhatsApp Cloud buttons; QQ Bot's settle
now passes the clicker too. Precedence: a narrowed `approvers` decides on its own
(requester, listed ids, admins); under `["*"]` the slash policy decides (admins plus
`user_allowed_commands`). No admin list, admins and clarify answers behave as on main.
Fixes#120506
Co-authored-by: Froraut <79215537+Froraut@users.noreply.github.com>
Co-authored-by: John Paul Soliva <soliva.johnpaul@icloud.com>
Use the built-in /model picker's non-blocking catalog path, so no prefetch
thread pool runs outside the conversation's profile scope, and pass the
merged custom-provider view so a current endpoint defined under providers:
is not listed a second time as a synthetic custom row.
Both changes and their tests are patches from @BearHuddleston's review.
Keep raw endpoint matching and config inputs inside core; return detached presentation rows. Share profile-scoped resolution with the display accessor and persisted-pick fallback. Custom endpoint live probes are disabled to avoid config writes.
The developer guide said `hermes gateway ensure` never rewrites service definitions. Since this PR it re-renders the Windows launcher scripts the Scheduled Task and the Startup entry run, when they are the installer's own and their interpreter is gone, and leaves the task and the Startup entry unchanged. The paragraph now names that exception.
Reported by @jquesnelle on #152232.
- `BaseEnvironment.cleanup()` documents the contract teardown relies on:
raise only while the sandbox may still be live, since a raise skips
settling its background processes.
- The plugin guide matches it: settlement also runs when cleanup reports
the sandbox already gone, and `cleanup_stops_processes = True` means the
processes are gone for that env object (ended or unreachable).
- The reaper tests share one env-cache fixture (the two hand-copied blocks
skipped `_calls_in_flight`), the SSH-like double initialises its cleanup
count, and the settlement race patches `_finish_exited` via monkeypatch.
Teardown settles a closed env's background processes only when cleanup()
returned, so a cleanup that raises while the sandbox is still up leaves
them polling. Two backends could raise after the sandbox was already gone:
- Vercel: snapshot() stops the sandbox, then saving the snapshot id
(disk full) raised out of cleanup(), skipping the stop/close and leaving
the processes unsettled; the next poll tried to recreate a sandbox.
The save is now caught and logged, like a failed snapshot.
- Modal: terminate succeeded, then stopping the async worker could raise
on a closed loop before the sandbox handle was cleared. The handle is
dropped first and a worker-stop failure is logged.
Also: eviction logs the key it actually evicted (the image switch passed
no task id), the settlement tests no longer swap the registry lock, and
the terminal-environment plugin guide documents `cleanup_stops_processes`
for plugin backends whose jobs survive cleanup().
Codex/xAI encrypted reasoning and Claude signed thinking from earlier turns are
resent on every request and billed as input at the reasoning count the provider
reported for that turn (live A/B: gpt-5.6-sol 2,765 -> +2,767, grok-4.7 73 -> +76,
claude-opus-5.5 3,959 -> +3,959). Hermes priced the ciphertext at 0 (and Claude
at its ~1/4-size summary), so long reasoning-heavy sessions looked small:
compression found nothing to cut while the real bill sat over the window.
Each assistant row now records its response's reported reasoning count in
display_metadata, and the preflight trigger, tail-budget walk and native
Anthropic projection charge it. Compaction checkpoints still cost 0. Anthropic's
output_tokens_details.thinking_tokens is now read (it was always 0).
Fixes#125920
Drop the _running_agents_ts, _busy_ack_ts, _queued_events and
_pending_approvals legacy dict views from GatewayRunner. The stall
watchdog, shutdown flush/cleanup, /agents and the stale /approve-/deny
path now read SessionState directly (peek, never creating a row), and
tests set SessionState fields instead of the views.
browser-vault-plugin.md tells plugin authors to subclass LoginBackend, return VaultItemMeta and
subclass BrowserPageBackend, and ctx.register_login_backend / register_browser_page_backend accept
only instances of those classes, yet hermes plugins validate warned on all three imports. List them
name-only in plugin_api.json, regenerate public-api.md and drop their docs import seam entries.
LocalEnvironment stays a seam: it is the host implementation class, not a stable base.