Skip to main content

Crate lellm_graph

Crate lellm_graph 

Source
Expand description

lellm-graph — Graph/Node/Edge 编排层 + 状态管理 + Checkpoint。

通用工作流引擎(类似 LangGraph / Temporal / Prefect)。

Re-exports§

pub use checkpoint::TraceId;
pub use ids::SpanId;
pub use state::ExecutionEntry;
pub use state::GraphResult;
pub use state::State;
pub use state::StateError;
pub use state::StateExt;
pub use state::StateMerge;
pub use state::StateMutation;
pub use state::StateReducer;
pub use state::array_reducer;
pub use state::Reducer;
pub use state::SK_COUNT;
pub use state::SK_ITERATIONS;
pub use state::SK_MESSAGES;
pub use state::SK_OUTPUT_TOKENS;
pub use state::SK_PENDING_TOOL_CALLS;
pub use state::SK_REASONING_TOKENS;
pub use state::SK_STEPS;
pub use state::SK_TOTAL_TOOL_CALLS;
pub use state::StateKey;
pub use state::StateKeyExt;
pub use checkpoint::Checkpoint;
pub use checkpoint::CheckpointBlob;
pub use checkpoint::CheckpointId;
pub use checkpoint::CheckpointPolicy;Deprecated
pub use checkpoint::CheckpointSink;
pub use checkpoint::CheckpointStoreError;
pub use checkpoint::FrameInfo;
pub use checkpoint::MemorySink;
pub use checkpoint::NodeId;
pub use checkpoint::NoopCheckpointSink;
pub use checkpoint::RetentionPolicy;
pub use checkpoint::TriggerPolicy;
pub use node::BarrierOutcome;
pub use node::BarrierSink;
pub use node::ChannelBarrierSink;
pub use node::MockBarrierSink;
pub use node::NoopBarrierSink;
pub use checkpoint::CheckpointCodec;
pub use checkpoint::SerdeCheckpointCodec;
pub use checkpoint::TypedCheckpointStore;
pub use checkpoint::BlobCheckpointStore;
pub use checkpoint::InMemoryBlobStore;
pub use error::BuildError;
pub use error::BuildErrors;
pub use error::Diagnostic;
pub use error::DiagnosticCategory;
pub use error::DiagnosticSeverity;
pub use error::GraphDiagnostics;
pub use error::GraphError;
pub use error::ObservedError;
pub use error::TerminalError;
pub use event::BarrierDecision;
pub use event::BarrierId;
pub use event::FlowEvent;
pub use event::GraphEvent;
pub use event::GraphExecution;
pub use event::GraphHandle;
pub use event::GraphStream;
pub use graph::CycleAnalysis;
pub use graph::GraphBuilder;
pub use graph::Edge;
pub use graph::Graph;
pub use graph::NoopStepCallback;
pub use graph::StepCallback;
pub use node::BarrierDefaultAction;
pub use node::BarrierNode;
pub use node::BranchCondition;
pub use node::ConditionNode;
pub use node::ConditionNodeBuilder;
pub use node::ExecutorOperation;
pub use node::FlowNode;
pub use node::LeafNode;
pub use node::NodeKind;
pub use node::ParallelErrorStrategy;
pub use node::ParallelNode;
pub use node::ParallelNodeBuilder;
pub use node::TaskFn;
pub use node::TaskNode;
pub use node::CompiledSubgraph;
pub use node::StateProjector;
pub use node::SubgraphSpec;
pub use state::IdentityLens;
pub use state::StateLens;
pub use checkpoint::Frame;
pub use checkpoint::FrameStack;
pub use exec::ExecutionSession;
pub use exec::SessionCheckpoint;
pub use exec::SessionCheckpointSink;
pub use exec::SessionError;
pub use test_executor::SimpleExecutor;
pub use exec::ExecutionContext;
pub use exec::ExecutionControl;
pub use exec::ExecutionEngine;
pub use exec::ExecutionSignal;
pub use exec::ExecutionView;
pub use exec::ExecutorState;
pub use exec::NextAction;
pub use exec::NodeMetadata;
pub use exec::OwnedExecutionEngine;
pub use node::LeafContext;
pub use node::NodeContext;
pub use runtime_event::RuntimeEvent;
pub use state::LastWriteWins;
pub use state::MergeStrategy;
pub use state::WorkflowError;
pub use state::WorkflowState;
pub use stream_chunk::StreamChunk;
pub use stream_chunk::ToolPhase;
pub use stream_emitter::BufferedSink;
pub use stream_emitter::ChannelSink;
pub use stream_emitter::NoopSink;
pub use stream_emitter::StreamHub;
pub use stream_emitter::StreamSink;
pub use stream_emitter::noop_sink;
pub use stream_emitter::sink_arc;
pub use stream_emitter::spawn_forward_task;
pub use checkpoint::ExecutionTrace;
pub use checkpoint::ExportedTrace;
pub use checkpoint::ExportedTraceStep;
pub use checkpoint::MemoryTraceSink;
pub use checkpoint::TraceSink;
pub use checkpoint::TraceStep;
pub use checkpoint::InMemoryMutationLog;
pub use checkpoint::MutationLogEntry;
pub use checkpoint::MutationLogStore;
pub use checkpoint::mutations_to_log_entries;

Modules§

checkpoint
检查点 + 持久化 — Checkpoint, Policy, Codec, Store, MutationLog, Trace。
compiler
Compiler — 图优化 pass 框架。
error
Graph 错误类型。
event
Graph 层流式事件。
exec
执行引擎 — ExecutionEngine, ExecutionLoop, Session。
graph
图构建 — Graph, GraphBuilder, GraphAnalysis。
ids
TraceId / SpanId — 执行追踪标识符。
node
节点定义 — Node, Barrier, Parallel, Subgraph, Context。
runtime_event
RuntimeEvent — Control Plane 控制面事件。
state
状态管理 — State, WorkflowState, StateKey, StateLens。
stream_chunk
StreamChunk — Data Plane 数据面事件。
stream_emitter
StreamSink — 数据面发射抽象。
test_executor
测试用执行器 — 替代已删除的 SimpleExecutor。

Structs§

CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.