1137 Commits

Author SHA1 Message Date
FroRaut
cb837e10a5 fix(dashboard): stop trusting fixed dev-server ports for CORS and WebSockets
_TRUSTED_LOCAL_ORIGIN_PORTS (9119, 5173, 5174, 4174) was trusted on every
backend, including packaged Desktop backends on an ephemeral port. A Vite app
on 5173, or on 5174 when 5173 is taken, could still read the session token
from / and open /api/ws. _is_trusted_local_origin() now accepts only the bound
port and the desktop dev renderer this backend was spawned for
(HERMES_DESKTOP_DEV_SERVER). `hermes dashboard` keeps working on 9119 because
that is its bound port.

The dashboard's Vite dev server was the only client that relied on a fixed
port: the browser's Origin on proxied /api upgrades is Vite's. The /api proxy
now presents upgrades from Vite's own page (Origin host equals Host) with the
backend's origin, and passes every other Origin through for the backend to
refuse, so it does not launder foreign pages the way Vite's rewriteWsOrigin
would. Vite's default CORS grants every localhost port and would hand another
local page the token hermesDevToken() injects into index.html, so it is off.

(cherry picked from commit 66de028a3ce39ec49a32205855dc269d30bf3942)
2026-11-02 13:56:48 -05:00
kshitijk4poor
0aab6dcf8b docs(skills): correct the projects reference against the live CLI
Running the documented commands against a scratch HERMES_HOME showed several
claims in the new reference were wrong:

- `hermes project bind-board` does not link a board's tasks to the project. It
  records the board on the project and, when the board exists and the project has a
  primary folder, sets the board's default workdir (from the CLI only a bare
  `--workspace worktree` task uses it). The board's project_id stays null, so tasks
  get no project link or deterministic branch; only the kanban dashboard's Project
  selector or `hermes kanban create --project` links tasks. Unbinding clears only
  the project's record.
- The CLI resolves `<project>` by an exact id or a slug in any case, not by display
  name; name matching is only in the desktop_project tool.
- `set-primary` normalizes paths, so the "spell it the way show prints it" tip was
  wrong.
- A desktop_project move leaves the active-project pointer alone only when the
  project has a folder, and the desktop sidebar following the viewed chat can still
  select the new project.

Also: the worktree + branch default applies to linked non-dir tasks of a project
with a primary folder; an unknown `--project` creates an unlinked task without an
error; complete the exit-code list; note desktop delete (folders and chats kept),
the sidebar's automatic groups, and the Windows HERMES_HOME default; drop internal
table/function names and the raw sqlite queries; replace troubleshooting advice
that made two projects own one folder; point background-systems.md at the
reference; shorten the routing row; and regenerate the bundled-skill docs page.

website/docs/reference/cli-commands.md made the same bind-board claim; its summary
rows and `hermes project` section now describe what the CLI does, and `--project`
is listed among the `kanban create` flags.
2026-11-02 16:20:57 +05:30
Ben Barclay
67d3d5076c fix(pm): a corrupt cached package no longer blocks every install
A machine stop during an install can leave an unpacked wheel in PM's uv
cache whose files are NUL bytes: uv renames its unpack directory into
archive-v0 without flushing the data. uv reuses that entry on every sync, so
every later plugin enable, repair or install failed with "The wheel is
invalid", and neither a retry nor the suggested `hermes pm doctor` helped.

When uv's install step fails on a cached artifact (invalid wheel, invalid
RECORD, or a cache pointer to a missing archive), PM now removes the named
package(s) plus any other entry that fails the same validation through
`uv cache clean`, deletes leftover corrupt archives, and retries. A retry
only follows a failure naming a package not purged yet (at most three), so a
source that serves a broken wheel fails once more with a message naming the
package and the cache directory. Other failures are untouched.

