Expand description
Core library for sapphire-journal — a Markdown-based task and note manager that keeps your data alive as plain text.
This crate provides the data models, parsing utilities, and high-level operations that are shared across the CLI and MCP frontends.
§Modules
entry— Core data structures:entry::Entry,entry::Frontmatter,entry::TaskMeta, andentry::EventMeta.entry_ref—entry_ref::EntryRef: a canonical input type that accepts either a filesystem path, an exact GrainId, or a title.error— Library-wideerror::Erroranderror::Resulttypes.journal— Journal directory discovery, entry collection, and configuration loading.labels— Status label classification for entry types and freshness.ops— High-level entry operations (list, create, update, delete) shared across frontends.parser— Markdown + YAML frontmatter parsing and serialization.period— Time period types used to filter entries by timestamp ranges.
Re-exports§
pub use journal_state::JournalState;
Modules§
- cache
- Machine-local SQLite cache for fast entry lookups.
- entry
- entry_
ref - error
- journal
- journal_
state - In-memory session state: an open journal with its lazily-initialised embedding infrastructure.
- labels
- Status flag classification for entry types and freshness.
- lancedb_
store - Full LanceDB backend for [
RetrieveDb]. - ops
- High-level entry operations shared across CLI, MCP, and future frontends.
- parser
- period
- state
- Frontend-neutral helpers for opening a journal and bootstrapping its optional vector/embedding backends.
- user_
config
Structs§
- FtsQuery
- Full-text search query.
- GitSync
- Git-based sync backend: stages file changes via
libgit2. - Retrieve
Db - Vector
Query - Vector (semantic) similarity query.
Statics§
- JOURNAL_
CTX - Shared application context for sapphire-journal.
Traits§
- Sync
Backend - Abstraction over file-level sync backends (git, future P2P / rclone).
Functions§
- init_
app_ context - Initialise
JOURNAL_CTXwith platform-default cache and data directories resolved via thedirscrate.