Versions in this module Expand all Collapse all v0 v0.2.0 Jul 25, 2026 v0.1.0 Jul 12, 2026 Changes in this version + const End + const Start + var ErrMaxSteps = errors.New("minigraph: max steps exceeded") + type App struct + MaxSteps int + func (r *App[S]) Invoke(ctx context.Context, state S) (S, error) + func (r *App[S]) InvokeFrom(ctx context.Context, from Step[S]) (S, error) + func (r *App[S]) InvokeThread(ctx context.Context, saver Checkpointer[S], thread string, initial S) (S, error) + func (r *App[S]) Stream(ctx context.Context, state S) iter.Seq2[Step[S], error] + func (r *App[S]) StreamFrom(ctx context.Context, from Step[S]) iter.Seq2[Step[S], error] + func (r *App[S]) StreamThread(ctx context.Context, saver Checkpointer[S], thread string, initial S) iter.Seq2[Step[S], error] + type Checkpointer interface + Load func(ctx context.Context, thread string) (Step[S], bool, error) + Save func(ctx context.Context, thread string, step Step[S]) error + type Graph struct + func New[S any]() *Graph[S] + func (g *Graph[S]) AddEdge(from, to string) *Graph[S] + func (g *Graph[S]) AddNode(name string, fn Node[S]) *Graph[S] + func (g *Graph[S]) AddRouter(from string, r Router[S]) *Graph[S] + func (g *Graph[S]) Compile() (*App[S], error) + type Interrupt struct + Node string + Payload any + func (i *Interrupt) Error() string + type MemorySaver struct + func (m *MemorySaver[S]) Load(_ context.Context, thread string) (Step[S], bool, error) + func (m *MemorySaver[S]) Save(_ context.Context, thread string, step Step[S]) error + type Node func(ctx context.Context, state S) (S, error) + func Parallel[S any](merge func(ctx context.Context, base S, results []S) (S, error), ...) Node[S] + type Router func(ctx context.Context, state S) (string, error) + type Step struct + Node string + State S