Expand description
Aggregates per-model token usage across the file-backed provider session trees.
Each provider directory is walked with the provider fixed by its source
path (never re-detected from file contents), parsed in
ParseMode::UsageOnly to skip the heavy file-operation payloads, and the
small per-model usage maps are merged into a UsageData. The provider is
tracked twice on purpose — once merged across providers (the per-model
table) and once kept per source directory (the per-provider footer) — see
UsageData for why.
Re-exports§
pub use crate::scan::ScanDiagnostics;pub use crate::scan::ScanFailure;
Structs§
- Stored
Costs - Provider-authoritative per-model costs, kept separate per provider.
- Usage
Collection - Usage data paired with source-collection diagnostics.
- Usage
Data - Aggregated token usage plus the per-provider active-day counts.
- Usage
Scan Options - Optional knobs for a usage scan.
Functions§
- aggregate_
usage_ from_ home - Aggregates token usage from all AI provider session directories.
- aggregate_
usage_ from_ home_ with_ diagnostics - Diagnostics-aware usage scan rooted at the current user’s provider paths.
- aggregate_
usage_ from_ home_ with_ diagnostics_ opts aggregate_usage_from_home_with_diagnosticswith scan options.- aggregate_
usage_ from_ home_ with_ providers aggregate_usage_from_homewith explicit per-provider toggles (from~/.vct/config.toml). A disabled provider is skipped entirely.- aggregate_
usage_ from_ paths - Aggregates token usage from provider session directories rooted at an
explicit
HelperPaths. - aggregate_
usage_ from_ paths_ with_ cache - Incremental usage scan backed by a process-local compact summary cache.
- aggregate_
usage_ from_ paths_ with_ cache_ opts aggregate_usage_from_paths_with_cachewith scan options.- aggregate_
usage_ from_ paths_ with_ diagnostics - Diagnostics-aware usage scan rooted at explicit provider paths.
- aggregate_
usage_ from_ paths_ with_ providers aggregate_usage_from_pathswith explicit provider toggles (the injectable core used by the CLI onceconfig.tomlis loaded).