Skip to main content

Crate truth_engine

Crate truth_engine 

Source
Expand description

§truth-engine

Deterministic calendar computation for AI agents.

The Truth Engine provides mathematically correct recurrence rule expansion, conflict detection, free/busy computation, multi-calendar availability merging, and temporal computation that LLMs cannot reliably perform via inference.

§Modules

  • expander — RRULE string → list of concrete datetime instances
  • dst — DST transition policies (skip, shift, etc.)
  • conflict — Detect overlapping events in expanded schedules
  • freebusy — Compute free time slots from event lists
  • availability — Merge N event streams into unified busy/free with privacy control
  • temporal — Timezone conversion, duration computation, timestamp adjustment, relative datetime resolution
  • error — Error types

Re-exports§

pub use availability::find_first_free_across;
pub use availability::merge_availability;
pub use availability::BusyBlock;
pub use availability::EventStream;
pub use availability::PrivacyLevel;
pub use availability::UnifiedAvailability;
pub use conflict::find_conflicts;
pub use error::TruthError;
pub use expander::expand_rrule;
pub use expander::expand_rrule_with_exdates;
pub use expander::ExpandedEvent;
pub use freebusy::find_free_slots;
pub use freebusy::FreeSlot;
pub use temporal::adjust_timestamp;
pub use temporal::compute_duration;
pub use temporal::convert_timezone;
pub use temporal::resolve_relative;
pub use temporal::resolve_relative_with_options;
pub use temporal::AdjustedTimestamp;
pub use temporal::ConvertedDatetime;
pub use temporal::DurationInfo;
pub use temporal::ResolveOptions;
pub use temporal::ResolvedDatetime;
pub use temporal::WeekStartDay;

Modules§

availability
Multi-stream availability merging with privacy-preserving output.
conflict
Detect overlapping events in expanded schedules.
dst
DST transition policies for recurring events.
error
Error types for truth-engine operations.
expander
RRULE expansion – converts recurrence rule strings into concrete datetime instances.
freebusy
Compute free time slots from event lists.
temporal
Deterministic temporal computation for AI agents.