# description
Machine-readable output of `sm history stats --json`. Aggregates over `state_executions` within a time window. camelCase keys throughout. The `elapsedMs` top-level field is the command's own wall-clock (see `cli-contract.md` §Elapsed time) — distinct from `totals.durationMsTotal`, which is the sum of every execution record's duration.

# properties.range.properties.since.description
Inclusive lower bound (ISO-8601). `null` means all-time — the earliest execution record is used.

# properties.range.properties.until.description
Exclusive upper bound (ISO-8601). Defaults to `now()` at command invocation.

# properties.totals.properties.tokensIn.description
Sum of `state_executions.tokens_in`. `null` values in the source are treated as 0.

# properties.totals.properties.durationMsTotal.description
Sum of every execution's `duration_ms`. NOT the command's wall-clock — see `elapsedMs`.

# properties.tokensPerAction.description
One row per distinct `(actionId, actionVersion)` pair in the window. Sorted by `tokensIn + tokensOut` descending.

# properties.tokensPerAction.items.properties.durationMsMean.description
Rounded mean duration over the action's executions. `null` when `executionsCount == 0`.

# properties.tokensPerAction.items.properties.durationMsMedian.description
Median duration. `null` when `executionsCount == 0`.

# properties.executionsPerPeriod.description
Time-bucketed counts. Bucket granularity follows the `--period` flag (`day` | `week` | `month`). `periodStart` always ISO-8601; `periodUnit` present so consumers can group without parsing the date shape.

# properties.executionsPerPeriod.items.properties.periodStart.description
Start of the bucket (UTC). For `day`: `YYYY-MM-DDT00:00:00.000Z`. For `week`: Monday 00:00 UTC. For `month`: day-1 00:00 UTC.

# properties.topNodes.description
Most-frequently-executed nodes in the window. Sorted by `executionsCount` descending, tie-broken by `lastExecutedAt` descending. Length controlled by `--top N` (default 10).

# properties.topNodes.items.properties.nodePath.description
Canonical node identifier (relative path from scope root). MAY point to a node that no longer exists (orphan in history).

# properties.topNodes.items.properties.lastExecutedAt.description
Unix ms of the most recent execution against this node within the window.

# properties.errorRates.properties.global.description
`failedCount / executionsCount` across the window. `0` when `executionsCount == 0`.

# properties.errorRates.properties.perFailureReason.description
Counts (not ratios) per failure reason. Every enum value of `state_executions.failure_reason` appears, with `0` when no occurrences — predictable shape for dashboards.

# properties.elapsedMs.description
Command's own wall-clock in milliseconds, from invocation to emission. Per `cli-contract.md` §Elapsed time: reported on stdout whenever the shape is an object (like this one), and always on stderr as `done in <formatted>`.