Commit Graph

8898 Commits

Author SHA1 Message Date
alt-glitch
c5a3c0f876 fix(plugins): address review — dashboard scan override, feed and pin-aware update signal, subdir coverage
- Dashboard: the update route answered a scan block with a bare HTTP 400,
  so the browser page could not show the findings or send force. It now
  passes scan_blocked through (update route only; install is unchanged),
  and the page's update button runs the same consent-then-scan flow as
  Desktop through web/src/lib/plugin-update.ts. AgentPluginUpdateResponse
  moves to web/src/lib/api-plugins.ts (api.ts is over the size cap).
- Saved update checks now record the install they were checked against
  (source, revision, pin). A result is dropped once any of those changed,
  so a --ref pin or a reinstall from another source no longer shows an
  Update button that update refuses. An update_url feed's version target
  is offered too (the old match compared it to a commit and never hit);
  the row field is update_target, a commit or a version.
- Each finding in the Desktop dialog shows its description.
- Tests: a real subdirectory install exercises the re-clone path (caution
  needs force, dangerous refused even with it, refusals leave the tree and
  record alone); the dashboard route returns findings and applies with
  force; the saved signal drops on update, new source and pin.
- locales/_keys.desktop.json regenerated for the new Desktop strings.
2026-10-20 12:26:35 +05:30
alt-glitch
17aab768ec feat(desktop): git-installed plugins get an Update button and a security-scan override dialog
A git-installed plugin's row shows "Update to <commit>" when the last
update check found a newer commit. Clicking it updates through the shared
backend path. When the scan rates the new code caution, a destructive
confirm dialog lists the findings (worst first, capped) with "Update
anyway", which retries with force. Cancel changes nothing. A dangerous
verdict is reported and never offered.

The update flow (catalog consent, then scan override, each asked at most
once) moves out of plugins-tab.tsx into plugin-update.ts. The update copy
moves into its own i18n sibling (*_plugin_update.ts) because en/de/es/fr
and types.ts are over the file-size ratchet; de/es/fr are translated, the
other locales are listed in overlay-gaps.json.
2026-10-20 12:26:35 +05:30
alt-glitch
3ac037670a fix(plugins): Desktop and the dashboard update git-installed plugins through the CLI's path
Desktop's plugins.manage update refused every non-catalog install ("not a
catalog install — update it via the CLI") and kept its own third copy of
the re-pin logic. It now calls dashboard_update_user_plugin, the same
function the dashboard route uses, so catalog and git installs update the
same way on every surface.

A scan block comes back as ok=false + scan_blocked + scan_verdict +
scan_findings (the shape install already returns) with nothing changed;
the client retries a caution verdict with force. The dashboard route reads
force from its body next to accept_capabilities.

