You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add firstActivity to session JSON output (#1222)
* feat: add firstActivity to session JSON output
Add firstActivity field alongside lastActivity in session JSON output for both ccusage and opencode. Use full RFC 3339 timestamps for both fields in JSON, while table display truncates to date-only.
* fix(opencode): preserve session id in session summaries
The firstActivity change switched OpenCode session grouping to use SessionAccumulator, which already writes session_id from the latest entry. The old summarize_by_key migration loop still ran afterward and replaced that value with row.date.take(), leaving session JSON with a null sessionId.
Remove that stale migration step and add a regression test that verifies the session id and first/last activity bounds. Update session JSON documentation examples to show firstActivity and RFC 3339 lastActivity values so the docs match the new public output shape.
---------
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
Co-authored-by: ryoppippi <1560508+ryoppippi@users.noreply.github.com>
This view shows usage grouped by individual OpenClaw sessions. Session IDs come from the JSONL filename stem (the part before `.jsonl`, ignoring `.deleted.<ts>` or `.reset.<ts>` suffixes), and metadata records the last activity date and provider that produced the most recent activity.
157
+
This view shows usage grouped by individual OpenClaw sessions. Session IDs come from the JSONL filename stem (the part before `.jsonl`, ignoring `.deleted.<ts>` or `.reset.<ts>` suffixes), and JSON output records activity timestamps and provider metadata for the most recent activity.
Copy file name to clipboardExpand all lines: rust/crates/ccusage/src/adapter/opencode/snapshots/ccusage__adapter__opencode__report__tests__snapshots_agent_summary_json_period_keys_and_session_metadata.snap
0 commit comments