fix: sync all session sources and add Jobs API configuration#369
Open
54laowang wants to merge 2 commits intoEKKOLearnAI:mainfrom
Open
fix: sync all session sources and add Jobs API configuration#36954laowang wants to merge 2 commits intoEKKOLearnAI:mainfrom
54laowang wants to merge 2 commits intoEKKOLearnAI:mainfrom
Conversation
b591a98 to
7bd425e
Compare
- Changed listHermesSessionSummaries('api_server') to listHermesSessionSummaries(undefined)
- Added source parameter to createSession() function
- Pass hermesSession.source when syncing sessions
- This allows syncing sessions from all sources (cli, telegram, weixin, feishu, etc.)
- Previously only api_server sessions were synced, causing empty session list for most users
- The UI already supports displaying session sources with proper labels and grouping
Fixes issue where Web UI shows no sessions after update to v0.5.x
7bd425e to
e7266c6
Compare
Contributor
|
Hey @54laowang, I've opened #373 which includes the source filter fix (same as yours) plus two additional fixes: (1) incremental sync via hermes_id dedup column — so existing users don't need to wipe their DB, and (2) SessionDeleter race guard from #354. The Jobs API config docs in your PR are useful but orthogonal — might be better as a separate docs PR. Hope we can consolidate! |
Merged
Collaborator
|
这个 PR 当前正文里引用/关闭了 #368,但它看起来没有处理 #368 描述的审批显示/审批响应问题。 #368 的根因更像是 Hermes Agent API run/event 流缺少审批控制面:WUI 需要从 相关上游跟踪:
请把正文里的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two critical bugs preventing Web UI from displaying session records and cron jobs.
Bug #1: Session Sync Filtering
Problem: session-sync.ts hardcoded listHermesSessionSummaries('api_server', ...) which only fetched sessions with source='api_server'. Hermes Agent sessions have sources like cli, telegram, weixin, feishu, wecom, qqbot, cron — never api_server.
Fix: Changed to listHermesSessionSummaries(undefined, ...) to sync all sources.
Files changed:
Bug #2: Session Source Override
Problem: createSession() hardcoded source: 'api_server' overriding actual source values from Hermes.
Fix: Added source?: string to CreateSessionData interface and changed to source: data.source || 'api_server' to preserve original source.
Files changed:
Bug #3: Jobs API Authentication
Problem: Jobs page returned Invalid API key because Web UI couldn't find API_SERVER_KEY.
Fix: Document that API_SERVER_KEY must be in ~/.hermes/.env (for default profile) or ~/.hermes/profiles//.env (for other profiles).
Files changed:
Configuration Required
After deploying this fix, users need to create .env file:
Default profile (~/.hermes/.env):
API_SERVER_KEY="your-api-server-key"Other profiles (~/.hermes/profiles//.env):
API_SERVER_KEY="your-api-server-key"The API key is found in ~/.hermes/config.yaml:
Test Plan
Closes #368