1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Document ingestion module for extracting content from various file formats.
//!
//! This module provides parsers and ingesters for different document types,
//! converting them into structured data suitable for the knowledge base.
//!
//! # Supported Formats
//!
//! - **Markdown** (`markdown.rs`): Parse markdown files with YAML front-matter,
//! chunk by headings, and preserve code blocks with language tags.
//! - PDF extraction has moved to `organism-intelligence`.
//!
//! # Knowledge Classification
//!
//! The module also includes a routing system for classifying knowledge:
//!
//! - **Case Knowledge**: Direct, actionable knowledge relevant to the current task.
//! Has high relevance, is recently accessed, and is explicitly linked to current context.
//!
//! - **Background Knowledge**: Contextual knowledge that supports understanding.
//! Provides context, general reference material, and supports case knowledge.
//!
//! # Example
//!
//! ```rust
//! use mnemos::ingest::{
//! KnowledgeRouter, RoutingRule, RoutingCondition, KnowledgeTypeHint,
//! AccessPattern, Permanence,
//! };
//! use std::collections::HashMap;
//! use std::path::Path;
//!
//! // Create a router with rules
//! let mut router = KnowledgeRouter::new();
//!
//! // Route project files as case knowledge
//! router.add_rule(RoutingRule::new(
//! RoutingCondition::SourcePath("projects/**/*".to_string()),
//! KnowledgeTypeHint::Case {
//! context: "active-project".to_string(),
//! access_pattern: AccessPattern::ActiveUse,
//! },
//! ));
//!
//! // Classify incoming knowledge
//! let metadata = HashMap::new();
//! let knowledge = router.classify(
//! Path::new("projects/my-app/README.md"),
//! "Project documentation...",
//! &metadata,
//! );
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;