Commit Graph

1068 Commits

Author SHA1 Message Date
kassdin
44248a0b39 fix(cli): restore snapshots through an offline gateway handoff 2026-10-20 15:03:19 +05:30
Teknium
c0015464f0 Merge pull request #141501 from NousResearch/fix/pkg13-cli-queue
fix(cli): classic CLI /queue goes into the gateway's durable FIFO (#134889 N5)
2026-10-19 12:12:46 -07:00
Teknium
d439b578d1 docs(cli): /queue's shared gateway queue, move refusal, lost-answer note
The /queue docs said move acts on the pending queue mid-run; it is
refused for prompts the gateway holds. They now also say that
/queue list|rm|edit|clear act on the session's shared gateway queue
(every window's and automation's queued prompts), that queue-mode Enter
uses the same queue, and that a slash command typed after your own
/queue prompt waits briefly for its turn.

Code notes: what a QueueOutcomeUnknown leaves behind (the turn runs
once but is not painted live here), and why an unknown /queue admission
stays tracked and is re-read once per pending list.

Refs #134889 (N5)
2026-10-19 11:56:22 -07:00
Teknium
ced2a39350 feat(plugins): hermes plugins update with no name offers every plugin update
Running `hermes plugins update` without a name now runs the check-updates
probe, lists the plugins the update path can actually move (catalog re-pin,
git pull), names every one it skips and why (pinned, needs fixing, unknown,
pip distributions Hermes never upgrades — #132494), asks once, and updates
each through cmd_update so per-plugin consent prompts still apply. One
failure does not stop the rest; the summary quotes each failure's reason.

Without a terminal nothing moves unless --yes is passed; --yes runs the
updates with interactive=False, so consent stays fail-closed.
2026-10-19 06:07:41 -07:00
Teknium
caa1ea8d92 fix(mcp): an unset ${VAR} env entry counts as absent; set values pass verbatim
Follow-up to #141379 from an independent post-merge review:
- the MCP SDK re-adds its inherited set (PATH, HOME, TERM, ...) at spawn,
  so popping an unset override never unset those keys. Treat the entry as
  absent instead: the key keeps its baseline value, one rule for every key,
  matching what the child actually receives.
- carry resolution provenance from interpolation (_RenderedStr) instead of
  guessing from the rendered text, so a set variable whose value is
  literally '${OTHER}' is passed through, not dropped.
2026-10-19 02:10:20 -07:00
Teknium
eea83bb603 Merge pull request #141357 from NousResearch/fix/pkg12-decided-gw
fix(gateway): lost automation turns settle; discard on every surface; classic /browser via browser.manage; pause holds interactive turns
2026-10-19 01:15:48 -07:00
Teknium
0bd184f3af Merge pull request #141336 from NousResearch/fix/pkg12-confirm
fix(gateway,tui): name the restart on interrupted turns and the backend on !cmd refusals; confirm TUI-14/T22
2026-10-19 01:15:12 -07:00
Teknium
43c9e0ae52 fix(mcp): leave an unset ${VAR} env entry out of a stdio server's environment
A stdio MCP server env entry like "GHIDRA_INSTALL_DIR": "${GHIDRA_INSTALL_DIR}"
was passed to the child as the literal text "${GHIDRA_INSTALL_DIR}" when the
variable was unset. Servers that validate the value refuse to start (REA:
"GHIDRA_INSTALL_DIR must be absolute"), so a portable plugin could not forward
an optional variable, and Hermes' filtered MCP env means forwarding is the only
way a user's variable reaches the server.

_build_safe_env now drops an env entry whose whole value is still one
unresolved ${VAR}/${env:VAR} reference. Partial references, context vars and
url/headers keep their existing behaviour. Applies to config.yaml mcp_servers
and plugin mcp.json alike (same launch path).

Co-authored-by: Rodrigo Gomes <2362425+rodrigogs@users.noreply.github.com>
2026-10-18 21:16:12 -07:00
Teknium
92a7e3b5bd docs(slash): document /discard and regenerate the Desktop slash registry
/discard was added as a gateway command without its row in the slash
command reference or the regenerated Desktop registry, so the docs-drift
and committed-registry checks failed in CI. Row added (with the Slack
`/hermes discard` form); registry regenerated with
scripts/dump_desktop_slash_registry.py.

Review #141357 (CI item 4).

Refs #134889 (GW-10)
2026-10-18 20:39:44 -07:00
Teknium
4be3eb413a docs(pause): hermes pause holds interactive CLI, TUI and Desktop turns too
Maintainer decision for GW-1: keep the hold. Since #106742 every local turn is
a gateway turn, so `hermes pause` holding CLI, TUI and Desktop turns is the
emergency stop working as designed, not a regression.

`hermes pause --help`, its confirmation text and the CLI reference now say so,
and that turns already running finish. A live probe (real GatewayRunner +
authority + WS API, loopback model) pins the behaviour: a turn running when
the pause lands finishes; a new interactive turn's completion is exactly
`estop.paused_reply()` (reason + "run `hermes resume`") with no model call;
after resume the next turn runs.

Refs #134889 (GW-1)
Refs #141321
2026-10-18 19:52:35 -07:00
Teknium
c71174441c fix(gateway): a turn interrupted by restart names the restart; document restart_drain_timeout
agent.restart_drain_timeout keeps its 0 default (pinned by a test): a restart
or stop interrupts in-flight chat turns at once, they settle interrupted and
are never replayed. Their message.complete now carries a named notice in
`warning` ("Gateway restarting: this turn was interrupted and will not be run
again ...", or the shutdown wording), only when the owner's stop() did it.
Ink and Desktop already render `warning`; the attached classic CLI now prints
it on stderr for interrupted turns only. A turn's own warning is kept.

Docs: a "Gateway Restart Drain" section in the configuration guide with the
default, what a positive value does, and the systemd TimeoutStopSec sizing
caveat from gateway/restart.py; the env-var row had the wrong default (900).

Refs #134889 (F1)
Refs #141321
2026-10-18 18:50:15 -07:00
David Dudok de Wit
875577495b fix(gateway): re-attach after session.replay_gap instead of failing the turn
On overflow the owner retires a viewer's subscription and sends one
session.replay_gap while the turn runs on. Every Python subscriber treated
that frame as a failed turn: the classic CLI reported "outcome unknown" and
then hung on every later turn, GatewayChatView (stream-json, -z,
--safe-mode) failed, and ACP stopped its event pump, failing the waiting
prompts of every session. #140292 made gaps much rarer by raising the frame
cap, but kept the overflow path.

A gap now means "this subscription ended; re-attach". The client resumes
that session only, adopts the new subscription, wakes whatever waits on its
pending rows or controls, and answers the controls the snapshot lists. The
snapshot is taken under the event-stream lock: a queued or started
admission it lists publishes its completion on the new subscription; an
unknown one owes none and settles as unknown now, in every client; one it
no longer lists ended in the hole and its receipt settles it, read once and
only against a snapshot that covers it (one whose resume left after the
submit). ACP's pump is the one recovery owner, so a reply is delivered at
most once. After a gap a control blocks only an admission the snapshot
still lists.

Live deltas stop at the gap and the settled reply shows once (the rest of
an exact prefix, else "[output resumed]" and the whole reply), to the
terminal and to the voice stream separately. An interim stays whole, as it
can be the reply's only copy. stream-json emits no further text and flags
its result with replay_gap. After a gap or from a receipt, a reused reply
is suppressed only when all of it was shown; without a gap main's rule
holds. A refused re-attach still ends the wait with today's error; an
unreadable receipt fails only that admission. A CLI turn owns its turn
token and its session from the pre-submit re-attach through _result and
painting, bounded by the interrupt settle deadline, and any received
boundary closes the reply segment.

The real-rig tests share one real owner that pins the fanout frame cap at
256, as #140292's own overflow probe does, so the paused viewer still
overflows.

Refs #134889
Fixes #140388

(cherry picked from commit 0d51f10640c560e0cb0b2205e2dbad18d06c7c5c)
2026-10-18 03:28:00 -07:00
Teknium
3882113085 feat: archive stale dirty worktrees before removing them, sweep every repo, ask on dirty exit
The worktree pruner never removed a dirty or unpushed tree at any age, so leftovers of finished
lanes (stray probe files, WIP commits on closed PRs) accumulated forever: 658 trees / ~1 TB on
one machine, 553 of them named lane trees. Approved design (Teknium, 2026-10-17):

- Snapshot-then-delete: an idle tree past its tier (hermes-*/subagent-* 24h, named 72h) with
  uncommitted changes or unpushed commits is archived to refs/hermes/archive/<tree> (HEAD +
  staged + unstaged + non-ignored untracked bytes, built with a temporary index; large untracked
  files skipped and listed) and then removed. A failed archive keeps the tree. Branch kept when
  published on a remote, otherwise the archive anchors its commits.
- Never touched at any age or budget: live hermes lock owners, any live process whose cwd/open fd
  is inside the tree (/proc on Linux, psutil cwd elsewhere), trees with recent file/ref activity,
  Kanban t_<hex> trees.
- No count cap; optional worktrees.max_total_gb evicts the oldest idle trees first.
- Per-profile registry (<HERMES_HOME>/worktree_repos.json) of every repo Hermes made a worktree
  in (hermes -w, /worktree new, subagent isolation, Desktop git pane); the 6h cron sweep unions
  it with its existing sources, scoped and throttled per profile.
- Subagent worktrees with commits/edits are archived and removed at child finish (branch kept).
- Interactive `hermes -w` (CLI and --tui) exit with a dirty/unpushed tree asks Keep (default) /
  Archive & remove / Remove and discard; non-interactive exits never ask.
- `hermes worktree restore <name> [--path]`, archives in `hermes worktree list`, a full
  decision table in `hermes worktree prune --dry-run`, archive retention (30 days).
- worktrees.archive_dirty: false restores the classic never-delete-dirty pruner exactly.
2026-10-17 21:49:14 -07:00
Teknium
dd0f51c774 docs: list /autoprune in the slash-command reference; refresh the desktop slash registry 2026-10-16 13:56:20 -07:00
Teknium
0715474bfd Merge origin/main into feat/unified-gateway-runtime
375 commits from main (0e427d788d). 24 files conflicted; the resolutions that carry a decision:

- /initiate-setup: main removed the command (25bf722063). Its gateway rewrite, CLI handler and the
  Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
  (gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
  the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
  first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
  the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
  setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
  lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
  state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
  publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
  _without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
  kickoff; this branch's prepared-submission slash path, request_id on session.create and
  PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
  createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
2026-10-14 05:52:49 -07:00
alt-glitch
f5ea924b7e docs: remove the initiate-setup and first-task skills and the setup docs
Both optional skills go, and generate-skill-docs.py prunes their pages, the
optional-skills catalog rows and the sidebar entries (the sidebar would point at
missing pages otherwise). slash-commands, toolsets-reference, delegation,
tools-reference, configuration's Onboarding section and the desktop setup-chat
section return to their 889eddcd86 text; the one inbound anchor to that desktop
section lived in the two pages restored here. The shared-metrics consent note
drops the setup profile too.

(cherry picked from commit e7a2af52bb23c02032529d823b64b24e5a79c6d8)
2026-10-14 00:29:11 +05:30
alt-glitch
72e7085e9e feat: set_theme replaces apply_layout and reports what the desktop applied
set_theme (desktop_ui, deferred like apply_layout was) sets the accent,
light/dark mode and layout preset, or with `picker` shows an accent or
layout card and waits up to 300 s. apply_layout emitted a layout.apply
event and returned success whether or not the renderer applied anything;
set_theme asks the renderer through the theme.apply server request and
returns its answer, so an unknown preset or a chat that is not on screen
comes back as an error with the available ids.

theme.pick waits for a person; the backend tells a dismissed card
({cancelled}) from an expired one ({timed_out}). The tool description
lists the Simple and Advanced preset ids from one constant, which fixes
the old description that named neither sidebar preset. The layout.apply
event and its renderer handler are deleted with the tool.
2026-10-13 23:55:10 +05:30
Teknium
954839a327 Merge origin/main (#46: 38 commits to 63d0b94120) into feat/unified-gateway-runtime
Previous merge base 3b63f7b0a4. Seven conflicts, all Desktop; each keeps
both sides' behaviour.

apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
  main:    composer text answers ANY parked card through the new
           store/parked-card-answers registry (answerParkedCard), so
           answerSetupCard is no longer imported here.
  branch:  added `import type { BusyInputMode }` for the configured
           busy-input mode.
  merged:  both imports kept; answerSetupCard dropped (main's registry
           reaches it via clarify.ts answerClarifyText).

apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
  main:    "answers one question per submit while a busy turn waits"
           now expects clarify.lock (no steer) and adds "brings the card
           back when an earlier lock fails after the last answer cleared it".
  branch:  the old body of that test with onSteer(..., 'interrupt').
  merged:  main's body (main changed the contract: typed text is the
           answer, not a steer); the branch's busyInputMode harness and
           every other 'interrupt' assertion stay.

apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/input-requests.ts
  main:    connectionRequestNoticeBody() (display card with no targets
           falls back to connectors.title) + ConnectionRequest type import.
  branch:  handlePromptSettledEvent() for approval/clarify.settled.
  merged:  both functions, adjacent.

apps/desktop/src/app/session/hooks/use-session-actions/index.ts
  main:    moved desktopSessionCreateParams verbatim into
           session-create-request.ts and imports it from there.
  branch:  added the resume-owner import block.
  merged:  resume-owner imports + `{ createGatewaySession,
           desktopSessionCreateParams }` from session-create-request
           (the branch's copy of the function was byte-identical to the
           base and is removed by main's hunk).

apps/desktop/src/components/assistant-ui/clarify/pending.tsx
  main:    seenLocks state so a newly locked answer (composer text)
           replaces the staged pick while a seen one leaves card edits.
  branch:  per-requestId card reset (submit latch + staged picks) when
           the canonical gateway reuses the row for the next card.
  merged:  both; the card reset also clears seenLocks so the next
           card's locks are treated as new.

apps/desktop/src/i18n/ja.ts, apps/desktop/src/i18n/ru.ts
  main:    jaConnectors / ruConnectors split files.
  branch:  jaBoot / ruBoot split files.
  merged:  union of imports (key spreads auto-merged).

Lost-line check: every non-blank line main added since 3b63f7b0a4
(79 files) is present in the merged tree.
2026-10-12 21:34:28 -07:00
alt-glitch
aa915ec02a fix(connectors): display costs fewer tokens, drops said, reports connections on timeout
Sid's review of the display action:
- The display text in the manage_connections description is cut to about
  60 tokens; every session (cron and messaging included) pays for it.
- "said" is removed from the wire (ConnectionAnswer), the backend, the
  description, the receipt copy and the renderer. Nothing sent it; typed
  answers for this card arrive with the composer registry later.
- The 300 s deadline now returns connected and newly_connected with
  timed_out: true, so an app the user connected before walking away is
  reported. The receipt names it.
2026-10-12 20:01:50 -07:00
alt-glitch
b1d0fe6060 feat(connectors): manage_connections display waits on a directory card
Add action "display": on a desktop session the call opens an operation
with no targets, emits connection.request with display.suggested, and
holds the tool thread until Continue, a typed answer (said), the 300 s
deadline or /stop. It returns connected / newly_connected / suggested,
computed from the gateway list read at the start and at settle, or
{said} / {timed_out}. Off desktop it returns the status list and says
where to connect.

The card reuses the existing operation transport: connection.respond by
op_id settles it; ConnectionAnswer gains "said". Connecting from the
card runs the Connectors page's account operation, so the two never
share the session's one open slot. The managed_tools gate is unchanged.
2026-10-12 20:01:50 -07:00
Teknium
a89f374d7c Merge origin/main (#45: 255 commits to 3b63f7b0a4) into feat/unified-gateway-runtime
Conflicts (2 files, 1 hunk each); every main-side change is kept, ported to
where the branch moved the code:

hermes_cli/kanban_db.py (build_worker_context helpers _ctx_cap .. _ctx_comments)
  main:   f5a6651231c/d56e357556f coerce foreign/text timestamps on read; in
          _ctx_role_history the "Recent work" stamp became
          _ctx_stamp(_to_epoch(row['ended_at']) or 0, now) instead of int().
  branch: moved the whole _ctx_* helper block into hermes_cli/kanban_db_context.py
          (kanban_db.py imports it back), deleting it from kanban_db.py.
  merged: kept the branch's deletion in kanban_db.py and applied main's change in
          kanban_db_context.py::_ctx_role_history as
          _ctx_stamp(_kb._to_epoch(row['ended_at']) or 0, now). Main's other
          timestamp coercions in kanban_db.py (Task/Run/Comment/Attachment/Event
          from_row, _TASK_EPOCH_COLUMNS, release_stale_claims,
          _extend_live_stale_claim, task_age) auto-merged unchanged.

hermes_cli/web_server.py (_lifespan)
  main:   d7830c6f42 reworded one comment in the free-tier bootstrap block
          ("the ONE place its identity is created" -> "the one boot-time creator
          of its identity"; guests are now also created on first connector use).
  branch: moved _lifespan's body into hermes_cli/web_server_app.py::app_lifespan.
  merged: kept the branch's relocation and applied main's comment rewording in
          web_server_app.py.

Merge-induced health fix (no conflict marker; the combination tripped the ratchet):
apps/desktop/src/app/session/hooks/use-cwd-actions.ts::changeSessionCwd
  main:   63ed3caa4ba/dbc538547fc grew the function (statusbar cwd change for the
          focused chat / tile runtime ids) to CC 20.
  branch: added the session_busy refusal mapping (sidebar.projects.moveBusy) in
          its catch, +1 branch -> CC 21 > target 20 (scripts/check health blocking).
  merged: both behaviours kept; the busy-error mapping moved verbatim into a
          module-level cwdChangeError(err) helper. Health back to 0 blocking.

Check: every line main added between 1fd1827726 and 3b63f7b0a4 (317 files) is
present in the merged tree.
2026-10-12 16:55:20 -07:00
Teknium
562fda904c fix(pm): plugins may move transitive core packages again (revert #137110 overreach)
#137110 pinned every core-locked package to its exact locked version in
the generated plugin workspace (`_trust_core_lock`). That overrode PM's
deliberate rule that a plugin may move a transitive core package within
core's declared ranges (only core's exact pins are fixed), and #137110
rewrote PM's test for that rule to assert the opposite. Five catalog
plugins stopped installing: cognee, loreconvo, mnemosyne, omnivoice and
radio-dm-gateway.

Remove `_trust_core_lock` and restore
tests/pm/test_workspace_build_inputs.py byte-for-byte from before #137110.
What #137110/#137159 got right stays: generated workspaces carry no
release-age cutoff, so users' machines never check upload dates and
mirrors without them keep working; the 3-day check still runs at
`hermes pm lock` and in CI.
2026-10-12 16:26:19 -07:00
Teknium
53df274b08 fix: Langfuse migration installs without a prompt at startup and keeps the old plugin key working
Review findings on the Langfuse move (#137131):

- Startup hang: a profile with the legacy bare `plugins.enabled: [langfuse]` made PM treat the new
  install as already selected, so the first interactive `hermes chat` after updating stopped at
  "Prepare these with Hermes through PM now? [y/N]" while the chat input owned the terminal
  (live-reproduced in a PTY). recover_at_startup now installs every left-core row with consent, as
  memory_provider_migration.recover_at_startup already does: the feature shipped in core, so its
  users accepted its dependencies; `hermes update` in a terminal still asks.
- `observability/langfuse` stays an alias of the catalog plugin: the loader's gate counts it in
  plugins.enabled / plugins.disabled (so an administrator's managed list, which replaces the
  profile's list, keeps tracing on, and a stale entry is harmless), `_find_plugin_entry` resolves it
  for every `hermes plugins` verb, and `_plugin_aliases` purges it from the opposing list. The
  "moved out of core" hint now only appears while the plugin is not installed.
- langfuse_in_use reads the managed-overlay config like the loader and derives its names from the
  row; the moved/install sentence is one helper shared with platform_install_hint.
- Docs: HERMES_LANGFUSE_CAPTURE row (en), MAX_DEPTH + CAPTURE rows (zh-Hans).
2026-10-12 14:00:32 -07:00
Teknium
cdf5732af6 refactor: move Langfuse out of core into the langfuse catalog plugin
The bundled observability/langfuse plugin now ships as the official catalog plugin `langfuse`
(NousResearch/hermes-official-plugins, subdir langfuse) with the same hooks, HERMES_LANGFUSE_* /
LANGFUSE_* env vars and capture modes. Same pattern as the Home Assistant and Spotify moves: a
LEFT_CORE row installs and enables the plugin on `hermes update` / first start for every profile
home that had observability/langfuse (or its bare name) in plugins.enabled and not in
plugins.disabled. Keys alone are not use: the plugin was opt-in.

- left_core_migration: langfuse row + langfuse_in_use; HERMES_LANGFUSE_SECRET_KEY stays a stripped
  child-process secret and the public key / base URL stay private env, exactly as core stripped them
  while it shipped the plugin. New plugin_key field: `hermes plugins enable observability/langfuse`
  (what every pre-move doc said) now names `hermes plugins install langfuse` for this home.
- Core drops the plugin, the `hermes tools` Langfuse category and its post-setup hook (the plugin
  prompts for its keys at install), the OPTIONAL_ENV_VARS / _EXTRA_ENV_KEYS rows, the `langfuse`
  extra + its PM anchor (uv.lock regenerated with CI's uv 0.12.13), and the
  plugin's tests (they moved to the plugin repo).
- Docs (en + zh-Hans): built-in plugins and env-var reference point at the catalog plugin.
2026-10-12 14:00:32 -07:00
kshitijk4poor
0033af0e4d fix(doctor): orphan-alias hint is platform-correct; docs cover orphan removal
Gate follow-up: the doctor hint strips .bat only on Windows (where it is the
wrapper suffix) and falls back to "delete <path>" when the file name is not a
valid alias, so it never prints a command that cannot work. The profile
reference documents `alias <alias> --remove` for orphan aliases and the .bat
wrapper name on Windows.
2026-10-13 01:11:36 +05:30
Teknium
37725f24f9 docs(pm): 3-day release age checked at lock time; plugins trust core's lock 2026-10-12 04:55:36 -07:00
Teknium
3bf97898ac perf(prompt): fixed prefix back under the post-diet size (-2.1k tokens per request)
The stock prompt surface regrew ~3.4k tokens after the August diet, almost
all from features added straight into the never-deferred core. This takes
back the biggest pieces:

- browser_vault: the five eager browser_vault_* tools (list, fill, unlock,
  save_login, enter_code) become one browser_vault tool with an action enum,
  deferred behind tool_search by default. It still rides with the browser
  (an empty vault keeps save_login reachable), so discovery holds; only a
  catalog line is paid per request. Results and errors name the new actions;
  the input-tool password note points at it through tool_call.
- terminal: schema re-dieted (1,136 -> 651 Qwen tokens). Description and
  param docs no longer repeat each other; heartbeat / persist_on_release keep
  their rules in one line each; process(...) references name process_manage.
- tool_search / tool_call: the keyword-query rule lives once, in the queries
  param; description and connector hint trimmed.
- system prompt: the "Async handoff" block is removed. Its rule ships in the
  delegate_task description and in the background dispatch result the model
  reads at the moment it matters, and the polling loop it targeted is guarded
  structurally (#124724).

Stock CLI surface (prompt-surface render, chars/4): 18,612 -> 16,524.
Fresh install, Qwen3 tokenizer: 14,962 -> 13,120 (Sep 7 post-diet: 11,595).

Live A/B harness: evals/prefix_rediet/.
2026-10-12 03:18:48 -07:00
Teknium
89963452ee fix(terminal): make persistent_shell / TERMINAL_*_PERSISTENT actually work
Since the spawn-per-call rewrite (d684d7ee7e) the persistence knobs were read
into config but never reached the environment: SSHEnvironment took no such
param and _create_environment dropped local_config. Every local and SSH
session carried cwd + exported env across commands regardless of the setting.

BaseEnvironment gains persist_env (default True). When False the per-command
wrapper still sources the login-time snapshot and still emits the cwd marker,
but skips the post-command export re-dump, so exports from one command do not
reach the next. SSHEnvironment/LocalEnvironment accept persistent=...;
_build_ssh_env forwards ssh_config['persistent'] and every local construction
path (terminal, file tools, execute_code, ensure_task_env) now forwards
TERMINAL_LOCAL_PERSISTENT via _local_config_from_config.

Defaults equal today's real behaviour: TERMINAL_LOCAL_PERSISTENT now defaults
to true (it was documented false but ignored), SSH keeps following
terminal.persistent_shell (true). Only users who explicitly set the knob to
false see a change: they get the isolation they asked for.

Docs: the Persistent Shell section claimed plain shell vars persist and that
local was non-persistent; rewritten to state exactly what carries over.
2026-10-11 16:53:57 -07:00
Teknium
549e53fd72 Merge origin/main (#43: 73 commits to c0ef5af520) into feat/unified-gateway-runtime
Conflicts (5 files):
- gateway/run_notifications.py: main lifted completion ownership into a new
  GatewayNotificationOwnershipMixin (run_notifications_ownership.py); the branch had lifted the
  update watcher into GatewayUpdateNotificationsMixin. The mixin inherits both. Kept both sides
  of the completion-event metadata (the branch's automation identities + local display card,
  main's proven_session_id / completion_ids), and in the async-delegation group the branch's
  authority admission runs first, then main's terminal-parent drop. Neither function main moved
  was changed on the branch.
- gateway/run_turn.py: the branch moved _hmwa_resolve_session into run_turn_prepare.py; main's
  one changed line there (the resolver receives the proven session id and completion ids) is
  ported into run_turn_prepare.py.
- hermes_cli/subcommands/sessions.py: keep both main's lazy cmd_sessions and the branch's
  rename/discard parser helper.
- ui-tui: keep both canonicalEn and connectorsEn catalogs; keep the branch's interfaces import
  plus main's findSlashCommand import.
2026-10-11 11:24:19 -07:00
Teknium
4e8fe569e4 feat(ci): new config keys and slash commands must ship with docs
DEFAULT_CONFIG changed 183 times in 30 days and nothing checked that a new
key reached the docs; /pause (the global emergency stop) went undocumented
for two months.

scripts/ci/check_docs_drift.py lists every DEFAULT_CONFIG leaf and every
registered slash command and finds the ones the docs never mention. A key is
documented by its dotted path, a placeholder path in inline code
(`auxiliary.<task>.timeout`, `display.pet.*`), or a YAML example nesting it
under its parents; a slash command by a `/name` row in
reference/slash-commands.md.

The 132 keys undocumented today are baselined in docs_drift_baseline.json;
tests/ci/test_docs_drift.py fails only on NEW gaps, so it never blocks an
unrelated PR, and documenting a baselined key never fails. Deterministic,
stdlib + repo imports, ~1s.

/pause is documented here, so the slash-command baseline starts empty.
contributing.md says what to do when the test fails.
2026-10-11 05:09:46 -07:00
Siddharth Balyan
cb9f6ac736 fix(tui,cli): reconnect is offered only as a repair, sign-in failures keep their reason
The /connectors panel offers c only on an account that needs repair; on a
healthy row the hint drops it and the key answers that the account is
connected. connect --reconnect on an active account says so and starts
nothing unless --force. A failed or expired sign-in shows the gateway's
detail. The docs say account is present only for a named account.
2026-10-11 17:21:07 +05:30
Siddharth Balyan
1fad8eb3dd docs: multiple named connector accounts
Covers account names, no default account, the agent telling the user the
name it chose, connector_alias on tools and account on results, rename,
reconnect keeping the old account retired, and where to manage accounts
(desktop, TUI /connectors, hermes connectors, Nous Portal).
2026-10-11 17:21:07 +05:30
Teknium
36e0c68ecc feat(optional-skills): anatomy, ported for Hermes (MIT, wheresryan22/anatomy)
Replaces the catalog stub with a vendored, Hermes-specific port of
wheresryan22/anatomy pinned at dbf697a (v1.0.0). The skill explains a
technical idea by building it as an interactive isometric machine
figure (SVG, optional WebGL layers, beta 3D mode) and proves the
drawing with a geometry audit and a line-end checker.

Vendored verbatim: kit/, references/, scripts/, the example sources,
LICENSE. Hermes changes:

- SKILL.md gains a "Running it in Hermes" section: ${HERMES_SKILL_DIR},
  build in a copied workspace (build.mjs writes next to itself, so it
  must never run inside the installed skill), vision_analyze for the
  PNG reviews, background terminal for the long audits, clarify for
  the Epic scope call, how to deliver results on CLI and messaging.
- The upstream body is kept, with "read every PNG" mapped to
  vision_analyze and the background runs mapped to the terminal tool.
- Example sources only (528 KB): the 9 MB of built HTML pages are
  dropped and the skill says how to rebuild them in seconds.
- capture/drive/turn-check now find the Playwright headless shell that
  Hermes' browser tool installs (Linux and macOS cache dirs) before a
  system Chrome, and pass --disable-background-networking. Under
  strace the headless shell makes zero outbound connections; a desktop
  Chrome reaches Google services even with that flag.
- The desk-computer example's CRT shows an H mark and types
  "hello, hermes" instead of another vendor's mark and name.
- Two CC-22 functions in the vendored spot-plate example carry a
  reviewed health allow rather than a refactor, so the port stays
  diffable against upstream.

.gitignore: the bare `examples/` pattern (meant for dataset dumps)
swallowed skill example dirs, which other skills had to force-add.
Skill trees are now allowlisted.
2026-10-11 04:40:50 -07:00
Teknium
994759f4c4 Merge origin/main (#39: 29 commits to d4d2ab7b5d) into feat/unified-gateway-runtime
No conflicts. Brings in main's reasoning-replay series, holographic memory leaving core
(run_profile_reconcile now imports it through import_provider_module), and the update
main-channel fix.
2026-10-10 23:38:42 -07:00
teknium1
cca83848ec chore(memory): holographic leaves core for its community catalog plugin (re-land #136424)
Holographic has a standalone third-party maintainer (itpartypattaya) and a
reviewed catalog entry, so it leaves core now rather than on Oct 15. Restores
9e827685f2 exactly: reverts the revert (435b7bd3a7) and its health waivers
(b9ecc727e9). byterover and retaindb have no maintainer and stay bundled until
the announced date.
2026-10-10 21:18:25 -07:00
teknium1
435b7bd3a7 Revert "chore(memory): holographic leaves core for its community catalog plugin"
This reverts commit 9e827685f2 (#136424). It landed before the announced
October 15, 2026 date for holographic leaving core; it re-lands on or after
that date. Restores plugins/memory/holographic and its tests/docs.
2026-10-10 20:58:02 -07:00
Teknium
9e827685f2 chore(memory): holographic leaves core for its community catalog plugin
Holographic now ships from itpartypattaya/hermes-plugin-holographic through the
plugin catalog (plugin-catalog/holographic.yaml, v0.6.1 @ 46b6f908, a fork of
Nous's archived handoff copy). It keeps the provider name, memory_store.db and
plugins.hermes-memory-store, and memory_provider_migration already lists
holographic in _LEFT_CORE. Deleting the in-tree copy and its tests lets
`hermes update` and agent start install the catalog plugin for every home that
has memory.provider: holographic.

Host code that still releases memory-store handles on profile unserve/delete
resolves the store through import_provider_module, the same way profiles.py
already does, and no longer imports plugins.memory.holographic. Tests that used
holographic as "a bundled provider" now use byterover. The journal-mode
contract drops the holographic row because the plugin owns that store now.

People who installed the archived Nous repo by URL have no catalog record, so
`hermes plugins update` kept pulling the archive. read_catalog_sidecar now
adopts an install from that repo as the holographic catalog entry, and update
re-pins it to the maintained repo at the reviewed sha. That catalog re-pin
also needed the reviewed-pin scan trust that catalog installs already get. Without
it, update_plugin scanned the reviewed tree as an unreviewed community source
and blocked on caution findings, and that blocked every catalog re-pin of
holographic (the reviewed 46b6f908 tree has 14 caution findings).
2026-10-10 20:31:02 -07:00
Teknium
cfaafec502 Merge origin/main (#35: 133 commits to f925b01791) into feat/unified-gateway-runtime
Three conflicts:
- apps/desktop/electron/updater/checkout-source.test.ts: main's 354fe11d7e is the
  same releases/latest fixture fix this branch carried as c300c295c1 (#135944); main's
  version (it also drops the unused release-candidates route) is taken.
- agent/context_compressor.py: both sides added one import line; both kept.
- gateway/run_turn.py: main's 4c7ab8b2a0 added trigger="gateway_hygiene" to the hygiene
  _compress_context call this branch moved to gateway/run_turn_hygiene.py; the branch side
  of run_turn.py is kept and the trigger is carried onto the moved call.
2026-10-10 06:49:02 -07:00
Teknium
07908be267 docs(update): CLI reference names stable as the default and --set-channel main as the way back
The reference still said hermes update pulls main by default and that main is
the only valid source channel, contradicting the updating guide.
2026-10-09 19:46:19 -07:00
Teknium
607a23e858 Merge origin/main (#30: 54 commits to 1744a19e0d) into feat/unified-gateway-runtime
8 conflicts, all from main's lint sweep (#135281 "Harder linter fixes" + the RUF series:
implicit-Optional, unused-unpacked-variable, next(...) for [...][0]). No other main commit touches
a conflicted file. Resolution: the branch side of each file plus main's exact autofix
(ruff 0.15.10, main's ruff.strict.toml, --fix --unsafe-fixes) on it. ruff.strict.toml takes main's
copy (the newly enabled rules). tests/cron/test_bot_chat_delivery_child_env.py stays deleted
(1cc9cb9199 retired its lane).
2026-10-08 21:38:54 -07:00
Teknium
72b1eece9f docs: bring cli-commands.md back under its file-size ratchet
The root AGENTS.md rule: files at or below 2,000 lines, units already over may
only shrink. cli-commands.md was 2,043 lines on main and 2,127 at this head
(+84). The long form this PR added moves to the page that owns it, leaving a
summary and a link:

- the `hermes gateway ensure` contract (service identity checks, the POSIX
  home-permission policy, exit codes, readiness caveats) -> developer-guide
  gateway-internals.md#hermes-gateway-ensure, next to optional service
  installation;
- "Delegation in finite chat runs" -> user-guide delegation.md#finite-chat-runs,
  beside the one-shot child cap.

Now 2,042 lines (< 2,043 on main). Content unchanged except the summaries.
Root AGENTS.md is 11,952/12,000 chars (check_agents_md_size.py ok); the other
over-cap units this PR grows are code/generated files outside the docs lane
(lanes/docs/NOT_COVERED.md).

Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5458083694
2026-10-08 19:09:51 -07:00
Teknium
71704ffb49 refactor: move Spotify out of core into the spotify catalog plugin
The spotify toolset (plugins/spotify) and its loopback-PKCE login (hermes_cli/auth_spotify.py)
now live in NousResearch/hermes-spotify, installed from the plugin catalog. Same pattern as the
Home Assistant move (fb9fc8a3dd): a LEFT_CORE row installs the plugin for every home that was
using it (a Spotify login in auth.json, or the spotify toolset in platform_toolsets) on
`hermes update` / first start; the toolset name, tool names, schemas, env vars and stored login
(providers.spotify) are unchanged, so nobody re-authenticates.

The one user-visible change is the login command: plugins cannot extend `hermes auth`, so the
plugin registers `hermes spotify login|status|logout`. LeftCoreFeature gains a `cli` field and
moved_command_hint() turns `hermes auth [status|logout] spotify`, and `hermes spotify` while the
plugin is not loaded, into a line naming the new command and the install/enable step for this
home. The dashboard's "needs login" hint names the new command too.

Core drops the Spotify auth constants/dispatch, the CONFIGURABLE_TOOLSETS row and post-setup
step, the core `spotify` entries in the shared-metrics toolset enums, its tests, and the docs
(en + zh-Hans) now point at `hermes plugins install spotify` / `hermes spotify login`.
2026-10-08 19:00:45 -07:00
Teknium
b09c202d9e Merge origin/main (#21: 191 commits to e675225af2) into feat/unified-gateway-runtime
Brings #134209 onboarding (setup chat, /initiate-setup, setup_choose/start_chat cards) and
889eddcd86 (/yolo survives a gateway restart).

Conflicts (6):
- gateway/run_turn.py, tui_gateway/server.py: the branch moved these blocks into siblings;
  main's edits ported there (run_turn_prepare: first-contact `message`/setup_command, the
  _restore_session_yolo call after _hmwa_open_session; agent_factory: coding_selection
  session-platform toolsets, setup_choose/start_chat lifecycle tools; session_registry:
  _lazy_resume_info default route).
- tests/gateway/test_yolo_command.py: both tests kept.
- Desktop composer submit / slash / wiring: main's parked-card answering and submitWhileBusy
  with the branch's busy-input policy in its steer branch; slash `hidden` folds into the
  prepared-submission journal; wiring keeps main's onboarding chain without the removed pool.

Semantic fixes:
- gateway/session_busy_controls.yolo_config writes main's persisted SessionEntry.yolo before
  the live flag, so an owner `/yolo` OFF is not revived by _restore_session_yolo next turn
  (new test test_owner_yolo_off_is_not_revived_by_the_persisted_restore).
- wiring runKickoffSlash awaits the branch's Promise<boolean> slash dispatcher.
- de/es/fr/ja/zh-hant: translate the branch's composer keys main's overlay-completeness test
  now requires.
2026-10-07 17:09:40 -07:00
Austin Pickett
3adc457de5 Merge remote-tracking branch 'origin/main' into sid/onboarding
Conflicts, all in apps/desktop/src/i18n:
- de/en/es/fr/zh.ts, types.ts: import blocks only. Main added the
  *_projects section split, this branch the *_onboarding one; kept both.
- en_shared_metrics, zh_shared_metrics, ar_common, zh-hant (usage-stats
  consent copy): kept this branch's rewritten copy. Main's only change on
  its side since the merge base was a prettier reflow of
  collectedReliability (2943ee6f19), which the branch's rewrite replaces;
  types_shared_metrics on HEAD already matches the branch's keys.

Follow-through: main's Undo-hide toast (sidebar.projects.hiddenFromSidebar /
undoHide) arrived without ar or zh-hant strings, which this branch's
overlay-completeness test rejects. Added both to ar_chrome / zh-hant_chrome
and regenerated locales/_keys.desktop.json.
2026-10-07 16:16:23 -04:00
Teknium
cff27bd30f Merge origin/main (#19: 14 commits to 2943ee6f19) into feat/unified-gateway-runtime
No conflicts.
2026-10-07 10:58:02 -07:00
Teknium
3ca97d5e59 fix(pm): orphan reclaim runs on every prune pass and keeps checkouts it cannot see
Follow-up to the review of this PR:

- The startup pruner returned early (no .worktrees/, or no tree past 24h) before the
  reclaim ran, so a tree removed by hand kept its state until some other tree aged out.
  _prune_stale_worktrees now runs the reclaim in a finally around the prune phases.
- A missing recorded path is not proof of deletion: a container sharing the data root
  (-v ~/.hermes:/opt/data) cannot see the host's checkout, and gc there deleted the
  host's live dependency environment. A state is an orphan only when its checkout sat
  under the data root that owns installs/, or directly in a .worktrees/ dir that still
  exists.
- PM runtime generation leases (pm-runtime/generations/*/.leases) now count as held,
  so a worker still running from a deleted checkout's runtime keeps it.
2026-10-07 08:47:47 -07:00
Teknium
ef4b046808 fix(pm): reclaim dependency state of deleted checkouts (pm gc + startup worktree prune)
Every checkout that boots Hermes commits its own dependency state under
<home>/installs/<sha256(path)[:16]>/ (venv, test venv, PM runtime; ~200 MB
each) and nothing removed it when the checkout went away. On a host that
runs `hermes -w` campaigns the directory held 499 entries / 92 GB, of which
402 (80 GB) belonged to worktrees and scratch clones that no longer exist.

The state dir already records its checkout in inputs/.project-root. A new
pm/install_states.py lists entries whose recorded checkout is gone and
removes them unless something could still be reading them (install lock
taken, or a generation lease held). `pm gc` runs it and reports the count;
the startup worktree pruner runs it after its own reaping so a removed
worktree's state follows the tree instead of outliving it.
2026-10-07 08:47:47 -07:00
alt-glitch
2c8df45ee5 Merge remote-tracking branch 'origin/main' into sid/onboarding
# Conflicts:
#	agent/conversation_loop.py
#	tui_gateway/prompt_turn.py
2026-10-07 19:29:35 +05:30
Teknium
ca38632fc0 Merge origin/main (#17: 454 commits to e6757f2029) into feat/unified-gateway-runtime
12 conflicted files, resolved in three lanes:
- gateway/run.py: take the branch split; main's tirith removal and spool-replay
  ordering ported into run_runtime_init.py / run_bootstrap.py.
- config migrations: main keeps v50 (tirith); the branch's bot-chat timeout removal
  becomes v51 (_config_version 51, template + test updated).
- hermes_state_usage.py: main's voice_chat task route threaded through the branch's
  owner transaction; worker.persist usage allowlist accepts task.
- tui_gateway/server.py: branch side; main's edits applied where the code now lives
  (agent_factory, session_registry). Desktop sessions get the catalog toolset on the
  authority path; daemon-run finite CLI turns are not watched turns; lazy session info
  reports nous/welcome on the free tier.
- Desktop/Ink: one branch-child spinner fix (main's route-token check); main's
  uninstall i18n keys kept, pool keys stay removed; voice_turn forwarded and accepted
  by the authority submit (surface_v1.voice_turn).
- chat_ws / PTY keepalive test: main's stricter test kept.
2026-10-07 06:48:09 -07:00
Teknium
1e347ccf2a feat(plugins): a portable package can ask Hermes to gate its MCP server
Agent Plugins v1 has no trust field, and Hermes's portable mcp.json reader
accepts only type/url/headers for a remote server, so a package server always
ran at the default trust: full. A package whose tools trade, spend or send
(senpi resolving trade approvals on a user's Hyperliquid account) could only
ask the model to check with the user; Hermes itself never prompted.

plugin.json's Hermes extension now accepts
  extensions.com.nousresearch.hermes.servers.<name>.trust: untrusted
which is applied to that mcp.json server exactly like a config.yaml
'trust: untrusted': every write-capable call asks first and fails closed
when unattended. 'full' (the default) is accepted and changes nothing, any
other value refuses the package, so a package can narrow access but never
widen it, and a config.yaml server with the same name still replaces the
package's entry. 'hermes plugins validate' lists the gated servers.
2026-10-07 04:51:23 -07:00