1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! Library crate behind the `vibe_coding_tracker` / `vct` CLI.
//!
//! The crate scans on-disk session logs written by eight AI coding assistants:
//! JSONL logs from Claude Code, OpenAI Codex, GitHub Copilot CLI, and Gemini
//! CLI; `signals.json` plus sibling `updates.jsonl` from Grok CLI; SQLite data
//! from OpenCode and Cursor; and usage-only SQLite data from Hermes. It exposes
//! two views:
//!
//! - **usage** — per-model token counts and LiteLLM-priced cost
//! - **analysis** — complete per-session data plus compact per-model
//! file-operation and tool-call metrics
//!
//! # Pipeline
//!
//! Raw bytes flow through a two-stage pipeline. [`session`] owns the
//! "local session data → typed [`CodeAnalysis`]" boundary (provider detection plus a
//! parser per provider); [`analysis`] and [`usage`] then aggregate those
//! typed records. The `vct-tui` crate renders the result as an interactive
//! TUI, a static table, plain text, or JSON, and the `vct-cli` binary wires
//! the clap surface to both. Both downstream views consume the same parsed
//! shape, so file parsing lives only in [`session`]. This crate holds no
//! terminal dependency, so a future GUI backend can reuse it directly.
//!
//! Supporting modules: [`pricing`] (LiteLLM price lookup with a daily
//! on-disk cache), [`cache`] (LRU file cache keyed by mtime), [`update`]
//! (self-replace from the matching GitHub release asset), [`utils`]
//! (path resolution and the glibc allocator tuning), and [`constants`]
//! (capacity and buffer sizing).
pub use *;
pub use ;
pub use ;
// Curated surface for non-CLI consumers (e.g. a future GUI backend): the
// serializable priced-usage payload, the compact analysis summary, and the
// shared scan diagnostics.
pub use ;
pub use ;
pub use ;
/// Full build version: latest git tag plus commits-since and short SHA
/// (with a `-dirty` suffix when the worktree is modified), generated by
/// `build.rs`. Falls back to the `Cargo.toml` version outside a git tree.
pub const VERSION: &str = env!;
/// Crate name from `Cargo.toml` (`vct-core`).
pub const PKG_NAME: &str = env!;
/// Crate description from `Cargo.toml`.
pub const PKG_DESCRIPTION: &str = env!;
/// `rustc` version string captured at build time by `build.rs`.
pub const RUST_VERSION: &str = env!;
/// `cargo` version string captured at build time by `build.rs`.
pub const CARGO_VERSION: &str = env!;
/// Snapshots the build version, Rust toolchain, and Cargo version into a
/// [`VersionInfo`].
///
/// Reads the compile-time [`VERSION`], [`RUST_VERSION`], and
/// [`CARGO_VERSION`] constants; this is what backs the `vct version`
/// subcommand.
///
/// # Examples
///
/// ```
/// let info = vct_core::get_version_info();
/// assert_eq!(info.version, vct_core::VERSION);
/// ```
/// Build metadata reported by the `vct version` subcommand.
///
/// Construct via [`get_version_info`]; the fields mirror the [`VERSION`],
/// [`RUST_VERSION`], and [`CARGO_VERSION`] constants. Serializes to JSON
/// for the `--json` output mode.