Skip to main content

ccboard_core/
lib.rs

1//! ccboard-core - Core library for ccboard
2//!
3//! Provides parsers, models, store, and file watcher for Claude Code data.
4
5pub mod analytics;
6pub mod bookmarks;
7pub mod cache;
8pub mod error;
9pub mod event;
10pub mod export;
11pub mod graph;
12pub mod hook_event;
13pub mod hook_state;
14pub mod live_monitor;
15pub mod models;
16pub mod parsers;
17pub mod preferences;
18pub mod pricing;
19pub mod quota;
20pub mod store;
21pub mod summaries;
22pub mod usage_estimator;
23pub mod watcher;
24
25pub use analytics::{
26    compute_trends, detect_patterns, discover_call_llm, discover_collect_sessions,
27    discover_patterns, forecast_usage, generate_insights, run_discover, AnalyticsData,
28    DiscoverConfig, DiscoverSessionData, DiscoverSuggestion, ForecastData, LlmSuggestion, Period,
29    SuggestionCategory, TrendDirection, TrendsData, UsagePatterns,
30};
31pub use cache::{AggregateStats, InsightsDb, SearchResult, StoredAlert};
32pub use error::{CoreError, DegradedState, LoadReport};
33pub use event::{DataEvent, EventBus};
34pub use export::{
35    export_billing_blocks_to_csv, export_billing_blocks_to_json, export_billing_blocks_to_markdown,
36    export_sessions_to_csv, export_sessions_to_json, export_sessions_to_markdown,
37    export_stats_to_csv, export_stats_to_json, export_stats_to_markdown,
38};
39pub use hook_event::{status_from_event, HookPayload};
40pub use hook_state::{
41    make_session_key, HookSession, HookSessionStatus, LiveSessionFile, SessionKey,
42};
43pub use live_monitor::{
44    detect_live_sessions, merge_live_sessions, LiveSession, LiveSessionDisplayStatus,
45    MergedLiveSession, SessionType,
46};
47pub use models::activity::{
48    ActivitySummary, Alert, AlertCategory, AlertSeverity, BashCommand, FileAccess, FileOperation,
49    NetworkCall, NetworkTool, ToolCall as ActivityToolCall,
50};
51pub use quota::{calculate_quota_status, AlertLevel, QuotaStatus};
52pub use store::{DataStore, McpCallStat, ProjectLeaderboardEntry};
53pub use usage_estimator::{calculate_usage_estimate, SubscriptionPlan, UsageEstimate};
54pub use watcher::FileWatcher;