feat: hermes merkle detail — session turns as CAS tree (Phase 2 of #337) #339

Merged
xiaoju merged 1 commits from feat/337-agent-detail-merkle into main 2026-05-18 15:58:02 +00:00
Owner

What

Hermes agent now stores session detail as a merkle CAS tree.

How

  • Parse session_id from hermes stdout
  • Read ~/.hermes/sessions/session_{id}.json
  • Each assistant/tool message → hermes-turn CAS node
  • Root hermes-detail node references all turn hashes via cas_ref
  • Fallback to hermes-raw-output if session file unavailable

Files

  • uwf-agent-hermes/src/session-detail.ts — session parsing + CAS storage
  • uwf-agent-hermes/src/schemas.ts — 3 schemas (turn, detail, raw-output)
  • uwf-agent-hermes/src/types.ts — type definitions
  • uwf-agent-hermes/__tests__/session-detail.test.ts — 7 tests

Ref

Closes #337

## What Hermes agent now stores session detail as a merkle CAS tree. ## How - Parse `session_id` from hermes stdout - Read `~/.hermes/sessions/session_{id}.json` - Each assistant/tool message → `hermes-turn` CAS node - Root `hermes-detail` node references all turn hashes via `cas_ref` - Fallback to `hermes-raw-output` if session file unavailable ## Files - `uwf-agent-hermes/src/session-detail.ts` — session parsing + CAS storage - `uwf-agent-hermes/src/schemas.ts` — 3 schemas (turn, detail, raw-output) - `uwf-agent-hermes/src/types.ts` — type definitions - `uwf-agent-hermes/__tests__/session-detail.test.ts` — 7 tests ## Ref Closes #337
xiaoju added 1 commit 2026-05-18 15:57:55 +00:00
Parse session_id from Hermes stdout, store hermes-turn leaves and
hermes-detail root in CAS with cas_ref turns; fall back to raw stdout
when the session file is missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
xiaoju merged commit f2be6fc057 into main 2026-05-18 15:58:02 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#339