pub mod identify;
pub mod publish;
pub mod validate;
pub use identify::identify_path_args;
pub use publish::{PublicationCache, PublicationKey, PublishedFile, publish_file};
pub use validate::validate_path;
use std::{collections::HashMap, sync::Arc};
use parking_lot::Mutex;
use crate::rpc::message::ToolSchema;
#[derive(Debug)]
pub struct SessionState {
pub publications: Arc<Mutex<PublicationCache>>,
pub tool_schemas: Arc<Mutex<HashMap<String, ToolSchema>>>,
}
impl Default for SessionState {
fn default() -> Self {
Self::new()
}
}
impl SessionState {
#[must_use]
pub fn new() -> Self {
Self {
publications: Arc::new(Mutex::new(PublicationCache::new())),
tool_schemas: Arc::new(Mutex::new(HashMap::new())),
}
}
}