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.
#152125 bound shared-chat exec approvals to the requester (or
approvals.approvers / the platform admins), but the other prompts a chat
member can answer for someone else stayed open: another member could press
"Always" on a relay or native /reload-mcp confirmation and run its handler,
or answer the agent's clarify question (a choice button, "Other", or a typed
reply) for the person who asked.
Both prompts now record the same authority an exec approval records when
raised (tools.approval_context.prompt_authority: the turn's actor, else the
command's sender, plus approvals.approvers and the chat type), and every
chat answer path checks it through gateway.approval_actor.may_answer:
- relay prompt_response (gateway/relay/prompt_resolvers.prompt_refusal),
with the bot-owning profile's admins as for exec approvals;
- Telegram, Discord, Slack, WhatsApp Cloud and Feishu button callbacks
(slash_confirm_refusal / clarify_refusal, published on the plugin API
beside approval_refusal);
- the runner's typed-reply intercepts (/always, "2", free text after
"Other"); another member's text is routed as their own message.
A refused tap gets the existing "Only <name> can answer this approval."
and the prompt stays pending. A turn merged from two senders records no
requester, so only approvers and admins can answer, as for approvals.
The default approvers ["*"] keeps today's behaviour.
Supersedes the slash_confirm/clarify half of #72008, whose session-owner
mechanism no longer applies on main (main records the requester itself).
Co-authored-by: necoweb3 <65560494+necoweb3@users.noreply.github.com>
Greptile P2 (thread 4518419778): `_inject_session_context_env` read the session
ContextVars directly, skipping the mixed-turn check in `get_session_env`, so a
terminal / execute_code child started after another member folded into the turn
still got the opener in HERMES_SESSION_ACTOR_ID/_NAME. Both readers now go
through one `_bound_session_value`, so the child env carries an empty actor,
like the approval binding; `_UNSET` stripping is unchanged.
Local entry points for lanes whose workflows stay as they are: catalog-tests.yml is
grepped by tests/ci/test_classify_changes.py, and the others run before or without
setup-pm, so their steps cannot call just. Documents every new recipe.
Nine workflow steps still ran the exact command of an existing recipe:
the tests-js install in the install-e2e workflows (5), the Electron
runtime preparation and the full JS install in js-tests and the Windows
desktop attach E2E (2 each). They now call just js-install-tests,
just electron-runtime and just js-install.
A new desktop-build recipe replaces the `pnpm run build` steps of the
desktop E2E workflows. The contributing guides and the PR template name
just test, just test-all and just check.
`set windows-shell` is dropped: the manual marks it deprecated, and its
value was identical to `set shell`, which applies on Windows when no
Windows setting exists. Checked on a Windows host with just 1.59.0: both
forms run the same bash.
New recipes, each one line over the script CI already ran:
- `just docs-generate`: extract-skills.py, then generate-skill-docs.py.
- `just docs-check-generated`: the "committed skill docs match the
generator" block, moved verbatim into scripts/ci/check_generated_skill_docs.sh
(same `git add -N`, same diff paths, same ::error:: line and exit 1).
- `just docs-check-links`, `just docs-lint-diagrams`.
- `just docs-check`: generate, then the three checks, in CI's order.
docs-site-checks.yml calls docs-install, docs-generate, the three checks
and docs-build. deploy-site.yml calls docs-generate and docs-install; its
generate-skill-docs.py step moves up beside extract-skills.py because it
reads neither the plugin stars nor the plugin catalog the steps between
them write. Its full bilingual `npm run build`, staging and Pages deploy
steps stay inline. Python recipes run through scripts/hermes-python, which
uses the interpreter setup-pm exports as HERMES_PYTHON, as python3 did.
- `just test -v` passed the recipe's one-argument check and then
discovered all of tests/. The runner takes --require-paths, which refuses
a run naming no path or file list, and `just test` passes it.
- `just test-js` ran the TUI tests before @hermes/ink was built. It builds it
first, as the TUI's own `check` script does.
- `just lock` went through run-in-hermes-env, which syncs first; after a
pyproject.toml edit the sync refuses the stale uv.lock before pm lock runs.
scripts/relock.sh runs pm lock with the bootstrap Python, then syncs.
- `just setup` on Windows called pwsh, which a stock Windows does not have.
It uses powershell.exe, as activate.ps1's own caller does.
The justfile held per-workspace eslint recipes that duplicated lefthook and
ran whatever ruff was on PATH. It is now one menu of developer commands:
setup, check, fix, test, the JS workspace checks, the desktop and TUI dev
servers, the website build and the PM re-lock. Each recipe calls an existing
script or tool. Python recipes go through scripts/run-in-hermes-env, so they
work in a shell that never ran `source ./activate`.
`just test` requires at least one path, because scripts/run_tests.sh with no
arguments starts the full suite; `just test-all` is that explicit form.
`python -m scripts.code_health.ruff_runner ARGS` runs the pyproject-pinned ruff
that scripts/check resolves. `just fix` and the pre-commit `just ruff` recipe
use it, so the hook no longer depends on the ruff version on PATH.
lefthook.yml keeps its jobs, globs and roots; each job now runs `just ruff` or
`just eslint`. A shell without `just` on PATH fails the hook with "command not
found" rather than skipping the lint.
CONTRIBUTING.md, the developer guide, the package-management reference and the
desktop and TUI READMEs name the recipes beside the commands they run.
Carries #144799 rebased onto #151023's request-bound approval cards (one
squashed commit, because #151023 rewrote the same resolver, card and
adapter paths that #144799's eight commits patched one by one).
With `approvals.approvers: []`, an approval raised by one person's message
can only be answered by that person, a listed approver or a platform admin;
anyone else who taps Allow/Deny, reacts or sends /approve gets a private
"Only <name> can answer this approval." and the command stays pending. The
default stays `["*"]` (any admitted member answers), unchanged from main.
How it sits on #151023:
- tools/approval.py::resolve_gateway_approval_card takes #144799's
signature (actor_id, admin_ids, extra) with #151023's body: a tap with no
request id resolves nothing, and a Deny-only card can only deny.
- _ApprovalEntry carries both `authority` (#144799) and `card_deny_only`
(#151023).
- Discord, Matrix and Telegram card handlers check the requester first,
then settle through the request-bound resolver; the Telegram refusal
toast goes through #151004's expired-query-safe answer_callback.
- #144799's tests that seeded id-less cards and expected the oldest
request to settle now seed the real request id.
- Relayed approval answers check the bot-owning profile's admins;
identical approvals coalesce only under the same answerers.
Fixes#80281
Review finding (nit): the public-helper row for resolve_gateway_approval_card
did not say an id-less call resolves nothing or that every request starts
Deny-only until the base send_exec_approval lifts the mark.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
(cherry picked from commit 8be788e276f85c32842faf82992fac1f1b778b7d)
Finding: "Relay _send_result drops partial-delivery info; no MAX_SPLIT_MESSAGES via relay"
(P3, review #6723383713).
The connector splits a long send, and the relay `send` result carries only success /
message_id / error: no field for a dropped or capped chunk (Discord's message-count cap
included). So a relayed full-command send counts as proof only when the command fits one
max_message_length message; a longer one leaves the approval card Deny-only. The wire
format is unchanged; the contract doc says why.
(cherry picked from commit 48b524ea5020c59e0b29091ccde4d4de4a33aba9)
Review finding: "Telegram platform hint recommends clarify even when clarify
is unavailable (cron / clarify-disabled)". The clarify sentence was part of
PLATFORM_HINT, so cron jobs delivering to Telegram (cron always disables the
clarify toolset) and profiles with clarify disabled were told to call a tool
they do not have.
PlatformEntry gains platform_hint_tool_notes ({tool: sentence}); the prompt
builder appends a note only when that tool is in the session's
valid_tool_names, which is fixed when the system prompt is built, so the
cached prefix stays stable for the session. Telegram moves its clarify
sentence there. The stock Telegram prompt-surface render is byte-identical
(that surface has clarify).
(cherry picked from commit bc29be1ee75cc4c8ca8a156166a5cd5f7e2b2168)
Review follow-ups on the observe-mode actor fix:
- HERMES_SESSION_USER_ID stays the session ROUTE (kanban notify, cron, send_message
rebuild delivery targets from it, and in a shared chat it is empty); the trusted
sender of the turn is HERMES_SESSION_ACTOR_ID / _NAME (defaults to the route user).
- Text and photo batch keys of a sender-less shared source carry the sender, so two
members addressing the bot in one batch window are two turns with their own actor.
- build_session_context gets the event positionally (existing stubs take *args).
- e2e marker: pytest.mark.platforms("posix").
Review finding "adding-platform-adapters.md stale after the move": the guide
still said built-in platforms like Telegram ship REST helpers in
tools/send_message_tool.py. Telegram's out-of-process sender is now
plugins/platforms/telegram/standalone.py::standalone_send, reached through the
same standalone_sender_fn hook the guide documents.
Greptile thread "Existing Telegram callbacks fail" / review finding "notify
forwarded unconditionally to telegram standalone_sender_fn".
_send_to_platform handed every Telegram standalone_sender_fn notify=..., so a
user plugin re-registering telegram with the documented signature (no notify)
failed every send with "unexpected keyword argument 'notify'".
send_message_senders._optional_sender_kwargs forwards an optional keyword only
when the sender declares it by name or takes **kwargs (inspect.signature, cached
per callable; an uninspectable callable gets it, as documented). The developer
guide and PlatformEntry comment document notify as optional.