bctx_forge/lib.rs
1pub mod awareness;
2pub mod budget;
3pub mod intercept;
4pub mod signal;
5pub mod substrate;
6pub mod tracker;
7
8/// Returns the user's home directory. Checks `HOME` first (Unix), then
9/// `USERPROFILE` (Windows), then falls back to `"."`. Use this everywhere a
10/// `~/.bctx` path is resolved so the data dir works on Windows too.
11pub fn home_dir() -> String {
12 std::env::var("HOME")
13 .or_else(|_| std::env::var("USERPROFILE"))
14 .unwrap_or_else(|_| ".".into())
15}
16
17pub use budget::estimator::TokenEstimator;
18pub use signal::capture::RawSignal;
19pub use signal::SignalKind;
20pub use substrate::local::LocalSubstrate;
21pub use substrate::Substrate;
22pub use tracker::store::ExecutionRecord;