Help us shape the future of Go! Take the 2026 Go Developer Survey

driver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package driver runs a workflow type for one scenario against a prepared env and returns the artifact to judge. New workflow types plug in by registering a WorkflowDriver; thread_mode_initial is the first.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobExecution

type JobExecution struct{}

JobExecution drives a workspace Job against a seeded case and judges what the job produced: its run outcome (success/failure + summary), the case state after the run, the actions present, and the tool-call trajectory.

The job goes through the real JobRunner onto the same agent runtime serve and tick dispatch to, so a scenario exercises the production strategy (simple / planexec), its per-transition checkpointing and budget, source resolution and tool wiring — not a second implementation of them.

func NewJobExecution

func NewJobExecution() *JobExecution

NewJobExecution builds the driver.

func (*JobExecution) Kind

func (*JobExecution) Kind() string

Kind implements WorkflowDriver.

func (*JobExecution) Run

Run implements WorkflowDriver. The simulator is unused (jobs run unattended, without user questions).

type Registry

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

Registry maps workflow kinds to drivers.

func Default

func Default() *Registry

Default returns a registry with all built-in drivers registered.

func NewRegistry

func NewRegistry() *Registry

NewRegistry builds an empty registry.

func (*Registry) Kinds

func (r *Registry) Kinds() []string

Kinds returns the registered kinds (sorted for stable output).

func (*Registry) Lookup

func (r *Registry) Lookup(kind string) (WorkflowDriver, bool)

Lookup returns the driver for a kind.

func (*Registry) Register

func (r *Registry) Register(d WorkflowDriver)

Register adds a driver. Panics on duplicate kind (a programming error).

type ThreadInitial

type ThreadInitial struct{}

ThreadInitial drives the thread-mode initial sequence: a top-level post starts the initialization (create) agent. The agent investigates and may ask the user a question instead of creating a case immediately; when it does, the simulator answers and the answer is injected as a thread reply that resumes the create agent, looping up to the persona's MaxAnswerTurns until the agent commits a case. The produced case is the artifact.

func NewThreadInitial

func NewThreadInitial() *ThreadInitial

NewThreadInitial builds the driver.

func (*ThreadInitial) Kind

func (*ThreadInitial) Kind() string

Kind implements WorkflowDriver.

func (*ThreadInitial) Run

Run implements WorkflowDriver.

type WorkflowDriver

type WorkflowDriver interface {
	Kind() string
	Run(ctx context.Context, e *env.Env, sc *scenario.Scenario, sim evaltype.Simulator) (evaltype.Artifact, error)
}

WorkflowDriver runs one workflow type for a scenario against a prepared env and returns the produced artifact. It may call sim.Answer when the agent asks the user a question.

Jump to

Keyboard shortcuts

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