The dialog inspects a source and shows its commit, but the agent half
cloned the branch tip at Install time: a branch that moved in between put
down a tree nobody reviewed, and the desktop half copied out of that
checkout followed it. Native Electron's probe returned no commit at all, so
its desktop clone had the same gap.
- plugins.manage install takes `inspected_sha` (custom sources without a
pin). The clone stays an ordinary branch checkout and is refused when its
tip is not that commit: "The source changed since you reviewed it ...
Re-open the install dialog". Not `ref`, which records a pin that refuses
every later `update`; not a detached checkout at the old commit, which
`git pull` cannot update. Catalog picks keep their pin.
- That install drops inspect's kept answer for the source, so re-opening
the dialog reads the moved branch instead of the stale commit.
- Electron: probePluginRepo returns the commit it read; installDesktopPlugin
takes it and installs exactly that tree (fetch + verify) or refuses.
Hardening on top of the contributor's Webapp install path (salvage #146132). A browser tab asks the
serving host to clone code onto it, so the host now decides what lands, not the tab:
- `ref` is required: the 40-hex commit the dialog showed (or the user's pin). The clone is checked
out at exactly that commit and the halves are read from that checkout, instead of re-using a
ten-minute inspection cache and installing whatever it named; a catalog install whose pin moved is
refused. `forget_inspection` goes away with the cache dependency.
- https only: `file://` would copy any folder of the host, `ssh`/`git@` spends the host's keys,
`http://` can be rewritten in transit. Native Desktop keeps those for a user at their own machine.
- The published tree may hold no symbolic link (a `desktop -> /anywhere` link in a repository
published that host folder) and is capped at 64 MB.
- A standalone plugin's in-tree `.hermes-package.json` is dropped as Electron's installer drops it:
only an installer writes the marker that pairs a folder with an agent package.
- `desktop_plugin_halves`: the helpers the installer shares become public names instead of
wrapper functions around private ones.
- Renderer sends `ref: plan.ref ?? plan.probe.sha`.
- Tests: the contributor's installer/RPC/route cases now run through an https identifier at a real
commit (only the clone's network leg points at the local repository); RPC cases folded into one
round trip; two added invariants (https only, link escape), each proven red with its guard removed.
In the browser-hosted app, installing a desktop plugin dead-ended: the install dialog could inspect a
repository through the gateway (`plugins.manage inspect`, #145770) but had nothing to install with.
A desktop-only package answered "This package has nothing to install here." and the desktop half of a
mixed one was skipped with a toast, because the only clone lived in Electron
(`installDesktopPluginFromGit`). Since #145072 the Webapp *loads* whatever sits in
`<root>/desktop-plugins/`, so the last mile was missing: no way to put it there from the UI.
This adds `plugins.manage` `install_desktop` / `remove_desktop` — the backend half of that install —
and points the dialog at them when it is not running in Electron.
- `hermes_cli/desktop_plugin_install.py`: clones a repository's desktop half into the app-level
`desktop-plugins/` root. Same resolution, folder name and package-marker rules as Electron, and the
same staged-copy-then-rename publication under the root's writer lock, so a reconcile pass cannot
copy a folder underneath it. The clone is held to the commit the inspection read, so a repository
that moves after review cannot install a tree nobody looked at; `force` re-inspects (a forced
reinstall means the repository moved). `remove_desktop_plugin` refuses a package's own half unless
forced, and refuses a linked folder it would only half-delete.
- `plugins_cmd_inspect.forget_inspection`: drops the ten-minute answer cache, used by a forced
reinstall.
- `desktop_plugin_halves`: `ROOT_WRITER` and `publish_desktop_tree`/`read_package_marker`/`mtime_ms`
go public (the installer shares the root's lock), a standalone plugin publishes with no marker, and
the Webapp's read router imports the root from the one place that defines it.
- `plugins.manage install_desktop|remove_desktop` + contract (`tools_mcp_plugins`), regenerated.
- Renderer: `desktopInstallSupported()` is also true in a browser-hosted tab, `cloneDesktopHalf` falls
back to the gateway, and a backend that predates the action keeps the old "unavailable in this
environment" wording. Uninstalling a disk plugin uses the same fallback.
- Docs: the Webapp install/remove paragraph now describes the working path.
Tests: 10 installer (real local clones: standalone vs package marker, force, sha pinning, path-shaped
names, linked folder, removal rules), 6 gateway RPC (incl. contract validation), 3 browser-modal cases
(desktop-only, both halves, old backend) beside the 6 existing ones, and one route test that installs
through the backend and then reads the plugin back over `/api/desktop-plugins/*` — the whole trip the
browser makes.
A Group Chat created before a gateway served the profile is imported into the gateway's store
and fenced in the standalone one (gateway/hosted_rooms_gateway_import.py). The Desktop's local
backend (`hermes serve`) forwarded room calls to that gateway from a hand list that stopped at
groups.approve, so groups.attachment.upload/download ran against the fenced copy and every
Attach files answered "This Group Chat is managed by another gateway.", and groups.discard (no
handler on this wire at all) answered "unknown method".
- The forwarded set is now the gateway route's own GROUP_METHODS, so a new room verb on the
gateway route is forwarded (and advertised in forwarded capabilities) without a second list.
- groups.discard gets a contract and handler on this wire: forwarded to the owning gateway, the
only runtime that offers Discard; refused (4127) on a room this backend drives itself.
- The owner hop accepts answer frames up to the largest room attachment (base64 of 15 MB plus
envelope) instead of websockets' 1 MiB default, so a forwarded download of a real file fits.
Fixes#145960
Refs #144648
Reported-by: dasader <dasader@users.noreply.github.com>
Review of #145981 (P2): after a Send is stored, a room preparation that keeps
failing (a member whose profile was deleted, a full room log) retried on every
driver pass forever, and the error only overwrote the process-wide driver
last_error that no client renders. The user saw "sent" and no member answered.
Now each room counts consecutive preparation failures (contention and
ownership moves never count). The third one appends ONE member.unavailable
event to the room ("Members could not be woken: <reason>"), which Desktop and
the Webapp already render, using the control headroom so a full room can still
say why. The room's status lists a Retry row (groups.retry, task_id
prepare:<room_id>) and a per-room last_error, and the driver stops preparing
that room until the next Send or Retry. A failed Retry stays stalled and is the
RPC's error, without a second notice.
Refs #145977
Any unknown JSON-RPC method on the tui_gateway route answered "the client and the Hermes
backend are out of sync (different versions)", which the Desktop/Webapp toast turns into
"update both" even on matching versions. A JSON-RPC client sends no version, so neither
route can know the versions differ: both now answer -32601 "unknown method: <m> — not
available on this Hermes backend" from one helper (the "unknown method:" prefix clients
match on is unchanged).
The concrete case was the group composer's groups.attachment.upload, which only the
gateway route served, while HostedRoomServerRPC declared accepts_attachments=False so a
member turn with a file failed attachments_unsupported_on_route. The tui_gateway route now
serves groups.attachment.upload/download over the same room attachment store, and its
member transport resolves event-bound bytes per member exactly like the gateway route
(bound_submission_payload, shared): documents ride as prompt path lines, images as an
in-process-only _hosted_images list handed to the turn as its image paths.
Refs #144648 (WA-20)
Refs #145184
The gateway inspection reported which halves a source ships but not the
commit it read, so for an unpinned Install from Git the reviewed tree and
the installed tree could differ if the source moved in between. Return
the inspected HEAD as `sha` (a catalog entry's is its reviewed pin) and
carry it through inspectAgentPlugin, so the install can be held to it the
way the native Desktop probe's will be. A cached answer keeps the sha it
read.
The component-detection rules now live in two inspectors (Python and
Electron). tests/fixtures/plugin_component_detection.json holds one set
of cases both run, registered as a shared fixture so editing it runs the
pytest and vitest consumers.
The install dialog inspected a repository only through Electron's
probePluginRepo. The browser-hosted app has no such bridge, so every
install stopped at "Plugin inspection is unavailable in this
environment" with a Retry that could never succeed.
Add a read-only plugins.manage inspect action. It resolves the source
with the installer's own rules, applies the kill list, clones into a
temporary directory outside every profile (catalog entries at their
reviewed pin) and reads only the manifest files; no plugin code is
imported or run. The renderer keeps Electron's inspection when present
and otherwise asks the gateway, with the same stale-result protection.
In the browser a desktop half cannot be installed: a mixed package now
installs its agent half and reports the desktop half as unavailable,
never as installed, and a desktop-only package says there is nothing to
install. Retry is hidden when it cannot help (inspection unsupported by
the backend, nothing installable here).
Rows the gateway bills to a subscription the account holds (billing_mode:
subscription) keep their free usage level, so a full allowance never dims
them, but the pickers no longer label them "Free": that subscription pays.
The ids ride on plan_usage.subscription_model_ids for Desktop/TUI; CLI and
messaging pickers use usage_tag_levels().
session.resume with omit_messages returns messages_omitted, but CanonicalSnapshot
forbids undeclared keys: every omitted Desktop open logged a contract violation and
the reply raised under strict checking. Declare it and regenerate the TS/OpenRPC.
The new test drives the omitted resume through dispatch, where the reply is checked.
A turn's message.* frames can reach the renderer twice: a reconnect
replay under new seqs, a superseded attempt that re-streams the segment
it already sent (#144609), a second socket. They carried no identity, so
the renderer could only append, and the copy painted beside the original:
inside the live bubble after its tool row, or as a second bubble.
The backend now stamps a prompt turn's frames (tui_gateway/
stream_segments.py): message.start carries the turn's turn_id; every
message.delta adds its segment (interim seals before it) and its offset
in UTF-16 code units inside that segment; every message.interim the
segment it seals. The contract and generated TS types carry the fields.
The renderer keeps a per-session cursor of how far the turn's reply has
been applied (use-message-stream/segment-identity.ts). A delta it has
already applied is dropped (an overlap keeps only the unseen tail), a
seal of a segment already sealed is a no-op, and a message.start whose
turn_id is the session's current turn is not a new occurrence. Frames
without a stamp (older backends, non-prompt emitters) take the old path,
and text the agent genuinely repeats in a later segment still renders:
identity, not content, decides.
The core e2e spec gains the reload-mid-answer step back and the replay
spec (start + narration re-sent when the tool starts).
Opened over http://<LAN, VPN or Tailscale IP> (the Webapp's documented
wildcard-host setup), the page is not a secure context, so the browser
exposes no crypto.randomUUID. Pressing Send cleared the composer, then
minting the submission id threw before the restore handler was in
place: the words were gone and nothing was sent. New chats, titles,
attachments, queue drains, pop-out windows and group operations failed
the same way.
Export the existing session-mutation id helper from @hermes/shared as
randomUuid (crypto.randomUUID when present, else
crypto.getRandomValues), re-export it from the plugin SDK, and mint
every renderer and hermes-bots id through it. An ESLint rule keeps
crypto.randomUUID out of src/, so the guarded call sites move to the
helper too. The composer now also routes a synchronous throw while
preparing a send through the same restore path as a rejection.
To keep sdk/index.ts within its scripts/check line cap, the comment on
the SDK's Panel re-exports shrinks to one line.
Refs #141864, #93508
(cherry picked from commit b55377a3a6bdb8788489e2194072475e3e30247f)
Settings hides the translucency row on Linux, but the renderer still
resolved the platform default (29% tint, a glass default that falls back
to Clear where glass is unsupported), drew the Clear overlay scrim for it,
sent it to main and persisted it to translucency.json. Main now refuses to
hand that value to a Linux window, but a hidden setting should have no
effect anywhere, so the renderer resolves it to off where the row is
hidden. The resolved off state goes to main over IPC, which rewrites a
translucency.json an earlier build left at 29, so an affected profile heals
on its first launch on this build.
Electron 44 honours setOpacity on Linux (X11 _NET_WM_WINDOW_OPACITY and
native Wayland alike), so the comments that called it a no-op are
corrected.
Co-authored-by: IPBDW <bagusdharma0202@gmail.com>
groups.log logged a contract violation on every read with bot replies because
RoomActor forbade the member fields the gateway stamps. Serve retry rows now
carry member_id and execution_generation, so Retry works over SSH, URL and
Cloud connections.
Rows HR-11, HR-14.
Refs #143547
A `file:` URL holding `..%252f` passed the renderer's encoded-separator check, because only after
one decode does it read `..%2f`. The gateway then decoded the path a second time when the first
reading did not exist, turned `..%2f` into `../`, and served a file from outside the folder the
URL names: the preview or clip on screen was not the file its label showed.
The renderer now refuses a URL whose decoded path still encodes a separator (`%2f`, and `%5c` in a
Windows path) or a dot-segment, as it already refused an encoded separator. The gateway never
decodes a `file:` URL's path twice, and its one-decode rescue for a doubly encoded plain path
(#103425) no longer applies when decoding would add a `.` or `..` segment.
The browser host's change made a failed native ticket mint reject on local Electron too, where
main dials the cached URL. Only the Webapp's own socket (native_dial=browser) rejects now; that
value is one shared constant, BROWSER_NATIVE_DIAL.
Ported from BearHuddleston's #93508.
@hermes/shared gets fileUrlToNativePath, which reads a file: URL the way the URL implies: a UNC
host or a drive letter is Windows, anything else POSIX. Previews, media and Electron's media
protocol use it, so a drive-letter or UNC URL names the same file on every surface and a URL that
encodes a separator names none.
Co-authored-by: emozilla <emozilla@nousresearch.com>
Carried from BearHuddleston's #93508: the browser bridge and transport,
launch-session handling, touch and phone layout, browser previews, file
staging, the host terminal rail, Webapp settings pages and media ticket
renewal. Relay-only and fence-only code stays out.
Co-authored-by: emozilla <emozilla@nousresearch.com>
Carried from BearHuddleston's #93508 onto main. The Webapp relay and the
profile-incarnation fence stay out: carried code follows main's
named-profile rule and refuses a missing or deleted profile home.
- Webapp routes: one-use launch tickets, window handoff, and gateway
WebSocket tickets minted for the signed-in browser
- Browser surface policy and the SPA document policy
- A host terminal for the browser that survives reconnects
- Staged browser uploads and file tickets; file.attach takes a staged upload
- hermes sessions adopt
- Webapp bundle build helpers and the renderer freshness check
- Regenerated gateway contracts
Co-authored-by: emozilla <emozilla@nousresearch.com>
Review fixes (Greptile on #143980):
- Ownership is exact: `plugins.manage list` reports each package's tools by
name, including the tools its MCP servers actually registered, instead of
`mcp__<server>__` prefixes (sanitized names can collide and a clamped long
name loses its prefix). A name two packages list belongs to neither;
Desktop's longest-prefix guess is gone and `tool_prefixes` is dropped.
- Ownership follows the chat: the list is fetched from the session's own
owner route with its profile (`knownOwnerForSession` +
`requestForSessionProfile`) and cached per owner, not from the window's
active gateway.
- Stale answers never restore removed ownership: each fetch carries a request
id and only the newest request for an owner may write; a plugin-list change
clears the cache and orphans in-flight answers.
- A failed fetch retries with a bounded backoff (2 s doubling to 60 s)
instead of latching the error.
- The producer match is a whole-path match (`/out/a.glb` never matches inside
`/out/a.glb.bak` or `/x/out/a.glb`).
A Desktop plugin can now register how Desktop shows a MEDIA: attachment
produced by one of ITS OWN tools (TOOL_MEDIA_RENDERER_AREA,
'transcript.toolMedia'). Ownership is provenance, never file type: the
transcript finds the tool call in that turn whose result produced the path
(earliest call wins, so a later `ls` only mentions it), and the plugin's
component replaces the built-in player only when that plugin's package
registered the tool.
Why: the elevenlabs-sound-effects and meshy plugins each needed a custom
card for their files and had to make the model emit a ::directive (plus a
backend handshake) to get one, which leaves non-Desktop users a raw line.
With this seam the tool keeps returning a plain MEDIA: tag every surface
understands and Desktop alone upgrades it.
- Backend: `plugins.manage list` rows carry `tools` (native tools the
loaded plugin registered, minus built-in names and names two plugins
list) and `tool_prefixes` (`mcp__<server>__` for each MCP server the
loader attributed to a portable package). Contract + generated TS.
- Desktop: lib/tool-media-renderers.ts (contract, producer lookup,
ownership resolution), store/tool-media-owners.ts (lazy per-route
ownership list), components/assistant-ui/tool-media-slot.tsx wired into
MarkdownLink's MEDIA and bare-path branches. Claims on core or other
plugins' tools, or from a desktop plugin with no agent half, are refused
with a console warning. A throwing renderer, a disabled plugin or an older
backend fall back to the built-in player.
- Props: file {path, name, kind, mime, resolveUrl()} (stream route for
audio/video, works on remote backends), toolName, toolCallId, args,
result, sessionId, fallback.
- Docs: desktop-plugin-sdk.md section with a worked example; skill ref.
The canonical session.resume / session.events.since replies carried only
approval and clarify prompts. Server-to-client requests sent through
gateway/session_server_requests.py (setup_beat, sudo, secret, batch clarify,
the Desktop UI bridges) kept no params and had no open_requests, so a
renderer reload mid-onboarding showed no card while the agent blocked up to
CARD_TIMEOUT_S. The legacy sidecar replayed them (tui_gateway/server_requests.py
open_requests); the shared channel already re-delivers open_requests from any
reply.
_Pending now keeps the frame's params; open_requests(events, session_id)
lists the requests still waiting on that live stream (with a batch's locked
answers), and both replies carry it. The contracts gain the optional field.
activate_plugin_now merged the gateway's and the Desktop/dashboard
backend's missing dependencies into one list, and the hint picked its
restart line from whether the gateway answered. A backend booted before
the install beside a gateway restarted since then got "hermes gateway
restart", which leaves the backend unable to load the plugin.
The activation now records which processes reported the gap
(missing_in: gateway / backend, declared on PluginActivation) and the
hint prints one restart line per process.
Three gaps in the restart notice, found in review of #143404:
- A plugin importing its dependency at module load fails to load in a
gateway booted before the install, so it had no activation summary and
enable still printed "nothing of this plugin needs a session or
restart". The gateway's reload answer and the in-process go-live now
carry a dependency-blocked entry for it (dependency_blocked_summaries),
kept out of the on_plugin_loaded payload since nothing of it loaded.
- PluginActivation (extra="forbid") did not declare missing_dependencies,
so every plugins.manage reply carrying it violated the wire contract.
Declared + regenerated the shared contract.
- The presence probe ignored versions: a running process holding x 1.2
satisfied x>=1.3 after a plugin update raised the floor. It now checks
the requirement's specifier, in this process and in the selected
generation.
The restart line also names the process that answered: the messaging
gateway, or the desktop app / dashboard when only the serve backend did.
Dependency activation is a boot decision: a gateway or dashboard running when
`hermes plugins enable` commits a new generation keeps the one it booted with.
Enable still nudged that gateway to reload, then reported "Gateway reloaded
plugins; nothing of this plugin needs a session or restart" while the plugin
failed to import its dependency there (a terminal backend then fails with
"No module named '<dep>'"), and discovery told the user to run
`hermes pm repair`, which changes nothing.
The activation summary now carries `missing_dependencies` read in the process
that loaded the plugin (the gateway, for its reload answer); `restart_required`
is set when this process or the gateway lacks them, and the CLI hint and the
discovery warning say restart when the selected generation carries the
dependency (repair only when it does not).
The broker's capability allowlist named only the deleted browser_navigate/click/type/... tools, so a
bound extension controller silently did nothing (review P1-1); owner ruling: remove the feature.
Drops the broker, artifact store, extension router, /v1/browser-control + /v1/artifacts routes,
browser.controller.* RPCs/events (contracts regenerated) and the per-request controller identity.
The authenticated-identity helpers bot relay and session ownership still use move to
gateway/session_identity.py; persisted API admissions carrying 'browser_control' still recover.
browser_exec is the only core browser path, so there is no Browser Use /
built-in tools switch to flip and no silent downgrade to announce.
- classic CLI, Ink TUI and the gateway browser.manage RPC lose the `use`
action (contract regenerated: BrowserAction, enabled, browser_use);
- /browser status no longer reports a mode; the Chromium-fallback line for
Lightpanda and the dead "chrome" engine row go with the built-in tools;
- browser_backend_notice leaves the session snapshot, the CLI banner and
the canonical contract.
TUI locale packs and _keys.tui.json drop the five slashCmd.ops.browser
keys whose only caller was `/browser use`.
* feat(connectors): list hosted apps without creating a guest identity
Opening the desktop Connectors page used to create a Nous guest identity:
connectors.list, connectors.catalog, connectors.accounts and
connectors.policy.get each created one before answering, because the
Portal's catalog route needs a token. A user who only looked at the page
got an identity anyway.
While there is no identity yet (and one may still be created), those four
reads now answer without one: the catalog from a snapshot that ships with
Hermes, an empty connector list, no accounts and no rules. Connecting an
app still creates the identity, as before.
scripts/refresh_connector_catalog.py rewrites the snapshot from a
signed-in install. It leaves logos out: no client draws them.
* feat(free-tier): sign-in offer for guests who connected apps
Every free-tier sign-in offer keyed on the welcome trial, so a user on
their own model key who connected apps through a guest identity never saw
one.
The offer record now tracks two offers on the same schedule. `trial` is
unchanged. `connector` is for a guest without the trial that has connected
an app: each app that finishes connecting sets `has_connected_app` on the
guest state (so it dies with the guest) and counts as a finished task.
free_tier.status (still a pure local read) adds connector_nudge_due_in, and
free_tier.claim_nudge takes a `kind`.
The desktop reads the connector offer whether or not the trial is
available, re-reads the status after a turn or a page connect, and shows
connector copy instead of the free-allowance copy. After a page connect
settles it also re-reads the catalog and rules, so the bundled catalog
from before the identity existed is replaced by the account's own.
* fix(connectors): point the sign-in hint at `hermes auth upgrade`
`hermes connectors` told users to run `hermes login`, which no longer
exists. Both hints now say "Run `hermes auth upgrade` to sign in."
* feat(connectors): read the public catalog with no token; one guest rule per entry point
The bundled catalog snapshot listed apps a new guest cannot connect and
went stale whenever the catalog changed. With no token, the Connectors
page now reads the Nous Portal's public catalog route
(GET /api/v1/connectors/catalog/public), sent with no Authorization and
parsed with the existing catalog model. Once a token exists the page reads
the signed-in route, as before.
Whether an entry point may create the guest identity is now declared once
per entry point instead of checked inside handlers:
- managed_client(creates_guest=...) is required: connect (page, agent,
card retry) and the explicit lists (CLI `hermes connectors list`, agent
manage_connections status/display) pass True, unchanged.
- account RPCs declare creates_guest on _account_method: catalog,
accounts and policy.get never create one; tools and the account writes
still do.
- the page's connectors.list never creates one; connect does.
With no token the page reads give true answers: public catalog, empty
connected list, no accounts. The invented "unrestricted" policy is gone:
the desktop asks for rules only once the list has rows, which needs a
token, and policy.get without one refuses with sign-in-required.
Deleted: the bundled snapshot, its refresh script, and the no-identity
stubs.
* fix(connectors): CI and review round: older backends, outside connects, link connects, guest opt-out
- CI: test_legacy_fallback_ticket_profile_verbs faked managed_client with
no arguments and gave the secondary profile no token, so the page list
(now token-gated, creates_guest=False) never reached it. The fake takes
the new keyword and the profile holds a token.
- Older backends: a trial claim sends free_tier.claim_nudge with no
params again. An older backend rejects the unknown `kind` key and would
have dropped the trial offer; the new backend defaults to the trial.
Only the connector claim sends `kind`.
- Outside connects: while the page's list is empty (no identity), every
finished turn or connect re-reads the list and catalog. An agent connect
in a chat then moves the page to the signed-in routes and its rules.
- Link connects: an agent status read that sees a connected app on a
guest without the flag arms the connector offer, so messaging and
one-shot connects (no operation watcher) count too.
- Opt-out: the connector offer requires nous.guest to be allowed.
* fix(connectors): the Connectors page list arms the connector offer too
A guest whose apps were connected by an older Hermes has no has_connected_app flag, and only the operation watcher or the agent's status read set it. The page's connectors.list now passes its rows to note_connected_apps_seen, which owns the any-connected check for both list reads.
* fix(connectors): review round 3: accounts after an outside connect, retryable offer record
- An identity created outside the page (an agent connect in a chat) now also re-reads the accounts cached while there was none, so the new account row, rename and remove show up.
- note_app_connected records the connector task before it sets has_connected_app. The flag ends list-read sightings, so a failed schedule write no longer leaves the offer unarmed for good.
Greptile: "Old allowance stays visible" (gateway/session_usage.py:101-102).
Both usage builders (gateway/session_usage.py::tui_usage and
tui_gateway/server.py::_get_usage) always send `calls` and send
`plan_gauge` only on a window plan, so a complete usage payload without
the key means the session is off the plan (or the allowance reset).
Desktop merged every payload into the stored usage, which kept the old
gauge forever. The new `mergeUsage` (apps/shared usage-tick) clears it on
complete payloads and keeps it across partial ticks; usageFromTick forwards
a top-level frame's gauge so a canonical counters-only frame is complete
too. The wire stays byte-identical for accounts never on a window plan.
The Ink TUI never reads plan_gauge, so it has no stale copy.
Greptile: "Headings mislabel pinned current models". sectionAt assumes picks-first order,
but the composer menu prepends a current model the catalog omits, so with featured A and
pinned custom X, X got "Recommended" and A "Other models". Re-apply the picks-first
order (splitRecommended) after the pin, and state the order contract on sectionAt.
Greptile: "Normal Desktop usage omits gauges". plan_gauge was built only in
tui_gateway/server.py::_get_usage (the embedded backend), but a normal local
Desktop session reads its session.usage ticks and message.complete usage from
gateway/session_usage (usage_stats -> tui_usage), so the status-bar allowance
never showed. Move the builder to gateway.session_usage.plan_gauge, use it on
both paths (omitted off a window plan, as before), and type it on the Usage,
SessionStats and session.usage contracts (regenerated).
Resolves the desktop i18n conflicts: main moved en/ru errorCodes into
en_error_codes.ts / ru_error_codes.ts, so usage_window moves there; ar/ja/zh/
zh-hant keep both usage_window and main's workspace_unavailable. _keys.desktop.json
regenerated.
* fix(desktop): catalog card actions sit above the card-wide hit area
On compact and hero cards the action slot comes before the title button,
whose ::after stretches over the whole card and painted on top of it, so
clicks on the switch or + opened the details instead.
* feat(desktop): install catalog entries with +, switch only once installed
Install is one-way, so it is now a + button instead of a switch that also
meant enable/disable. Installed entries keep their on/off switch. Featured
cards and the detail spell it out as "+ Install". A plugin's Uninstall
moves from the header trash icon to a labelled row at the bottom of its
detail.
* feat(plugins): badge the install dialog with the catalog tier
The dialog called every catalog pick Verified. It now says Official,
Verified or Community. plugins.catalog.lookup returns the tier so
hermes://plugin/install?catalog= links badge the same as in-app picks.
* refactor(desktop): plugin Uninstall row is its own component
Keeps PackageRow under its code-health complexity cap.
* chore(i18n): regenerate desktop locale keys for catalog.install
* fix(desktop): "Install here" badges the catalog tier too
The third way into the install dialog opened it with a catalog name but no
tier, so a community package still read Verified. Read the tier from the
cached catalog by name; uncached keeps the generic badge. Also note why the
catalog path passes entry.source as the tier.
Comment and docstring edits only (no code or assertion changes): bug
history in module docstrings, narration, cross-refs and test copies of
the handshake comment go; WHY comments on ordering, locking, the launch
profile scope and the old-backend wire constraint stay.
Since the unified gateway (#106742) the Desktop attaches to the shared
gateway instead of spawning its own `hermes serve`. Onboarding, the
welcome-trial claim and free inference decide "is this the Desktop app on
this machine?" from HERMES_DESKTOP and the spawn token in the process
environment, which the gateway never has. So `onboarding.state` answered
eligible:false for every new user, who landed on the provider picker with
no free account.
The answer now comes from the connection:
- The Desktop sends `client.capabilities {desktop_local: true}` first on
every socket, as a call of its own, before the boot's first
`onboarding.state` (the backend reads frames in order). An older backend
refuses only that call and keeps the server_requests answer.
- The gateway counts it only on a native-ticket connection, so a remote or
tunnelled client never gets the trial.
- Requests on that connection run under `serving_local_desktop(True)`, and
a chat it creates records the declaration in its launch policy, so the
chat's later turns run the same way (`local_desktop_turn`).
- A trial-only user has no configured model; a canonical chat freezes its
model at creation, so the chat now freezes the free model
(`_welcome_trial_model`) instead of refusing.
Live: a --fresh-install sandbox launch minted a guest account, opened the
onboarding chat and the free model answered.
Gateway-owned group rooms only reported a room-wide `working` flag, so a
client had no way to show which bot was busy. `HostedRoomService.status`
now returns `member_activity`: the room's live tasks (queued, running,
stopping) with their member, in admission order. `working` derives from
the same list. The field is optional in the contract, so older gateways
simply omit it.
Fixes#102196.
In canonical mode the picker filtered by connection membership alone, so it
offered parked profiles, retiring siblings, and (on a profile-bound
socket) siblings the caller may not seat. groups.create then refused them
by name, which left #141178 only half fixed.
groups.capabilities now returns seatable_profiles: the roster
gateway/session_hosted_members.member_roster gives THIS caller (served
bots minus problem/retiring ones, plus usable hosted_rooms.profiles
entries; served siblings only for a host-scoped socket). It is the same
rule and the same host_scope flag the create handler validates with. The
field is optional in the contract (TS + OpenRPC regenerated), and a gateway
that predates it keeps the connection-only filter.
The Desktop picker keeps a canonical-mode bot only when its target profile
is in that set.
Tests: tests/gateway/test_hosted_group_members.py::
test_capabilities_name_exactly_the_profiles_this_caller_can_seat (base:
KeyError 'seatable_profiles'), and canonical-group-capability-gates.test.tsx
"canonical creation offers only the bots the authority says this caller can
seat" (base: the parked bot is rendered).
MCP tool calls now send _meta.progressToken, so servers that emit
notifications/progress (Meshy refine, creative-lab) report live progress.
The executor binds a per-call relay; the MCP handler forwards each
notification to tool_progress_callback as a throttled (<=1 per 500 ms,
final always) tool.progress event. Surfaces:
- gateway event stream + legacy TUI gateway: tool.progress
{tool_id, name, progress, total, percent, message} (contract registered)
- Desktop: running tool row shows '42% · <message>' beside its timer;
plugins subscribe with ctx.onEvent('tool.progress')
- CLI: the running tool spinner shows the same text
Documented in the Desktop plugin SDK guide.
Symptom: a client attaching to a session with a plan (the classic CLI's
/resume, `chat -c`, /branch) gets no todo list from the owner's
session.resume reply. The only todo source is a later todo.updated frame,
which fires only when the model calls the todo tool again.
Root cause: the canonical snapshot (AuthorityConnection.resume) never had
a todo field. The TUI-gateway reply has carried todo_state since the
revisioned snapshots (itsflownium, 2026-08-29, 393af4a310); the owner
runtime (#106742) did not carry it over.
Change: the reply adds `todo_state`, the newest paired todo result in the
transcript it already loads (tui_gateway's _todo_state_from_history,
through the server module it is bound to, as session.resume's
display projection does). This is the snapshot the session's agent
hydrates from and its todo.updated frames carried. null when the session
has none. CanonicalSnapshot gets the optional field (the existing
TodoState model); TS and OpenRPC regenerated.
Why: the gateway stays the only source of task state, and a first
resume shows the plan with its revision.
Refs #134889
Refs #139158 (package 1)
Follows up #141090
A cron session only runs its own frozen fire. Anything else admitted into it
(a message typed into the Desktop chat while the job ran) made
session_cron.execute raise admission_conflict, which _execute_claimed logged
as a traceback and settled as the opaque "The admitted turn failed." card.
session_cron.execute now settles that admission as a failed turn whose text
names the restriction and whose error_surface is
{layer: gateway, code: cron_session_read_only, retryable: false};
completion_payload forwards a captured error_surface on message.complete.
The job itself still never runs for it.
Desktop gives cron_session_read_only its own card copy and the
"Start new chat" action instead of Retry. The TUI already renders the
specific text (no `error` field, so the bare-error rewrite does not apply).
"Copy error details" stamped `time:` with the copy moment, so a stale failure
read as a fresh incident. It now uses the bubble's recorded completion time
(the terminal frame's), or the hydrated row's own timestamp, and omits the
line when neither is known.
en.ts is over its size cap: the error-card layer tables move to
en_error_layers.ts to offset the new copy.
Salvages the idea of #141369 by @Ehsan-hash (cherry-picked as the parent
commit); this trims it to the cron producer, drops the new wire timestamp
field and the per-site allow-list in completion_payload, and reuses existing
bubble timeline metadata for the diagnostics time.
A live agent's 'rejected' can follow delivery: Codex turn/steer returns
False on an ACK timeout even when the server already consumed the steer.
The TUI read every same-generation 'rejected' as "never delivered" and
re-sent the words as prompt.submit, so the correction could run twice.
correct() now marks the no-agent refusal with delivered: False (declared
on CanonicalCorrectionAck, contracts regenerated). The TUI re-admits only
that reply plus the three pre-agent error reasons; a plain 'rejected'
settles as refused with the input retained, as on main. The salvaged
gateway tests are trimmed to the no-agent case plus a live-agent refusal
that must carry no marker.
A pane whose busy belief outlived its turn (a session switch, a reclaim)
sends the next message as session.steer / session.redirect. The owner
refuses it before delivery (execution_not_ready / stale_generation), and
both Desktop correction paths (the primary redirectPrompt and the tile
steerPrompt) threw that as a failed send: the optimistic row was
discarded, "prompt failed" toasted, and the composer's keep() fallback
never ran, so the text was lost.
Those refusals are now answered as "not corrected": the action returns
false and steerDraft's keep() re-queues the frozen words as the next turn.
A refusal that may have reached the turn still surfaces as an error.
isUndeliveredCorrectionRefusal lives in @hermes/shared so the TUI uses the
same reason set.
Fixes#141644