pipeline

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pipeline provides a sequential stage-based execution pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildContext

type BuildContext struct {
	Opts           PipelineOptions
	Config         *types.ForgeConfig
	Spec           *agentspec.AgentSpec
	GeneratedFiles map[string]string // relPath -> absPath
	Warnings       []string
	Verbose        bool
	PluginConfig   *plugins.AgentConfig // Set by FrameworkAdapterStage
	WrapperFile    string               // Relative path to generated wrapper (empty = no wrapper)

	// Container packaging extensions
	DevMode            bool
	ProdMode           bool
	EgressResolved     any // *egress.EgressConfig (avoid import cycle)
	SkillRequirements  any // *skills.AggregatedRequirements (avoid import cycle)
	SkillEntries       any // []contract.SkillEntry (avoid import cycle)
	SecurityAudit      any // *analyzer.AuditReport (avoid import cycle)
	SkillsCount        int
	ToolCategoryCounts map[string]int

	// Bin resolution for smart Dockerfile generation
	BinManifest  any // *packaging.BinManifest (avoid import cycle)
	PreferAlpine bool
	PreferSlim   bool

	// ForgeCLIVersion is the version of the forge CLI binary (e.g. "v0.9.0").
	// Used to pull the correct release when framework is "forge".
	ForgeCLIVersion string

	// LocalBins maps binary name → host file path (from --local-bin flags).
	LocalBins map[string]string
}

BuildContext carries all state through the build pipeline.

func NewBuildContext

func NewBuildContext(opts PipelineOptions) *BuildContext

NewBuildContext creates a BuildContext with the given options and initialized maps.

func (*BuildContext) AddFile

func (bc *BuildContext) AddFile(relPath, absPath string)

AddFile records a generated file in the build context.

func (*BuildContext) AddWarning

func (bc *BuildContext) AddWarning(msg string)

AddWarning appends a warning message to the build context.

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

Pipeline executes a sequence of stages in order.

func New

func New(stages ...Stage) *Pipeline

New creates a Pipeline from the given stages.

func (*Pipeline) Run

func (p *Pipeline) Run(ctx context.Context, bc *BuildContext) error

Run executes each stage sequentially. It stops on the first error.

type PipelineOptions

type PipelineOptions struct {
	WorkDir        string
	OutputDir      string
	ConfigPath     string
	Env            map[string]string
	SigningKeyPath string // Ed25519 private key for signing build output
}

PipelineOptions carries shared configuration for all pipeline stages.

type Stage

type Stage interface {
	Name() string
	Execute(ctx context.Context, bc *BuildContext) error
}

Stage is a single unit of work in a build pipeline.

Jump to

Keyboard shortcuts

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