Something went wrong. Try again.
A 5e storytelling engine with an LLM DM
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041//! The DM's knowledge tree: an ordered union of layered directories,//! indexed in memory by address.//!//! A layer is a directory; the mount reads only its `rules/` and `lore/`//! subtrees, recursively, and ignores everything else at the layer's//! root. Layers mount lowest first. When two layers hold the same//! address, the higher layer's file becomes the entry, whole file; a//! tombstone, an entry whose frontmatter sets `deleted: true`, removes//! its address, and a later layer can resurrect it with a normal entry//! at the same address. [`Mount::open`] builds the index; [`Entry`] is//! what it holds at each address; [`normalize_address`] cleans up//! address input a model might paste into a lookup; [`search`] runs a//! keyword query over a mount's entries.//!//! An address can name a directory instead of a file, and then it//! resolves to the [`ENTRY_FILE`] inside it. [`entity_directory`] holds//! that rule, for the mount and for anything else that walks notes on//! disk.
mod address;mod entity_directory;mod entry;pub(crate) mod frontmatter;mod mount;mod search;
#[cfg(test)]pub(crate) mod fixtures;
pub use address::normalize_address;pub use entity_directory::{ENTRY_FILE, address_of, is_history_directory};pub use entry::{Entry, Visibility};pub use frontmatter::read_frontmatter;pub use mount::Mount;pub use search::{INLINE_BUDGET_BYTES, MAX_LISTED_MATCHES, Match, SearchResult, search};
/// The layers a play session mounts, lowest first: the SRD is the/// foundation, and each later entry shadows addresses the ones before it/// also define. The world layer joins this list in a later phase.pub const SESSION_LAYERS: [&str; 2] = [crate::srd::SRD_LAYER_ROOT, "rules/drowned-coast"];