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
//! Semantic model daemon for warm embedding and reranking.
//!
//! This module provides a daemon server that keeps ML models resident in memory
//! for fast inference. The daemon:
//! - Listens on a Unix Domain Socket for requests
//! - Shares the socket with xf (wire-compatible protocol)
//! - First-come spawns, others connect
//! - Supports graceful fallback to direct inference
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────────┐
//! │ WIRE-COMPATIBLE DAEMONS │
//! ├─────────────────────────────────────────────────────────────────┤
//! │ xf (standalone) cass (standalone) │
//! │ ┌──────────────┐ ┌──────────────┐ │
//! │ │ xf binary │ │ cass binary │ │
//! │ │ └─ daemon │ │ └─ daemon │ │
//! │ └──────────────┘ └──────────────┘ │
//! │ │ Same socket path: /tmp/semantic-daemon-$USER.sock │
//! │ ▼ ▼ │
//! │ ┌────────────────────────────────────────┐ │
//! │ │ Shared UDS Socket (first-come wins) │ │
//! │ └────────────────────────────────────────┘ │
//! └─────────────────────────────────────────────────────────────────┘
//! ```
//!
//! ## Usage
//!
//! ```ignore
//! use cass::daemon::{client::UdsDaemonClient, core::ModelDaemon};
//!
//! // Client usage (auto-spawns daemon if not running)
//! let client = UdsDaemonClient::with_defaults();
//! client.connect()?;
//! let embeddings = client.embed(&["hello world"])?;
//!
//! // Server usage (for daemon subprocess)
//! let daemon = ModelDaemon::with_defaults(&data_dir);
//! daemon.run()?;
//! ```
use ;
// Used by daemon client/server paths in some target combinations, but not all
// library-only builds that we verify during placeholder cleanup.
pub
pub
// Re-export key types for convenience
pub use ;
pub use ;
pub use ModelManager;
pub use ;
pub use ResourceMonitor;
pub use ;