Skip to main content

Crate hh_core

Crate hh_core 

Source
Expand description

hh-core — storage, blob store, event model, and config for Halfhand.

This crate implements the local-first data layer (SRS §4) used by the hh binary and the recorder. It is intentionally free of any I/O runtime or CLI concern: the binary drives it, not the other way around.

Per CLAUDE.md, every public item is documented (missing_docs is denied here) and clippy::pedantic is enabled via the workspace lint table.

Re-exports§

pub use adapter::resolve_override as resolve_adapter_override;
pub use adapter::select as select_adapter;
pub use adapter::Adapter;
pub use adapter::AdapterContext;
pub use adapter::AdapterHandle;
pub use adapter::AdapterOutcome;
pub use blob::BlobStore;
pub use blob::PutOutcome;
pub use bundle::Bundle;
pub use bundle::FORMAT_VERSION;
pub use config::parse_bytes;
pub use config::Config;
pub use config::Paths;
pub use config::RecordConfig;
pub use config::RedactionConfig;
pub use config::RedactionRule;
pub use config::ReplayConfig;
pub use config::StorageConfig;
pub use config::Theme;
pub use deprecation::warn_deprecated;
pub use error::BlobError;
pub use error::BundleError;
pub use error::ConfigError;
pub use error::Error;
pub use error::ResolveError;
pub use error::Result;
pub use error::StorageError;
pub use event::truncate_summary;
pub use event::AdapterStatus;
pub use event::AgentKind;
pub use event::ChangeKind;
pub use event::Event;
pub use event::EventDetail;
pub use event::EventIndexRow;
pub use event::EventKind;
pub use event::EventRow;
pub use event::FileChange;
pub use event::NewSession;
pub use event::RawEventRow;
pub use event::SessionRow;
pub use event::SessionStatus;
pub use event::JSON_SCHEMA_VERSION;
pub use redact::Detectors;
pub use redact::Finding;
pub use redact::SecretKind;
pub use step::assign_steps;
pub use store::CreatedSession;
pub use store::EventWriter;
pub use store::FindingLocation;
pub use store::LargestSession;
pub use store::PruneStats;
pub use store::RedactOutcome;
pub use store::ScanFinding;
pub use store::SearchFilters;
pub use store::SearchResult;
pub use store::SecretSummary;
pub use store::Store;
pub use store::StoreStats;
pub use timeline::build_timeline;
pub use timeline::StepEntry;
pub use timeline::TerminalSegment;
pub use timeline::TimelineRow;

Modules§

adapter
Agent adapters: tail a structured event stream and yield Events (FR-1.5).
blob
Content-addressed, zstd-compressed blob store (SRS §4.1, FR-1.4, NFR-4).
bundle
Portable session bundle format (hh export --bundle / hh import).
config
Configuration and path resolution (SRS §2.3, §4.2).
deprecation
Standard deprecation-warning printer (STABILITY.md).
error
Error types for hh-core.
event
Event and session data model (SRS §4.1, §1.3).
migrations
Embedded, idempotent SQLite migrations (SRS §4.1, DR-1).
redact
Secret detection and redaction (docs/redaction-design.md).
step
Step-assignment pass (FR-3.4): 1-based step ordinals for semantic events.
store
SQLite-backed session/event store (SRS §4.1, §3, FR-3.1).
timeline
Pure timeline-grouping for replay/inspect (FR-3.2/FR-3.4).

Structs§

Uuid
A Universally Unique Identifier (UUID).