Pins the localsend catalog entry to 28dfd30ccd — the revision that merges
the catalog security review's hardening (teknium1's review on this PR:
share-root allowlist with realpath checks on send and receive, LAN-only
peer gate, mandatory PIN with crypto-safe generation, 2 GiB transfer cap),
plus bumps the entry to v1.19.0.
The receiver can now serve TLS for peers that force encryption, announcing the
certificate fingerprint a peer pins. Sender certificates are not validated -
stdlib Python cannot accept arbitrary self-signed client certificates - which is
documented next to the limit rather than implied.
Pins the reviewed commit for v1.17.0 and fills in the entry contract the rest of
the catalog uses: tier, category, docs_url, requires_hermes, version, and the
capability declarations (three tools, no hooks, no middleware, no env vars).
Card image rebuilt from a real capture of the plugin's desktop pane.
Stop now reports a genuinely stopped receiver (the payload previously said
stopped=true and running=true at once), plus a contract test pinning the
desktop pane's ctx.rest paths to the backend routes.
Repins to the v1.16.0 commit: the plugin can now send to peers in LocalSend's
default HTTPS mode, presenting a persistent device certificate, announcing its
SHA-256 fingerprint in LocalSend's uppercase-hex format, and pinning the peer's
certificate against the fingerprint it advertised.
Repins to the v1.15.0 commit, which adds the desktop half — a LOCALSEND pane,
status-bar chip and three palette commands — and a dashboard backend at
/api/plugins/localsend/. The agent tools are unchanged.
LocalSend (open-source AirDrop alternative) peer-to-peer transfer for Hermes:
localsend_discover, localsend_send and localsend_receive. Standard-library
implementation of LocalSend Protocol v2.2 with no runtime dependencies.
Owner submission of https://github.com/tylerbrevard/hermes-localsend, pinned to
49dcb1f0c18ff2a25a2f3c9d89fa021307afbcde (tag v1.12.2).
Adds the contributors/emails mapping for @rain610 (check-attribution) and
the two padding-line-between-statements blank lines eslint --fix wanted in
roster-actions.ts. No behaviour change.
Activity toasts were deduplicated only on last_active. A busy bridge
(Feishu) keeps advancing last_active while the preview text is unchanged,
so every roster poll re-fired the toast for identical content.
Add lastToastedPreview, seeded alongside rosterWatermarks, and skip the
toast when the preview equals the last one we surfaced. Unread marking is
unaffected. Add two regression tests.
(cherry picked from commit 273ee2e18e667d73cb786d18537caf03b8954b7e)
user-sections-ui.tsx's SectionNameDialog (bot-roster section create/rename)
checked only nativeEvent.isComposing on Enter, missing the legacy
keyCode===229 commit-Enter some IMEs (macOS Chinese IMEs) still fire after
compositionend with isComposing already false — the same class 09b74dea64
widened IME-Enter guards for across the desktop app and specifically called
out fixing "the sites main added since" for. This site was added after that
sweep and inherited the same partial guard shape.
isSubmitEnter is already exported from the plugin SDK for exactly this
purpose (sibling hermes-bots files hand-roll the same two-part check inline);
use it here instead of re-deriving a partial version of it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
(cherry picked from commit 27a6c3c1f7987f15e79dcf658769e438d33a39b0)
The restamp test faked subprocess.run only; once the relay books turns from
their report through quiet_single_query.run_reported_turn (#114980, #116968)
that seam is no longer read and the test spawns a real `hermes chat -Q` child.
Fake both (run_reported_turn with raising=False) so the test is transport-
agnostic in either merge order.
`tests/tools/test_bot_turn_lock.py` imports `fcntl` unconditionally at
module level. `fcntl` does not exist on Windows, so the import raises
during collection — and an uncaught collection error is not "skip this
file", it aborts the entire run:
ERROR collecting tests/tools/test_bot_turn_lock.py
E ModuleNotFoundError: No module named 'fcntl'
!!!!! Interrupted: 1 error during collection !!!!!
no tests collected, 1 error
That takes out all of `tests/tools/` on Windows — 7732 collectable tests
— not just this module.
Skip before the import, matching `tests/cli/test_termios_drift_heal.py`.
`pytestmark = pytest.mark.skipif(...)` — the other convention in the tree,
used by `tests/state/test_fts_rebuild_admission.py` — cannot work here:
it is evaluated after the module body has already been imported, so the
`fcntl` import would still raise first. That module gets away with it
because it never imports `fcntl` itself.
Skipping loses no coverage. `acquire_turn_lock()` in tools/bot_relay.py
degrades to a no-op contextmanager on Windows precisely because `fcntl`
is unavailable, so the cross-process flock contention this module asserts
on cannot occur there.
before: no tests collected, 1 error
after: 7732/7739 tests collected; this module reports 1 skipped
(cherry picked from commit 1e7fac955150a647c23f97aceed90bc880b45ad3)
Every gateway's `default` profile is `@hermes`, so a remote default titled
"CoS Bot" was unreachable by any bare form: `resolve_remote_target` matched
handle/profile only, the prompt roster offered it as `@hermes` (which local
resolution routes to THIS gateway's default), and the DM it sent arrived
stamped `(@hermes)` so a reply hit the recipient's own default.
- `tools/bot_relay.py`: `_target_aliases` adds the Bot Mode title's mention
slugs; `resolve_remote_target` accepts them (exact handle/profile keeps
precedence over a colliding title); `remote_target_forms` picks the shortest
form no LOCAL profile and no other remote row answers to — bare handle,
title slug, then `handle@connection` — independent of roster order;
`qualify_sender_stamp` rewrites a relayed `Message from 🤖 … (@handle):`
to that form.
- `tools/bot_mode_probe.py::local_taken_forms` feeds the local handles and
friendly-name slugs into the roster paragraph; `bot_mode_dm` lists ambiguous
candidates with the same forms.
- `tui_gateway/methods_bot_relay.py::bot_relay.deliver` re-stamps the sender
before the transport branch (the recipient knows `from_connection`; the
sender does not know its own Desktop id).
Slim redo of #103767's Python half (@fangliquanflq): that PR always
qualified every remote form with its connection id and reworked the Desktop
mention Map; this keeps bare forms where they are unambiguous and leaves the
Desktop picker untouched.
Part of #103731
Salvages #103767
Co-authored-by: fangliquanflq <fangliquanflq@users.noreply.github.com>
attachTouchDrag() armed a drag on ANY touch pointerdown and immediately
called preventDefault(), which suppresses the synthesized click
TaskCard.handleClick relies on to call props.onOpen(). There was no
movement threshold, so a finger drifting even ~2-3px on a normal tap --
which is universal on real touch hardware -- was enough to arm the
drag and swallow the open.
Fix: defer starting the drag proxy and calling preventDefault() until
the pointer has actually moved past an 8px threshold (matches the
common native drag-affordance convention). A stationary tap never
crosses the threshold, dragging is never armed, and the click fires
normally. A real drag still claims the gesture identically to before,
just after the same few pixels of travel every touch drag implementation
already tolerates.
The bundle (plugins/kanban/dashboard/dist/index.js) has no build step --
it is hand-maintained directly, as established by prior kanban dashboard
PRs (#114882, #108694) -- so the fix is applied there.
Closes#115568.
Testing: no jsdom/vitest harness exists for this bundle (confirmed by
PR #114882's review follow-up, which explicitly rejected turning a
"live-repro jsdom harness" into a pytest because jsdom/react aren't
declared in the root package.json and the Python CI job has no
node_modules -- such a test would be vacuous in CI). Per that
precedent and the "never read source code in tests" rule (no
regex/substring pin on the bundle text), this PR instead extracts
attachTouchDrag() verbatim at test time via Node (already present:
tests-js/ + vitest are in the repo) and drives it through real
pointerdown/pointermove/pointerup sequences against a minimal DOM
stub -- a behavioral test, not a source-shape test. Proven red on the
unfixed bundle (asserts preventDefault is called on a stationary tap)
and green on the fix; skips cleanly via shutil.which("node") if Node
is unavailable in a given lane.
Verification:
- node tests/plugins/fixtures/kanban_touch_drag_probe.js against the
ORIGINAL (unfixed) bundle: fails with "FAIL: a stationary tap called
preventDefault (suppresses the click)", exit 1 -- confirms the probe
reproduces the reported bug
- Same probe against the fixed bundle: "PASS", exit 0
- scripts/run_tests.sh tests/plugins/test_kanban_dashboard_plugin.py --
42/42 passed (1 new, 41 unchanged)
- node --check plugins/kanban/dashboard/dist/index.js -- syntax OK
Terminal / Files / Review / Logs registered bare English `title` strings the
same way Sessions and Bots did (#111715 §3 audit): the strip rendered the
import-time sample. They now pair `title` with `tabTitle` like the sessions
pane, on new `sidebar.{terminal,files,review,logs}` keys in every locale.
The zone menu's Show/Hide rows and the drag ghost chip read `title` as a
string outside React, so `tabTitle` could not reach them. PaneChrome gains
`tabTitleText?: () => string`; `hideOnlyZoneTabs` (the menu rows) and the
strip/edit-veil drag starts in tree-group.tsx resolve it at menu-open /
drag-start time, when the locale has loaded. Every localized pane supplies
both. `title` stays the register-time string fallback for readers that do
not go through PaneChrome.
The sidebar tab strip kept reading SESSIONS and BOTS in English on a
Russian (or any non-English) install. Both panes register at module
import — `discoverBundledPlugins()` runs synchronously from
controller.tsx — which is BEFORE `I18nProvider` has fetched
`display.language` from the backend, so a `translateNow(...)` in the
pane `title` samples English and the string is never re-read.
Fix: give both panes (and the Bots plugin's Scheduled jobs pane) a
render-time `data.tabTitle` through the existing PaneChrome seam
(`tree-group.tsx::tabLabel`) that returns `LocalizedTabTitle`, a tiny
component subscribing to `useI18n()`; the tab re-renders when the locale
loads or the user switches it. `title` stays as the string fallback for
the non-React readers (zone menu rows, drag ghost).
Locale keys (`common.bots` x6 locales, ru `settings.model.moaTitle`)
come from KoNit-K's #111726, cherry-picked underneath.
Fixes#111715
Salvages #111726
The entry-point test (wake word via _handle_text_message lands as an observed
row) and one control test (explicit @mention still dispatches and is not
observed; refused quote-reply is observed; human wake word unaffected) cover
the behaviour the fix changes.
With `require_mention: true` + `bots_require_mention: true` + wake words in `mention_patterns`, a message
authored by another Hermes bot that addressed this bot by name matched no dispatch path (the
bot-to-bot loop breaker skips it) and was also refused by the observe gate (`mention_patterns`
matches are assumed dispatched), so it vanished from both paths with no log line.
Factor the loop-breaker predicate into `_bot_sender_suppressed` and consult it in
`_should_observe_unmentioned_group_message`, so every message the dispatcher drops because of
`bots_require_mention` is kept as observed context instead of being lost (#115119).
`_record_profile_rename` swallowed every exception silently. The history is
advisory (group-chat member re-link), so the rename must still succeed, but
an unwritable or corrupt profile.yaml now leaves a debug line naming the
profile and the error instead of vanishing.
The docstring also records why no default / no-op guard is needed here:
`rename_profile` returns before this helper for the default profile
(display-name only) and refuses `old == new` because the target directory
already exists.
parseGroupChatMentions registered live identities with hand-rolled
normalizations (name, collapsed [\s_-]) but normalized previous-name
aliases with mentionNameForms (slug + collapsed, dots stripped). The
!handles.has guard therefore missed collisions on normalization variants:
a previous name like 'bobjones' could squat on the collapsed form of a
live 'bob.jones' and hijack @bobjones, and 'ann-lee' could squat on the
slug form of live 'ann.lee'.
The live loop now also claims the mentionNameForms slug/collapsed
variants of every live name, handle, title and friendly name - gap-filled
so an exact live name elsewhere in the roster still wins - before
previous-name aliases are considered. Aliases keep working in all typed
forms when uncontested.
Regression tests: 2 fail without the fix (collapsed-form and slug-form
hijack), all 70 hermes-bots routing/membership tests pass with it.
Records previous profile names in profile.yaml on `hermes profile
rename` and surfaces them via profiles.list. Group chats re-seat stale
member descriptors through the rename history on the same connection
(self-healing via the normal persistence pass), and pre-rename handles
remain usable as @-mention aliases with live names winning conflicts.
Fixes#110200
usePublishRosterSnapshot keyed its effect on the whole useRoster() envelope.
Every 5 s poll stamps a fresh `fetchedAt` on that envelope, so the object was
new on every tick even when the gateway returned identical rows — $lastRoster
got a new array (re-rendering every subscriber: chat-empty, bot rows, the
plugin host effects), and mergeServerMeta / pullServerAvatars /
trackInboundActivity / backfillMessagingProtocol re-ran with nothing changed.
React Query's structural sharing already keeps the unchanged `profiles` and
`sources` subtrees reference-stable across polls, so the effect now keys on
those subtrees instead of the envelope. A changed row (new preview, new
last_active, edited ui_meta) still republishes; an identical roster does not.
The `fetchedAt` write fence is unaffected: it only matters on a republish.
Slim redo of #105029 (@kumaxs), which reached the same skip through a 300-line
allowlist fingerprint module that would have silently dropped any pane-visible
field not mirrored in the allowlist.
Co-authored-by: kumaxs <45620232+kumaxs@users.noreply.github.com>
`from.source` (`connectionLabel || connectionId`) is THIS Desktop's name for
the connection. Two Desktops reaching one gateway under different labels
stamped different sources for the same bot, so the mirrored reply failed the
self test on the other Desktop and read as a third machine's bot.
The roster source's `installId` (/api/status install_id, already on the
DesktopAgentRoster sources) is annotated onto the row, seated on the member,
and stamped as `from.gateway` beside the label. `isGroupChatSelf` matches on
it first whenever both speaker and viewer carry one; the label rule remains
the fallback for sources that never reported an id. `source` stays
display-only.
A group-room reply produced by a member local to the Desktop running the turn was
appended without `from.source`; when the shared room projection reached another
Desktop, that entry was indistinguishable from the reader's own same-named bot
(#94863 D3). Every member that knows its connection now stamps
`source: connectionLabel || connectionId` (groupMemberAuthor, used by both append
sites), and the `(you)` self-check in member prompts follows the same resolution
rule as routing.ts: a sourced line is "you" only when it matches the viewer's
connection, an unsourced line only for a local viewer.
Part of #94863 (D3 only; D2 realtime pull is a parked design decision).
Drive tools.environments.local.build_subprocess_env — the seam every
terminal / execute_code / background spawn goes through — with HOME
deleted from the host environment and assert the child gets the real
home. Why: the contributor's test covers the resolver; this one proves the
production spawn path actually reaches the repaired value.
get_subprocess_home() only repaired HOME when the current value pointed
at the profile home. A host process with no HOME at all (e.g. a systemd
system unit without User=) has an empty current_home, which is neither
the profile home nor a container, so the function fell through to None
and left subprocesses HOME-less. Treat an absent HOME as needing repair
too, matching the auto docstring's "hosts keep real HOME".
Fixes#116081
hermes_home_assignments parses a space-joined command line, so an unquoted
`HERMES_HOME=C:\Users\John Doe\.hermes` token was cut to `c:/users/john` and the
default-profile predicate (assignments non-empty, own home absent) judged the
gateway NOT to belong to its own home -- a regression from the substring test
this PR replaced. Add command_line_names_hermes_home: the token-bounded parse
first, then a token-bounded literal match of the whole home, used by both
gateway.status and the hermes_cli PID scan so the two predicates stay mirrors.
Sibling-home rejection (named + default branch) and own-home spellings
(quoted, trailing separator, embedded name) each get one test; the
hermes_cli scan test drives the production entry point.
Review follow-up (#115039): a supervisor that exports HERMES_HOME with a
trailing separator (systemd Environment=, sh -c wrappers) put a spelling on
the command line the token-bounded comparison rejected, so gateway status
reported that gateway not-running for its own home. Strip one trailing
separator on both the extracted values and the profile home, keeping the
longer-sibling rejection (ops/2 is still a different home).
Also bound the assignment NAME: FOO=hermes_home=/x embeds the name inside
another token and is not a HERMES_HOME assignment (the value side already
was token-bounded; the substring test this replaces matched it).
Drive _scan_gateway_pids in a test so the mirrored predicates in
gateway.status and hermes_cli.gateway cannot drift apart again.
The named-profile branch of _command_line_belongs_to_profile tested
`hermes_home={home}` as a substring of the command line, so a process
declaring HERMES_HOME=/root/profiles/ops2 satisfied the ops profile's
predicate (the -p side already uses token equality for exactly this
reason). The default-home branch and the CLI mirror
hermes_cli.gateway._matches_current_profile had the same hole.
Extract every HERMES_HOME=<value> assignment token-bounded with quotes
stripped (hermes_home_assignments) and compare full values in all three
places. Quoted assignments (ps/wmic re-quoting paths with spaces) now
match too.
2cc23a9 -> c4123fbdb315137b40e4c5b4b5fd3eb2298dae66. The pinned commit runs its suite on ubuntu-latest, macos-latest and
windows-latest (actions/runs/35520540211, all green), so windows is declared in platforms instead of
being excluded without explanation, and the README now gives the manual install route that Windows
needs because install.sh is a POSIX shell script.
What CI found and fixed on the way to that green run, all of it reaching the plugin only through this
branch: an in-place overwrite of a multi-frame image failed on Windows because the input's read handle
(and the mapping Pillow uses for single-strip BMP/TIFF/PNG/P) was still open at the rename; a
read-only target is refused by Windows even with the mode restored afterwards, so the attribute is
cleared for the rename and put back either way; WinError 5/32 from an external holder is retried
briefly; release/rename/chmod hold the plugin's guard lock; and converting a JPEG with EXIF
orientation 5-8 to TIFF no longer fails its own verification (Pillow's TIFF reader applies the tag,
so the file legitimately reads back transposed).
Diff adopted: 5 commits, tools.py +158/-23, tests +366, README +5, 135 tests (134 + 1 platform skip
on Windows).
b1eb2585 -> 2cc23a99a6df9238b25cd5dc118946563afb1bd9. The new commit adds a linux/macOS/Windows test matrix and the two platform
guards it needed, so the pinned code is now tested on every platform the entry claims plus Windows.
Diff being adopted: .github/workflows/tests.yml (new), tests/test_image_utils.py and
tests/test_competition_fixes.py (platform guards only). No plugin behaviour changes.
One unit test covers the hidden .env, the hidden out-of-workspace path and the
all-safe control; the e2e test keeps driving handle_function_call so the prompt
is proven on the production path. The conditional Move File test asserted only
when the proposal parsed, which is not an invariant.