Commit Graph

1182 Commits

Author SHA1 Message Date
george-andraws 0f388de09c fix duplicate chat upload filenames 2026-05-25 17:48:19 +00:00
nesquena-hermes 0c6af12723 Merge pull request #2933
# Conflicts:
#	CHANGELOG.md
2026-05-25 17:48:05 +00:00
nesquena-hermes c6869806f0 Merge pull request #2923
# Conflicts:
#	CHANGELOG.md
2026-05-25 17:47:23 +00:00
nesquena-hermes c2fc390723 Merge pull request #2915 2026-05-25 17:46:56 +00:00
nesquena-hermes f6dc7aad6f Merge pull request #2907 2026-05-25 17:17:44 +00:00
nesquena-hermes 68afa0e44a Merge pull request #2932
# Conflicts:
#	CHANGELOG.md
2026-05-25 17:17:44 +00:00
nesquena-hermes 0be9874549 Merge pull request #2918
# Conflicts:
#	CHANGELOG.md
2026-05-25 17:17:31 +00:00
nesquena-hermes 6eaddada93 Merge pull request #2934
# Conflicts:
#	CHANGELOG.md
2026-05-25 17:17:06 +00:00
nesquena-hermes 67b41b2b54 Merge pull request #2927 2026-05-25 17:02:02 +00:00
Frank Song aa6daf82f2 fix(gateway): treat active sessions as configured 2026-05-25 21:48:51 +08:00
Frank Song 524ed6cce3 fix(streaming): preserve profile env for checkpoints 2026-05-25 21:29:06 +08:00
Frank Song e265389116 perf(sessions): prime missing index in background 2026-05-25 21:21:20 +08:00
Frank Song 459286830b fix(session): preserve sidecar truncation boundary 2026-05-25 21:21:15 +08:00
carryzuo00 2881fcec89 fix(agent_health): detect profile-scoped gateway.pid for correct status
_gateway_root_pid_path() unconditionally returned <hermes_root>/gateway.pid.
Profile-scoped gateways (started with --profile <name> or via active_profile)
write their runtime files under <hermes_root>/profiles/<name>/ instead of the
root, so the root-level path never existed.

build_agent_health_payload() therefore always received a non-existent pid_path,
fell through to the stale root-level gateway_state.json, and returned alive=None.
This caused the cron/scheduled-jobs page to display "Gateway not configured" even
when a gateway was actively running.

Fix: after failing to find a root-level gateway.pid, fall back to the active
profile directory via get_active_hermes_home(). Root-level wins when it exists,
so deployments that do write there are unaffected. Errors from profile lookup are
swallowed and the root path is returned, preserving the previous safe default.

Adds five focused unit tests covering the new fallback, the priority rule, and
the error-handling path.
2026-05-25 10:35:37 +00:00
MinhoJJang d920d4222a Trim paginated session tool call payloads 2026-05-25 18:28:43 +09:00
Frank Song 89d8c3a94c fix: cap live tool prompt estimate per turn 2026-05-25 16:04:40 +08:00
fxd-jason dd09e1c2a8 Merge remote-tracking branch 'origin/master' into fix/compression-anchor-marker-based
# Conflicts:
#	tests/test_issue2028_compression_anchor_helpers.py
2026-05-25 15:23:17 +08:00
fxd-jason 90dfbf2f2d fix: marker-based compression anchor calculation
Instead of using len(visible_after)-1 (which points to the last visible
message and gets pushed behind the render window as more turns accumulate),
find the last [CONTEXT COMPACTION] marker in s.messages and compute the
anchor from visible messages before it.

This keeps the compression reference card at the correct boundary even
after 50+ subsequent turns have scrolled the render window past the old
anchor position.

