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
//! Port traits — abstract capabilities the application depends on.
//!
//! Each trait is a *port* in the hexagonal sense: it captures one external
//! capability (persistence, embedding, NLI, clock, …) without committing to a
//! concrete implementation. Native `async fn` in trait is used (no
//! `#[async_trait]`); dispatch is generic over `T: Trait`.
//!
//! # On `async_fn_in_trait`
//!
//! Rust's `async_fn_in_trait` lint warns that the returned `Future` of an
//! `async fn` in a trait has no explicit `Send` bound. We allow it here on
//! purpose: we want *call sites* to choose whether they need `Send` (most do,
//! via tokio) instead of baking it into the trait surface. Concrete adapters
//! in `smos` are written to return `Send` futures, and use cases
//! that spawn tasks require `T: Trait + Send + Sync + 'static` at the call
//! site, which propagates the `Send` requirement through the bound.
pub use Clock;
pub use Delay;
pub use EmbeddingProvider;
pub use FactRepository;
pub use IdGenerator;
pub use LlmExtractor;
pub use LlmUpstream;
pub use NliClassifier;
pub use RerankProvider;
pub use SessionRepository;