Commit Graph

2867 Commits

Author SHA1 Message Date
Frank Song 70402f96f1 fix(workspace): fall back for large markdown previews 2026-05-24 15:52:54 +00:00
Frank Song 99c886c199 fix(workspace): open rendered preview links correctly 2026-05-24 15:52:35 +00:00
Frank Song f1586daa3b fix(cron): surface gateway scheduling guidance 2026-05-24 15:52:35 +00:00
Frank Song 67a204773e fix(csrf): clarify rejection diagnostics 2026-05-24 15:52:34 +00:00
AJV20 b6f7412b53 Add option to ignore agent updates 2026-05-24 15:52:34 +00:00
Koraji95-coder 7a3ceacffe fix(composer): stop chip wraps from compressing past their content (#2740)
Squashed from 2 author commits:
- a1017d02 initial fix: flex:0 0 auto on all 5 chip wraps
- bf54ba50 Copilot review fix-up: consolidate into single rule

Closes #2740. CSS-only, no JS changes. Default-width layout unchanged,
only affects narrow-viewport overflow regime via composer-left's existing
overflow-x:auto.
2026-05-24 15:52:26 +00:00
tangerine-fan 9a5973a6b5 feat: echo clarify user choice as visible message in conversation
After the user responds to a clarify prompt, insert a synthetic user
message into the conversation showing their choice. This makes the
clarify interaction visible in the chat history, which was previously
only shown in the transient clarify dialog card.

The message is marked with _clarify_response: true so downstream
consumers can distinguish it from regular user messages if needed.
2026-05-24 15:52:00 +00:00
humayunak 32df5546b4 fix(webui): prevent approval and clarify cards stealing focus from composer textarea
When tool approval or clarification cards appear during streaming,
they unconditionally call focus() on their input elements via setTimeout,
stealing focus from the composer (#msg) if the user is actively typing.
This silently drops keystrokes mid-type.

Add a guard: only move focus to the card if the composer textarea does
not already have focus. The document.activeElement check matches the
pattern already used upstream in other focus-sensitive components.

Fixes: #
2026-05-24 15:52:00 +00:00
Frank Song 618e1a5da8 fix(server): tolerate malformed request logging 2026-05-24 15:52:00 +00:00
tn801534 2e876ea229 fix: kanban worker log URL double query param on non-default boards 2026-05-24 15:52:00 +00:00
nesquena-hermes 66de2367a9 Merge pull request #2817 from nesquena/release/stage-batch6
Release CV: stage-batch6 — 3-PR Windows-only stack (v0.51.124) — start.ps1 paths/docs/hardening
v0.51.124
2026-05-23 21:53:47 -07:00
nesquena-hermes fe0a1cea94 Stamp CHANGELOG for v0.51.124 (Release CV / stage-batch6 / 4-PR Windows-only stack)
Cherry-picked PRs (all by @Koraji95-coder):
- #2805 — expand hermes-agent candidate paths for Windows installers
- #2806 — clarify native Windows venv path; remove WSL2-venv-portability claim
- #2807 — TryParse HERMES_WEBUI_PORT + exit AFTER try/finally cleanup
- #2811 — native-Windows startup E2E CI workflow

All 4 PRs were branched off #2783 (now shipped in v0.51.121). Squash-merged
each PR's unique changes onto current master with conflict resolution.
Authorship preserved on every commit. Zero impact on Linux/macOS runtime —
file scope is start.ps1, README.md (Windows section), and a new Windows-CI
workflow that only runs on PRs touching start.ps1/requirements.txt/etc.
2026-05-24 04:47:53 +00:00
Koraji95-coder 055f9b3cd0 harden(start.ps1): TryParse HERMES_WEBUI_PORT + exit AFTER try/finally cleanup (#2807)
Squashed from 2 author commits onto current master (3 base commits from
already-shipped #2783 were filtered out by the squash):
- f53b9308 fix(start.ps1): TryParse HERMES_WEBUI_PORT + exit AFTER try/finally cleanup
- 7b6e0722 fix(start.ps1): drop non-functional @args splat under [CmdletBinding()]

Authorship preserved. CHANGELOG entry merged into batch stamp commit.
2026-05-24 04:37:18 +00:00
Koraji95-coder 9db6be99e1 docs(start.ps1+README): clarify native Windows venv path; remove misleading WSL2-venv-portability claim (#2806)
Squashed from 3 author commits onto current master (3 base commits from
already-shipped #2783 were filtered out by the squash). #2805's expanded
candidate-path discovery + PathType Container check preserved from prior
stage commit.

Authorship preserved. CHANGELOG entry merged into batch stamp commit.
2026-05-24 04:37:18 +00:00
Koraji95-coder ed9a163731 feat(start.ps1): expand hermes-agent candidate paths for Windows installers (#2805)
Squashed from 3 author commits onto current master (the 3 base commits from
already-shipped #2783 were filtered out by the squash):
- 6822cbbb feat: expand hermes-agent candidate paths
- 6f423538 Copilot review: PathType+null-guard+changelog
- dbebbedd handle WOW64 ProgramFiles redirection

Authorship preserved. CHANGELOG entry merged into batch stamp commit.
2026-05-24 04:37:18 +00:00
nesquena-hermes cb270f351f Merge pull request #2816 from nesquena/release/stage-batch5
Release CU: stage-batch5 — 2-PR low-risk batch (v0.51.123) — gzip+ETag static caching / Open in VS Code
v0.51.123
2026-05-23 21:36:33 -07:00
nesquena-hermes 79a3ac3724 Stamp CHANGELOG for v0.51.123 (Release CU / stage-batch5 / 2-PR low-risk batch)
Cherry-picked PRs:
- #2779 (v2psv) — gzip + ETag/304 + immutable cache for fingerprinted /static/*
- #2787 (munim) — Open in VS Code workspace file browser action (closes #2735)

Conflict resolution: kept ours CHANGELOG (3 PRs all added Unreleased entries).
For #2779's _serve_static overhaul, took theirs (PR replaces function body).
Folded missing 'import gzip' into the #2779 commit via fixup+autosquash.
2026-05-24 04:27:34 +00:00
Abdul Munim 7999d1c75a feat(workspace): add Open in VS Code action for files and folders (#2735)
Right-click any workspace file, folder, or root now shows
'Open in VS Code' alongside the existing Reveal in File Manager action.

- POST /api/file/open-vscode: resolves path via safe_resolve, finds VS
  Code via shutil.which() with fallbacks for macOS (/usr/local/bin/code,
  app bundle CLI), Linux (/usr/bin/code, /snap/bin/code), and Windows
  (%LOCALAPPDATA% and %PROGRAMFILES% user/system installs). Returns a
  descriptive error if not found rather than a bare OS error.
- Optional vscode block in config.yaml: command (default: code),
  host_path_prefix + container_path_prefix for Docker path mapping.
- i18n: open_in_vscode and open_in_vscode_failed translated in all 10
  locales (it, ja, ru, es, de, zh-CN, zh-TW, pt, ko).
- 26 tests in tests/test_2735_open_in_vscode.py covering source wiring,
  command resolution, i18n completeness, and live endpoint error paths.
2026-05-24 04:26:46 +00:00
Qi d20da832b3 fix(static): tighten cache validators and 304 headers 2026-05-24 04:26:46 +00:00
nesquena-hermes 904cdec1a6 Merge pull request #2815 from nesquena/release/stage-batch4
Release CT: stage-batch4 — 4-PR low-risk batch (v0.51.122) — stale cache tail / inflight UI / segment flush / reasoning accumulator
v0.51.122
2026-05-23 21:17:39 -07:00
nesquena-hermes 6bfded9e02 Stamp CHANGELOG for v0.51.122 (Release CT / stage-batch4 / 4-PR low-risk batch)
Cherry-picked PRs:
- #2802 (ai-ag2026) — drop stale cached user tail (supersedes held #2733)
- #2796 (ai-ag2026) — clear stale inflight UI state (5-commit squash)
- #2777 (b3nw) — flush pending render at segment boundaries
- #2778 (b3nw) — reset reasoning accumulator per turn + prefer reasoning_content
2026-05-24 04:09:45 +00:00
b3nw 160cd03c18 fix(chat): reset reasoning accumulator per turn and prefer reasoning_content (closes #2565)
Two confirmed bugs in the thinking/reasoning display:

1. reasoningText was initialized once when the SSE stream opened and never
   reset between turns. On the done event, the last assistant message
   received the union of every turn's reasoning. Now reset at both turn
   boundaries: tool (alongside existing liveReasoningText reset) and
   interim_assistant (the other turn boundary where prior reasoning closes).

2. ui.js renderMessages preferred m.reasoning (which could be corrupted by
   bug 1) over m.reasoning_content (the clean per-turn value from the
   backend). The fallback now reads m.reasoning_content || m.reasoning.

Both fixes are needed: bug 2 alone cannot cover providers that stream
reasoning events without populating reasoning_content on the final API
message.

Updated test_streaming_race_fix.py to scope its reconnect-accumulator
guard to the _wireSSE preamble only, since turn-boundary resets inside
event listeners are intentional and correct.

9 new regression tests in test_issue2565_reasoning_accumulation.py.
2026-05-24 04:08:40 +00:00
b3nw 1f56fad73f fix(chat): flush pending render before segment reset at tool/interim boundaries
Fixes #2713 — live assistant text can truncate at tool-call segment
boundaries during streaming.

Before _resetAssistantSegment() in the tool and interim_assistant SSE
handlers, synchronously flush any pending rAF render work so tokens that
arrived during the 66ms throttle window are written to the DOM before
assistantBody is cleared. Without this flush, the pending _doRender
callback fires after assistantBody is null and skips the write silently,
causing the tail of the pre-tool segment to disappear from the live view.

Implementation:
- Extract _flushPendingSegmentRender() helper (guarded by assistantBody
  && _renderPending) that cancels the pending rAF and synchronously
  writes via smd/renderMd/esc — same cascade as _doRender.
- Call the helper from both the tool and interim_assistant handlers
  before their respective _resetAssistantSegment() calls.
- Normal cases where the rAF has already fired are unaffected (guard
  skips immediately).

Completed transcripts were never affected (renderMessages rebuilds from
the full assistantText accumulator on done).

Adds tests/test_issue2713_streaming_segment_flush.py with 11 static
analysis regression tests pinning the helper shape and call-site
ordering.
2026-05-24 04:08:33 +00:00
ai-ag2026 39242c586c fix: clear stale inflight UI state (closes #2795, squashed from 5 commits)
Cherry-pick of PR #2796 by @ai-ag2026, squashed from 5 author commits onto current master:
- dcee0563 fix: drop stale optimistic sidebar rows
- 3a73400d fix: clear stale busy state before send
- 46c3b902 fix: preserve server idle rows during optimistic merge
- de51d271 fix: let chat start survive pre-start UI errors
- d2f5c906 fix: hide nonfatal pre-start send warnings

Authorship preserved via --author. Code-only squash (no CHANGELOG).
2026-05-24 04:08:25 +00:00
ai-ag2026 225ea78604 fix: drop stale cached user tail after saved assistant 2026-05-24 04:06:45 +00:00
nesquena-hermes 798e5714ec Merge pull request #2813 from nesquena/release/stage-batch3
Release CS: stage-batch3 — 4-PR low-risk batch (v0.51.121) — state.db merge / display counts / compression marker / Windows launcher
v0.51.121
2026-05-23 21:03:41 -07:00
nesquena-hermes 10838ae8fa Stamp CHANGELOG for v0.51.121 (Release CS / stage-batch3 / 4-PR low-risk batch)
Cherry-picked PRs:
- #2788 (Carry00) — state.db merge: include id column + per-profile reads
- #2797 (ai-ag2026) — align messaging session display counts (raw->merged)
- #2803 (simjak) — compression marker strict predicate (no tool output)
- #2783 (Koraji95-coder) — native Windows start.ps1 + README community link
2026-05-24 03:55:42 +00:00
Koraji95-coder 49f340d939 feat(windows): native Windows community-guide link + start.ps1 launcher (#1952)
PR #2783 by @Koraji95-coder — squashed from 3 commits (initial PR + Copilot review fixes + agent-dir validation). CHANGELOG entry merged into stamp commit.
2026-05-24 03:55:42 +00:00
Simonas Jakubonis 35c55e1268 fix(compression): ignore tool output for compaction cards 2026-05-24 03:55:42 +00:00
ai-ag2026 cd029d801a fix: align messaging session display counts 2026-05-24 03:55:42 +00:00
carryzuo00 ee672df463 fix: prevent state.db messages being silently dropped during sidecar merge
Two bugs combined to cause historical messages to vanish from the WebUI
after a session was continued in a later conversation.

**Bug 1 — missing `id` in state.db SELECT (models.py)**
`get_state_db_session_messages()` did not include the `id` column in its
SELECT, so every row got a `("legacy", ...)` merge key instead of
`("message_id", ...)`.  The timestamp gate in
`merge_session_messages_append_only()` explicitly exempts `message_id`-keyed
rows from its "skip if older than newest sidecar message" rule, but
legacy-keyed rows are unconditionally dropped.  With a session that has any
new sidecar messages (max_sidecar_timestamp == today), all older state.db
rows were silently discarded.

Fix: include `id` when the column is present so rows get proper
`("message_id", ...)` keys and survive the timestamp filter.

**Bug 2 — always reads active profile's state.db, not the session's (models.py + routes.py)**
`get_state_db_session_messages()` always called `_active_state_db_path()`,
which returns the currently-active profile's database.  Sessions belonging to
a different profile (e.g. `jump`) were read from the wrong state.db, returning
either no rows or unrelated ones.

Fix: add an optional `profile` parameter; when supplied, resolve the path via
`_get_profile_home(profile)` with a fallback to the active path if the
profile-specific db does not exist.  The call-site in `routes.py` now reads
`session.profile` and passes it through.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 03:55:42 +00:00
nesquena-hermes 465b97a9f5 Merge pull request #2810 from nesquena/release/stage-batch2
Release CR: stage-batch2 — 3-PR low-risk batch (v0.51.120) — Bedrock provider / update past-tag / CORS preflight
v0.51.120
2026-05-23 20:49:09 -07:00
nesquena-hermes 60eb6f5349 Stamp CHANGELOG for v0.51.120 (Release CR / stage-batch2 / 3-PR low-risk batch)
Cherry-picked PRs:
- #2786 (munim) — surface bedrock provider in WebUI model picker
- #2789 (munim) — update check falls through when HEAD is past latest tag
- #2790 (weidzhou) — do_OPTIONS handler for CORS preflight (minimal resubmit of closed #2750)

No surface overlap between the 3 PRs.
2026-05-24 03:43:14 +00:00
wdzhou acda74e557 fix: add do_OPTIONS handler for CORS preflight requests 2026-05-24 03:42:13 +00:00
Abdul Munim d04805b0d7 fix(updates): fall through to branch check when HEAD is past latest tag
When current_tag == latest_tag, _check_repo_release returned behind=0
and reported 'Up to date' even if master had moved hundreds of commits
past the tag.  This was visible as Agent: v2026.5.16-593-gedb2d9105
alongside a green 'Up to date' pill in Settings.

Run 'git describe --tags --always' after computing behind==0.  If the
output includes a -N-gSHA suffix the tag is not at HEAD; return None so
_check_repo_branch runs and counts the real commit gap via rev-list.

When HEAD is exactly on the latest tag the new branch is never taken and
behaviour is unchanged.

Fixes #2653.
2026-05-24 03:42:13 +00:00
Abdul Munim d7f1514d96 fix(models): surface bedrock provider in WebUI model picker (#2720)
Bedrock was silently dropped from the picker because:
1. 'bedrock' absent from _PROVIDER_DISPLAY — group header fell back to
   title-cased id; more critically the group fell to the else branch
2. 'bedrock' absent from _PROVIDER_MODELS — else branch has no
   auto-detected models, so the group was never appended
3. Fallback env-var detection (hermes_cli unavailable) never checked
   AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY

Fix:
- Add 'bedrock': 'AWS Bedrock' to _PROVIDER_DISPLAY
- Add static fallback model list to _PROVIDER_MODELS['bedrock'] with
  global Anthropic Claude 4.x cross-region inference profile IDs;
  live discovery via hermes_cli.models.provider_model_ids('bedrock')
  is used first (existing _read_live_provider_model_ids machinery)
- Detect bedrock in env fallback path when both AWS_ACCESS_KEY_ID and
  AWS_SECRET_ACCESS_KEY are present

Tests: tests/test_issue2720_bedrock_model_picker.py (5 new tests)
2026-05-24 03:42:13 +00:00
nesquena-hermes 01e4159818 Merge pull request #2809 from nesquena/release/stage-batch1
Release CQ: stage-batch1 — 3-PR low-risk batch (v0.51.119) — tool cards / 404 recovery / Hepburn skin
v0.51.119
2026-05-23 20:38:58 -07:00
nesquena-hermes 1ffac74a8b Stamp CHANGELOG for v0.51.119 (Release CQ / stage-batch1 / 3-PR low-risk batch)
Cherry-picked PRs:
- #2801 (ai-ag2026) — preserve settled tool cards after stream completion
- #2808 (chouzz) — recover from boot-time /session/{id} 404
- #2799 (gavinssr) — Hepburn skin (magenta-rose palette)

All UI-only, additive or behaviorally-narrow. No api/ changes.
2026-05-24 03:26:45 +00:00
gavinssr 75fdadd477 feat: add Hepburn skin (magenta-rose palette)
Add Hepburn skin with full light/dark palette derived from the
Hepburn TUI theme. Brand color #c6246a with pink-magenta accents.

- Light: soft pink surfaces (#fff3f7 / #fbe4ed)
- Dark: deep aubergine (#110a0f / #1e0f19)
- Accent: #d44a7a (light) / #f278ad (dark)
- Styled: send button, new chat button, tool cards, session indicator

Also fix settings panel skin picker to prioritize localStorage
over server defaults, so newly selected skins reflect correctly
in the dropdown.
2026-05-24 03:03:32 +00:00
Harlan Zhou 21481e85fd fix(ui): recover from stale /session/{id} on boot-time 404 2026-05-24 03:03:31 +00:00
ai-ag2026 1e5f20f56d fix: preserve settled tool cards after stream completion 2026-05-24 03:03:31 +00:00
nesquena-hermes e091e65d56 Merge pull request #2774 from nesquena/release/stage-pr2773
Release v0.51.118 (Release CP / stage-pr2773 / 1-PR hotfix — v0.51.117 brick fix)
v0.51.118
2026-05-22 16:25:41 -07:00
nesquena-hermes c9dfa33e39 Stamp CHANGELOG for v0.51.118 (Release CP / stage-pr2773 / 1-PR hotfix) 2026-05-22 23:22:27 +00:00
nesquena-hermes 3adc59874d Stage pr2773: PR #2773 — fix(chat): rename _inflightStateLimits() to fix v0.51.117 collision (closes #2771) 2026-05-22 23:21:33 +00:00
nesquena-hermes d8b82e274a docs: stamp PR #2773 in CHANGELOG entry 2026-05-22 23:17:47 +00:00
nesquena-hermes 12becd1f4b fix(chat): rename _inflightStateLimits() to _getInflightStateLimits() to fix v0.51.117 collision
Closes #2771.

v0.51.117 (PR #2766) introduced a top-level function _inflightStateLimits()
in static/ui.js that collided with the window._inflightStateLimits config
object set in static/boot.js. Because top-level function declarations in
classic (non-module) scripts attach to window, boot.js's assignment
overwrote the function reference, and every later _inflightStateLimits()
call threw TypeError. _compactInflightState() runs on every send(), so
no new chat session could be created — v0.51.117 is effectively unusable.

Reported by @jahilldev, with multiple users (@isma3iloiso, @theDanielJLewis,
@JHVenn) confirming the bug or reverting to v0.51.116.

Fix: rename the function to _getInflightStateLimits() — the window-attached
config key stays under its original name (unchanged for any downstream
code that reads it). Updates all 4 call sites in static/ui.js.

Tests:

  - Update tests/test_inflight_storage_quota.py — the existing test
    asserted 'function _inflightStateLimits()' in UI_JS as a positive
    presence check, which certified the bug. Now asserts the renamed
    function name is present AND the old colliding name is absent AND
    no stale call sites remain.
  - Add tests/test_window_function_collision.py — generalized regression
    that scans every static JS file for top-level function declarations
    whose name also appears as the target of 'window.X = {...}' or
    'window.X = <number>'. This is the exact shape that broke #2715
    (_pinnedSessionsLimit in v0.51.106) and #2771. Test fails with a
    precise diagnostic naming the file and symbol if the bug class
    returns. Confirmed test FAILS on current master (unfixed) and PASSES
    on this branch.

Verified end-to-end against the live browser before commit:
  - typeof window._inflightStateLimits === 'object' (config preserved)
  - typeof window._getInflightStateLimits === 'function'
  - _getInflightStateLimits() returns the limits object
  - saveInflightState() persists to localStorage without throwing

Full pytest suite: 6308 passed, 6 skipped, 3 xpassed, 8 subtests passed.
Opus advisor: SHIP.
2026-05-22 23:17:00 +00:00
nesquena-hermes f930260157 Merge pull request #2770 from nesquena/release/stage-pr2766
Release CO: v0.51.117 (stage-pr2766 — 1-PR — in-flight recovery storage quota-safe)
v0.51.117
2026-05-22 12:56:45 -07:00
nesquena-hermes aa0c7b7144 Stamp CHANGELOG for v0.51.117 (Release CO / stage-pr2766 / 1-PR) 2026-05-22 19:53:05 +00:00
george-andraws b2477974c5 fix: make in-flight recovery storage quota-safe 2026-05-22 19:49:20 +00:00
nesquena-hermes a9acafb918 Merge pull request #2769 from nesquena/release/stage-pr2676
Release CN: v0.51.116 (stage-pr2676 — 1-PR — per-skill enable/disable toggle in Skills panel, CLI-parity, Telegram-approved)
v0.51.116
2026-05-22 12:47:44 -07:00