Documentation
¶
Overview ¶
Package weaveflow provides high-level graph construction, loading, and runner assembly. Domain types and lower-level operations remain owned by their respective core, dsl, graph, registry, runtime, and state packages.
Index ¶
- Constants
- func BuildGraph(reg *registry.Registry, definition dsl.GraphDefinition, ...) (*graph.Graph, error)
- func BuildGraphInstance(reg *registry.Registry, definition dsl.GraphDefinition, ...) (*graph.Graph, error)
- func LoadGraphFromFile(path string, options ...LoadGraphOption) (*graph.Graph, error)
- func NewDefaultRegistry() *registry.Registry
- func NewGraph() *graph.Graph
- func NewInMemoryRunner(target *graph.Graph, options ...RunnerOption) (*runtime.GraphRunner, error)
- func NewLocalRunner(target *graph.Graph, baseDir string, options ...RunnerOption) (*runtime.GraphRunner, error)
- func NewRunner(target *graph.Graph, options ...RunnerOption) (*runtime.GraphRunner, error)
- type LoadGraphOption
- type RunnerOption
- func WithArtifactStore(store runtime.ArtifactStore) RunnerOption
- func WithBreakpoints(breakpoints ...runtime.Breakpoint) RunnerOption
- func WithCheckpointStore(store runtime.CheckpointStore) RunnerOption
- func WithContractPolicy(policy runtime.ContractPolicy) RunnerOption
- func WithContractValidation(mode core.ContractValidationMode) RunnerOption
- func WithEventSink(sink runtime.EventSink) RunnerOption
- func WithExecutionStore(store runtime.ExecutionStore) RunnerOption
- func WithGraphID(id string) RunnerOption
- func WithGraphVersion(version string) RunnerOption
- func WithNow(now func() time.Time) RunnerOption
- func WithStateCodec(codec state.Codec) RunnerOption
Constants ¶
View Source
const EndNodeRef = graph.EndNodeRef
Variables ¶
This section is empty.
Functions ¶
func BuildGraph ¶
func BuildGraph(reg *registry.Registry, definition dsl.GraphDefinition, options ...LoadGraphOption) (*graph.Graph, error)
func BuildGraphInstance ¶
func BuildGraphInstance(reg *registry.Registry, definition dsl.GraphDefinition, instance dsl.GraphInstanceConfig, buildContext *registry.BuildContext) (*graph.Graph, error)
func LoadGraphFromFile ¶
func LoadGraphFromFile(path string, options ...LoadGraphOption) (*graph.Graph, error)
func NewDefaultRegistry ¶
func NewInMemoryRunner ¶
func NewInMemoryRunner(target *graph.Graph, options ...RunnerOption) (*runtime.GraphRunner, error)
func NewLocalRunner ¶
func NewLocalRunner(target *graph.Graph, baseDir string, options ...RunnerOption) (*runtime.GraphRunner, error)
func NewRunner ¶
func NewRunner(target *graph.Graph, options ...RunnerOption) (*runtime.GraphRunner, error)
Types ¶
type LoadGraphOption ¶
type LoadGraphOption interface {
// contains filtered or unexported methods
}
func WithBuildContext ¶
func WithBuildContext(buildContext *registry.BuildContext) LoadGraphOption
func WithGraphResolver ¶
func WithGraphResolver(resolver registry.GraphResolver) LoadGraphOption
func WithInstanceConfig ¶
func WithInstanceConfig(instance dsl.GraphInstanceConfig) LoadGraphOption
func WithRegistry ¶
func WithRegistry(reg *registry.Registry) LoadGraphOption
type RunnerOption ¶
type RunnerOption interface {
// contains filtered or unexported methods
}
func WithArtifactStore ¶
func WithArtifactStore(store runtime.ArtifactStore) RunnerOption
func WithBreakpoints ¶
func WithBreakpoints(breakpoints ...runtime.Breakpoint) RunnerOption
func WithCheckpointStore ¶
func WithCheckpointStore(store runtime.CheckpointStore) RunnerOption
func WithContractPolicy ¶
func WithContractPolicy(policy runtime.ContractPolicy) RunnerOption
func WithContractValidation ¶
func WithContractValidation(mode core.ContractValidationMode) RunnerOption
func WithEventSink ¶
func WithEventSink(sink runtime.EventSink) RunnerOption
func WithExecutionStore ¶
func WithExecutionStore(store runtime.ExecutionStore) RunnerOption
func WithGraphID ¶
func WithGraphID(id string) RunnerOption
func WithGraphVersion ¶
func WithGraphVersion(version string) RunnerOption
func WithNow ¶
func WithNow(now func() time.Time) RunnerOption
func WithStateCodec ¶
func WithStateCodec(codec state.Codec) RunnerOption
Directories
¶
| Path | Synopsis |
|---|---|
|
Package builtin wires WeaveFlow's default registry, protocols, and edge conditions.
|
Package builtin wires WeaveFlow's default registry, protocols, and edge conditions. |
|
capability
|
|
|
chat
Package chat defines the channel-neutral chat reply protocol.
|
Package chat defines the channel-neutral chat reply protocol. |
|
conversation
Package conversation provides state-bound conversation capabilities.
|
Package conversation provides state-bound conversation capabilities. |
|
execution
Package execution provides state-bound execution tracking capabilities.
|
Package execution provides state-bound execution tracking capabilities. |
|
plan
Package plan provides state-bound planning capabilities.
|
Package plan provides state-bound planning capabilities. |
|
supervisor
Package supervisor provides state-bound supervisor capabilities.
|
Package supervisor provides state-bound supervisor capabilities. |
|
cmd
|
|
|
server
command
|
|
|
Package core defines the stable execution contracts shared by graph construction, node implementations, the registry, the runtime, and tools.
|
Package core defines the stable execution contracts shared by graph construction, node implementations, the registry, the runtime, and tools. |
|
Package dsl defines serializable Graph Definition data transfer objects.
|
Package dsl defines serializable Graph Definition data transfer objects. |
|
examples
|
|
|
dsl
command
|
|
|
graph
command
|
|
|
multi_llm_turns
command
|
|
|
node
command
|
|
|
plan_mode
command
|
|
|
shared_tool_loop
command
|
|
|
supervisor_mode
command
|
|
|
two_agent_handoff
command
|
|
|
Package graph builds, validates, compiles, and executes graph topology.
|
Package graph builds, validates, compiles, and executes graph topology. |
|
internal
|
|
|
memory
Package memory provides local memory storage, indexing, and retrieval.
|
Package memory provides local memory storage, indexing, and retrieval. |
|
openai
Package openai provides an interface to OpenAI and OpenAI-compatible language models.
|
Package openai provides an interface to OpenAI and OpenAI-compatible language models. |
|
parts
Package parts defines reusable content-part helpers for LLM messages.
|
Package parts defines reusable content-part helpers for LLM messages. |
|
Package node provides reusable graph node implementations and construction options.
|
Package node provides reusable graph node implementations and construction options. |
|
plan
Package plan provides planning, review, and synthesis graph nodes.
|
Package plan provides planning, review, and synthesis graph nodes. |
|
stateops
Package stateops provides graph nodes for declarative state mutations.
|
Package stateops provides graph nodes for declarative state mutations. |
|
supervisor
Package supervisor provides routing and synthesis nodes for supervisor workflows.
|
Package supervisor provides routing and synthesis nodes for supervisor workflows. |
|
Package registry stores validated node, condition, capability, and state module definitions.
|
Package registry stores validated node, condition, capability, and state module definitions. |
|
Package runtime manages runs, checkpoints, events, artifacts, and control transitions.
|
Package runtime manages runs, checkpoints, events, artifacts, and control transitions. |
|
Package state provides structured graph state, paths, contracts, patches, and snapshots.
|
Package state provides structured graph state, paths, contracts, patches, and snapshots. |
|
Package tools provides bundled tool implementations for agent workflows.
|
Package tools provides bundled tool implementations for agent workflows. |
Click to show internal directories.
Click to hide internal directories.