Commit Graph

4143 Commits

Author SHA1 Message Date
Gille 48c1eefa26 fix(desktop): repair missing Windows runtime 2026-08-17 21:43:52 -06:00
Teknium 6170f844c4 fix(desktop): remove profile scoping from the Gateways settings page
The unified Gateways settings page (from the recent settings merge) still
carried the legacy per-profile gateway-override machinery: an "Applies to"
profile-chip scope switcher, a scope state machine threaded through load/
save/test/sign-in paths, inherit-mode ModeCard variants, and an SSH
remote-profile mapping row.

The page is machine-level gateway management: it decides which gateway
backends this desktop can connect to, and profiles are discovered FROM the
connected gateways. It must not be profile-scoped.

- Delete the scope chips section, ScopeChip component, and the scope/setScope
  state; every scope-conditional collapses to its global (scope === null)
  branch. getConnectionConfig/save/apply/test/sign-in are all unscoped now.
- ModeCard local card always renders the local title/desc (inherit variants
  gone); SSH remote-profile mapping row removed.
- i18n: drop now-unused gateway keys (appliesTo, allProfiles,
  defaultConnection, profileConnection, inheritTitle, inheritDesc,
  sshRemoteProfileTitle, sshRemoteProfileDesc) from types.ts and en/zh/
  zh-hant/ja/ar in sync; rewrite the gateway intro in each locale to say
  connections are machine-level and profiles come from gateways.
- Tests: replace the scope-switching component tests with a machine-level
  assertion (loads getConnectionConfig(null), never a profile scope, no
  scope UI rendered).
- Docs: update desktop.md and multi-connection-desktop.md wording — gateway
  connections are machine-level; per-profile backend routing continues via
  the profile rail / session source surfaces, not the settings page.

