Documentation
¶
Overview ¶
Package petalflow provides a Go-native framework for building, orchestrating, and deploying AI agents and multimodal workflows.
This file provides backward-compatible re-exports for all types and constructors from the core, graph, runtime, and nodes subpackages. Existing code using petalflow.* imports will continue to work without modification.
For new code, consider importing subpackages directly for clearer dependencies:
import "github.com/petal-labs/petalflow/core" import "github.com/petal-labs/petalflow/graph" import "github.com/petal-labs/petalflow/runtime" import "github.com/petal-labs/petalflow/nodes"
Index ¶
- Constants
- Variables
- type AllMergeStrategy
- type Artifact
- type AutoApproveHandler
- type AutoStepController
- type BaseNode
- type BasicGraph
- type BasicRuntime
- type BestScoreMergeConfig
- type BestScoreMergeStrategy
- type BreakpointStepController
- type Budget
- type CacheKeyBuilder
- type CacheNode
- type CacheNodeConfig
- type CacheResult
- type CacheStore
- type CallbackHumanHandler
- type CallbackStepController
- type ChannelHumanHandler
- type ChannelStepController
- type ConcatMergeConfig
- type ConcatMergeStrategy
- type ConditionFunc
- type ConditionOp
- type Edge
- type EnvFunc
- type Envelope
- func Run(ctx context.Context, g Graph, env *Envelope) (*Envelope, error)
- func RunParallel(ctx context.Context, g Graph, env *Envelope, concurrency int) (*Envelope, error)
- func RunWithHandler(ctx context.Context, g Graph, env *Envelope, handler EventHandler) (*Envelope, error)
- func RunWithOptions(ctx context.Context, g Graph, env *Envelope, opts RunOptions) (*Envelope, error)
- type EnvelopeModification
- type EnvelopeSnapshot
- type Event
- type EventEmitter
- type EventHandler
- type EventKind
- type FanOutBranch
- type FilterNode
- type FilterNodeConfig
- type FilterOp
- type FilterOpType
- type FilterStats
- type FilterTarget
- type FuncMergeStrategy
- type FuncNode
- type FuncTool
- type GateAction
- type GateNode
- type GateNodeConfig
- type GateResult
- type Graph
- type GraphBuilder
- type GraphSnapshot
- type GuardianAction
- type GuardianCheck
- type GuardianCheckType
- type GuardianFailure
- type GuardianNode
- type GuardianNodeConfig
- type GuardianResult
- type HTTPClient
- type HumanCallbackFunc
- type HumanHandler
- type HumanNode
- type HumanNodeConfig
- type HumanOption
- type HumanRequest
- type HumanRequestType
- type HumanResponse
- type HumanTimeoutAction
- type JSONMergeConfig
- type JSONMergeStrategy
- type LLMClient
- type LLMMessage
- type LLMNode
- type LLMNodeConfig
- type LLMReasoningOutput
- type LLMRequest
- type LLMResponse
- type LLMRouter
- type LLMRouterConfig
- type LLMTokenUsage
- type LLMToolCall
- type LLMToolResult
- type MapNode
- type MapNodeConfig
- type MemoryCacheStore
- type MergeCapable
- type MergeFunc
- type MergeNode
- type MergeNodeConfig
- type MergeStrategy
- type Message
- type MockHTTPClient
- type MockNode
- type Node
- type NodeError
- type NodeFunc
- type NodeKind
- type NoopNode
- type PIIType
- type PetalTool
- type QueuedHumanHandler
- type RetryPolicy
- type RouteCondition
- type RouteDecision
- type RouteRule
- type RouterNode
- type RuleRouter
- type RuleRouterConfig
- type RunOptions
- type Runtime
- type ShouldPauseFunc
- type StepAction
- type StepCallback
- type StepConfig
- type StepController
- type StepHandler
- type StepPoint
- type StepRequest
- type StepResponse
- type StreamChunk
- type StreamingLLMClient
- type TokenUsage
- type ToolNode
- type ToolNodeConfig
- type ToolRegistry
- type TraceInfo
- type TransformFunc
- type TransformNode
- type TransformNodeConfig
- type TransformType
- type ValidateFunc
- type WebhookAuthType
- type WebhookCallNode
- type WebhookCallNodeConfig
- type WebhookTriggerAuthConfig
- type WebhookTriggerNode
- type WebhookTriggerNodeConfig
Constants ¶
const ( NodeKindLLM = core.NodeKindLLM NodeKindTool = core.NodeKindTool NodeKindRouter = core.NodeKindRouter NodeKindMerge = core.NodeKindMerge NodeKindMap = core.NodeKindMap NodeKindGate = core.NodeKindGate NodeKindNoop = core.NodeKindNoop NodeKindFilter = core.NodeKindFilter NodeKindTransform = core.NodeKindTransform NodeKindGuardian = core.NodeKindGuardian NodeKindCache = core.NodeKindCache NodeKindWebhookCall = core.NodeKindWebhookCall NodeKindWebhookTrigger = core.NodeKindWebhookTrigger NodeKindHuman = core.NodeKindHuman )
NodeKind constants
const ( EventRunStarted = runtime.EventRunStarted EventNodeStarted = runtime.EventNodeStarted EventNodeOutput = runtime.EventNodeOutput EventNodeFailed = runtime.EventNodeFailed EventNodeFinished = runtime.EventNodeFinished EventRouteDecision = runtime.EventRouteDecision EventRunFinished = runtime.EventRunFinished EventStepPaused = runtime.EventStepPaused EventStepResumed = runtime.EventStepResumed EventStepSkipped = runtime.EventStepSkipped EventStepAborted = runtime.EventStepAborted )
EventKind constants
const ( StepActionContinue = runtime.StepActionContinue StepActionSkipNode = runtime.StepActionSkipNode StepActionAbort = runtime.StepActionAbort StepActionRunToBreakpoint = runtime.StepActionRunToBreakpoint )
StepAction constants
const ( StepPointBeforeNode = runtime.StepPointBeforeNode StepPointAfterNode = runtime.StepPointAfterNode )
StepPoint constants
const ( OpEquals = nodes.OpEquals OpNotEquals = nodes.OpNotEquals OpContains = nodes.OpContains OpGreaterThan = nodes.OpGreaterThan OpLessThan = nodes.OpLessThan OpExists = nodes.OpExists OpNotExists = nodes.OpNotExists OpIn = nodes.OpIn )
ConditionOp constants
const ( GateActionBlock = nodes.GateActionBlock GateActionSkip = nodes.GateActionSkip GateActionRedirect = nodes.GateActionRedirect )
GateAction constants
const ( FilterOpTopN = nodes.FilterOpTopN FilterOpThreshold = nodes.FilterOpThreshold FilterOpDedupe = nodes.FilterOpDedupe FilterOpByType = nodes.FilterOpByType FilterOpMatch = nodes.FilterOpMatch FilterOpExclude = nodes.FilterOpExclude FilterOpCustom = nodes.FilterOpCustom )
FilterOpType constants
const ( FilterTargetArtifacts = nodes.FilterTargetArtifacts FilterTargetMessages = nodes.FilterTargetMessages FilterTargetVar = nodes.FilterTargetVar )
FilterTarget constants
const ( TransformPick = nodes.TransformPick TransformOmit = nodes.TransformOmit TransformRename = nodes.TransformRename TransformFlatten = nodes.TransformFlatten TransformMerge = nodes.TransformMerge TransformTemplate = nodes.TransformTemplate TransformStringify = nodes.TransformStringify TransformParse = nodes.TransformParse TransformMap = nodes.TransformMap TransformCustom = nodes.TransformCustom )
TransformType constants
const ( GuardianCheckRequired = nodes.GuardianCheckRequired GuardianCheckMaxLength = nodes.GuardianCheckMaxLength GuardianCheckMinLength = nodes.GuardianCheckMinLength GuardianCheckPattern = nodes.GuardianCheckPattern GuardianCheckEnum = nodes.GuardianCheckEnum GuardianCheckTypeCheck = nodes.GuardianCheckType_ GuardianCheckRange = nodes.GuardianCheckRange GuardianCheckPII = nodes.GuardianCheckPII GuardianCheckSchema = nodes.GuardianCheckSchema GuardianCheckCustom = nodes.GuardianCheckCustom )
GuardianCheckType constants
const ( GuardianActionFail = nodes.GuardianActionFail GuardianActionSkip = nodes.GuardianActionSkip GuardianActionRedirect = nodes.GuardianActionRedirect )
GuardianAction constants
const ( PIITypeSSN = nodes.PIITypeSSN PIITypeEmail = nodes.PIITypeEmail PIITypePhone = nodes.PIITypePhone PIITypeCreditCard = nodes.PIITypeCreditCard PIITypeIPAddress = nodes.PIITypeIPAddress PIITypeDateOfBirth = nodes.PIITypeDateOfBirth )
PIIType constants
const ( HumanRequestApproval = nodes.HumanRequestApproval HumanRequestChoice = nodes.HumanRequestChoice HumanRequestEdit = nodes.HumanRequestEdit HumanRequestInput = nodes.HumanRequestInput HumanRequestReview = nodes.HumanRequestReview )
HumanRequestType constants
const ( HumanTimeoutFail = nodes.HumanTimeoutFail HumanTimeoutDefault = nodes.HumanTimeoutDefault HumanTimeoutSkip = nodes.HumanTimeoutSkip )
HumanTimeoutAction constants
const ( WebhookAuthTypeNone = nodes.WebhookAuthTypeNone WebhookAuthTypeHeaderToken = nodes.WebhookAuthTypeHeaderToken )
Webhook auth mode constants.
Variables ¶
var ( NewEnvelope = core.NewEnvelope NewBaseNode = core.NewBaseNode NewNoopNode = core.NewNoopNode NewFuncNode = core.NewFuncNode NewFuncTool = core.NewFuncTool NewToolRegistry = core.NewToolRegistry DefaultRetryPolicy = core.DefaultRetryPolicy )
Core package constructors
var ( ErrNodeNotFound = graph.ErrNodeNotFound ErrDuplicateNode = graph.ErrDuplicateNode ErrInvalidEdge = graph.ErrInvalidEdge ErrNoEntryNode = graph.ErrNoEntryNode ErrCycleDetected = graph.ErrCycleDetected ErrEmptyGraph = graph.ErrEmptyGraph ErrNodeAlreadyAdded = graph.ErrNodeAlreadyAdded )
Graph package errors
var ( NewGraph = graph.NewGraph NewGraphBuilder = graph.NewGraphBuilder NewBranch = graph.NewBranch NewPipelineBranch = graph.NewPipelineBranch )
Graph package constructors
var ( ErrMaxHopsExceeded = runtime.ErrMaxHopsExceeded ErrRunCanceled = runtime.ErrRunCanceled ErrNodeExecution = runtime.ErrNodeExecution ErrStepAborted = runtime.ErrStepAborted ErrStepRequestNotFound = runtime.ErrStepRequestNotFound )
Runtime package errors
var ( NewRuntime = runtime.NewRuntime DefaultRunOptions = runtime.DefaultRunOptions NewEvent = runtime.NewEvent MultiEventHandler = runtime.MultiEventHandler ChannelEventHandler = runtime.ChannelEventHandler DefaultStepConfig = runtime.DefaultStepConfig NewCallbackStepController = runtime.NewCallbackStepController NewChannelStepController = runtime.NewChannelStepController NewBreakpointStepController = runtime.NewBreakpointStepController NewAutoStepController = runtime.NewAutoStepController )
Runtime package constructors
var ( NewLLMNode = nodes.NewLLMNode NewToolNode = nodes.NewToolNode NewToolNodeWithRegistry = nodes.NewToolNodeWithRegistry NewRuleRouter = nodes.NewRuleRouter NewLLMRouter = nodes.NewLLMRouter NewMergeNode = nodes.NewMergeNode NewJSONMergeStrategy = nodes.NewJSONMergeStrategy NewConcatMergeStrategy = nodes.NewConcatMergeStrategy NewBestScoreMergeStrategy = nodes.NewBestScoreMergeStrategy NewFuncMergeStrategy = nodes.NewFuncMergeStrategy NewAllMergeStrategy = nodes.NewAllMergeStrategy NewMapNode = nodes.NewMapNode NewFilterNode = nodes.NewFilterNode NewTransformNode = nodes.NewTransformNode NewGateNode = nodes.NewGateNode NewCacheNode = nodes.NewCacheNode NewMemoryCacheStore = nodes.NewMemoryCacheStore NewCacheKeyBuilder = nodes.NewCacheKeyBuilder NewMockNode = nodes.NewMockNode NewGuardianNode = nodes.NewGuardianNode NewHumanNode = nodes.NewHumanNode NewChannelHumanHandler = nodes.NewChannelHumanHandler NewCallbackHumanHandler = nodes.NewCallbackHumanHandler NewAutoApproveHandler = nodes.NewAutoApproveHandler NewAutoRejectHandler = nodes.NewAutoRejectHandler NewQueuedHumanHandler = nodes.NewQueuedHumanHandler NewWebhookCallNode = nodes.NewWebhookCallNode NewWebhookTriggerNode = nodes.NewWebhookTriggerNode NewMockHTTPClient = nodes.NewMockHTTPClient )
Nodes package constructors
Functions ¶
This section is empty.
Types ¶
type AllMergeStrategy ¶
type AllMergeStrategy = nodes.AllMergeStrategy
AllMergeStrategy collects all inputs into a single output.
type AutoApproveHandler ¶
type AutoApproveHandler = nodes.AutoApproveHandler
AutoApproveHandler automatically approves or rejects requests.
type AutoStepController ¶
type AutoStepController = runtime.AutoStepController
AutoStepController automatically continues with a configurable delay.
type BasicGraph ¶
type BasicGraph = graph.BasicGraph
BasicGraph is a simple implementation of the Graph interface.
type BasicRuntime ¶
type BasicRuntime = runtime.BasicRuntime
BasicRuntime is a simple sequential runtime implementation.
type BestScoreMergeConfig ¶
type BestScoreMergeConfig = nodes.BestScoreMergeConfig
BestScoreMergeConfig configures a BestScoreMergeStrategy.
type BestScoreMergeStrategy ¶
type BestScoreMergeStrategy = nodes.BestScoreMergeStrategy
BestScoreMergeStrategy selects the envelope with the best score.
type BreakpointStepController ¶
type BreakpointStepController = runtime.BreakpointStepController
BreakpointStepController only pauses at specified breakpoints.
type CacheKeyBuilder ¶
type CacheKeyBuilder = nodes.CacheKeyBuilder
CacheKeyBuilder helps build complex cache keys.
type CacheNodeConfig ¶
type CacheNodeConfig = nodes.CacheNodeConfig
CacheNodeConfig configures a CacheNode.
type CacheResult ¶
type CacheResult = nodes.CacheResult
CacheResult contains metadata about a cache operation.
type CacheStore ¶
type CacheStore = nodes.CacheStore
CacheStore is the interface for cache storage backends.
type CallbackHumanHandler ¶
type CallbackHumanHandler = nodes.CallbackHumanHandler
CallbackHumanHandler uses a callback function.
type CallbackStepController ¶
type CallbackStepController = runtime.CallbackStepController
CallbackStepController invokes a function at each step.
type ChannelHumanHandler ¶
type ChannelHumanHandler = nodes.ChannelHumanHandler
ChannelHumanHandler uses Go channels for human interaction.
type ChannelStepController ¶
type ChannelStepController = runtime.ChannelStepController
ChannelStepController uses Go channels for interactive debugging.
type ConcatMergeConfig ¶
type ConcatMergeConfig = nodes.ConcatMergeConfig
ConcatMergeConfig configures a ConcatMergeStrategy.
type ConcatMergeStrategy ¶
type ConcatMergeStrategy = nodes.ConcatMergeStrategy
ConcatMergeStrategy merges by concatenating values.
type ConditionFunc ¶
ConditionFunc is a convenience type for condition checking functions.
type ConditionOp ¶
type ConditionOp = nodes.ConditionOp
ConditionOp is the operator for a route condition.
type Envelope ¶
Envelope is the single data structure passed between nodes.
func Run ¶
Run is a convenience function to execute a graph with default options. It creates a new runtime, runs the graph, and returns the result.
func RunParallel ¶
RunParallel is a convenience function to execute a graph with parallel execution.
func RunWithHandler ¶
func RunWithHandler(ctx context.Context, g Graph, env *Envelope, handler EventHandler) (*Envelope, error)
RunWithHandler is a convenience function to execute a graph with an event handler.
func RunWithOptions ¶
func RunWithOptions(ctx context.Context, g Graph, env *Envelope, opts RunOptions) (*Envelope, error)
RunWithOptions is a convenience function to execute a graph with custom options.
type EnvelopeModification ¶
type EnvelopeModification = runtime.EnvelopeModification
EnvelopeModification specifies changes to apply to the envelope.
type EnvelopeSnapshot ¶
type EnvelopeSnapshot = runtime.EnvelopeSnapshot
EnvelopeSnapshot is a read-only view of the envelope state.
type EventEmitter ¶
type EventEmitter = runtime.EventEmitter
EventEmitter is a function type for emitting events.
type EventHandler ¶
type EventHandler = runtime.EventHandler
EventHandler is a function type for handling events.
type FanOutBranch ¶
type FanOutBranch = graph.FanOutBranch
FanOutBranch is a helper for building complex fan-out patterns.
type FilterNodeConfig ¶
type FilterNodeConfig = nodes.FilterNodeConfig
FilterNodeConfig configures a FilterNode.
type FilterOpType ¶
type FilterOpType = nodes.FilterOpType
FilterOpType is the type of filter operation.
type FilterStats ¶
type FilterStats = nodes.FilterStats
FilterStats tracks filter operation statistics.
type FuncMergeStrategy ¶
type FuncMergeStrategy = nodes.FuncMergeStrategy
FuncMergeStrategy uses a custom function for merging.
type GateAction ¶
type GateAction = nodes.GateAction
GateAction defines what happens when a gate condition fails.
type GateNodeConfig ¶
type GateNodeConfig = nodes.GateNodeConfig
GateNodeConfig configures a GateNode.
type GateResult ¶
type GateResult = nodes.GateResult
GateResult is stored in the envelope when ResultVar is set.
type Graph ¶
Graph represents a directed graph of nodes connected by edges.
func BuildGraph ¶
BuildGraph is a convenience function to create a simple linear graph. It creates a builder, adds all nodes with edges between them, and builds.
func MustBuildGraph ¶
MustBuildGraph is like BuildGraph but panics on error. Useful in tests and examples.
type GraphBuilder ¶
type GraphBuilder = graph.GraphBuilder
GraphBuilder provides a fluent API for constructing workflow graphs.
type GraphSnapshot ¶
type GraphSnapshot = runtime.GraphSnapshot
GraphSnapshot provides read-only graph context.
type GuardianAction ¶
type GuardianAction = nodes.GuardianAction
GuardianAction defines what happens when a check fails.
type GuardianCheck ¶
type GuardianCheck = nodes.GuardianCheck
GuardianCheck defines a validation check.
type GuardianCheckType ¶
type GuardianCheckType = nodes.GuardianCheckType
GuardianCheckType is the type of check to perform.
type GuardianFailure ¶
type GuardianFailure = nodes.GuardianFailure
GuardianFailure records a single check failure.
type GuardianNode ¶
type GuardianNode = nodes.GuardianNode
GuardianNode validates data against defined checks.
type GuardianNodeConfig ¶
type GuardianNodeConfig = nodes.GuardianNodeConfig
GuardianNodeConfig configures a GuardianNode.
type GuardianResult ¶
type GuardianResult = nodes.GuardianResult
GuardianResult contains the results of all checks.
type HumanCallbackFunc ¶
type HumanCallbackFunc = func(ctx context.Context, req *HumanRequest) (*HumanResponse, error)
HumanCallbackFunc is a convenience type for human handler callbacks.
type HumanNodeConfig ¶
type HumanNodeConfig = nodes.HumanNodeConfig
HumanNodeConfig configures a HumanNode.
type HumanRequest ¶
type HumanRequest = nodes.HumanRequest
HumanRequest represents a request for human input.
type HumanRequestType ¶
type HumanRequestType = nodes.HumanRequestType
HumanRequestType identifies the type of human request.
type HumanResponse ¶
type HumanResponse = nodes.HumanResponse
HumanResponse contains the human's response.
type HumanTimeoutAction ¶
type HumanTimeoutAction = nodes.HumanTimeoutAction
HumanTimeoutAction defines what happens on timeout.
type JSONMergeConfig ¶
type JSONMergeConfig = nodes.JSONMergeConfig
JSONMergeConfig configures a JSONMergeStrategy.
type JSONMergeStrategy ¶
type JSONMergeStrategy = nodes.JSONMergeStrategy
JSONMergeStrategy merges envelopes by combining JSON data.
type LLMMessage ¶
type LLMMessage = core.LLMMessage
LLMMessage is a chat message in PetalFlow format.
type LLMReasoningOutput ¶
type LLMReasoningOutput = core.LLMReasoningOutput
LLMReasoningOutput contains reasoning information from the model.
type LLMRequest ¶
type LLMRequest = core.LLMRequest
LLMRequest is the request structure for LLM completion.
type LLMResponse ¶
type LLMResponse = core.LLMResponse
LLMResponse captures the output from an LLM call.
type LLMRouterConfig ¶
type LLMRouterConfig = nodes.LLMRouterConfig
LLMRouterConfig configures an LLMRouter.
type LLMTokenUsage ¶
type LLMTokenUsage = core.LLMTokenUsage
LLMTokenUsage tracks token consumption for LLM calls.
type LLMToolCall ¶
type LLMToolCall = core.LLMToolCall
LLMToolCall represents a tool invocation requested by the model.
type LLMToolResult ¶
type LLMToolResult = core.LLMToolResult
LLMToolResult represents the result of executing a tool.
type MemoryCacheStore ¶
type MemoryCacheStore = nodes.MemoryCacheStore
MemoryCacheStore is an in-memory cache implementation.
type MergeCapable ¶
type MergeCapable = core.MergeCapable
MergeCapable is implemented by nodes that can merge multiple input envelopes.
type MergeNodeConfig ¶
type MergeNodeConfig = nodes.MergeNodeConfig
MergeNodeConfig configures a MergeNode.
type MergeStrategy ¶
type MergeStrategy = nodes.MergeStrategy
MergeStrategy defines how to combine multiple envelopes.
type MockHTTPClient ¶
type MockHTTPClient = nodes.MockHTTPClient
MockHTTPClient is a mock HTTP client for testing.
type QueuedHumanHandler ¶
type QueuedHumanHandler = nodes.QueuedHumanHandler
QueuedHumanHandler queues requests for later processing.
type RetryPolicy ¶
type RetryPolicy = core.RetryPolicy
RetryPolicy configures retry behavior for nodes that call external systems.
type RouteCondition ¶
type RouteCondition = nodes.RouteCondition
RouteCondition defines a condition for routing.
type RouteDecision ¶
type RouteDecision = core.RouteDecision
RouteDecision is produced by RouterNode to indicate which targets to activate.
type RouterNode ¶
type RouterNode = core.RouterNode
RouterNode is a node that can select which edges to activate.
type RuleRouterConfig ¶
type RuleRouterConfig = nodes.RuleRouterConfig
RuleRouterConfig configures a RuleRouter.
type RunOptions ¶
type RunOptions = runtime.RunOptions
RunOptions controls execution behavior.
func NewStepRunOptions ¶
func NewStepRunOptions(controller StepController) RunOptions
NewStepRunOptions creates RunOptions configured for step-through debugging.
func NewStepRunOptionsWithConfig ¶
func NewStepRunOptionsWithConfig(controller StepController, config *StepConfig) RunOptions
NewStepRunOptionsWithConfig creates RunOptions configured for step-through debugging with a custom step configuration.
func NewTimedRunOptions ¶
func NewTimedRunOptions(now func() time.Time) RunOptions
NewTimedRunOptions creates RunOptions with a custom time function. Useful for testing time-sensitive behavior.
type ShouldPauseFunc ¶
type ShouldPauseFunc = runtime.ShouldPauseFunc
ShouldPauseFunc is an optional predicate for CallbackStepController.
type StepAction ¶
type StepAction = runtime.StepAction
StepAction specifies what the runtime should do at a step point.
type StepCallback ¶
type StepCallback = runtime.StepCallback
StepCallback is the function signature for CallbackStepController.
type StepController ¶
type StepController = runtime.StepController
StepController is the interface for controlling step-through execution.
type StepHandler ¶
type StepHandler = runtime.StepHandler
StepHandler is called when a breakpoint is hit.
type StepRequest ¶
type StepRequest = runtime.StepRequest
StepRequest contains information about the current step point.
type StepResponse ¶
type StepResponse = runtime.StepResponse
StepResponse contains the controller's decision.
type StreamChunk ¶ added in v0.3.0
type StreamChunk = core.StreamChunk
StreamChunk is a partial response from the LLM.
type StreamingLLMClient ¶ added in v0.3.0
type StreamingLLMClient = core.StreamingLLMClient
StreamingLLMClient extends LLMClient with streaming capability.
type TokenUsage ¶
type TokenUsage = core.TokenUsage
TokenUsage tracks token consumption for cost tracking and budgeting.
type ToolNodeConfig ¶
type ToolNodeConfig = nodes.ToolNodeConfig
ToolNodeConfig configures a ToolNode.
type ToolRegistry ¶
type ToolRegistry = core.ToolRegistry
ToolRegistry holds a collection of tools for lookup by name.
type TransformFunc ¶
TransformFunc is a convenience type for custom transformation functions.
type TransformNode ¶
type TransformNode = nodes.TransformNode
TransformNode reshapes or transforms data.
type TransformNodeConfig ¶
type TransformNodeConfig = nodes.TransformNodeConfig
TransformNodeConfig configures a TransformNode.
type TransformType ¶
type TransformType = nodes.TransformType
TransformType specifies the type of transformation.
type ValidateFunc ¶
type ValidateFunc = func(ctx context.Context, env *Envelope, check *GuardianCheck) (bool, string, error)
ValidateFunc is a convenience type for custom validation functions.
type WebhookAuthType ¶ added in v0.3.0
type WebhookAuthType = nodes.WebhookAuthType
WebhookAuthType identifies webhook trigger auth mode.
type WebhookCallNode ¶ added in v0.3.0
type WebhookCallNode = nodes.WebhookCallNode
WebhookCallNode executes outbound HTTP webhook calls.
type WebhookCallNodeConfig ¶ added in v0.3.0
type WebhookCallNodeConfig = nodes.WebhookCallNodeConfig
WebhookCallNodeConfig configures a WebhookCallNode.
type WebhookTriggerAuthConfig ¶ added in v0.3.0
type WebhookTriggerAuthConfig = nodes.WebhookTriggerAuthConfig
WebhookTriggerAuthConfig configures webhook trigger authentication.
type WebhookTriggerNode ¶ added in v0.3.0
type WebhookTriggerNode = nodes.WebhookTriggerNode
WebhookTriggerNode maps inbound webhook requests into workflow vars.
type WebhookTriggerNodeConfig ¶ added in v0.3.0
type WebhookTriggerNodeConfig = nodes.WebhookTriggerNodeConfig
WebhookTriggerNodeConfig configures a WebhookTriggerNode.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bus provides an event distribution system for PetalFlow workflow execution.
|
Package bus provides an event distribution system for PetalFlow workflow execution. |
|
cmd
|
|
|
petalflow
command
|
|
|
Package core provides the foundational types and interfaces for PetalFlow workflows.
|
Package core provides the foundational types and interfaces for PetalFlow workflows. |
|
Package graph provides the directed graph model for PetalFlow workflows.
|
Package graph provides the directed graph model for PetalFlow workflows. |
|
internal
|
|
|
Package llmprovider bridges iris LLM providers to petalflow's core.LLMClient interface.
|
Package llmprovider bridges iris LLM providers to petalflow's core.LLMClient interface. |
|
Package loader provides schema detection and loading for PetalFlow workflow files.
|
Package loader provides schema detection and loading for PetalFlow workflow files. |
|
Package nodes provides the node implementations for PetalFlow workflows.
|
Package nodes provides the node implementations for PetalFlow workflows. |
|
conditional
Package conditional implements the conditional routing node for PetalFlow.
|
Package conditional implements the conditional routing node for PetalFlow. |
|
conditional/expr
Package expr provides a minimal, safe expression language for conditional routing in PetalFlow graphs.
|
Package expr provides a minimal, safe expression language for conditional routing in PetalFlow graphs. |
|
Package otel provides OpenTelemetry integration for PetalFlow runtime events.
|
Package otel provides OpenTelemetry integration for PetalFlow runtime events. |
|
Package registry provides a global node-type registry for PetalFlow.
|
Package registry provides a global node-type registry for PetalFlow. |
|
Package runtime provides the execution engine for PetalFlow workflow graphs.
|
Package runtime provides the execution engine for PetalFlow workflow graphs. |
|
Package sse provides a Server-Sent Events handler for streaming workflow execution events to HTTP clients.
|
Package sse provides a Server-Sent Events handler for streaming workflow execution events to HTTP clients. |
|
Package tool defines the contract boundary for external tool integration.
|
Package tool defines the contract boundary for external tool integration. |
|
mcp
Package mcp implements the core Model Context Protocol client primitives used by PetalFlow tool adapters.
|
Package mcp implements the core Model Context Protocol client primitives used by PetalFlow tool adapters. |
|
Package traceflow provides the PetalTrace SDK adapter for enriching PetalFlow execution traces with observability data.
|
Package traceflow provides the PetalTrace SDK adapter for enriching PetalFlow execution traces with observability data. |