eval

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package eval implements the `da eval` command tree: the operator surface over the R4 agent-evaluation harness. It mirrors the `da score` command-surface idioms (subcommands under a group, a --repo-dir root resolver, --json output) and is pure CLI wiring — every heavy stage lives behind the internal/eval seam packages (generator registry, sandbox, runner, verifier, scoring bridge, store).

  • `da eval gen` synthesises one TaskSpec from the knowledge graph.
  • `da eval run` drives one task end-to-end (gen → sandbox → run → verify → score → persist) and prints the R1-scored outcome.
  • `da eval ls` lists the persisted eval runs under the eval root.

The gen/run/ls RunE handlers are injected by the root command rather than defined here (see NewCmd). internal/globalflagcov statically traces each handler's global-flag reads by indexing a fixed set of command packages that does not include this subpackage, so a RunE closure defined here is opaque to it ("unresolved closure"). Wiring the handlers from package commands — where they read the global --json flag through a traceable commands.Flags access — keeps global-flag coverage analysable while the run logic stays here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(genRunE, runRunE, lsRunE handlerFunc) *cobra.Command

NewCmd builds the `da eval` command group. The gen/run/ls RunE handlers are supplied by the caller (root) so they compile in package commands and stay statically analysable by internal/globalflagcov; the exported RunGen/RunEval/ RunLs entry points below are what those handlers call.

func RunEval

func RunEval(cmd *cobra.Command, asJSON, dryRun bool) error

RunEval is the `da eval run` entry point the root wires as the subcommand's RunE. asJSON and dryRun are the resolved global --json and -n/--dry-run flags, passed by the root handler so the flag reads stay statically traceable in package commands. When dryRun is set the run resolves and previews the task but performs no live work (no agent, no sandbox, no persisted run dir).

func RunGen

func RunGen(cmd *cobra.Command, asJSON bool) error

RunGen is the `da eval gen` entry point the root wires as the subcommand's RunE. asJSON is the resolved global --json flag, passed by the root handler so the flag read stays statically traceable in package commands (mirroring RunEval/RunLs). It reads the gen flags off cmd and synthesises + writes a TaskSpec as JSON when asJSON is set, YAML otherwise.

func RunLs

func RunLs(cmd *cobra.Command, asJSON bool) error

RunLs is the `da eval ls` entry point the root wires as the subcommand's RunE. asJSON is the resolved global --json flag, passed by the root handler so the flag read stays statically traceable in package commands.

Types

This section is empty.

Jump to

Keyboard shortcuts

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