`hermes pm doctor` now reports corrupt uv cache entries, and
`hermes pm doctor --repair` removes them.
2026-11-01 20:07:30 -08:00
Teknium
06433066f4 fix: bare hermes migrate passes no setup-only flags; an import that ran with errors gets its own warning 2026-11-01 19:53:24 -08:00
Teknium
43cc73f12d fix: hermes migrate openclaw imports secrets only with --migrate-secrets
First-run setup keeps passing --migrate-secrets (what core's old OpenClaw step did); the named
command forwarded setup's choice too, so API keys and bot tokens came over without being asked.
2026-11-01 19:53:24 -08:00
Teknium
afc5c55d47 feat: setup and hermes migrate offer the OpenBot import too 2026-11-01 19:53:24 -08:00
Teknium
3053b9dd92 feat: hermes migrate and setup move Grok Bot users over; hermes migrate <agent> installs the importer
Grok Bot joins setup's "Coming from another agent?" step (detected from its desktop app
or a downloaded grok-bot-export file). Bare `hermes migrate` offers the same import on an
existing install; `hermes migrate <agent>` imports from one agent, installing the
agent-importers plugin from the catalog when missing. A plugin too old for the picked
importer is updated once and the import retried, for setup and migrate alike.
2026-11-01 19:53:24 -08:00
Teknium
005fbe8058 fix(update): stash only what the update collides with, and ask before stashing
`hermes update` ran `git stash push --include-untracked` on every dirty tree,
so any untracked folder in the checkout was hashed into git objects and
deleted from disk, then written back on restore. A 55 GB leftover worktree
copy (2.8M files) made the "stashing before update" step take minutes, and
declining the restore left the whole folder parked in git stash.

- Untracked entries are stashed only when a ref the update can land on
  (target, origin/<branch>, local <branch>) has a file at that path, or a
  parent/child of it; the rest stay on disk via exclude pathspecs, because a
  pull or checkout never refuses on them. Comparison is casefolded so a
  case-insensitive filesystem still counts Config.py vs config.py. Forks and
  unreadable target trees keep the old stash-everything behaviour (the
  upstream sync lands on a ref fetched later).
- An interactive terminal now asks "Keep these changes after updating?"
  BEFORE anything is stashed. Yes stashes and restores without a second
  prompt; no deletes exactly what would have been stashed, so no stash
  entry is left behind. A run with nothing to pull does not ask. Gateway
  /update, --yes and non-interactive (Desktop) paths are unchanged apart
  from the scoped stash.
2026-11-01 10:08:01 -08:00
Teknium
b484be5610 fix(agent): configure stream_max_lifetime through config.yaml only
Drops the HERMES_STREAM_MAX_LIFETIME override (non-secret behaviour settings
belong in config.yaml) and its docs row; tests now set agent.stream_max_lifetime
in a temp HERMES_HOME config.yaml and read it through the real loader.
2026-10-31 22:44:47 -07:00
Teknium
eee418e089 fix(streaming): cap kills name agent.stream_max_lifetime and skip the stale breaker
A stream cut by agent.stream_max_lifetime was counted as a stale kill, so two
capped long replies latched HERMES_STREAM_STALE_GIVEUP and the next healthy
request was refused with nothing sent. The cut also surfaced as a transport
error ("stream attempt N was superseded", "the endpoint looks unreachable").

- cap kills are marked accounted in the stale breaker but never counted;
- the killed attempt's error becomes StreamLifetimeExceeded (a TimeoutError,
  so still retried) naming the setting, and the exhausted notice uses it;
- docs say which transports the cap covers (Chat Completions and Anthropic
  Messages; not Codex/Responses or Bedrock) and that it skips the breaker.
2026-10-31 22:44:47 -07:00
Teknium
ac8037c05b feat(streaming): opt-in cap on a streaming response's total lifetime
The stale-stream detector bounds the gap BETWEEN chunks and resets on every
chunk, so a stream that keeps sending data but never finishes (a gateway
trickling chunks, a runaway generation) is never cut and the turn sits there.

New opt-in agent.stream_max_lifetime (env HERMES_STREAM_MAX_LIFETIME), default
0 = off, so long reasoning streams keep today's behaviour unless the user sets
it. When set, the cap is charged from the start of the current stream attempt,
never resets on chunk arrival, restarts for each retry attempt, and is floored
at the effective stale timeout. Tripping it kills the attempt like a stale
kill: cancel the attempt, abort the request-local client, shut down its socket,
count it once in the cross-turn stale breaker; the retry loop or the
partial-delivery continuation takes over.

Logic lives in agent/stream_max_lifetime.py; the stream monitor calls it from
its poll loop. The Bedrock poll loop is not covered (chat_completion_helpers.py
may not grow).

Port of an upstream idea.
2026-10-31 22:44:47 -07:00
Teknium
66c48cb158 feat(cli): /model reset in the classic CLI, help hint and queued-pick display (salvage #74899)
- Classic CLI (and the Desktop slash worker, which runs this handler): `/model reset` switches
  back, session-scoped (never --global, even under model.persist_switch_by_default), to
  config.yaml's model read fresh at the command, through the normal typed path (guards, confirm,
  session-row persist), and drops an armed --once restore. Already on the default: says so; no
  model.default: says there is nothing to reset to.
