pipeline

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pipeline defines a lightweight DSL for multimodal runtime steps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Steps []Step `json:"steps,omitempty"`
}

Batch groups an ordered list of steps.

type Checkpoint

type Checkpoint struct {
	Name string `json:"name,omitempty"`
	Step Step   `json:"step"`
}

Checkpoint marks a resumable boundary around a step.

type Conditional

type Conditional struct {
	Condition string `json:"condition,omitempty"`
	Then      Step   `json:"then"`
	Else      *Step  `json:"else,omitempty"`
}

Conditional chooses between two branches based on a runtime condition.

type Executor

type Executor struct {
	RunTool  func(context.Context, Step, []artifact.ArtifactRef) (*tool.ToolResult, error)
	RunSkill func(context.Context, Step, []artifact.ArtifactRef) (*tool.ToolResult, error)
	Cache    cache.Store
}

Executor runs lightweight multimodal pipeline steps against injected runtime surfaces.

func (Executor) Execute

func (e Executor) Execute(ctx context.Context, step Step, input Input) (Result, error)

Execute runs a declared pipeline step and returns its aggregated result.

type FanIn

type FanIn struct {
	Strategy string `json:"strategy,omitempty"`
	Into     string `json:"into,omitempty"`
}

FanIn aggregates fan-out results into a named target.

type FanOut

type FanOut struct {
	Collection string `json:"collection,omitempty"`
	Step       Step   `json:"step"`
}

FanOut applies the same step across a named artifact collection.

type Input

type Input struct {
	Artifacts   []artifact.ArtifactRef
	Collections map[string][]artifact.ArtifactRef
	Items       []Result
}

Input carries the runtime inputs used for pipeline execution.

type Result

type Result struct {
	Output     string
	Summary    string
	Artifacts  []artifact.ArtifactRef
	Structured any
	Preview    *tool.Preview
	Items      []Result
	Lineage    artifact.LineageGraph
}

Result captures the output of executing a pipeline step.

type Retry

type Retry struct {
	Attempts int  `json:"attempts,omitempty"`
	Step     Step `json:"step"`
}

Retry wraps a step with a bounded retry policy.

type Step

type Step struct {
	Name        string                 `json:"name,omitempty"`
	Tool        string                 `json:"tool,omitempty"`
	Skill       string                 `json:"skill,omitempty"`
	Input       []artifact.ArtifactRef `json:"input,omitempty"`
	With        map[string]any         `json:"with,omitempty"`
	Batch       *Batch                 `json:"batch,omitempty"`
	FanOut      *FanOut                `json:"fan_out,omitempty"`
	FanIn       *FanIn                 `json:"fan_in,omitempty"`
	Conditional *Conditional           `json:"conditional,omitempty"`
	Retry       *Retry                 `json:"retry,omitempty"`
	Checkpoint  *Checkpoint            `json:"checkpoint,omitempty"`
}

Step is the basic unit of multimodal pipeline declaration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL