application

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package application is the single use-case boundary shared by the CLI and importable library adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecutionReport

func ExecutionReport(fixtureDir, executionID string) (*lifecycle.ExecutionReport, error)

ExecutionReport regenerates validated evidence for one mock execution.

func Export

func Export(o ExportOptions) error

Export validates caller input and copies the current recording.

Types

type ExecutionStart

type ExecutionStart struct {
	FixtureID       string
	ExecutionID     string
	ConnectionID    string
	Material        corpus.Material
	ExecutionSHA256 string
	ExecutionPath   string

	Workspace    string
	ProtocolCwd  string
	Home         string
	Config       string
	Tmp          string
	HistoryFiles map[string]string
	Env          map[string]string
	NativeArgs   []string
	Transport    lifecycle.MockTransport
}

ExecutionStart is the immutable public projection of one claimed execution overlay.

type ExportOptions

type ExportOptions struct {
	FixtureDir string
	Output     string
}

type Fixture

type Fixture = lifecycle.Fixture

func Prepare

func Prepare(o PrepareOptions) (*Fixture, error)

Prepare validates caller input and creates one prepared fixture.

type MockOptions

type MockOptions struct {
	FixtureDir  string
	Connection  string
	ExecutionID string
	Timeout     time.Duration
	ResultFD    int
	ProgressFD  int
	NativeArgs  []string
}

type MockResult

type MockResult = mock.Result

func Mock

func Mock(ctx context.Context, o MockOptions, streams Streams) (*MockResult, error)

Mock validates caller input and owns one mock action.

type MockRun

type MockRun struct {
	Start ExecutionStart
	// contains filtered or unexported fields
}

MockRun is an in-process mock connection handle.

func StartMock

func StartMock(ctx context.Context, o MockOptions, streams StartMockStreams) (*MockRun, error)

StartMock validates, claims, writes running evidence and exposes the overlay before releasing replay.

func (*MockRun) Abort

func (r *MockRun) Abort() error

Abort requests cancellation and closes fixture-side streams. It is idempotent; Wait remains the only final-report path.

func (*MockRun) Done

func (r *MockRun) Done() <-chan struct{}

Done closes after replay, protocol receipt and lifecycle finalization for this connection have ended.

func (*MockRun) FullConsumption

func (r *MockRun) FullConsumption() <-chan struct{}

FullConsumption reports the one-shot safe point for SDK input half-close.

func (*MockRun) Wait

func (r *MockRun) Wait(ctx context.Context) (*lifecycle.MockResult, error)

Wait is the authoritative repeatable terminal-result path.

type OpenResult

type OpenResult struct {
	Fixture    *Fixture
	Current    *corpus.Material
	FixtureDir string
}

func Open

func Open(fixtureDir string) (*OpenResult, error)

Open reads the prepared fixture and its optional current recording.

type PrepareOptions

type PrepareOptions struct {
	FixtureDir       string
	Agent            string
	Case             string
	Plan             string
	Recording        string
	Model            string
	InitialModel     string
	HistorySeed      string
	ProtocolBytes    int64
	StderrBytes      int64
	MaxFrames        int64
	MaxFrameBytes    int64
	EmbeddedTool     bool
	EmbeddedIdentity *version.EmbeddedIdentity
}

type RecordOptions

type RecordOptions struct {
	FixtureDir     string
	Connection     string
	URL            string
	TokenFile      string
	Command        string
	NativeArgs     []string
	Timeout        time.Duration
	ConnectTimeout time.Duration
	ResultFD       int
}

type RecordResult

type RecordResult = lifecycle.RecordResult

func Record

func Record(ctx context.Context, o RecordOptions, streams Streams) (*RecordResult, error)

Record validates caller input and owns one record action.

type StartMockStreams

type StartMockStreams struct {
	Reader io.ReadCloser
	Writer io.WriteCloser
	Stderr io.Writer
}

StartMockStreams are the fixture-side closeable streams transferred to a StartMockAgent run.

type Streams

type Streams struct {
	In  *os.File
	Out *os.File
	Err *os.File
}

Streams are caller-owned process streams used by protocol actions.

Jump to

Keyboard shortcuts

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