Fixes a bug where the assistant's output message appeared to disappear
after automatic context compression because the reference card was placed
at the wrong position.
2026-05-25 15:16:26 +08:00
ai-ag2026 5b9484b816 fix(streaming): suppress visible progress echoes 2026-05-25 06:18:06 +02:00
Simonas Jakubonis 7aae822872 fix(compression): ignore tool output for compaction cards 2026-05-25 11:27:15 +08:00
Harlan Zhou e8b426d825 test: avoid global env-coupled defaults regression 2026-05-25 01:58:32 +00:00
Harlan Zhou f8a7726e09 fix(windows): align WebUI defaults with Hermes Agent home path 2026-05-25 01:58:32 +00:00
nesquena-hermes 7e22c4edd5 Merge pull request #2894 — send Joplin token in Authorization header
# Conflicts:
#	CHANGELOG.md
2026-05-25 01:47:23 +00:00
nesquena-hermes 15dc7373c1 Merge pull request #2895 — preserve cached agent prefill context
# Conflicts:
#	CHANGELOG.md
2026-05-25 01:47:23 +00:00
Frank Song dc86841547 fix: send joplin token in auth header 2026-05-25 08:51:44 +08:00
Frank Song 535c238285 fix: preserve cached agent prefill context 2026-05-25 08:51:44 +08:00
Frank Song 826e719a29 fix: validate auxiliary model task slots 2026-05-25 08:51:44 +08:00
nesquena-hermes 1c2d574882 Stage-batch14: Opus advisor SHOULD-FIX patches (UX + defense-in-depth)
Inline fixes for 4 of 5 Opus SHOULD-FIX items before tag:

1. /api/auth/status now gates passkeys_enabled / passwordless_enabled on
   _passkey_feature_flag_enabled() — when flag is off, status reports
   no credentials even if passkeys.json has legacy entries. New
   passkey_feature_flag field added to the response for the frontend.

2. Settings → System Passkeys block (passkeysSettingsBlock) now starts
   display:none and loadPasskeys() reveals it only when the server
   confirms passkey_feature_flag === true AND /api/auth/passkeys
   doesn't return {disabled: true}. Stops the broken-affordance trap
   where users would see Add passkey → click → 404.

3. /api/settings/save now refuses to set passwordless mode when the
   passkey feature flag is off. Closes the auth-bypass path Opus flagged:
   user goes passwordless while flag on → admin unsets flag → restart
   serves the WebUI fully unauthenticated.

4. CHANGELOG entries added for PR #2685 (replayed-context dedup +
   per-turn metering cap) and PR #2824 (Stop server affordance,
   relocated to Settings) — both PRs had functional changes but no
   release-notes entries. Also enriched the rate-limit detail on the
   #2739 entry (30 events / 60s / 4KB body cap).

