kiromi-ai-memory 0.2.2

Local-first multi-tenant memory store engine: Markdown/text content on object storage, metadata in SQLite, plugin-shaped embedder/storage/metadata, hybrid text+vector search.
Documentation
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! Canonical, opt-in attribute key conventions.
//!
//! None of these are required by the engine — they are documented strings
//! that consumers (CLI, mind-map renderer, integration adapters such as the
//! Kiromi macOS transcriber) can use uniformly so tools interoperate.
//!
//! Pair these constants with the typed [`crate::AttributeValue`] enum:
//!
//! ```
//! use kiromi_ai_memory::{canonical_keys, AppendOpts, AttributeValue};
//! let opts = AppendOpts::default()
//!     .with_attribute(canonical_keys::SPEAKER, "alex")
//!     .with_attribute(
//!         canonical_keys::TS_START_MS,
//!         AttributeValue::Timestamp(1_700_000_000_000),
//!     );
//! # let _ = opts;
//! ```

/// `Array<String>` — keywords for this subject (memory or summary). Used
/// by mind-map renderers to label nodes and by integration adapters to
/// drive cross-tenant fan-out.
pub const KEYWORDS: &str = "keywords";

/// `Array<String>` — tags for this subject. Distinct from keywords:
/// tags are author-supplied, keywords are extracted.
pub const TAGS: &str = "tags";

/// `String` — short contextual headline / one-liner.
pub const HEADLINE: &str = "headline";

/// `String` — speaker for episodic memories (transcripts).
pub const SPEAKER: &str = "speaker";

/// `String` — meeting id (caller-supplied stable identifier).
pub const MEETING_ID: &str = "meeting_id";

/// `Array<String>` — participant ids for episodic memories.
pub const PARTICIPANTS: &str = "participants";

/// `Timestamp` — millisecond offset of segment start (for transcript
/// memories).
pub const TS_START_MS: &str = "ts_start_ms";

/// `Timestamp` — millisecond offset of segment end.
pub const TS_END_MS: &str = "ts_end_ms";

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn keys_are_stable_strings() {
        assert_eq!(KEYWORDS, "keywords");
        assert_eq!(TAGS, "tags");
        assert_eq!(HEADLINE, "headline");
        assert_eq!(SPEAKER, "speaker");
        assert_eq!(MEETING_ID, "meeting_id");
        assert_eq!(PARTICIPANTS, "participants");
        assert_eq!(TS_START_MS, "ts_start_ms");
        assert_eq!(TS_END_MS, "ts_end_ms");
    }
}