dynacu

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 13 Imported by: 1 module, 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 dynacu runs DynaCU-Bench against an OpenRealtime endpoint.

The benchmark stays where it belongs. The AOI repository owns the 150 task pages, the browser environment that serves them, the audio injected into them, and the evaluator that decides whether a task passed - and reimplementing any of that here would produce a benchmark that agreed with this project rather than with the published one. What OpenRealtime ships is a runner: it pins the environment to a revision, points it at a local endpoint, and turns what comes back into the same report shape every other suite produces.

Pointing it at OpenRealtime needs no bridge. The AOI harness carries a GA Realtime baseline that is already provider-agnostic - its websocket base, credential, and image support are constructor arguments, because OpenAI and xAI both speak that protocol - and OpenRealtime is a strict superset of it, so it is a third value for the same argument. Nothing in the benchmark is patched and nothing in it knows this project exists, which is what makes the result a test of the protocol claim rather than of our own adapter.

The suite is 150 tasks: 100 dynamic ones across ten categories that a screenshot-only agent cannot solve, and a static 50 that any agent should, which is the control that says whether perception cost anything on pages where there was nothing to perceive.

Index

Constants

View Source
const (
	DynamicTasks = 100
	StaticTasks  = 50
)

DynamicTasks and StaticTasks are the two halves, which answer different questions and are never averaged: the first is what a screenshot-only agent cannot do, and the second is whether perception cost anything where there was nothing to perceive.

View Source
const PinnedRevision = "3c9f452aca697ee61de87a4907f0937d6c486a99"

PinnedRevision is the AOI commit the suite is measured against.

It is pinned rather than tracked because a benchmark that moves underneath a result makes the result unreproducible without anybody noticing. Moving it is a deliberate change with its own comparison, not a `git pull`.

View Source
const TaskCount = 150

TaskCount is how many tasks the published suite declares: 100 dynamic and a static 50. A cell that runs fewer is incomplete, and the report says so rather than dividing by whatever ran.

View Source
const Upstream = "https://github.com/19PINE-AI/aoi.git"

Upstream is where the environment comes from.

Variables

View Source
var Categories = []string{
	"A_podcast", "B_meeting", "C_video", "D_carousel", "E_dashboard",
	"F_transient", "G_phone", "H_interview", "I_collab", "J_game", "S_static",
}

Categories are the ten dynamic domains plus the static control.

Functions

func Breakdown

func Breakdown(result bench.Result) map[string]CategorySummary

Breakdown summarises a cell by category, because the dynamic ten and the static control answer different questions and one number hides that.

func Report

func Report(config Config) (bench.Result, error)

Report turns the driver's per-task records into a cell.

It is exported because it is the half of a run that can be checked without a browser: whether an interrupted run is reported with what it completed, whether a retried task appears once, and whether a task the suite marked invalid is kept out of the pass rate.

func Run

func Run(ctx context.Context, config Config) (bench.Result, error)

Run executes the cell and reports what came back.

Types

type CategorySummary

type CategorySummary struct {
	Total     int     `json:"total"`
	Invalid   int     `json:"invalid"`
	Completed int     `json:"completed"`
	Passed    int     `json:"passed"`
	Rate      float64 `json:"rate"`
}

CategorySummary is one domain's reading.

Invalid is reported separately rather than folded into the rate: a task where every model call failed says something about the endpoint and nothing about the agent.

type Config

type Config struct {
	// AOIDir is the prepared AOI checkout. scripts/prepare-dynacu.sh creates
	// it at the pinned revision with its dependencies verified.
	AOIDir string
	// Endpoint is the OpenRealtime WebSocket base URL the agent connects to.
	Endpoint string
	// Model names the session the endpoint should open. It reaches the server
	// as the ordinary Realtime model parameter.
	Model string
	// Category restricts the run to one domain. A cell that uses it is never
	// complete.
	Category string
	// Difficulty restricts the run to easy, medium, or hard. Same consequence.
	Difficulty string
	// TaskIDs restricts the run to named tasks, for reproducing one row. Same
	// consequence.
	TaskIDs []string
	// Limit caps the task count, for a smoke run. Same consequence.
	Limit int
	// MaxSteps bounds one task's agent loop. It is part of the measurement:
	// an agent given three steps and one given thirty are being asked
	// different questions.
	MaxSteps int
	// StepInterval is how long the agent observes between actions. The suite's
	// own baseline uses two seconds, which is the interval the published
	// numbers were taken at.
	StepInterval time.Duration
	// WithoutImages withholds screenshots, leaving audio and the element list.
	// It isolates audio perception, which is the axis half these categories
	// are about.
	WithoutImages bool
	// WithoutPageElements withholds the interactive-element list, leaving the
	// screenshot alone. The suite's own baselines are given the list so a
	// failure reflects perception rather than selector guessing; withholding
	// it asks the harder question.
	WithoutPageElements bool
	// Resume continues a run that was interrupted rather than starting again.
	// A 150-task cell is hours, and losing all of it to one crash is how a
	// measurement program stops being run.
	Resume bool
	// Output is where per-task records are written. Empty selects a file under
	// the checkout's results directory.
	Output string
	// Timeout bounds the whole run. Zero selects six hours.
	Timeout time.Duration
	// Cell is the measured configuration this run belongs to.
	Cell bench.Cell
	// Python is the interpreter that has the AOI dependencies installed.
	Python string
	// TokenEnv names the environment variable holding the bearer token the
	// agent presents to the endpoint.
	TokenEnv string
	// Logf receives progress. A 150-task run is hours, and a runner that says
	// nothing until it finishes is indistinguishable from one that has hung.
	Logf func(format string, args ...any)
}

Config configures one cell.

func (Config) Restricted

func (config Config) Restricted() bool

Restricted reports whether this run covers less than the declared suite.

A restricted run is reported incomplete however well it scores, because it is not the suite: five tasks from one category answer a question the published number does not ask.

func (*Config) Verify

func (config *Config) Verify(ctx context.Context) error

Verify checks that the environment is the one the result will claim.

It runs before anything expensive and fails closed. Every check here is a way a run can produce numbers that look fine and mean nothing: a checkout at the wrong revision measures a different benchmark, a missing browser turns 150 tasks into 150 identical infrastructure errors, and a task registry that does not declare 150 tasks is not the suite the report will name.

Jump to

Keyboard shortcuts

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