Commit Graph

1205 Commits

Author SHA1 Message Date
BonyFish ea3d4ec0b3 feat(cron): dynamic delivery options from API instead of hardcoded select
Replace the hardcoded 4-option deliver dropdown (local/discord/telegram/slack)
with a dynamic select populated from a new GET /api/crons/delivery-options
endpoint that reads _KNOWN_DELIVERY_PLATFORMS from hermes-agent.

Key changes:
- Add GET /api/crons/delivery-options endpoint returning all known platforms
- Frontend loads options asynchronously on first cron form open, with caching
- Enable deliver editing for existing jobs (was previously disabled)
- Include deliver in update payload when editing cron jobs
- Fallback to local-only if API unavailable
- Custom deliver values (e.g. feishu:oc_xxx) shown with * suffix
- Add cron_deliver_custom i18n key to all 12 locales
- Add 5 integration tests for the new endpoint
2026-05-27 10:58:49 +08:00
nesquena-hermes aa6cd48318 Merge pull request #2888
# Conflicts:
#	CHANGELOG.md
#	tests/test_webui_prefill_context.py
2026-05-27 00:38:24 +00:00
nesquena-hermes e0dfa0c586 Merge pull request #2792 2026-05-27 00:37:48 +00:00
nesquena-hermes 244258aa89 Merge pull request #2986 2026-05-27 00:19:00 +00:00
nesquena-hermes 2db584969c Merge pull request #2964 2026-05-27 00:19:00 +00:00
nesquena-hermes 80a9b0fa68 Merge pull request #2985
# Conflicts:
#	CHANGELOG.md
2026-05-27 00:03:02 +00:00
nesquena-hermes f3fbb49ce4 Merge pull request #2983
# Conflicts:
#	CHANGELOG.md
2026-05-27 00:02:47 +00:00
nesquena-hermes f061733c91 Merge pull request #2969
# Conflicts:
#	CHANGELOG.md
2026-05-27 00:02:32 +00:00
ai-ag2026 815df9de76 fix: vendor math and yaml assets for CSP 2026-05-26 23:49:02 +02:00
ai-ag2026 fceb255252 fix(session): anchor message windows on renderable tail rows 2026-05-26 23:37:08 +02:00
george-andraws 65cae8f1a5 Improve sidebar chat search highlighting 2026-05-26 14:17:59 -07:00
dobby-d-elf b74df67726 Make session index pruning explicit 2026-05-26 07:43:16 -06:00
Frank Song 2ff73c9954 Document truncation watermark metadata intent 2026-05-26 20:13:01 +08:00
Frank Song 9db0d6869a fix: keep session switch metadata non-blocking 2026-05-26 16:40:35 +08:00
Isla-Liu ecfa580660 fix(config): exclude credential-rotation fields from models-cache auth.json fingerprint
auth.json is rewritten by credential-pool/OAuth token refresh roughly every
14 minutes. _models_cache_source_fingerprint() hashed it via mtime/size
(#1699 _models_cache_file_fingerprint), so every token refresh churned the
fingerprint and the 24h /api/models cache was effectively dead -- the hot
GET /api/session?resolve_model=1 path paid a cold ~11.5s rebuild every few
minutes (RCA t_d127953d residual #2, t_16551f61).

Add _auth_store_semantic_fingerprint(): content-hash auth.json with a
DENY-list of known credential-rotation-only keys (access/refresh token,
expiry, per-credential status/telemetry, request_count, save updated_at)
stripped. Deny-list (not allow-list) is deliberate -- any unknown field, or
a real provider/endpoint/model-set change (active_provider, a new
credential_pool entry, base_url, source, label, auth_type, the providers{}
block, ...) stays in the fingerprint and still correctly busts the cache.
Conservative fallbacks: missing file -> marked; unreadable/corrupt ->
stat-based fallback (never less safe than pre-fix). config.yaml keeps the
cheap stat fingerprint (deliberate edits, no timer churn).

Bidirectional invariant regression test (non-tautological -- the
end-to-end churn test flips RED when the auth_json axis is reverted to
stat-based): token-only churn keeps fingerprint byte-identical AND keeps a
valid disk cache loadable; active_provider change / new credential_pool
entry / changed base_url each flip the fingerprint AND reject the stale
disk cache. Measured: 5/5 cold rebuilds per 5 refresh cycles -> 0/5.

Tests: 9 new pass; 28 adjacent (#1699/#1633/display-resolver) pass;
54 models_cache/fingerprint suite pass.
2026-05-26 12:46:59 +08:00
dobby-d-elf ca9e821b5e Reduce session index churn on chat start 2026-05-25 16:25:23 -06:00
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
AJV20 894ad9ed90 Merge origin/master into feat/webui-prefill-script 2026-05-24 21:04:27 -04: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
Roberto Villegas d1471fbed7 fix(webui): resolve reasoning efforts for routed codex models 2026-05-24 18:42:44 -06:00
Roberto Villegas a9ce2889af fix(ui): hide reasoning chip when model lacks effort levels
Resolve supported reasoning efforts per active model/provider and pass
that context through /api/reasoning so Composer and other non-configurable
models no longer show a misleading effort picker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 18:42:31 -06:00
Roberto Villegas ef5eafcceb fix(cursor-acp): route slash models and honor picker on new chat
Ensure cursor/composer IDs always resolve via @cursor-acp:, carry the
visible picker selection into POST /api/session/new, persist model
changes before a session exists, and evict cached agents on model switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 18:42:20 -06:00
Roberto Villegas aee376323f feat(cursor-acp): add cursor-acp to WebUI model picker
- Add cursor-acp to _PROVIDER_DISPLAY with label 'Cursor ACP'
- Add cursor-acp static model list to _PROVIDER_MODELS
- composer-2.5, composer-2, default, cursor-acp
2026-05-24 18:42:04 -06: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
AJV20 befee0e035 test(chat): harden WebUI prefill script hook 2026-05-24 20:20:28 -04:00