langgraph_core_rs/
runtime.rs1use std::sync::Arc;
2use serde_json::Value as JsonValue;
3use tokio::sync::mpsc;
4use langgraph_checkpoint::store::base::BaseStore;
5
6pub type StreamWriter = mpsc::Sender<JsonValue>;
9
10#[derive(Clone)]
12pub struct Runtime<Ctx: Clone = ()> {
13 pub context: Ctx,
15 pub store: Option<Arc<dyn BaseStore>>,
17 pub stream_writer: Option<StreamWriter>,
19 pub previous: Option<JsonValue>,
21 pub execution_info: Option<ExecutionInfo>,
23 pub server_info: Option<ServerInfo>,
25}
26
27#[derive(Debug, Clone)]
29pub struct ExecutionInfo {
30 pub checkpoint_id: String,
31 pub checkpoint_ns: String,
32 pub task_id: String,
33 pub thread_id: Option<String>,
34 pub run_id: Option<String>,
35}
36
37#[derive(Debug, Clone)]
39pub struct ServerInfo {
40 pub server_url: Option<String>,
41}