Skip to main content

hh_core/
lib.rs

1//! hh-core — storage, blob store, event model, and config for Halfhand.
2//!
3//! This crate implements the local-first data layer (SRS §4) used by the `hh`
4//! binary and the recorder. It is intentionally free of any I/O runtime or
5//! CLI concern: the binary drives it, not the other way around.
6//!
7//! Per CLAUDE.md, every public item is documented (`missing_docs` is denied
8//! here) and `clippy::pedantic` is enabled via the workspace lint table.
9
10#![deny(missing_docs)]
11
12pub mod adapter;
13pub mod blob;
14pub mod bundle;
15pub mod config;
16pub mod deprecation;
17pub mod error;
18pub mod event;
19pub mod migrations;
20pub mod redact;
21pub mod step;
22pub mod store;
23pub mod timeline;
24
25// Re-export the most commonly used types at the crate root for ergonomics.
26pub use adapter::{
27    resolve_override as resolve_adapter_override, select as select_adapter, Adapter,
28    AdapterContext, AdapterHandle, AdapterOutcome,
29};
30pub use blob::{BlobStore, PutOutcome};
31pub use bundle::{Bundle, FORMAT_VERSION};
32pub use config::{
33    parse_bytes, Config, Paths, RecordConfig, RedactionConfig, RedactionRule, ReplayConfig,
34    StorageConfig, Theme,
35};
36pub use deprecation::warn_deprecated;
37pub use error::{BlobError, BundleError, ConfigError, Error, ResolveError, Result, StorageError};
38pub use event::{
39    truncate_summary, AdapterStatus, AgentKind, ChangeKind, Event, EventDetail, EventIndexRow,
40    EventKind, EventRow, FileChange, NewSession, RawEventRow, SessionRow, SessionStatus,
41    JSON_SCHEMA_VERSION,
42};
43pub use redact::{Detectors, Finding, SecretKind};
44// `Uuid` is part of the public surface already (`now_v7` returns it,
45// `NewSession::id` holds it); re-exporting it lets downstream crates name the
46// type without adding `uuid` as a direct dependency.
47pub use step::assign_steps;
48pub use store::{
49    CreatedSession, EventWriter, FindingLocation, LargestSession, PruneStats, RedactOutcome,
50    ScanFinding, SearchFilters, SearchResult, SecretSummary, Store, StoreStats,
51};
52pub use timeline::{build_timeline, StepEntry, TerminalSegment, TimelineRow};
53pub use uuid::Uuid;