vct_core/usage/mod.rs
1//! Token-usage aggregation across provider session directories.
2//!
3//! Rolls parsed [`CodeAnalysis`](crate::models::CodeAnalysis) records up into
4//! [`UsageData`] for the `usage` view. [`aggregate_usage_from_home`] is the
5//! home-resolved entry point and [`aggregate_usage_from_paths`] its
6//! test/injection twin; [`scan_usage_priced`] wraps the pricing-then-scan
7//! pipeline, [`price_usage_data`] builds the priced JSON payload, and
8//! [`summary`] builds the aggregated view the display renders.
9
10pub mod aggregator;
11pub mod pipeline;
12pub mod priced;
13pub mod summary;
14
15pub use aggregator::*;
16pub use pipeline::{PricedUsageScan, scan_usage_priced};
17pub use priced::{PricedUsageRow, price_usage_data};
18// Shared merged-cost resolver used by both the JSON payload and the display
19// summaries.
20pub(crate) use priced::resolve_merged_model_cost;
21// The token-merge helpers moved to `utils`; keep the historical
22// `usage::normalize_usage_value` path working for the CLI and library callers.
23pub use crate::utils::normalize_usage_value;