The electron main-process per-profile override mechanism
(getConnectionConfig(profileName), route map) and the profile-rail connect
flows are intentionally untouched; only the settings page loses the
affordance.
2026-08-17 20:39:02 -07:00
Teknium c9ce66e25e fix(desktop): one roster row per bot even when a backend is registered under two addresses — /api/status install_id + roster collapse
Backend: /api/status now carries a stable random install_id persisted once
under the root HERMES_HOME, shared by every profile of the install.
Desktop: roster enumeration captures it per connection (TTL-cached probe),
buildAgentRoster collapses same-install rows with a deterministic canonical
pick (active > local > ssh > remote > cloud > earliest), the @name-device
handle rule runs after the collapse, and Settings → Gateways shows a
display-only 'Same backend as' hint. Backends without install_id bypass the
collapse (fully backward compatible).
2026-08-17 19:22:57 -07:00
hermes-seaeye[bot] 41a80d5251 fmt(js): npm run fix on merge (#88818)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 01:27:07 +00:00
hermes-seaeye[bot] a3995f8aed fmt(js): npm run fix on merge (#88813)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 01:10:42 +00:00
Teknium 133381508f feat(bot-mode): hide bots from the roster via right-click — header eye toggle reveals and unhides them
Right-click a bot row -> Hide Bot persists hidden:true through the
existing bot-meta pipeline (local ctx.storage + server profile.yaml
ui_meta via profiles.configure), so the hidden state follows the
profile across machines through mergeServerMeta.

- Hidden bots drop out of the roster list and the Active-now strip.
- A header eye toggle renders only while >=1 bot is hidden; while on,
  hidden rows render dimmed (opacity-60, eye-closed glyph) and their
  context menu offers Unhide Bot.
- Unhide writes hidden:false (never null): the server deletes None'd
  ui_meta keys while the local {...prev, ...patch} merge keeps null
  keys, and that asymmetry would let a stale truthy copy resurrect.
- Hiding the selected bot re-homes selection: first visible bot, then
  'default'; if default itself is hidden with nothing else visible the
  selection stays put so the Routines pane never chases a ghost.
- Hidden bots accumulate unread silently but never toast; the eye
  button badges when a hidden bot has unread.
- Display-only: @mentions, group chats, name-collision checks, and the
  meta/avatar/activity sweeps all keep the full roster. Known v1
  simplification: meta is keyed by bot NAME, so hiding a name hides
  every local row of that name (thin remote-source rows never read
  local meta and stay visible).
2026-08-17 18:03:44 -07:00
Teknium d89434e352 fix(desktop): Bots pane is a Sessions-zone tab again (not stacked below) and the Cronjobs pane only appears in Bots mode
- Bot Mode's pane dock changes to { pane: 'sessions', pos: 'center' }: the
  lone-pane header auto-hide trap the old 'bottom' split worked around is
  fixed (center gains pin the header shown), so the sidebar grows a
  SESSIONS | BOTS tab strip instead of two cramped stacked panes.
- One-time persisted-layout heal (dock heal tokens in the tree store):
  installs that adopted under the old split re-home into the sessions strip
  exactly once; user-placed panes are never touched and the burned token
  never re-fights a user who re-stacks afterward.
- The profile-scoped Cronjobs (routines) pane now registers only while the
  Bots pane is on screen, via the contribution disposer driven by the new
  host.paneVisibility SDK export (reactive $paneVisible). Feature-detected
  in plugin.js with the always-registered fallback for older desktops;
  the visibility listener tears down through ctx.onDispose.
2026-08-17 17:48:39 -07:00
Teknium 4014eb7d5c fix(bot-mode): sweep CLI-born Bot Mode sessions out of the global sidebar (ownership-based)
The id-based hide sweep (66221397a) only reconciled session ids the plugin
KNOWS — canonical Bot Chats from $botMeta and group rooms' member sids. But
Bot Mode sessions are also minted OUTSIDE the plugin: bot-to-bot handoffs run
`hermes -p <bot> chat -c "Agent Inbox" / -c "Bot Chat" --create-if-missing`
via CLI, and the mention-handoff path can mint a fresh "Bot Chat" beyond the
canonical one. Those ids never enter plugin state, so the sweep never touched
them and they sat visible in the global Sessions sidebar forever (user
report: five "Bot Chat" + two "Agent Inbox" leaked rows).

Add sweepBotProfileSessions(), chained from hideOwnedBotSessions() at the
same two call sites (plugin load + gateway reconnect): enumerate each roster
bot's OWN profile via session.list (visible rows only — naturally idempotent)
and session.set_hidden any row titled exactly 'Bot Chat' or 'Agent Inbox',
or prefixed 'Group: ' (the member-session title ensureGroupChatSession has
always used). Exact-title matching means a user's real conversations inside
a bot profile are never hidden, and non-bot profiles are never listed at all.
Remote-source bots route via requestForBot to their own connection. All
feature-detected and fire-and-forget per row.

The kickoff instruction text is left unchanged: the hermes CLI has no
hidden flag on `chat -c` session creation, so the sweep is the cover for
CLI-born rows.
2026-08-17 17:48:31 -07:00
Teknium b2c8a148e8 fix(desktop): fail-stop deleted-profile reconnects and evict the stale rail badge
Closes the renderer half of #88769, found while live-verifying the
profile-lifecycle fixes:

- The secondary-socket reconnect loop now fail-stops when Electron's spawn
  guard rejects with "no longer exists" / "is being deleted" — a permanent
  condition for that scope, previously retried forever on the 15s-cap
  backoff (40+ guard hits observed in 3 minutes after clicking a stale
  badge). The entry is disposed, evicted, and the active key restored to
  the primary, mirroring the existing missing-connection fail-stop.
- The Bot Mode SDK deleteProfile path now refreshes $profiles after a
  successful delete, so the profile rail drops the dead badge instead of
  keeping a clickable ghost. (The Desktop dialog path already refreshed
  via onDeleted; the SDK path was the gap.)

Tests: two fail-stop regression tests (profile-gone + mid-delete guard
rejections, sabotage-verified to fail without the fix) and a refresh
assertion on the SDK delete ordering test.
2026-08-17 17:18:47 -07:00
Teknium 9aa1413781 feat(desktop): extend kanban native notifications to blocker/failure events
Builds on @nductien's completion-notify module (PR #87705):

- Notify on the gateway watcher's full terminal set — blocked, gave_up,
  crashed, timed_out, block_loop_detected — not just completed. A worker
  hitting a blocker while the user is away was the original community ask.
- Route all notification copy through the kanban plugin i18n bundles
  (en/ja/zh/zh-hant), with an English-bundle fallback when the translator
  isn't bound yet.
- Wire the ctx.os.notify door so events also fire a NATIVE OS notification
  while the user is away from the Hermes window (host.notify toast covers
  the foreground). OS-door failures are isolated from the toast path.
- Docs: Desktop notifications section in kanban.md, including the
  app-running coverage window.
2026-08-17 17:00:00 -07:00
nductien 1802620847 chore(desktop): remove local markers from kanban notify comments 2026-08-17 17:00:00 -07:00
nductien a30636f817 feat(desktop): surface native OS notification on Kanban task completion
When a background agent completes a Kanban task, the Desktop app now surfaces a native OS notification with the task summary and a one-click "Open Kanban" action.

Rides the existing /events WebSocket (onEventsFrame in api.ts). A
new module completion-notify.ts implements cursor-based per-board
deduplication with baseline from GET /board, fail-closed on unknown
baseline, and reconnection safety. The notification uses the existing
host.notify() and host.navigate() SDK APIs.

Files changed:
- apps/desktop/src/plugins/kanban/api.ts (+8, -1) — wire completion-notify
- apps/desktop/src/plugins/kanban/completion-notify.ts (+89, new)
- apps/desktop/src/plugins/kanban/completion-notify.test.ts (+378, new)

19 targeted tests pass (0 fail).
2026-08-17 17:00:00 -07:00
Teknium 7999ac6e3d feat(desktop): shared 'Applies to' profile scope across settings pages and Messaging
Bring the per-profile scoping affordance the Gateway page already has to
every config-backed settings surface. A new shared nanostore
($settingsScopeOverride in store/settings-scope.ts) holds one "Applies to"
selection that persists across pages; a reusable SettingsProfileScope chip
row (app/settings/profile-scope.tsx) renders it. Hidden with fewer than two
profiles, and null (follow the active profile) keeps every request on the
exact pre-existing unscoped path.

Scoped pages:
- Model / Workspace / Safety / Memory & Context / Voice / Chat / Advanced
  (ConfigSettings): config record + schema queries and the debounced
  autosave PUT now carry the selected profile; the inner page remounts per
  scope so drafts can't leak across profiles. ModelSettings threads the
  scope through model info/options/aux/MoA fetches and assignments; memory
  provider config/OAuth panels follow.
- Tools & Keys (KeysSettings via useEnvCredentials): env list + save/
  reveal/delete target the selected profile's store.
- Messaging overlay: platforms, enable/save/clear, pairing approve/revoke
  are scoped; the list blanks on scope switch so stale rows can't be
  toggled against the wrong backend.

Plumbing: hermes.ts REST helpers gain optional trailing `profile`
parameters (config, schema, env, memory provider, messaging, pairing,
model endpoints) resolved through the existing profileScoped() ladder —
omitting them is byte-identical to before. The cron model-impact warning
is skipped for scoped applies (it belongs to the other profile's backend).
An app-wide profile switch drops the override so edits can't silently
stay pointed at the previous target.

i18n: new settings.profileScope.{appliesTo,editsProfile} keys in
en/zh/zh-hant/ja/ar.

Capabilities (app/skills) and Scheduled Jobs (app/cron) verified: both
already thread their profile scope through every fetch and mutation.
2026-08-17 16:55:14 -07:00
hermes-seaeye[bot] 77d6c78cf5 fmt(js): npm run fix on merge (#88760)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-17 23:46:08 +00:00
Teknium ae5c4c1672 feat(desktop): Discord-style group-chat rows in Bot Mode, opening in the main chat window
Group chats in the Hermes Bots roster were rendered as a section header
("HERMES, PAPERCLIP MANAGER" + divider + tiny "Open chat" link) with each
member bot listed underneath — reading as separate DMs, not a group — and
opening the room rendered it INSIDE the narrow bots side panel.

Roster (plugin.js):
- Each group chat is now ONE standalone roster row (GroupRow), Discord-style:
  stacked member avatars (BotFace composite, org glyph when empty), group
  name, member count, latest room line as the preview with markdown syntax
  flattened, relative last-activity time, and the "needs you" badge on the
  row itself.
- The roster is a flat list: bot rows and group rows interleaved in the SAME
  pin+recency ordering (a group's recency = its newest room-log entry).
  Bots keep their individual DM rows; the group is an additional
  independent row. The groupRoster() sectioning is removed.
- New stripPreviewMarkdown() flattens **bold**, `code`, > quotes, links,
  and headings out of BotRow and GroupRow previews (raw ** and > were
  leaking into row previews).

Main-window takeover (sdk/index.ts + plugin.js):
- New generic SDK door host.openWorkspace(id, { render, title, minWidth,
  onClose }): registers a placement:'main' pane docked center into the
  workspace zone (the same shape session tiles and previews use), wires
  registerPaneCloser so tab Close / ⌘W tears the registration down, and
  reveals it. Re-opening the same id refreshes in place and re-fronts.
  Returns a disposer.
- Clicking a group row calls openGroupChat(): on desktops with
  host.openWorkspace the room opens as a tab taking over the MAIN chat
  area; older desktops keep the exact in-panel GroupChatWorkspace fallback
  (feature-detected, established Bot Mode pattern). Disband closes the
  main-window tab too; the composer/round-robin logic is untouched and
  renders identically in both hosts.

Tests: roster-groups rewritten for the flat model + new helpers;
group-chat/create-group-chat source contracts updated to the
openGroupChat door; profile-prewarm harness stubs stripPreviewMarkdown.
2026-08-17 16:39:59 -07:00
Teknium d16413ef43 fix(desktop): stop Skills Hub picker overlaying the installed list and cut Capabilities lag
Layout (overlap bug): the EmbeddedHubPicker section had no flex
containment — its fixed-height iframe viewport made the section's
min-content height rigid, so at a tall persisted drag height or a short
window the flex column starved the installed-skills area to 0px and the
hub header row painted straight over the list's sort strip and "changes
apply to new sessions" footer. The picker section now clips its own
content (overflow-hidden, shrinkable, min-h for the header row), the hub
viewport uses flex-basis instead of a hard height so it gives pixels
back first, the list region keeps a min-h-40 floor, and the sash drag is
clamped against the actual column height (list reserve) rather than just
the window.

Perf (Capabilities lag):
- The hub iframe (a full Docusaurus site) mounted eagerly with the view
  and re-mounted on every scope change (key={`picker-${scopeKey}`}).
  It now lazy-mounts the first time the Skills tab is shown, then stays
  mounted but display:none across Tools/MCP so a tab bounce never
  reloads the site. The scope key is gone — the picker fetches nothing;
  the profile rides into each install call as a prop.
- EmbeddedHubPicker is memo()ed and subscribes to the single
  UPDATE_ALL_KEY running flag via useStoreSelector instead of the whole
  $hubActions map, which churns on every tailed log line during installs.
- Collapse state now persists through the pane store (0 = collapsed),
  matching DetailPane, instead of resetting open on every mount.
- CapRow gets content-visibility:auto so 80+ row lists skip offscreen
  layout/paint (fixed row heights keep scroll geometry stable).

Validation: npm run check:lint (tsc x3 + eslint) clean; vitest
src/app/skills 9/9 passing, including a new test asserting the iframe
is absent on non-Skills tabs, mounts with the Skills tab, and survives
a tab switch hidden.
2026-08-17 16:39:52 -07:00
Teknium 76ff060748 fix(desktop): clean up Plugins settings — drop Example Plugin, hide bundled built-ins, add profile scoping
- Remove the bundled Example Plugin from the desktop renderer plugins
  (apps/desktop/src/plugins/example/). Reference/demo plugins live in the
  companion hermes-example-plugins repo (already pointed to by
  src/plugins/README.md); shipping the counter demo in everyone's Settings
  doubled UI noise for no user value.
- Agent plugins section now hides ALL repo-bundled built-ins
  (source === 'bundled': browser/browserbase, cron_providers/chronos,
  model-providers/deepinfra, platform adapters, image/video backends, …).
  The section is the control panel for plugins the user installed
  (user/git/project/pip/portable); built-ins ship enabled-by-default and
  are configured from their own surfaces. The HIDDEN_KEY_PREFIXES list
  stays as a fallback for older backends. Count pill reflects the
  filtered list.
- Add an "Applies to" profile scope selector to the Agent plugins section
  (same pattern as the Capabilities scope selector): list/toggle any
  profile's plugins without switching the whole app. Backend:
  plugins.manage now accepts an optional `profile` param via the same
  set_hermes_home_override contract as cron.manage / mcp.servers.*;
  unscoped calls are unchanged, so older backends keep working.
- i18n: new settings.plugins.agent.appliesTo key (types + en + zh; other
  locales fall back through defineLocale).
- Tests: plugins-settings.test.tsx covers bundled hiding, prefix fallback,
  count pill, selector visibility, scoped list/toggle payloads; new
  tests/test_plugins_manage_profile_scope.py mirrors the cron.manage
  profile-scope tests (scoped read, unknown-profile 4064, no override
  leak, unscoped contract unchanged).
2026-08-17 16:39:47 -07:00
Teknium 9a85769fc3 feat(desktop): unify Gateway + Connections into one Gateways settings page
Merge Settings → Connections into Settings → Gateway as a single
"Gateways" page:

- One nav entry ("Gateways"); the Connections nav entry is removed. The
  legacy `?tab=connections` deep link stays in the route enum and
  redirects to the unified page, and renders it in the interim frame so
  saved routes/bookmarks don't break or flash.
- The connections registry UI (list, add, edit, delete, test, make
  primary, update-all) moves into its own component
  (connections-registry.tsx) composed at the bottom of the Gateways
  page; connections-settings.tsx is deleted (nothing else imported it).
- The Add flow now offers ALL kinds: Local, Hermes Cloud, Remote
  gateway, and SSH (previously only remote/ssh). The Local kind button
  is disabled while the managed local entry exists; a hint points cloud
  adds at the sign-in/discovery flow above.
- Duplicate prevention, enforced in the save path on both sides of the
  IPC boundary (renderer inline error + main-process
  normalizeConnectionInput throw): only one 'local' entry ever;
  remote/cloud dupes keyed on the normalized URL (trim, strip trailing
  slashes, lowercase) across both kinds; ssh dupes keyed on normalized
  user@host:port + remote profile.
- The page-level "Applies to" ScopeChip row is gone. Per-profile
  gateway overrides are now an explicit "Per-profile overrides"
  subsection listing the default connection and each named profile,
  with an Edit affordance that drives the same scope state machinery.
- Command palette and profile-rail deep links retarget the unified
  page; i18n nav rename + new strings across types, en, ja, zh,
  zh-hant, ar.

Tests: new connections-registry.test.tsx (registry UI + dedupe helper
units, including the inline duplicate rejection), electron
connection-registry.test.ts dedupe cases, and updated
profile-rail-connect test.
2026-08-17 16:39:40 -07:00
Teknium 91878fb3c1 fix(desktop): visible eye catchlights on dark-bodied Bot Mode avatars
The BotFace catchlight dots were hardcoded white. On dark bodies
(maroon/ink/oxblood) isDarkColor() flips the pupils to light cream
(eyeFill), so a white catchlight on a cream pupil is invisible — those
avatars looked like they had no dots in their eyes (image14 report).

Catchlight contrast now follows the pupil, not the body: dark pupils
keep the white sparkle, light pupils get a dark one (rgba(0,0,0,0.6)).
The animation clock only moves the hb-hl elements (cx/cy) and never
touches fill, so the initial-render fill carries through every frame.

Verified with a rendered before/after/control strip: BEFORE maroon has
no visible dots, AFTER shows clear dark dots in the cream eyes, light
control body unchanged with white catchlights. Plugin suite green
incl. new face-catchlight.test.mjs.
2026-08-17 16:35:12 -07:00
BkashJEE 6c84c33546 fix(bot-mode): explain hidden cronjobs in the Routines pane empty state
Partial salvage of PR #88561 (routines-filter-hint half only; the pet
gallery pagination half is out of scope for #88263 and was skipped).

When the cron store has jobs but none surface for the active bot (older
gateway without profile scoping, no [bot:<name>] tags matching), the
Routines pane now explains that cronjobs exist but are hidden, instead
of showing the generic empty state — so users don't believe their
scheduled jobs disappeared.

Port of NousResearch/Hermes-Bot-Mode#95 (repo archived, ported upstream).
2026-08-17 16:34:02 -07:00
ScaleLeanChris 799d3fe021 fix(desktop): show legacy cronjobs in default bot
Signed-off-by: ScaleLeanChris <chris@scalelean.com>
2026-08-17 16:34:02 -07:00
Andrew Walker e3c4bfe9ab fix(bot-mode): show profile-owned cronjobs 2026-08-17 16:34:02 -07:00
Teknium 399fdeae8b fix(bot-mode): plugin listener leaks, jsx key prop, OAuth poll overwrite
Three bugs in apps/desktop/src/plugins/hermes-bots/plugin.js:

1. register() subscribed host.state.profile / host.state.gateway listeners
   without capturing the unbind functions, so a plugin disable -> re-enable
   cycle stacked a duplicate listener per cycle that kept firing until app
   quit (same survives-disable class as the face clock before its
   onDispose hook). The unbinds are now captured and released via
   ctx.onDispose.

2. CreateRoutineDialog passed `key: createTarget` INSIDE the jsx() props
   object. The react/jsx-runtime silently ignores a `key` prop there (key
   is the third jsx() argument), so switching the routine owner never
   remounted the dialog and it kept stale per-bot form state. Moved the
   key to the third argument; the source-shape test now pins the correct
   shape and rejects the prop form.

3. beginOAuth() overwrote pollRef.current without clearing an existing
   interval, so a retry / double-click while a poll was live orphaned a
   2s poller that ran until unmount and could flip the phase from a stale
   OAuth session. It now clears any live poll before starting a new one.
2026-08-17 16:33:42 -07:00
Teknium aa2622128f fix(hermes-bots): show profile pics in group chat rooms
Community report: group chats showed neither profile pictures nor proper
names for members (names fixed in #88721; this adds the avatars).

- Every bot message in a group room now carries the speaker's avatar,
  resolved through the same botAppearance pipeline as the roster: custom
  uploaded/generated/pet images honored, backfilled PNGs dropped so the
  animated math face renders, deterministic shape+color for bots with no
  customization (including remote speakers with no local meta).
- The room header shows the member roster as overlapping faces (capped
  at 6) with a display-name tooltip, alongside the existing count.
2026-08-17 16:29:45 -07:00
Teknium 9b112e5736 refactor(desktop): extract pool teardown into pool-stop.ts with behavior tests
Follow-ups on the salvaged bounded-teardown fix:

- Replace the source-grep regression test (backend-lifecycle.test.ts asserted
  main.ts source text) with behavior-contract tests against the extracted
  createPoolStopper(): handle retention until bounded exit, stop dedup,
  stopAll completeness, and the respawn-awaits-dying-backend gate.
- Gate the registry-local spawn path on the in-flight stop too (sibling site
  the original PR predates).
- Route teardownPoolBackendAndWait through the shared stopper so profile
  delete/rename teardown covers both local pool keys with the same bounded
  semantics.
2026-08-17 16:26:02 -07:00
giga corp c07171209a fix(desktop): await pooled backend teardown 2026-08-17 16:26:02 -07:00
Teknium c6a0789bc5 fix(desktop): retire old-name renderer sockets and widen the deletion gate for renames
Follow-ups on top of the salvaged rename lifecycle:

- Retire both local renderer socket scopes for the OLD profile name before
  the rename PATCH (rename-profile-dialog), mirroring the delete-path fix
  from #88638 — a retained socket otherwise treats the rename's backend
  teardown as a transient drop and its reconnect respawns the old-name
  backend, whose ensure_hermes_home() recreates the directory the rename
  just moved (#45474).
- Hold the profile deletion gate for rename requests too, so a concurrent
  renderer reconnect entering ensureBackend() mid-rename cannot respawn the
  old-name backend.
- Regression tests for retire-before-rename ordering and the
  validation-rejected path.
2026-08-17 16:15:22 -07:00
wangdong 69abe41f36 fix(desktop): re-home backend after profile rename 2026-08-17 16:15:22 -07:00
Teknium 4b7eb02907 fix(hermes-bots): group chats never surface @default — Hermes keeps its name
Community report: in a Bot Mode group chat with the primary agent, Hermes
lost its name and rendered as @default in the room.

- Workspace speaker labels now render the roster displayName (default →
  Hermes, titles respected) instead of the raw @profile id. Clicking a
  speaker reveals the full disambiguated form — Display-gatewayname
  (@handle) — so same-named agents on two connections stay tellable
  apart on demand; naturally they just show their display name.
- Room transcripts fed to members render the default profile as Hermes
  (new groupSpeakerLabel helper).
- The per-turn prompt addresses members by @handle (@hermes for the
  primary profile) instead of @default, and parseGroupChatMentions now
  resolves @hermes back to the default member via botHandle.
2026-08-17 16:14:53 -07:00
Teknium 66221397a1 fix(bot-mode): always hide Bot Mode sessions from the global Sessions sidebar
Bot Mode's group chats spawned one per-member session per room, and those
"Group: ..." rows (plus canonical Bot Chats when the old eye-toggle pref was
off) flooded the global Sessions sidebar — a 6-bot room dumped six identical
rows into recents (reported with screenshot, Aug 17).

Plugin (apps/desktop/src/plugins/hermes-bots/plugin.js):
- session.create now passes hidden:true UNCONDITIONALLY for both canonical
  Bot Chats and group-room member sessions; the $hideBotChats pref, its eye
  toggle, and its storage hydrate are removed (Bot Mode sessions are plumbing
  or plugin-owned forever-chats, never scratch conversations).
- hideOwnedBotSessions(): idempotent reconciliation sweep over every owned
  session id (bot meta canonical chats + each room's member sessions) via
  session.set_hidden, run on plugin load and on each gateway reconnect, so
  rows born visible under the old pref get cleaned up.
- The Bots session browser and canonical-chat recovery scan pass
  include_hidden:true so they still see the rows they own.

Gateway (tui_gateway/methods_session.py):
- session.list honors an include_hidden param (default off — the resume
  picker and all global callers keep dropping hidden rows).
- session.set_hidden gains a durable fallback: when no LIVE runtime session
  matches, resolve the stored session id in the target profile's state.db
  (via resolve_session_id) and flip the flag there. The sweep holds stored
  ids for chats that aren't live; the old live-only lookup 4001'd them.

Validated E2E with real imports against a temp HERMES_HOME: born-hidden row
(hidden=1), profile-scoped session.list default vs include_hidden (0 vs 1),
and stored-id sweep on a non-live legacy row (hidden=1). Plugin suite
167/167; new RPC regression tests in tests/tui_gateway/test_session_hidden_rpc.py.
2026-08-17 16:02:42 -07:00
hermes-seaeye[bot] bb92473074 fmt(js): npm run fix on merge (#88720)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-17 22:59:42 +00:00
embwl0x 55e34fb7d0 fix(desktop): avoid local profile REST backend spawns 2026-08-17 15:51:02 -07:00
Gille 976183f536 fix(desktop): stop deleted profiles reconnecting 2026-08-17 15:46:44 -07:00
Teknium 4151599e81 fix(desktop): cross-machine bot DMs — canonical chat, sender attribution, reply relay
Follow-up to #88664. The remote @mention delivery path had three gaps that
made cross-machine DMs half-work:

1. No reply relay: deliverRemoteRosterMentions submitted the prompt and
   toasted, but never polled — the handoff note promised a relay that never
   came. Now a bounded poll (same shape as a group member turn: new
   assistant message after the baseline, 180s cap) relays the recipient's
   reply as a notification, or says it's still pending.
2. No sender attribution: the raw user text was submitted, so the
   recipient's messaging protocol never recognized an agent-to-agent
   message. Deliveries now carry the standard
   "Message from 🤖 <sender> (@handle):" prefix.
3. Duplicate Bot Chats: every mention minted a fresh "Bot Chat" session.
   ensureRemoteCanonicalChat now resolves the recipient's pinned canonical
   chat from its profile ui_meta, falls back to resume-by-title, and only
   creates when neither exists — mirroring ensureGroupChatSession.

Tests: remote-dm-delivery.test.mjs (pin-resume without create, attribution
prefix + reply relay via vm-run behavior tests, source contract for the
bounded poll). Plugin suite 187/187.
2026-08-17 15:28:43 -07:00
Teknium d0b02efa9d fix(desktop): don't treat a mid-switch 404 as session deletion (#88540)
A resume racing a profile/connection swap can 404 on a backend that
does not own the session; the terminal-failure branch then dropped the
window to the blank new-chat route while the target session was alive.

goneSessionVerdict() now gates the draft fallback: a session created
this run, still listed on some profile, or looked up while a gateway
swap is in flight arms the bounded auto-retry latch instead of
discarding the route. Draft remains the calm-conditions path for
verifiably dead ids.
2026-08-17 15:27:00 -07:00
NealZhouPanda 8484786832 fix(desktop): align BOTS roster preview with the session its click opens
The BOTS sidebar previewed each profile's most recently active session
(last_session) but clicking the row opened the pinned canonical chat —
two different session identities, so the preview described one
conversation and the click landed in another.

- profiles.list gains an optional preferred_session_ids param
  ({profile: session_id}): an exact, existence-checked per-profile
  lookup that resolves hidden rows and compression lineages to the
  live tip (the same resolver session.resume uses) and returns a
  preferred_session summary alongside the unchanged last_session.
- The hermes-bots plugin sends its canonical-chat pins with each
  roster poll and previews preferred_session ?? last_session.
- openBotCanonicalChat verifies pins through the precise resolver
  instead of a paginated, hidden-excluding session.list window that
  misjudged real hidden pins as gone; transient lookup failures no
  longer clear the pin or mint a replacement chat.
- Grandfathering: a bot with history but no pin adopts the previewed
  session on first open instead of minting a new empty chat — the
  behavior the design comment already promised.

Closes #88200
2026-08-17 15:26:48 -07:00
Adolanium 69a62ce2c8 fix(desktop): keep the Bot Chat pin
A failed intro used to clear the pin even though the chat was already made, so the next click opened a second one. A missing pin grabbed the newest session, even when a real Bot Chat was in the list.

Failed intros now keep the pin. A missing pin looks for a session titled Bot Chat. If that is not there, we try the stored pin instead of the newest row.

Ported from NousResearch/Hermes-Bot-Mode#59 after Bot Mode moved in-tree.
2026-08-17 15:26:48 -07:00
hermes-seaeye[bot] dc2e9dde9a fmt(js): npm run fix on merge (#88671)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-17 21:39:36 +00:00
Teknium 62f376279b feat(desktop): cross-connection Bot Mode — Create-on picker + multi-machine group chats
Builds on the salvaged #88598 multi-source roster work:

- New Agent "Create on" picker (multi-connection registries only): the
  profiles.create/configure/describe/mcp.catalog calls route to the picked
  connection's backend via host.requestProfile route descriptors — the
  window's active gateway never switches. Remote-target drafts discard via
  the remote CLI; appearance/title write into the remote profile's ui_meta
  and asset store; the taken-name check is scoped to the target machine's
  roster; the live SkillsView Capabilities tab (active-gateway-bound) falls
  back to the staged checklists for remote targets.

- Group chats can seat bots from other registered connections: member turns
  (session.create/resume, prompt.submit, reply polling) route to each
  member's own source through the new requestForBot helper. Remote member
  descriptors persist on the room record (bot-meta is active-gateway-scoped
  by design); watermarks/sessions key by source-qualified member keys so
  same-named agents on two machines never share state; @name-device handles
  resolve in room mentions; room lines and turn prompts badge cross-machine
  speakers with their device.

- pidIsOurDashboard: a dead remote PID (ps exits non-zero) now reads as
  FOREIGN instead of throwing "Could not verify SSH backend process
  ownership" — the misleading error from #88625's secondary report.

Tests: cross-connection-bots.test.mjs (route descriptors, requestForBot
routing, member keys, disambiguated mentions, device badges, source
contracts); plugin suite 180/180; electron vitest 220/220.
2026-08-17 14:32:52 -07:00
Al Zilla f89f884a5d fix(desktop): mention Connections bots from this local chat
Stay on the default gateway. Bot Mode still lists every Connections
agent. Clicking a remote row no longer hops the window onto SSH —
@dixie / @bob-spark in this chat resolve against the roster and
Desktop delivers in the background via requestProfile.
2026-08-17 14:32:52 -07:00
Al Zilla 30299efa38 fix(desktop): open SSH default bots on the remote root profile
Clicking Mac Mini / Spark (the device default row) passed the desktop
pool key as the remote Hermes profile. That profile does not exist, so
the chat never opened. Named profiles (bob, dixie) already sent a real
name and worked.

Also refuse to fall back to this-device's default chat pin when the
remote source did not actually become active.
2026-08-17 14:32:52 -07:00
Al Zilla c2c3058eca fix(desktop): never spawn SSH dashboards just to list Bot Mode agents
A leftover sshConnections key made roster polling call
ensureRegistryBackend for every SSH source every ~5s. That spawned
remote dashboards, the mux died, and the renderer hit hermes:api
ECONNRESET / liveness-probe drops.

SSH inventory stays on the cached ls path only. Clicking a bot still
dials that one source.
2026-08-17 14:32:52 -07:00
Al Zilla 4afe08f494 fix(desktop): retry failed SSH Bot Mode inventory after cooldown
A first inventory miss used to stick forever as a seeded default until
the user hit Test. Retry after 60s; a successful cache still never
re-probes, and Test still forces an immediate refresh.
2026-08-17 14:32:52 -07:00
Al Zilla 89877d10a5 fix(desktop): drop Bot Mode rows for removed SSH connections
Remembered remotes were restored whenever the union omitted their
connection id, so a deleted registry source could keep resurrecting
until remount. Only restore rows that still belong to a registered
source.
2026-08-17 14:32:52 -07:00
Al Zilla 4068162118 fix(desktop): keep SSH Bot Mode agents visible across local clicks
Clicking the local agent left connectionId null, so the roster treated
the registry primary (often an SSH box) as active and dropped its
profiles while inventing a "This device" shadow of default.

Inventory undialed SSH sources with a cached ls of ~/.hermes/profiles
instead of requiring the window to switch onto that machine. Hostile
HERMES_HOME values are rejected before the listing command runs.
2026-08-17 14:32:52 -07:00
Teknium bd9c7d87f0 feat(desktop/bots): add disband (delete) for group chats
Group chats could be created but never deleted — the only way out was
manually ungrouping every member, which still left the shared room log
in plugin storage forever.

The group-chat workspace header now has a trash button behind a
ConfirmDialog. Disband is soft: it clears every member's group
assignment (syncs cross-machine via ui_meta), drops the room log from
the atom and the persisted group-chats map, clears the needs-you badge,
and closes the room view. The members' per-group gateway sessions
("Group: <name>") are intentionally kept and remain reachable from each
bot's session browser. A room with a drive still in flight leaves a
runtime-only epoch-bumped tombstone so the round-robin loop bails at its
next member boundary; the tombstone is never persisted.
2026-08-17 14:32:11 -07:00
Teknium 39c0bc80b7 feat(desktop): link the installer from the app-build-out-of-sync warning
The skew banner told users to run the in-app update, but on machines where
the local desktop pack is the broken step (e.g. the get-windows win32
binding staging failure in #88251), rebuilding in place cannot succeed.
Reinstalling from the packaged installer sidesteps the local build
entirely, so offer it as the escape hatch:

- Settings > About skew banner gains a "Get the installer" button opening
  https://hermes-agent.nousresearch.com/ via openExternal
- banner copy now mentions reinstalling when the update doesn't clear the
  warning
- all 5 locales updated (new bundleOutOfSyncAction key)
2026-08-17 14:31:09 -07:00
hermes-seaeye[bot] cf7b3d0c90 fmt(js): npm run fix on merge (#88652)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-17 21:15:38 +00:00
Brooklyn Nicholson 3ead0f8dc1 feat(desktop): widget clicks reach the agent as hidden user turns — the widget updating IS the response
An inline ::preview widget could render and be clicked, but the click went
nowhere: the sandbox has no channel to the agent, so an interactive chart
was a dead end. Now the frame injects a second script beside the measurer
that gives the page one voice:

  window.hermes.send('get-price eth')
  <button data-hermes-send="get-price eth">ETH</button>  (zero-script form)

The prompt rides postMessage up tagged with the mount token, then goes
through the composer's own send path (requestComposerSubmit -> prompt.submit)
flagged display_kind=hidden — the same row-typing auto-continue and internal
notifications already use. The agent wakes and takes a real turn; the
durable row persists (context, resume, DB audit); but NO bubble renders,
live or on reload. The user clicks ETH and the chart just changes — the
off-screen loop is click -> hidden turn -> agent rewrites the widget file ->
frame hot-swaps.

Trust boundary matches size reports and is tighter where it matters: mount
token required (frames can't forge each other's intents), string-only,
trimmed, capped at 500 chars, throttled to one intent per second per frame.
The gateway whitelists display_kind to "hidden" — the RPC can't mint
arbitrary row types — and the flag threads through both turn paths (inline
and compute-host isolation) so isolated sessions don't resurrect bubbles on
resume.

The desktop platform hint teaches the model to wire interactive widgets
with data-hermes-send and to answer clicks by updating the widget's file
rather than with prose; the SDK doc documents the contract.
2026-08-17 16:08:18 -05:00
Teknium a13be69572 feat(desktop): warn in About when the app build is out of sync with the runtime
hermes update moves the source tree, but the desktop UI (including bundled
plugins like Bot Mode) is compiled into the app binary at build time. A
terminal-side update — or an in-app update whose bundle-swap leg failed —
leaves a new runtime under an old renderer: About reports the new Hermes
version while the sidebar is missing that version's desktop features
(the 'no Bots tab after the Bot Mode update' reports).

Detect the skew by comparing the packaged install-stamp commit against the
tree (git rev-list --count <stamp>..HEAD -- apps/desktop) and surface it:

- Settings > About: amber warning banner pointing at the updater
- macOS native About panel: suffix on the version line
- hermes:version IPC gains bundleOutOfSync / bundleCommitsBehind

Fail-quiet by design (no stamp / fallback stamp / git failure = no warning)
so dev runs and non-git builds never see a false 'install is torn' alarm.
All 5 locales covered.
2026-08-17 14:05:09 -07:00