use std::sync::Arc;
use serde_json::Value as JsonValue;
use tokio::sync::mpsc;
use langgraph_checkpoint::store::base::BaseStore;
pub type StreamWriter = mpsc::Sender<JsonValue>;
#[derive(Clone)]
pub struct Runtime<Ctx: Clone = ()> {
pub context: Ctx,
pub store: Option<Arc<dyn BaseStore>>,
pub stream_writer: Option<StreamWriter>,
pub previous: Option<JsonValue>,
pub execution_info: Option<ExecutionInfo>,
pub server_info: Option<ServerInfo>,
}
#[derive(Debug, Clone)]
pub struct ExecutionInfo {
pub checkpoint_id: String,
pub checkpoint_ns: String,
pub task_id: String,
pub thread_id: Option<String>,
pub run_id: Option<String>,
}
#[derive(Debug, Clone)]
pub struct ServerInfo {
pub server_url: Option<String>,
}