Deferred to follow-up issue (#5 in Opus review):
- Live tool metering cumulative cap across many tool calls — non-trivial
  refactor of _bump_live_prompt_estimate, will be a separate PR
2026-05-25 00:26:40 +00:00
nesquena-hermes 46ed70bfde Stage-batch14: add HERMES_WEBUI_PASSKEY feature flag for #2859 passkey support
Per the stage-batch14 ship plan, passkey/WebAuthn support is shipped
opt-in default-off behind an explicit feature flag so deployments can
disable the entire surface (UI + endpoints + credential storage) without
needing to delete code.

Enable via either:
  - HERMES_WEBUI_PASSKEY=1 environment variable, OR
  - webui_passkey_enabled: true in config.yaml

With the flag off:
  - are_passkeys_enabled() returns False even if credentials exist
  - is_auth_enabled() falls back to password-only checking
  - /login renders password-only (no passkey button)
  - All 6 /api/auth/passkey/* endpoints return 404 with a clear message
  - Settings → System → Passkeys section is hidden

Mirrors the #2527 notes-drawer flag shape (env-or-config, truthy parse).
Auth is high-stakes; opt-in lets us land the code while keeping default
deployments on the well-tested password-only path.

Touches: api/auth.py (new _passkey_feature_flag_enabled helper, gated
are_passkeys_enabled), api/routes.py (6 endpoint guards).
2026-05-25 00:16:12 +00:00
AJV20 1b48643f63 feat: support passkey-only auth 2026-05-25 00:14:38 +00:00
AJV20 c60ff543b5 feat: add passkey sign-in 2026-05-25 00:14:38 +00:00
gavinssr 0ab3ad3bb2 fix: place shutdown route after CSRF gate
Move POST /api/shutdown routing after the CSRF check so drive-by
cross-origin requests cannot bring down a dev server with auth off.
Also replace os._exit(0) with os.kill(os.getpid(), signal.SIGINT)
so atexit handlers and pending session writes run during shutdown.
2026-05-25 00:10:52 +00:00
gavinssr 39121650d4 feat: add shutdown button to WebUI title bar
Add a power button (⏻) in the title bar that gracefully stops the
WebUI server process from the browser.

- api/routes.py: POST /api/shutdown endpoint with threaded os._exit(0)
- static/boot.js: shutdownServer() with confirm prompt, BroadcastChannel
  cross-tab notification, and _showServerStopped() placeholder UI
- static/index.html: shutdown button HTML in title bar (after reload btn)
- static/style.css: .app-titlebar-shutdown styles, hover turns red
2026-05-25 00:10:52 +00:00
Lumen Yang d0992730a9 fix: preserve repeated state rows in replay delta 2026-05-25 00:10:27 +00:00
Lumen Yang 5934c2fe8a fix: address context replay review feedback 2026-05-25 00:10:27 +00:00
Lumen Yang c616c8e788 fix: cap live tool prompt estimates 2026-05-25 00:10:27 +00:00
Lumen Yang 50c69713cc fix: reconcile state db delta after context 2026-05-25 00:10:27 +00:00
Lumen Yang 15cde132f3 fix: dedupe replayed context summaries 2026-05-25 00:10:27 +00:00
ai-ag2026 8a2f11c770 fix(chat): log sanitized client sse diagnostics
(cherry picked from commit 749ca6e18c5e307fbf7e7fb5fffce97249545017)
2026-05-25 02:06:42 +02:00
ai-ag2026 2f1ca959f1 fix(chat): classify interrupted response causes
(cherry picked from commit 5c1e802cd6ee8565da74c7ffe57e6407fe21bf02)
2026-05-25 02:06:42 +02:00
ai-ag2026 efe3d7c296 fix(chat): avoid false restart wording for interrupted responses
(cherry picked from commit ef8fd879682aeb729a7b7afa1e7c46478ca5ebb6)
2026-05-25 02:06:42 +02:00
nesquena-hermes e5533ea0e4 Merge pull request #2547 from AJV20/fix/webui-context-parity
fix(chat): align WebUI context with messaging sessions
2026-05-24 23:12:27 +00:00
nesquena-hermes 767a9cd06d Merge pull request #2527 from AJV20/feat/webui-notes-sources
feat(memory): show third-party notes sources
2026-05-24 23:11:54 +00:00
AJV20 d7b98d87cd Merge remote-tracking branch 'origin/master' into maint/pr-2547
# Conflicts:
#	CHANGELOG.md
2026-05-24 17:48:09 -04:00
AJV20 24979c8af1 Merge remote-tracking branch 'origin/master' into maint/pr-2527
# Conflicts:
#	CHANGELOG.md
2026-05-24 17:48:09 -04:00
AJV20 6e2991f45a Merge remote-tracking branch 'origin/master' into maint/pr-2865
# Conflicts:
#	CHANGELOG.md
2026-05-24 17:48:06 -04:00
hermes-agent 7796f74ca3 Stage 406: Opus MUST-FIX — parity-fix sync_session_usage profile= at api/routes.py:9007
Opus pre-release advisor caught a #2762 parity gap. api/streaming.py:5078
(_run_agent_streaming worker, background thread) correctly passes
profile= to sync_session_usage post-#2827. But the SECOND production
call site at api/routes.py:9007 (_handle_chat_sync, HTTP thread) does
not. Safe TODAY (HTTP thread sets TLS correctly), but it's a
defense-in-depth gap: anyone wrapping that handler in a worker pool
later silently regresses the fix. Closes the parity gap so the
threat-model invariant holds regardless of future threading changes.
2026-05-24 19:39:28 +00:00
AJV20 7af7370be6 Merge remote-tracking branch 'origin/master' into fix/session-personality-default
# Conflicts:
#	CHANGELOG.md
2026-05-24 15:05:29 -04:00
hermes-agent fd1c4eaeaf Stage 406: PR #2827 — fix(state-sync): pass profile explicitly so background-thread DB writes hit the right state.db (#2762) by @Koraji95-coder 2026-05-24 18:57:40 +00:00
AJV20 9bd595de40 fix: avoid stamping display personality on sessions 2026-05-24 14:57:37 -04:00