Commit Graph

4673 Commits

Author SHA1 Message Date
nesquena-hermes a10f511a13 fix(#4561): catch RecursionError on deeply-nested manifest (BRICK)
Codex+Opus ship-gate: a <=64KB but deeply-nested JSON manifest makes json.loads raise
RecursionError, which escaped _read_manifest_urls into the app-shell route -> every page
load 503s. Add RecursionError to the fail-safe except + regression test (verified
red-without/green-with). Co-authored-by: santastabber <santastabber@users.noreply.github.com>
2026-06-21 00:42:58 +00:00
nesquena-hermes 3e229141af stage #4561 + stamp v0.51.545 — extension manifest asset bundles
santastabber. HERMES_WEBUI_EXTENSION_MANIFEST: bundle extension assets via a 64KB JSON manifest
instead of long URL lists. Same same-origin allowlist validator, traversal-guarded manifest path,
default-off. Nathan blessed (richer extension system). Co-authored-by: santastabber <santastabber@users.noreply.github.com>
2026-06-21 00:37:08 +00:00
nesquena-hermes 36611b7e20 Merge pull request #4565 from nesquena/stage-3933
Release v0.51.544 — opt-in render markdown in user messages (#3933)
v0.51.544
2026-06-20 17:18:38 -07:00
nesquena-hermes 2471e277cb rebase #3933 + stamp v0.51.544 — opt-in render markdown in user messages
rodboev. Default-off; OFF path byte-identical to master (cache key 'u' + _renderUserFencedBlocks
unchanged when window._renderUserMarkdown falsy). ON routes user text through the same renderMd
SAFE_TAGS/_isSafeUrl sanitizer as assistant msgs. Nathan override-approved (likes the idea, opt-in).
Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-21 00:03:02 +00:00
nesquena-hermes e4dab9b83d Merge pull request #4564 from nesquena/stage-4411
Release v0.51.543 — stable assistant turn anchors (#4411)
v0.51.543
2026-06-20 15:42:09 -07:00
nesquena-hermes feeb5b760a docs(release): stamp v0.51.543 — stable assistant turn anchors (#4411/#3926) 2026-06-20 22:38:38 +00:00
nesquena-hermes cf178d6b0a test: assert direct-assignment anchor-scene snapshot export (not recursive wrapper)
The #4411 snapshot test codified the OLD recursive wrapper signature verbatim
(window.X=function(){return X()}), which is the brick the recursion fix removes.
Update lines 829-830 to assert the correct direct-assignment export form + that the
wrapper form is absent — so the test now guards AGAINST the brick instead of for it.
Codex final re-confirm flagged this stale assertion (product code already correct).
2026-06-20 22:26:18 +00:00
nesquena-hermes 54818261e1 test: widen window-collision classifier to recognize long bare-identifier exports
The #2715/#2771 brick-guard (test_window_function_collision) capped the window.X=RHS
capture at 32 chars and required a trailing terminator to classify a bare identifier,
so a very long function name (e.g. _renderLiveAnchorActivitySceneSnapshotForStream, 47
chars) was misclassified as 'other' → false positive on the now-correct direct-assignment
exports. Widen capture to 80 chars + recognize an identifier running to end-of-window.
Still flags the real object/number/other bug shapes.
2026-06-20 22:15:41 +00:00
nesquena-hermes 6c1fe51ca6 fix(#4411): BRICK — infinite recursion in live anchor-scene window exports
Codex ship-gate (CORE). ui.js:9241 re-exported three top-level functions via
same-name wrappers (window.X = function(){ return X() }). In a classic script a
top-level `function X(){}` IS window.X, so the wrapper reassigns that global to
itself → infinite recursion → RangeError: Maximum call stack size exceeded on
every live worklog render / session reattach / snapshot-restore path (send,
sessions.js:1264/1375/570). Replace with direct assignments. JS-only brick the
pytest suite can't catch (no JS execution) — confirmed by classic-script semantics
+ will verify live in-browser. Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-06-20 22:09:34 +00:00
nesquena-hermes 81a4945be8 harden(#4411): read-side anchor-scene ref-ambiguity guard (Opus finding)
Mirror the write-side _find_anchor_scene_message ambiguity guard on the read side:
_hydrate_anchor_activity_scenes now counts ref occurrences and skips ref-based
attachment for any ref resolving to >1 assistant message (falls through to the
positional index match), so a duplicate content-digest ref can't double-render the
same worklog scene. Low-severity defense-in-depth on the crown-jewel render surface.
Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-06-20 22:05:01 +00:00
nesquena-hermes 001148d208 fix(#4411): guard /api/session/anchor-scene against cross-profile writes
Codex ship-gate (CORE): _handle_session_anchor_scene loaded the session via
_get_or_materialize_session (by-id, no profile scoping) and persisted
anchor_activity_scenes without the active-profile visibility check GET /api/session
applies — an authenticated request under profile A could write anchor scenes onto a
profile-B session. Add the _session_visible_to_active_profile guard (404, no write),
mirroring routes.py:~8922. Regression test verified red-without/green-with the guard.

Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-06-20 22:02:56 +00:00
nesquena-hermes 6951d10ae5 rebase #4411 onto master (v0.51.542) for deep-review — Stable Assistant Turn Anchors capstone
franksong2702's activity_scene_v1 anchor-scene model: live-stream/settled/refresh/re-entry
show the same ordered turn. Rebased clean (no conflicts) onto current master.
Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>
2026-06-20 21:48:55 +00:00
nesquena-hermes 0d6adf9a08 Merge pull request #4562 from nesquena/stage-4413b
Release v0.51.542 — model picker syncs with agent catalog (#4413)
v0.51.542
2026-06-20 14:42:03 -07:00
nesquena-hermes 01985bba04 docs(release): stamp v0.51.542 — model picker syncs with agent catalog (#4413) 2026-06-20 21:38:35 +00:00
nesquena-hermes acd57d847d rebase #4413 re-pushed head (553e9584) for re-gate
Converged both bounce items: enrich-existing-only (continue on webui_list-is-None,
no new providers -> routing side-effect gone, routes.py no longer touched) + respects
per-provider ID prefix convention (@nous:). Co-authored-by: kaishi00 <kaishi00@users.noreply.github.com>
2026-06-20 21:22:53 +00:00
nesquena-hermes 17d9fb6d6a Merge pull request #4559 from nesquena/stage-4555
Release v0.51.541 — stale models-cache fallback on catalog timeout (#4555)
v0.51.541
2026-06-20 12:49:01 -07:00
nesquena-hermes 5eeb43a1f7 test: update disk-cache round-trip assertions for reconstructed aliases
Two existing tests asserted _load_models_cache_from_disk()/get_available_models()
return EXACTLY the saved payload; the loaders now also return aliases reconstructed
from config (empty {} when no config aliases). Update both assertions to expect the
aliases field. Caught by the full suite + Codex re-gate.
2026-06-20 19:33:57 +00:00
nesquena-hermes 85e3be6a42 fix(#4555): preserve /api/models aliases contract on disk-cache fallback
Codex ship-gate (SILENT): both disk loaders dropped `aliases` (the save path
never persisted them), so a disk-cache hit — strict cold-path OR the new stale
fallback — served /api/models with empty aliases, silently breaking `/model
<alias>` slash-command resolution (static/commands.js resolves slash aliases
only from /api/models.aliases). Add _model_aliases_from_config() helper and
reconstruct aliases from current config in BOTH loaders (fixes the pre-existing
strict-loader gap too). Adds a regression test.

Co-authored-by: starship-s <starship-s@users.noreply.github.com>
2026-06-20 19:25:51 +00:00
nesquena-hermes fbafe1e623 harden(#4555): isolate stale-cache path in test fixture + enforce schema-version equality on stale fallback
Applies Opus ship-gate findings: (1) the autouse fixture now points
_get_models_cache_path at an isolated temp file so the over-budget static-fallback
test can't read a real ~/.../models_cache.json and become an order-dependent flake;
(2) _load_stale_models_cache_from_disk rejects a cross-schema cache (its groups/badge
shape may be incompatible with the current picker). Adds a cross-schema-rejection test.

Co-authored-by: starship-s <starship-s@users.noreply.github.com>
2026-06-20 19:19:52 +00:00
nesquena-hermes 3d9487cbaf docs(release): stamp v0.51.541 — stale models cache fallback on catalog timeout (#3928) 2026-06-20 19:11:56 +00:00
Hermes Agent 3d8f3a1f7b fix(models): use stale disk cache on catalog timeout 2026-06-20 19:11:17 +00:00
nesquena-hermes d053b29308 Merge pull request #4558 from nesquena/stage-540
Release v0.51.540 — cross-provider model selection + gateway reasoning effort (#4554, #4552)
v0.51.540
2026-06-20 11:55:35 -07:00
nesquena-hermes a46c368854 docs(release): stamp v0.51.540 — cross-provider model selection + gateway reasoning effort 2026-06-20 18:44:43 +00:00
Rod Boev ee588ba70e fix(#4550): harden gateway reasoning forwarding follow-up 2026-06-20 18:44:25 +00:00
Rod Boev 26c55404a5 fix(#4550): forward gateway reasoning effort 2026-06-20 18:44:25 +00:00
jja881 53affd6936 fix: address review feedback — remove redundant clause, add guard and tests
- Remove the redundant 4th OR clause from _catalog_has_provider() — the
  existing C1–C3 already handle compound provider IDs correctly (C2 IS
  a normalized-vs-raw comparison; the 4th clause was a strict subset).
- Add && _activeProvider guard to _isCrossProviderPick in messages.js
  to prevent spurious True when the profile has no configured default
  provider (reviewer's optional hardening suggestion).
- Add test_catalog_has_provider_compound_ids.py verifying that compound
  provider IDs like 'custom:glm-free-relay' are correctly recognized by
  the existing C1–C3 clauses.
2026-06-20 18:44:25 +00:00
jja881 42fedaf780 test: update explicit-pick regex for broadened _explicitPick inference
The consume-clear guard now checks _pendingPickMatch (the pending onchange
marker match) instead of the broadened _explicitPick, which may also be
true from the new _isCrossProviderPick inference without a pending marker
to consume.
2026-06-20 18:44:25 +00:00
jja881 96265f6ae4 fix: preserve cross-provider model selection across conversation turns
Two-part fix for the model selector jumping back to the profile default
after the first message when a cross-provider model (e.g. a custom relay
like custom:glm-free-relay) is selected.

Backend (api/routes.py):
- _catalog_has_provider() now matches compound provider IDs (e.g.
  custom:zenmux-relay) whose normalized form (custom) is a raw
  catalog provider_id.  Previously the three existing checks missed
  normalized-vs-raw comparison for compound hints, causing the catalog
  lookup to fail and the fallback branch to silently revert the model
  to the profile default on every non-explicit turn.

Frontend (static/messages.js):
- The explicit_model_pick marker was consumed after the first send(),
  so subsequent sends lost the signal and the server repaired the
  model back to the profile default (#3737 regression).
- Now, when the session has a non-default model from a different
  provider than the profile's active provider, every send() sends
  explicit_model_pick=true so the server honors the user's choice
  across the entire conversation.
- The pending onchange marker is still consumed after the first send
  (unchanged behavior); only the explicit_pick inference is broadened.
2026-06-20 18:44:25 +00:00
nesquena-hermes c6ac31b71e Merge pull request #4556 from nesquena/stage-538b
Release v0.51.539 — gateway session continuity + local slash-model routing (#4548, #4547)
v0.51.539
2026-06-20 11:40:18 -07:00
nesquena-hermes 1ee5666870 docs(release): stamp v0.51.539 — gateway session_id + slash-model routing 2026-06-20 17:42:42 +00:00
MinhoJJang 630fd26eec fix configured provider slash model routing 2026-06-20 17:42:18 +00:00
Rod Boev 6ae0ecca0a fix(#4535): include session_id in Runs API request body 2026-06-20 17:42:18 +00:00
nesquena-hermes 84a8932210 Merge pull request #4551 from rodboev/pr/4549-approval-legacy
fix: relay approval SSE events on the legacy gateway chat/completions path
v0.51.538
2026-06-20 10:39:43 -07:00
nesquena-hermes 79bb2a9a34 docs(release): stamp v0.51.538 — gateway legacy approval relay (#4549) 2026-06-20 17:36:45 +00:00
nesquena-hermes 5020f8de9a fix: record gateway run_id on legacy approval event for response relay
The legacy /v1/chat/completions approval handler (added for #4549) rendered
the approval card but never populated _STREAM_RUN_IDS, so /api/approval/respond
could not relay the user's choice back to the gateway to resume the parked run
— it fell through to the local approval path and returned {ok: false}. Record
the run_id from the approval payload (no-op when absent), mirroring the runs-API
path. Adds a behavioral regression test that fails on the pre-fix head.

Codex ship-gate finding (CORE). Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-20 17:26:46 +00:00
Rod Boev 172ca592b6 Add behavioral regression test for legacy approval relay 2026-06-20 09:14:26 -04:00
Rod Boev 0435dddda1 Move approval handler before tool.progress per GPT-5.5 spec review 2026-06-20 08:59:52 -04:00
Rod Boev 9bc84dcad5 Unify approval handler blocks and add debug logging per review 2026-06-20 08:48:55 -04:00
Rod Boev 39d18b39c7 fix: remove unused imports flagged by ruff 2026-06-20 08:40:44 -04:00
Rod Boev f19b0ffc67 fix: relay approval SSE events on the legacy gateway chat/completions path 2026-06-20 08:32:02 -04:00
nesquena-hermes c1a24171e8 Merge pull request #4545 from nesquena/stage-4540
Release v0.51.537 — queued card clears on session switch (#4533)
v0.51.537
2026-06-20 00:16:00 -07:00
nesquena-hermes 0a30790689 ci: re-trigger (shard 3.11/2 flake — shard-2 isolation run green locally) 2026-06-20 07:12:51 +00:00
nesquena-hermes 2f3abb00be stage #4540 + CHANGELOG 2026-06-20 07:12:51 +00:00
nesquena-hermes 3d91defb66 Merge pull request #4546 from nesquena/stage-4542
Release v0.51.536 — transparent-stream tool-call rows persist after settle (#4539)
v0.51.536
2026-06-20 00:09:30 -07:00
nesquena-hermes 348381bda3 stage #4542 @696bf798 (incl perf: pre-scan burst IDs) + CHANGELOG 2026-06-20 06:56:34 +00:00
nesquena-hermes 5b96d28139 Merge pull request #4541 from nesquena/stage-4537
Release v0.51.535 — keep open model picker stable during stream sync (#4531)
v0.51.535
2026-06-19 23:21:37 -07:00
nesquena-hermes 2b398bb2b1 stage #4537: keep open model picker stable during stream sync (#4531, head 92de7615 incl duplicate-rebuild fix) + v0.51.535 CHANGELOG 2026-06-20 06:10:04 +00:00
nesquena-hermes 9988f0a3f6 Merge pull request #4538 from nesquena/stage-4524b
Release v0.51.534 — clarify prompt no longer bricks the session on expiry (#4504)
v0.51.534
2026-06-19 22:48:27 -07:00
nesquena-hermes 15fe6add30 stage #4524: clarify 409-terminal (id-guarded, loading-cleared) + SSE-notify on expiry (#4504) + v0.51.534 CHANGELOG 2026-06-20 05:36:56 +00:00
nesquena-hermes 3433c7d6a1 Merge pull request #4532 from nesquena/stage-3285
Release v0.51.533 — restart gateway from the agent-health alert (#3285)
v0.51.533
2026-06-19 21:52:32 -07:00