Versions in this module Expand all Collapse all v0 v0.6.0 Sep 15, 2026 Changes in this version + func ExecSelf(ctx context.Context, binary string, args []string) int + func PrintFlowInfo(ctx context.Context, out io.Writer, req Request, reg *flow.MapRegistry) int + func ResolveRequires(ctx context.Context, reqs []flow.Requirement, stdout, stderr *os.File) (string, error) + func RunAssertions(result any, assertions []string, metrics *RunnerObserver) int + func RunWithRegistry(ctx context.Context, req Request, reg *flow.MapRegistry, ...) int + type ApprovalMode string + const ApprovalAll + const ApprovalDanger + const ApprovalNone + type Checkpoint struct + Flow string + FlowHash string + Layer int + RunID string + SavedAt time.Time + SpentMicros int64 + State map[string]any + type CheckpointStore interface + Delete func(ctx context.Context, runID string) error + Load func(ctx context.Context, runID string) (Checkpoint, bool, error) + Save func(ctx context.Context, cp Checkpoint) error + type Default struct + Observer *RunnerObserver + func (d Default) RunFlow(ctx context.Context, path string, payload map[string]any, args []string, ...) int + func (d Default) RunWithRegistry(ctx context.Context, req Request, reg *flow.MapRegistry, obs *RunnerObserver) int + type FieldDoc struct + Key string + Name string + Required bool + Type string + Validation string + type FileCheckpointStore struct + func NewFileCheckpointStore(baseDir string) (*FileCheckpointStore, error) + func (s *FileCheckpointStore) Delete(ctx context.Context, runID string) error + func (s *FileCheckpointStore) Load(ctx context.Context, runID string) (Checkpoint, bool, error) + func (s *FileCheckpointStore) Save(ctx context.Context, cp Checkpoint) error + type FlowStep struct + Name string + Prompt string + type MemoryCheckpointStore struct + func NewMemoryCheckpointStore() *MemoryCheckpointStore + func (s *MemoryCheckpointStore) Delete(ctx context.Context, runID string) error + func (s *MemoryCheckpointStore) Load(ctx context.Context, runID string) (Checkpoint, bool, error) + func (s *MemoryCheckpointStore) Save(ctx context.Context, cp Checkpoint) error + type MetricRecord struct + Action string + CompTokens int + CostKnown bool + CostMicros int64 + Currency cost.Currency + Duration time.Duration + ExecutionID string + PromptSnippet string + PromptTokens int + Success bool + type ObserverHooks struct + KnownModel func(model string) bool + PromptFromRequest func(req any) string + ResultSummary func(res any) string + TokensAndCost func(res any) (int, int, int64, cost.Currency, bool) + type Request struct + ApprovalMode ApprovalMode + Args []string + Assertions []string + BenchNode string + BenchRuns int + CacheDir string + Info bool + Metrics bool + OutDir string + OutFormat string + Path string + Payload map[string]any + Resume string + Stderr io.Writer + Stdout io.Writer + Store CheckpointStore + Verbosity int + type RunnerObserver struct + func NewRunnerObserver(out io.Writer, verbosity int) *RunnerObserver + func NewRunnerObserverWithHooks(out io.Writer, verbosity int, hooks ObserverHooks) *RunnerObserver + func (o *RunnerObserver) AddSpend(micros int64) + func (o *RunnerObserver) Emit(_ context.Context, ev observe.Event) + func (o *RunnerObserver) Hook() action.AnyHook + func (o *RunnerObserver) Out() io.Writer + func (o *RunnerObserver) PrintSummary(out io.Writer) + func (o *RunnerObserver) ProviderTrace(kind, provider, model string, in, out int, costMicro int64, dur time.Duration, ...) + func (o *RunnerObserver) SetVerbosity(n int) + func (o *RunnerObserver) TotalSpentMicros() int64 + func (o *RunnerObserver) TotalTokens() int + func (o *RunnerObserver) Verbosity() int + type TerminalApprovalGate struct + func NewApprovalGate(mode ApprovalMode) *TerminalApprovalGate + func (g *TerminalApprovalGate) Check(ctx context.Context, actionName, argsJSON, token string) error