The Plugins tab can only offer Update when it knows an update exists. Git
installs had no such signal, so the row never showed a button. The gateway
already runs the update check every plugins.auto_update_check_hours, and
`hermes plugins check-updates` runs it on demand; both now save the results
next to the cadence marker. The plugin list reads that file (no network per
listing) and sets update_available + latest_sha on git rows. A saved result
is ignored once the install's revision moves past the one it compared.
2026-10-20 12:26:35 +05:30
Gille
0b10b9f815 fix(desktop): preserve Windows backing after material changes (#141702) 2026-10-19 21:58:35 -04:00
Austin Pickett
9cb34e9e28 fix(desktop): read the final reply aloud after tool calls (#140623)
* feat(desktop): give each spoken message in a turn its own key

A turn with tool calls can speak several messages: short progress
updates, then the final reply. The turn key alone cannot tell them apart.
spokenSegmentKey adds a text fingerprint, which every window computes the
same way and which a message id rewrite does not change.

* fix(desktop): read the final reply aloud after tool calls

Auto-speak claimed `speak:<turnKey>` across windows, and the arbiter holds
speech claims for 10 minutes. Once a progress update in a turn was read
aloud, the final reply of the same turn asked for the same claim when that
clip ended, was refused, and returned silently. It was already marked
spoken, so nothing retried and no TTS request was made.

Claim, and join in-flight playback, per message instead. An id rewrite
keeps the text, so the double-speak guard from #121560 still holds. Log
the refused claim so a drop is no longer traceless.

* fix(desktop): key a spoken message by its last text part

Hydration folds a tool-call turn's assistant rows into one bubble, so the
bubble's full text becomes progress + final. Hashing the full text gave a
window that only saw the hydrated history a different key from the window
that read the live final bubble, and both read it (#99717 again).

The bubble's last text part is the same in both, and still differs between
a progress update and the final reply. Test runs a stored tool turn through
toChatMessages and checks the keys match.

Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>

* fix(desktop): one window reads every message of a turn

Each renderer's busy check only sees its own playback. With the same chat
open in two windows, A read the progress update while B stayed idle; when
the final reply arrived B was free, won the new per-message claim, and
read it over A.

The window that wins a turn's first message now claims the turn
(`speak:turn:<turnKey>`) and voices its later messages after its own clip
ends. Other windows skip the turn. Test drives two renderers with separate
playback stores against the real claim arbiter.

Co-authored-by: unsupportedpastels <theoldwizard123@pm.me>

---------

Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
Co-authored-by: unsupportedpastels <theoldwizard123@pm.me>
2026-10-19 18:15:27 -04:00
yoniebans
cc6b1f299b fix(desktop): an unhinted project-tree lookup reads the live gateway's profile 2026-10-19 23:04:43 +02:00
yoniebans
35b4d07371 test(desktop): another profile's same-id messaging tree row does not silence a local completion 2026-10-19 23:04:43 +02:00
yoniebans
88ebfa74d9 style(desktop): the project-tree fixture is a complete tree, no cast; blank line before the source key 2026-10-19 23:04:43 +02:00
yoniebans
d61f28fd1a fix(desktop): unread lookups stay within the owning profile and see project-tree rows
The live source cache is keyed by profile and stored id, so one profile's
messaging source never silences another profile's same-id session. The read
family is built from the opened session's own profile's rows. The messaging
check also resolves rows the project tree alone holds (older than the
messaging page), and the held-completion map says that unmatched entries are
expected and evicted.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
c675b4b669 test(desktop): the live source cache and the read family stay within their own profile (currently failing)
Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
Teknium
9a4c9075f6 test(desktop): a messaging completion known only from the project tree does not light unread (currently failing)
Carried from #141491 (Teknium, e7787d72b9): the project tree lists messaging
rows too and is the only loaded copy of a conversation older than the
messaging page.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
20d9fc0386 style(desktop): import order in the unread poll and its message-stream tests 2026-10-19 23:04:43 +02:00
yoniebans
ad7c5a1d88 fix(gateway,desktop): the live session poll names each session's source, so a messaging settle never lights unread before its row loads 2026-10-19 23:04:43 +02:00
yoniebans
d1e3792aa3 test(gateway,desktop): a messaging turn that settles before its row loads does not light unread (currently failing) 2026-10-19 23:04:43 +02:00
yoniebans
e569eea1ba fix(desktop): reading any segment of a messaging or cron conversation marks the whole conversation read 2026-10-19 23:04:43 +02:00
yoniebans
4173a80d9f test(desktop): a compressed conversation read at its listed segment stays read when the receipt lands late (currently failing) 2026-10-19 23:04:43 +02:00
yoniebans
f02e8a8da8 refactor(desktop): one unread writer for the live edge and stamped messaging completions 2026-10-19 23:04:43 +02:00
yoniebans
fea668999e fix(desktop): a held completion the user already read stays read; the marker goes to its own profile
A completion that arrived before its receipt was replayed with the focus it had
when it arrived, so opening the session in between (even opening and leaving)
left it marked unread once the receipt landed. Its completion time is now kept
and compared with the session's last read. The marker for a resolved row is
written to that row's own profile; re-resolving the bare id let another
profile's same-id row take it.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
53e9eb7a21 test(desktop): cover a held completion read before its receipt, and the background profile's marker (currently failing)
Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
478738e6b3 fix(desktop): note Desktop's turns at the canonical client, by profile, in either order
Only the composer recorded its admissions, so an edit, a regenerate or a Quick
Entry send into a messaging session never lit the unread dot. The canonical
client now reports every prompt.submit receipt that starts a turn, whichever
surface sent it. A completion is judged against its delivering socket's profile
(another profile's same-id session no longer decides it) and marks the row's own
id (a compressed conversation's listed segment paints at once). A completion
that arrives before its receipt is held until the receipt lands.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
fe75884a28 test(desktop): cover every Desktop submit path, an early completion, a background profile and a compressed row (currently failing)
Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
4b12ad037e fix(desktop): a turn Desktop sends into a messaging session lights the unread dot
Messaging completions were all skipped for the unread dot, including a turn the
user sent from Desktop, which lit the dot before the shared gateway listed
messaging sessions in Desktop's live poll. Desktop now records the admission id
of each of its submits the owner accepted to run, and the turn's stamped
message.complete marks the session unread when its admission is one of those
and the conversation is not on screen. The busy-to-idle edge still never lights
a messaging session, so no settle path can attribute one turn's completion to
another.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
28a373782e test(desktop): cover the unread dot for a messaging turn Desktop sent (currently failing)
The stamped completion of a turn Desktop submitted marks its messaging session
unread once; a turn from the chat itself, an on-screen conversation and any
busy-to-idle settle do not; a queued Desktop turn stays eligible after others
complete.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
fb4a4e2ba5 fix(desktop): judge a messaging completion by its runtime's own profile
A completion's stored id was matched against every loaded row, ties going to
the active profile, so another profile's messaging row with the same id hid a
background profile's local completion. The runtime's proven owner profile, which
already picks the unread marker's bucket, now picks the row too.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
b3c1f7c134 test(desktop): cover another profile's messaging row hiding a local completion (currently failing)
Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
d8c2757444 style(desktop): import order in the messaging unread test
Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
yoniebans
34dae5d0c5 refactor(desktop): the messaging-completion check lives with the unread store
session-states.ts is over the file-size cap and may only shrink. The
messaging check now sits beside markSessionUnreadFinished and reuses its
loaded-row lookup (resolveLoadedRow), which also picks the right row when
two profiles hold the same id. No behaviour change.

Refs #134889 (RT-18)
2026-10-19 23:04:43 +02:00
KoNit-K
e2138711d7 fix(desktop): ignore messaging session completions
A messaging conversation delivers its completion to its own platform; a
Desktop observer is not an unread recipient. Before the shared gateway the
Desktop sidecar never listed messaging sessions as live, so their turns
lit no unread marker.

Carried from #139031 (0d091fd384), Desktop half only; the PR's gateway
half is covered by the control-read fix in this branch.

Refs #134889 (RT-18)
Fixes #139017
2026-10-19 23:04:43 +02:00
KoNit-K
785dd823c1 test(desktop): cover a messaging completion lighting the unread marker (currently failing)
Carried from #139031 (0d091fd384), test half only.

Refs #134889 (RT-18)
Refs #139017
2026-10-19 23:04:43 +02:00
Teknium
85188e61c3 Merge origin/main into fix/pkg13-ink-leftovers
Resolves the hermes_cli/cli_tui_mixin.py conflict from #141501 landing: main moved _Panel to
hermes_cli/cli_panel.py and this branch moved the wrap helpers to hermes_cli/cli_tui_wrap.py.
Keep both moves: import _Panel and the wrap helpers, define neither here.

Refs #134889 (N8)
2026-10-19 12:55:27 -07:00
Teknium
c9dce2c26f Merge pull request #141492 from NousResearch/fix/pkg13-rt40
fix(desktop): a repeated /undo or /retry after a lost reply replays the same rewind (RT-40)
2026-10-19 11:55:35 -07:00
Teknium
554162543a fix(desktop): a voice_stopped reply on the legacy submit fallback settles the send
When the sidecar refuses submission_id (version skew), Desktop
retries prompt.submit without an identity, and
_submit_to_ledger_owner answers that write with the same
{voice_stopped: true}. isVoiceStoppedReceipt excluded the legacy
path, so the user bubble and busy state stayed while no turn would
ever complete them. The receipt check now accepts voice_stopped on
both paths. A new test covers the identityless fallback.

Refs #134889 (TUI-26)
2026-10-19 11:52:14 -07:00
Teknium
703b4753c8 fix(desktop): a named-profile owner finds its lost rewind after a redial
Review on #141492 (client.ts:409-419): the replay-only /undo /retry probe
was answered locally before the attach re-route. A redial forgets the
named launch profile the owner reports in info.profile_name, so the probe
looked under `default`, missed the rewind retained under the named
profile, and answered "nothing". localAnswer now runs after the attach
and the second routeCanonicalParams, so the repeat re-presents the
original request. Cost: one attach for an unattached session, which
deriveAndRewind's session.resume would make anyway.

Refs #134889 (RT-40)
2026-10-19 11:47:53 -07:00
Teknium
da8015feba fix(desktop): a replayed /undo or /retry cuts the view by the lost rewind's own count
Review on #141492 (Greptile, slash-session-commands.ts:182): a repeat that
replays a lost derived rewind cut a view without row ids by the NEW
command's turnsBack. After a lost `/undo 2`, a plain `/undo` replays the
two-turn cut on the owner but removed only one turn on screen. The
command now remembers the turnsBack of each session's derived rewind
until it is answered, and a replay cuts by that count.

Refs #134889 (RT-40)
2026-10-19 11:46:07 -07:00
Teknium
afe27560b1 Merge pull request #141490 from NousResearch/fix/pkg13-win-ticket
fix(desktop): gateway tickets on Store bundles and spaced .cmd overrides (pkg13 win-ticket)
2026-10-19 11:35:23 -07:00
Teknium
f14699a137 fix(desktop): a steer flushes buffered text first, and a lost tool result can't outlive the turn
Review findings on the steer-arrival seal:

- Stream deltas are buffered per session and painted on a timer. Sealing
  the live bubble with text still in that buffer moved the tail below the
  steer (and a final could then repeat it). Every steer boundary (composer
  primary + tile, typed /steer) now flushes the session's buffer before it
  seals, through a small registration the stream hook owns.
- A bubble a steer sealed stays pending while its tool runs. If that tool's
  completion frame was lost, the turn's terminal settle skipped the pending
  bubble and its tool row spun forever. Completion now un-pends interim
  bubbles before sealing open tool parts.
- sealKeepingRunningTools decides which rows stay live before finalizing
  instead of finalizing and undoing by object identity.
2026-10-19 07:32:06 -07:00
Teknium
eae7106348 fix(desktop): a steer stays where it was sent, above the answer it causes
A steer sent while a tool runs (typed /steer, or the composer's Steer
action) painted its row at the transcript tail but never sealed the live
reply bubble. Tool rounds now stay in one bubble, so the model's answer
to the steer kept streaming into that bubble ABOVE the steer, and the
steer row ended up pinned under the finished reply. Users could not see
where the steer landed or whether the model reacted to it.

An accepted steer now seals the live bubble at its arrival point, the
same boundary an accepted redirect already uses. Output written after the
steer streams into a fresh bubble below it. A steer interrupts nothing,
so the tool it waits on keeps its live row in the sealed bubble (no
"Result unavailable"), and that bubble un-pends when the tool's result
lands by call id. Covers the primary chat and session tiles.
2026-10-19 07:32:06 -07:00
Teknium
2d35f6184b feat(plugins): portable plugins get the Settings > Plugins form, live
A portable Agent Plugins v1 package (plugin.json) had no way into Settings >
Plugins: the schema reader only looked at plugin.yaml, and v1 rejects unknown
top-level fields. It now reads extensions.com.nousresearch.hermes.config_schema
(the vendor namespace that already carries server trust and timeouts) for the
form, the save, the loader's schema warnings and catalog admission.

Two gaps any plugin with settings hit once the form existed:

- The plugin's Desktop half had no way to learn a save happened. Every
  plugins.manage settings save now broadcasts plugin.<id>.settings.changed
  ({written}); a secret-only save still makes the (empty) settings call so the
  event fires for a new API key too.
- A secret the form stored never reached the plugin's running MCP server (its
  env ${VAR} was rendered at spawn). After a save, Hermes reconnects the plugin's
  servers whose resolved launch inputs changed (identity digest, rendered the way
  the connect path renders it); a toggle-only save leaves them alone.
2026-10-19 07:27:50 -07:00
Teknium
6d71467ba1 fix(desktop): a repeated /undo or /retry resolves its lost rewind before deriving
Two gaps in the lost-reply repeat:

1. The retained rewind was reached only after the repeat had derived and
   checked a new target from the already-rewound transcript. A /retry
   that removed the only user turn answered "nothing to retry", /undo N
   with fewer than N turns left answered "nothing to undo", and an older
   media turn made a text-only /retry refuse as unsupported, all before
   the retained request could be resent. Each /undo and /retry now sends
   a replay-only rewind first. The protocol re-presents the retained
   request (the owner answers with the original receipt), or, when
   nothing is retained, answers 'nothing' locally without a request
   (CanonicalDesktopProtocol.localAnswer). Only then does the command
   derive and check a fresh target.

2. A reconnect refreshes the transcript, so the rewound rows can already
   be gone when the replayed receipt arrives. truncateRewoundMessages
   then fell back by position and hid the newest remaining exchange.
   A view bound to durable rows that holds none of the rewound rows is
   left as is; only unbound live bubbles after the bound history, or a
   wholly unbound view, still fall back by position.

Red on the previous head: the four new lost-reply command tests (real
CanonicalDesktopProtocol in front of a receipt-replaying owner) and the
bound-view truncate test.

Refs #134889 (RT-40)
2026-10-19 06:57:19 -07:00
Teknium
dfb4ecd911 fix: a stop typed as a busy correction ends the voice chat on the shared gateway
In Ink's interrupt and steer busy modes, text typed during a running turn
goes to session.redirect / session.steer, not prompt.submit. The typed
stop-phrase check only ran in prompt.submit, so a bare "stop" in a LOCAL
voice chat reached the running agent and voice chat stayed on.

The owner's correct() now makes the same _typed_voice_stop decision (attached
submitter, LOCAL session, voice on, bare stop phrase) after authorization and
before the generation fence, and answers {voice_stopped: true}. The canonical
CanonicalCorrectionResult becomes Ack | CanonicalVoiceStopped (generated TS
and OpenRPC regenerated); the dispatch test proves it through the real
contract parse.

Every client settles that reply instead of treating it as a refusal that
re-sends the text as a prompt (which would admit "stop" as a turn):
- Ink: settleControlReply renders the stop-phrase event and settles the
  item; the running turn's busy state is untouched.
- Desktop: redirectPrompt drops the optimistic bubble and reports accepted,
  so the composer does not re-queue it.
- ACP: /steer reports the stop-phrase notice and does not send a prompt.

Greptile review on #141508.

Refs #134889 (TUI-26)
2026-10-19 06:54:34 -07:00
Teknium
ff0698f3f0 fix(desktop): a voice_stopped prompt.submit reply is a settled send, not a mismatch
A Desktop viewer of a LOCAL session whose voice chat another viewer (Ink)
turned on, typing a bare "stop": the owner ends that voice chat, admits
nothing and answers {voice_stopped: true}. CanonicalDesktopProtocol's
admissionReceipt threw "Canonical admission receipt destination mismatch",
so the submit errored and showed a failed prompt although the stop worked.

admissionReceipt now passes that variant through as an allowlist (only
voice_stopped, session_id and the submission id, and only when no ref or
admission_id is present). The submit pipeline treats it as settled with no
turn: the optimistic bubble goes (no turn holds it), busy is released, no
pending submission is tracked and no error is shown. Nothing new is rendered,
so no new strings. Other Desktop callers (tiles, bots, rewind, first message)
only read admissions or survivor ids and are unaffected once it stops throwing.

Refs #134889 (TUI-26)
2026-10-19 05:43:16 -07:00
yoniebans
b4170e73b0 fix(gateway,desktop): keep compression busy refusals at debug, share the busy mapping, check the reason on Desktop
A session_busy refusal that names the compression lock now logs at debug like any other busy refusal, so Desktop's busy retry during an edit cannot flood the gateway log. The MUTATION_GUARD_REFUSALS-to-session_busy mapping moves to busy_refusal() beside the tuple. Desktop's isCompressionBusyError also requires reason session_busy, as the TUI's check does.
2026-10-19 14:40:07 +02:00
yoniebans
7c3212a906 test(gateway,desktop): a compression busy refusal logs at debug, and only a busy refusal gets the wait text (currently failing) 2026-10-19 14:40:07 +02:00
yoniebans
2950772e58 fix(desktop,tui): busy /undo and /retry show main's stop-first or wait-for-compress text on both clients
The Ink TUI's canonical /undo and /retry printed the bare session_busy code on the shared gateway, as Desktop did. Both clients now read the owner's typed refusal: field=compression gets main's wait-for-compress text, any other session_busy gets the stop-first text, all other errors print as before. Strings added to every Desktop and TUI locale.
2026-10-19 14:40:07 +02:00
yoniebans
9f36385cb9 test(desktop,tui): busy /undo and /retry show main's stop-first or wait-for-compress text on both clients (currently failing) 2026-10-19 14:40:07 +02:00
yoniebans
31adb71e68 fix(desktop): /undo and /retry mid-reply say to stop the reply first
A busy session refuses the rewind with session_busy, which Desktop printed as a bare error. Show the guidance main gave for the same refusal: stop the current reply, then run the command again.
2026-10-19 14:40:07 +02:00
yoniebans
fd38f0ee4a test(desktop): cover /undo and /retry refused while a turn runs (currently failing)
A busy session's rewind refusal must show main's stop-first guidance, leave the draft alone, and neither interrupt the turn nor submit or queue anything.
2026-10-19 14:40:07 +02:00
Teknium
24b0b4d9a1 fix(voice): a typed stop phrase ends the voice chat on the shared gateway
Ink sends prompts to the canonical prompt.submit on the shared gateway, which
had no stop-phrase check. A bare stop phrase typed during a voice chat was
admitted as a turn and reached the agent. The spoken stop and push-to-talk
worked.

AuthorityConnection.submit now checks first, for a submitter attached to
the session whose gateway /voice mode is on. It reuses the sidecar's check
(methods_prompt._consume_typed_stop_phrase, split out of
_typed_stop_phrase_response) and _end_session_voice_chat, so the owner's
per-session mode goes off and that session's capture ends. Nothing is
admitted, and the reply is {voice_stopped: true}.

The canonical contract declares that shape: the prompt.submit result is now
AdmissionStatus | CanonicalVoiceStopped, and the shared artifacts are
regenerated. On a canonical reply, Ink settles the queue item, releases busy
and renders the existing voice.transcript stop_phrase event locally, so the
notice and mode flags are the ones the sidecar path already shows (existing
gatewayMsg.voice.stopPhrase string, no new text).

Refs #134889 (TUI-26)
2026-10-19 03:41:28 -07:00
Teknium
fbe61c7107 fix(desktop): a refused derived rewind is never resent by the next /undo
A typed /undo or /retry rewind is retained by operation alone, so the retry
after a lost reply resends the original request. Only revision/generation and
busy refusals dropped it, though. Any other typed refusal (invalid_params when
the target row is gone or was compacted) left the refused request retained,
and every later /undo or /retry resent that same refused request until some
other control retired it. A refusal that carries a reason means the owner
wrote nothing, so the rewind is now forgotten and the next attempt derives
its target again.

Refs #134889 (RT-40)
Refs #134889 only
2026-10-19 03:05:30 -07:00
rodricksz4h5
82b8632d46 test(desktop): pad the lost-reply owner fixture for the lint rule
(cherry picked from commit fcc711285e88f7192b109c16cf56383aa7c49584)
2026-10-19 03:05:30 -07:00