- The /model args_hint lists `reset`.
- TUI: a `/model reset` queued mid-turn shows the default it will adopt, not the word "reset",
  and skips the pick-time selection guard (adopting the configured default is not a new pick).
- cli.model.reset_none / reset_no_default in all 17 locales; slash-command and messaging docs.
- Tests: parser invariants, gateway reset of a store-only override after a restart, TUI reset
  that adopts config without re-pinning.
2026-10-31 22:08:49 -07:00
Teknium
08a7c25eec docs(skills): regenerate skill pages and the prompt-surface snapshot
Output of website/scripts/generate-skill-docs.py and
scripts/ci/prompt_surface.py render after the skill moves. The default
skills index loses 15 lines (14 skills leave the built-in set, three
become microsoft-office).
2026-10-28 21:24:43 -07:00
Teknium
183b5ddd5f chore(skills): move niche built-in skills to optional
These stop loading by default and become one
`hermes skills install official/<category>/<name>` away:
notion, airtable, box (hosted connectors cover them for Portal users),
opencode, design-md, gif-search, songsee, llm-wiki,
hermes-agent-skill-authoring, inspecting-hermes-desktop-dom,
node-inspect-debugger and python-debugpy.

Existing installs keep their copies: the skills sync already re-labels
a byte-identical copy of a moved built-in as an official optional
install. Onboarding first tasks drop the two skills that are no longer
bundled (llm-wiki, design-md), claude-design and popular-web-designs
point at design-md as an optional install, and doc examples use
skills that still ship.
2026-10-28 21:24:43 -07:00
Victor Kyriazakos
e240d617e8 feat(sessions): refresh-prompts lets continuing sessions adopt updated prompt sources
A continuing session replays its stored system prompt verbatim on every turn
so the provider prefix cache stays warm. The gateway restores that prompt from
the session row on each fresh agent, and warm cached agents keep it in memory,
so SOUL.md edits, new or edited skills and project-context changes never
reach a long-running conversation until /new, which also drops the history.
Operators who push profile updates and restart the gateway had no way to make
existing conversations pick them up.

`hermes sessions refresh-prompts [--session ID] [--json]` records a refresh
epoch in the profile's state.db (state_meta, one counter orders profile-wide
and per-session requests). At the start of a continuing session's next turn,
_restore_or_build_system_prompt compares that epoch with the one stamped in
the session's model_config when its prompt was built. When the stored prompt
is older it follows the Bot Chat capability-refresh precedent in the same
function: tools[] pin restored first, skills prompt cache and snapshot
cleared, prompt rebuilt through _build_system_prompt (memory reloaded and
plugin sections re-rendered, as at a compaction boundary), cache break
recorded, on_session_start not fired, new bytes and epoch persisted so the
following turns restore them verbatim. One cache break per request.

Warm agents (gateway agent cache, TUI/Desktop) run the same check from
build_turn_context against the epoch they saw when their prompt was set, so
the verb works with the gateway running. A session first built after a
request is stamped with it and does not rebuild again.

With no request recorded, the stored prompt is reused byte-identically. The
only added work per continuing turn is one state_meta point read. No file
scanning, no config key, no watcher, no mid-turn mutation.

The tools[] pin is kept on purpose: the refresh is about instructions, and
tool changes already reach long sessions at the compaction boundary. The
cache break is recorded as the existing system_prompt_rebuild cause rather
than a new one, which would change the shared-metrics contract and schemas.

Related: #141154 (per-turn source hashing, alternative design), #74622.
2026-10-28 19:30:48 -07:00
Teknium
4a8c01790a fix(skills): document skills share one PM-built side environment; pause before Enter in the no-tmux recipe
The six document skills each carried a copy of a venv bootstrap that ran
`python -m venv --clear` on a shared directory after an unlocked check, so two
agents could erase each other's install, and the pdf skill's optional installs
read a DOCS_ENV that was only set inside a branch.

`hermes pm environment NAME --extra E | --requirement R` exposes PM's existing
isolated environments (pm.ensure_environment) to shell callers: the identity
is re-checked under the environment's install lock, a rebuild lands in a new
generation published by an atomic selection, and the previous generation is
never deleted. It prints only the interpreter path on stdout. --extra reads
the extra's pins from pyproject.toml, so a Hermes update does not build a new
generation unless those pins change.

