mi6_core/
lib.rs

1// Allow stderr for warning messages in config parsing
2#![allow(clippy::print_stderr)]
3
4pub mod config;
5pub mod context;
6pub mod enable;
7pub mod framework;
8pub mod input;
9pub mod model;
10pub mod time;
11pub mod util;
12
13// Re-export from config (including OTel configuration and directory management)
14pub use config::{
15    CURRENT_TUI_CONFIG_VERSION, Config, ConfigSource, DEFAULT_OTEL_PORT, DEFAULT_RETENTION,
16    EXAMPLE_THEME_FILENAME, EXAMPLE_THEME_NAME, HooksConfig, OTEL_ENV_KEYS, OtelConfig, OtelMode,
17    StorageConfig, TuiColumnProfile, TuiConfig, TuiSortSpec, core_config_path, db_path,
18    ensure_initialized, generate_otel_env, mi6_dir, parse_retention, themes_dir,
19};
20
21// Re-export from model (including all error types)
22pub use model::{
23    ApiStats, BoxError, ConfigError, Event, EventBuilder, EventOrder, EventQuery, EventType,
24    FrameworkResolutionError, InitError, Mi6Error, Order, ScanError, Session, SessionOrder,
25    SessionQuery, SessionStatus, Storage, StorageError, StorageStats, StorageStatsQuery,
26    StringError, TranscriptError, TtlParseError,
27};
28
29// Re-export from framework (including installation)
30pub use framework::{
31    ClaudeAdapter, CodexAdapter, ConfigFormat, FrameworkAdapter, FrameworkResolutionMode,
32    GeminiAdapter, InitOptions, InitResult, ParsedHookInput, all_adapters, default_adapter,
33    detect_all_frameworks, detect_framework, generate_config, get_adapter, initialize,
34    initialize_all, installed_frameworks, json_to_toml_string, resolve_frameworks,
35};
36
37// Re-export from context
38pub use context::{
39    ClaudeProcessInfo, GitBranchInfo, SessionContextUpdate, extract_context, find_claude_process,
40    get_branch_info, get_current_branch, get_parent_pid, is_branch_changing_command,
41    is_process_alive, parse_branch_info,
42};
43
44// Re-export from input
45pub use input::{
46    CodexEventType, ExportLogsServiceRequest, FilePosition, ParsedApiRequest, ParsedCodexEvent,
47    ScanResult, TranscriptEntry, TranscriptParser, TranscriptScanner, extract_first_prompt,
48    process_logs_request,
49};
50
51// Re-export from time
52pub use time::{format_timestamp, parse_timestamp_millis, timestamp_millis};
53
54// Re-export from util
55pub use util::truncate_string;
56
57// Re-export from enable (high-level API)
58pub use enable::{
59    DisableResult, EnableError, EnableResult, FrameworkDisablement, FrameworkEnablement,
60    PreviewResult, disable, disable_with_options, enable, preview_enable,
61};