mcprotocol_rs/client_features/
mod.rs1use async_trait::async_trait;
2use serde_json::Value;
3
4use crate::Result;
5
6#[derive(Debug, Clone)]
8pub struct ClientConfig {
9 pub name: String,
11 pub version: String,
13 pub roots: Vec<String>,
15}
16
17#[async_trait]
19pub trait Client: Send + Sync {
20 fn config(&self) -> &ClientConfig;
22
23 async fn handle_sampling(&self, prompt: Value) -> Result<Value>;
25
26 async fn get_root_context(&self, path: &str) -> Result<Value>;
28}
29
30pub mod roots;
31pub mod sampling;