Every document skill now runs the same one-liner
(`hermes pm environment documents --extra documents --extra documents-pdf`)
when `python` lacks the libraries; the new documents-pdf extra carries
pdfplumber and pypdfium2. OCR libraries get their own named environments.

The no-tmux PTY recipe pauses 0.5 s between the text write and the Enter
write, like the tmux recipe, so the paste guard cannot read Enter as a newline.
2026-10-28 19:26:17 -07:00
Ben Barclay
f292c4c357 fix(config-remote): the poll interval is a constant, not a HERMES_* env var
HERMES_CONFIG_REMOTE_POLL_SECONDS is gone: the interval is 300 s (the 30 s floor stays), so no
new non-secret HERMES_* env var is needed before config can be read. A plane-served interval is a
later cross-repo change. The environment-variables reference now lists HERMES_CONFIG_REMOTE_URL
and HERMES_CONFIG_INSTANCE_ID next to HERMES_CONFIG_BACKEND, with why each must be env.

Addresses teknium1's P2-2 on #122509.
2026-10-27 17:33:48 -07:00
Ben Barclay
e4374020bd fix(config-remote): adapt the remote backend to the seam as merged in #134362
puts back what that build deliberately left for the remote backend, on
main's seam shape:

- RemoteBackend implements main's protocol (read_user_doc, probe_readable)
  and is not a FileBackend; _route returns (backend, home) and explicit
  files go through _ExplicitFile, so the is_layer branches are gone.
- One bootstrap: _ensure_bootstrap_env / bootstrap_deployment select the
  backend from the process env, the launch home's .env and the managed .env.
  #134362's _dotenv_backend_override did not survive its file-only refactor,
  so nothing stacks; its rules are now tests (stale shell remote + .env file
  boots file; empty .env value resets to file; .env-only remote selects
  remote; an absent key keeps the shell value).
- The file-tooling gates main removed (backup/import/snapshot restore,
  config edit, migration write-back, config backups, profile clone and
  distribution install, raw config editor, xAI migration, gateway --config).
- profile_serve_signature uses the backend version for config.yaml.
- restore_config_model_settings_if_rewritten is a no-op without file tooling.
- PM's dependency runtime reads a home's selection from the local file it
  publishes to (config_backend.local_file_layer), so a remote deployment
  never needs the plane there or fails PM closed.
- Ratchet: _container_slots/_validate_quoted_containers move to
  config_value_checks, _count_cron_jobs to backup_restore, the gateway
  --config load to gateway/config_loader.
2026-10-27 17:33:48 -07:00
Teknium
ba48bbcd8b fix(pm): reclaim dependency state of missing checkouts after 14 days unused
orphan_install_states only reclaimed installs/<key> when the recorded checkout
was provably deleted (under the data root, or directly in an existing
.worktrees/ dir). A checkout anywhere else (~/.cache/review-*/head, a scratch
clone outside the data root) kept its ~0.5 GB / ~27k-file state forever once
deleted: ~235 of ~300 states on one developer host.

The proof rule stays: a provably deleted checkout is reclaimed at once. A
missing checkout that cannot be proved deleted (it may sit behind a mount
boundary: a container sharing the data root, an unmounted volume) is now
reclaimed once its state has also gone unused for
worktrees.install_state_retention_days (default 14, 0 = keep forever).
"Used" is what the runtime moves, measured on a live install: every sync
recreates inputs/ (and rewrites facts.json on a change), every launch takes a
generation lease (moving its .leases dir). Present checkouts, record-less
states and held states (install lock, generation lease) are never reclaimed;
removal keeps the record-last order, and a part-way removal does not restart
the clock.
2026-10-27 16:03:18 -07:00
unsupportedpastels
50e14f7dd8 docs(dashboard): generate the basic-auth signing secret in the remote recipes
The remote-backend recipes in desktop.md and web-dashboard.md wrote the
HERMES_DASHBOARD_BASIC_AUTH_SECRET line inside a quoted heredoc, so .env got the
literal text $(openssl rand -base64 32) instead of a random secret. Write the
credentials with the quoted heredoc and append the secret with a real command
substitution, and tell readers how to spot and replace the literal line.

