workflowsmoke

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(ctx context.Context, run Runner) error

Verify exercises the public agent-workflow relation through one installed CLI carrier. Command owners provide exact expectations; adapters own only process execution.

func VerifyProcess

func VerifyProcess(ctx context.Context, carrier ProcessCarrier) error

VerifyProcess applies Verify to one installed process carrier.

Types

type Invocation

type Invocation struct {
	Args       []string
	Input      []byte
	StdinClass StdinClass
}

Invocation is one immutable installed-carrier request.

type ProcessCarrier

type ProcessCarrier struct {
	Directory   string
	Executable  string
	Prefix      []string
	Environment []string
}

ProcessCarrier identifies one installed executable and any fixed argv prefix.

type ProcessOutputLimits added in v0.7.0

type ProcessOutputLimits struct {
	MaximumStdoutBytes int
	MaximumStderrBytes int
}

ProcessOutputLimits bounds the memory retained from one process invocation. Both values must be positive and no greater than the package hard limit.

type Result

type Result struct {
	ExitCode int
	Stdout   []byte
	Stderr   []byte
}

Result is the observable process contract for one installed CLI invocation.

func RunProcess

func RunProcess(ctx context.Context, carrier ProcessCarrier, invocation Invocation) (Result, error)

RunProcess executes one bounded carrier invocation and terminates its whole process group before returning on every post-start path.

func RunProcessWithOutputLimits added in v0.7.0

func RunProcessWithOutputLimits(ctx context.Context, carrier ProcessCarrier, invocation Invocation, limits ProcessOutputLimits) (Result, error)

RunProcessWithOutputLimits executes one invocation with caller-selected, package-bounded stdout and stderr limits.

type Runner

type Runner func(context.Context, Invocation) (Result, error)

Runner invokes one installed carrier under the supplied lifecycle context.

type StdinClass

type StdinClass uint8

StdinClass declares whether an invocation owns stdin bytes or must not read stdin at all.

const (
	StdinBytes StdinClass = iota
	StdinMustRemainUnread
)

Jump to

Keyboard shortcuts

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