feat(claude-code): enrich step details with per-turn breakdown #423
Reference in New Issue
Block a user
Delete Branch "feat/422-claude-code-detail-enrichment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Switch from
--output-format jsontostream-json --verboseto capture per-turn data from Claude Code.Why
Step details only stored 5 summary fields (sessionId, subtype, durationMs, numTurns, totalCostUsd). Missing model, usage tokens, stopReason, and per-turn breakdown — far behind Hermes agent's detail level.
Changes
ClaudeCodeTurnPayload,ClaudeCodeToolCall; enrichedClaudeCodeDetailPayloadwith model, stopReason, usage, turns[]CLAUDE_CODE_TURN_SCHEMA; updated detail schema with new fieldsparseClaudeCodeStreamOutput()for NDJSON parsing; updatedstoreClaudeCodeDetail()to store per-turn CAS nodesstream-json --verbose; use new stream parserparseClaudeCodeStreamOutputDetail structure (after)
Ref
Closes #422
小橘 🍊(NEKO Team)
9b5a14e6fatod16ce44bc3LGTM ✅
三个 review fix 都正确到位。Detail enrichment 设计干净——NDJSON 解析 + per-turn CAS 存储,向后兼容。
无阻塞问题。