Repository navigation
feat(transcript): read Hermes conversations from state.db - #31
Merged
Merged
Conversation
Hermes keeps no transcript file; messages live in ~/.hermes/state.db. Add a SQLite-backed TranscriptReader and projector (same shape as opencode's) and wire them onto the hermes agent row.
|
🎉 This PR is included in version 0.1.16 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
요약
hermes 패널의 대화(프롬프트·답·도구 호출/결과)를 hwip 세션 기록(타임라인)에 싣는다. hermes 는 transcript 파일이 없고
~/.hermes/state.db의messages테이블에 쓰므로, opencode 와 같은 모양의 SQLiteTranscriptReader+ projector 를 추가하고 hermes 행에 연결했다.src/hermes-transcript.ts신규:<db>#<sessionId>경로, 읽기 전용 SQL(id 정규식 검증·active=1·tool_calls 를 SQL 에서 축약),hermesLinesOf,readHermesTranscript(DB stamp·1초 간격·messages.id커서),projectHermesEntries.command/cmd인자는 이벤트에 싣지 않는다(path·pattern·url 류만 target).src/remote-agents.ts: hermes 행에resolveTranscript(기존detectHermesResumeId재사용)·projectTranscript·readTranscript.검증
npx vitest run --exclude src/http-proxy.test.ts: 209 파일 5597 passed (http-proxy 8건은 main 에서도 실패하는 기존 문제).tsc --noEmit통과.~/.hermes/state.db에hermesRowsSql을 돌려 행→이벤트 변환 확인.sessions.id=messages.session_id(FK) ③ hermes_state.py 에 messages INSERT 만 있고 content UPDATE 없음(UPDATE 는 display_*·active/compacted) → id 커서 안전.남은 것
ok: true(스키마에 오류 신호 없음). 대용량 tool 출력의 줄 수 계산이 SQL 전체 길이를 훑는다(리뷰 Nice-to-have).