Skip to main content

synwire_core/
lib.rs

1//! # synwire-core
2//!
3//! Core traits and types — the foundational trait layer for the Synwire AI framework.
4//!
5//! This crate provides the foundational trait hierarchy for chat models,
6//! embeddings, vector stores, runnables, tools, callbacks, output parsers,
7//! retrievers, credentials, and security primitives.
8//!
9//! All I/O operations are async-first. Core crate compiles with zero `unsafe`.
10
11#![forbid(unsafe_code)]
12
13use std::future::Future;
14use std::pin::Pin;
15
16/// A boxed future that is `Send`.
17pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
18
19/// A boxed stream that is `Send`.
20pub type BoxStream<'a, T> = Pin<Box<dyn futures_core::Stream<Item = T> + Send + 'a>>;
21
22pub use agents::sampling::{
23    NoopSamplingProvider, SamplingError, SamplingProvider, SamplingRequest, SamplingResponse,
24};
25pub use state::State;
26
27pub mod agents;
28pub mod callbacks;
29pub mod credentials;
30pub mod documents;
31pub mod embeddings;
32pub mod error;
33pub mod language_models;
34pub mod loaders;
35pub mod mcp;
36pub mod messages;
37pub mod output_parsers;
38pub mod prompts;
39pub mod rerankers;
40pub mod retrievers;
41pub mod runnables;
42pub mod sandbox;
43pub mod security;
44pub mod state;
45pub mod tools;
46pub mod vectorstores;
47pub mod vfs;
48
49pub mod observability;
50
51pub mod prelude;