The basic provider now ignores a signing secret that still contains unexpanded
shell text ($( or a backtick), logs an error, and uses a random per-process key,
so the literal string is never used to sign or verify sessions.
2026-10-27 16:37:10 -04:00
SHL0MS
3e1a5b1368 feat(skills): unbroker spam-call lane (phone-led runs + DNC one-shot)
A number that keeps getting spam calls is almost always listed on people-search
sites, so the engine now accepts the number as the starting point, with the FTC
Do Not Call registry as a one-shot alongside the opt-outs.

- intake accepts phone/email-led subjects (one identifier minimum); a missing
  name/contact-email is warned, not refused (scans run; opt-outs need them)
- --focus-phone marks the number being scrubbed: added to search vectors and
  used as the `phone` disclosure field instead of phones[0]
- brokers with zero runnable search vectors group as `unsearchable` instead of
  wedging `unscanned` forever; `fanout` skips them
- `dnc` command + `dnc_register` action in `next` (mirrors `drop`): register
  US personal numbers on the National Do Not Call Registry (FTC-verified
  steps: 3 numbers per pass, 72h confirmation links, 31 days to take effect,
  never expires), surfaced once per subject until `--filed`
- docs: SKILL.md recipe + quick reference, methods.md reverse-phone notes,
  README; regenerated the website skill page; corrected the stale "85 tests"
  claim (repo-wide test purges left 30) -> 34 with the 4 new hermetic tests
2026-10-27 10:28:43 +05:30
Teknium
2f644f3fed Merge origin/main into copilot-seams/integration
Conflict: hermes_cli/env_loader.py import block. Kept the branch's
left_core_migration.profile_env_names import and main's ConfigBackend
switch (load_yaml_file_readonly no longer imported; _load_secrets_config
reads through config_backend.read_config_doc_readonly).

No main commit since 0c771d7a5ba touches Copilot code; nothing to port.
2026-10-25 21:02:41 -07:00
Calvin Ng
5239b1323e
fix(models): make GLM-5.3 the silent default model (#144810)
GLM-5.2 became the silent default (the model Hermes lands on when the user
never picked one) in #64635 as a capable low-cost pick. GLM-5.3 has since
superseded it at about the same price on Nous Portal and OpenRouter, with
the same 1M context, and both curated catalogs already list it.

Move every copy of the default together:

- PREFERRED_SILENT_DEFAULT_MODEL and the OpenRouter "default" description.
- The "default": true label in website/static/api/model-catalog.json,
  regenerated with scripts/build_model_catalog.py, so clients rotate from
  their cached catalog without a release.
- The TUI's _resolve_model last resort, which hardcoded "z-ai/glm-5.2" and
  would drift on every rotation; it now reads the constant from the
  data-only models_catalog_static module.
- The example manifest in the model catalog reference docs.

The new TUI test pins the no-model fallback to the constant, and the
manifest contract test is renamed since it checks whatever the constant is.
2026-10-26 03:50:53 +00:00
Teknium
ee3bcbbbc1 docs: GitHub Copilot is the github-copilot labs plugin; document the provider seams
Provider pages (en + zh-Hans) replace the built-in Copilot sections, table
rows and env rows with a pointer: `hermes plugins install github-copilot`
(labs: built by Nous Research, not supported), auto-installed for profiles
that already use copilot/copilot-acp, sign-in with `hermes auth add copilot`
or COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN (gh and Copilot CLI logins are
no longer read). The model-provider plugin guide gets one table of every
ProviderProfile field and hook in providers/base.py, and its examples point at
the labs plugin. The hermes-agent skill references and the
cli-config.yaml.example provider list drop the built-in Copilot rows.
2026-10-25 20:47:11 -07:00
unsupportedpastels
395c673739 fix(webapp): point to --no-open when a private launch opened no visible browser
On macOS webbrowser.open can return True with no page the user sees: over SSH osascript opens the browser on the Mac's own screen, and a sandboxed browser may refuse a file: page in a hidden folder. After a private launch, say how to get the link. The docs no longer say an SSH session always prints the link: that holds on the BSDs and illumos. The private-launch docstring notes that on macOS the URL reaches osascript on stdin, so the page mainly protects the BSDs and illumos.
2026-10-25 23:32:04 -04:00
unsupportedpastels
166bc0f822 fix(webapp): open private launch links through a user-only page
Where nothing checks who redeems a one-use launch link (macOS, the BSDs, illumos, WSL), hermes webapp printed it, and any local user who read it first could redeem it within its 60 s. TCP loopback has no peer-credential call on those platforms. The launcher now writes the link into a 0600 page in the gateway home's user-only webapp folder and opens that page, so the browser launcher's command line carries only the page's path and nothing is printed. It still prints the link where it cannot open a browser and on WSL.

Refs #144648 (WA-12)
2026-10-25 23:32:04 -04:00
Teknium
bbe207c593 refactor(config): ship the seam with the file backend only
The seam had a selector and reserved members that nothing in this PR
uses: HERMES_CONFIG_BACKEND accepted only `file` (every other value
exited), the .env override existed only to decide when to refuse,
UserLayer.locks/provenance and ConfigBackend.locked() were always empty,
and the supports_file_tooling()/require_file_tooling() checks at ten
file-copy sites were always true. All of it is for the remote backend
(#122509), so it lands there with the code that makes it real.

get_config_backend() now returns the file backend. The env var, its
docs row, the dotenv override, ConfigBackendUnavailable and the
file-tooling gates are gone, with the tests that covered them. The
explicit-file routing test now proves a non-config.yaml path never
consults the backend.

probe_config_readable() calls a probe_readable() protocol method
instead of an isinstance(FileBackend) check, and version_token()
documents how it treats an int-led version.
2026-10-25 18:54:09 -07:00
kshitijk4poor
32ea245ded docs(config): document HERMES_CONFIG_BACKEND; correct the hermes_time fallback comment
- The environment-variable reference had no row for HERMES_CONFIG_BACKEND,
  a selector that stops Hermes at startup when set to anything but
  `file`. Added, with where it is read from and a link to the developer
  guide.
- hermes_time called the config backend module "dependency-free"; its
  file backend imports utils. Say what the fallback actually does.
2026-10-25 18:54:09 -07:00
Teknium
f219708926 feat(tts): fold voice search into text_to_speech's ElevenLabs schema (find_voices)
Teknium: the ElevenLabs variant of text_to_speech is where voice search belongs, not a
separate tts_voices tool. The ElevenLabs schema now carries voice_id plus a find_voices
object (text optional there); other providers' schema is byte-identical to main.

Live search findings folded in: the library is the default source and sorts by a year of
usage (most-used first); use_case (e.g. characters_animation) and sort filters; library
voices with a custom credit rate show credit_rate; the description tells the model the
library matches words literally, so a role word that finds nothing ('dwarf') falls back to
describing the sound ('gravelly old' + filters).
2026-10-25 15:58:23 -07:00
Teknium
c975831fbc feat(tts): let the agent pick ElevenLabs voices (voice_id + paginated tts_voices search)
With tts.provider: elevenlabs, text_to_speech gains an optional voice_id and a new
tts_voices tool searches the user's account voices (/v2/voices) or the public
Voice Library (/v1/shared-voices) with query/gender/age/accent/language filters and
an opaque next_page cursor. Both are gated on the ElevenLabs provider (dynamic
schema override + check_fn), so every other provider's surface is unchanged. A
per-call voice_id never rewrites config; a stale one sent under another provider is
ignored with a warning.
2026-10-25 15:58:23 -07:00
emozilla
bf8e96e233 docs(webapp): say that on Windows nothing checks who spends a launch link
The guides and the launcher's docstring said, or implied, that on Linux and Windows the gateway
checks who redeems a one-use launch link. Only Linux does: on Windows the check returns yes for
every connection, and the link is protected because it travels only in the browser launcher's
command line, which other standard users cannot read. A reader weighing a shared Windows machine
was told the server authenticates the browser when it does not.

The peer check's docstring, the launcher's module docstring, the CLI reference and the Desktop
guide now say what each platform does: Linux checks the connection's user, Windows relies on the
launcher's private command line, and macOS, the BSDs and WSL print the link instead.
2026-10-25 03:22:38 -07:00
emozilla
b70215d46a fix(webapp): hermes webapp under WSL prints a launch link the Windows browser can use
Under WSL2 the Windows browser reaches the gateway's loopback port through WSL's localhost relay, and
inside Linux that connection belongs to root. The gateway treated WSL as Linux: it gave hermes webapp
a launch link that only a connection owned by the gateway's user may spend, so every link was
refused, and the page told the user it "was already used or has expired. Run hermes webapp again",
which failed the same way. The loopback Webapp could not be opened from Windows at all.

The connection cannot be tied to the user there (any Windows account can reach the relayed port), so
WSL now takes the macOS path: the link is printed for the user to open by hand and spends without
the peer check. Native Linux keeps the check. Live on this machine's WSL2 (NAT): before, curl.exe from
Windows arrived as uid 0 and got 403; after, the printed link spent with 200.
2026-10-25 03:22:37 -07:00
emozilla
e77feea88d fix(webapp): on the LAN, open the address Web Access registered Nous sign-in for
With the Webapp on every interface (`webapp.host: 0.0.0.0`) and no `webapp.public_url`, `hermes
webapp` on the host opened the loopback address. Web Access Start registers Nous sign-in for the
LAN address's callback, so a sign-in started there sent the Portal a callback for 127.0.0.1 that it
had never seen, and failed.

For a launch behind the sign-in gate the gateway now opens, in order: `webapp.public_url` when set,
as before; on the LAN, the address in Start's `webapp/sign-in-registration.json`, while that is
still this machine's LAN address and the Webapp's port (a moved address or port would send the
browser elsewhere); otherwise the loopback address, which still serves a password provider and
sign-in set up by hand for it. Native clients keep the loopback address. The docs say so.
2026-10-25 03:22:32 -07:00
emozilla
b140bf4039 fix(webapp): print a one-use link on macOS instead of the long-lived browser credential
Where nothing can check who redeems a launch link (macOS and the BSDs), `hermes webapp` printed the
gateway's browser credential as `#hermes-session=<token>`. That link signed a browser in as the user
until the next sign-out, and when Hermes ran the command through its terminal tool the credential
landed in the transcript.

The gateway now mints a launch ticket there too: the same one-use, 60-second link Linux and Windows
get, which spends without the peer check, as a window ticket does. `hermes webapp` prints it with its
lifetime and still never passes it to a browser launcher, whose arguments other local users can read.
A copy that leaks is spent once the user opens it and dead after 60 seconds, instead of working until
the next sign-out. The docs describe the macOS link as the one-use link it now is.
2026-10-25 03:22:31 -07:00
emozilla
9538b1b040 fix(webapp): end the account tokens of a signed-out browser login on the Webapp too
A browser that signs in to the gated Webapp keeps the sign-in provider's access and refresh token
in its cookies. Only the cookie path checked the login's binding to the browser credential, so
after `hermes webapp --sign-out` those tokens still worked when presented on their own: the access
token as `Authorization: Bearer` (enough to mint a host-terminal ticket) and the refresh token on
`/auth/native/refresh`, where the bundled password provider hands out a new 30-day refresh token
every time. Refusing a recorded list of those tokens would not hold: the password provider decodes
base64 leniently, so another spelling of the same token, such as the quoted value the cookie
stores, verifies too.

On the gateway's Webapp behind the sign-in gate, a provider token now works on its own only when
the listener gave it to a native app's RFC 8252 sign-in (`/auth/native/token`, then each
`/auth/native/refresh`). The listener keeps a digest of each such token until it expires, in
`webapp/native-sign-in-tokens.json` in the gateway home, so native apps stay signed in across a
sign-out and a restart. A browser login's tokens work only as that login's cookies, which
sign-out, or a credential replaced while no gateway ran, already ends. The standalone dashboard
and the gateway's private listener keep main's behaviour. `hermes webapp --sign-out` and the docs
now say that those tokens end and that native apps stay signed in.
2026-10-25 03:22:31 -07:00
emozilla
7e2972f249 fix(webapp): open the Webapp's public URL to sign in when webapp.public_url is set
Behind the sign-in gate, hermes webapp opened the gateway's loopback address even when
webapp.public_url was set. Sign-in started there and kept its state cookie on the loopback
address, but its callback is built on the public URL, so an OAuth sign-in such as the Nous
account's came back to an address without that cookie and failed with "Missing PKCE state
cookie".

A gated launch now opens the listener's own public URL, path prefix kept, with the profile
query after it, so sign-in starts and finishes on the same address. Without a public URL it
still opens the loopback address, and native clients keep dialling loopback. The CLI and
configuration docs say which address is opened.
2026-10-25 03:22:30 -07:00
emozilla
ac64150960 docs(webapp): describe sign-out behind the sign-in gate and where launch links work
The Webapp docs said `hermes webapp --sign-out` signs out the tabs a launch link signed in. They
now say it also signs out every browser that signed in with a dashboard account behind the
sign-in gate, closes Bot Desktop viewers with the rest of a tab's connections, reports how many
connections it closed, waits for a gateway that is still starting, and replaces the stored
credential itself only when no gateway runs. The private-link fallback is documented for the BSDs
as well as macOS, and the developer guide records how a Webapp login is bound to the browser
session token (the hermes_webapp_signin cookie).
2026-10-25 03:22:25 -07:00
emozilla
fbdf0b0f22 docs(webapp): say what turns the Webapp's sign-in on and what the gateway does around it
The docs said only a 0.0.0.0 or :: host turns on the Webapp's sign-in gate. A public URL does too,
on a loopback host, and `hermes webapp` then opens the Webapp's address instead of a one-use link.
The configuration reference, the Desktop guide, the `hermes webapp` reference and the gateway
sessions guide now name both triggers (webapp.public_url, not dashboard.public_url), say that the
listener native clients use never asks for sign-in, and say that a taken Webapp port replaces the
browser sign-in so open tabs need `hermes webapp` again.
2026-10-25 03:22:24 -07:00
emozilla
7f1e623c71 docs(webapp): sign-in behind the gate, sign-out and the terminal
Documents what hermes webapp does behind the sign-in gate, that sign-out closes open tabs, the
gateway restart after fixing an unavailable Webapp, terminal file drop and the terminal's starting
folder.
2026-10-25 03:22:21 -07:00
emozilla
7979fb2ce3 docs(webapp): document the gateway-served Webapp
Configuration, the hermes webapp command, the Desktop guide's browser
section, and the operator credential in the gateway session notes.
2026-10-25 03:22:17 -07:00
Teknium
e3f1dced6b docs: plugin workspaces solve only for the installing platform 2026-10-24 19:27:03 -07:00
akfoster
8607c509f0 fix(pm): avoid delaying available mirrors 2026-10-24 18:47:41 -07:00
akfoster
938be3a6d4 fix(pm): tolerate failed periodic checkpoints 2026-10-24 18:47:41 -07:00
akfoster
e5470c9888 feat(pm): preserve progress across interrupted downloads 2026-10-24 18:47:41 -07:00
Teknium
ab80e122c0 test(gateway): messaging /refine after the cached agent is gone, warm vs cold
A real gateway with a user-plugin messaging platform and a loopback model:
a resident /refine, then a restart (which drops the cached agent the way
the idle sweep does, without the sweep's one-minute first pass) and a cold
/refine on the same chat. The cold summary must land in that chat and its
review request must equal the resident one (model, provider routing,
session id, prefill, tools). Red on the previous base: "Nothing to refine
yet - send a message first."

Docs: the messaging slash table says /refine works on a chat left idle.
2026-10-24 06:16:10 -07:00
Teknium
14e1e43a23 docs: name each YOLO source's reach; sampling never prompts the user 2026-10-23 16:54:27 -07:00
Teknium
aa82d233cf docs: YOLO / approvals.mode off skip the MCP trust prompt, not the spend limit 2026-10-23 16:54:27 -07:00
Teknium
ad81947668 docs(mcp): deleting an Always entry leaves the granting chat's copy until it ends 2026-10-23 16:16:43 -07:00
Teknium
3ee9fcfbb5 docs(mcp): what the trust-gate and one-shot consent prompts offer 2026-10-23 16:16:43 -07:00
ethernet
be82958af5 fix(nix): the dev shell's HERMES_PYTHON carries its own dependencies
The shell pointed HERMES_PYTHON at the bare pm-pinned interpreter and reached
the uv2nix site-packages only through PYTHONPATH. Every consumer that replaces
PYTHONPATH (Ink's gateway bootstrap, image attachments, run_tests.sh's env -i)
got an interpreter with no dependencies, so 'hermes --tui' in the shell failed
with 'No module named ruamel'.

devVenv re-homes uv2nix's editable venv onto the pinned interpreter: a real
pyvenv.cfg whose home is the lock's python, devPython's site-packages, and
console scripts re-shebanged onto it. HERMES_PYTHON, VIRTUAL_ENV, python,
pytest and pm are now one interpreter and the shell sets no PYTHONPATH.

The shipped package and the shell share one tool list: runtimeDeps takes
ripgrep and ffmpeg from pm/lock.json too. Reverts the run_tests.sh PYTHONPATH
passthrough, which leaked a caller's PYTHONPATH into every HERMES_PYTHON run.
The dev-venv-self-contained check runs the venv under env -i.
2026-10-23 17:20:39 -04:00