evalserver

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 15 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 evalserver is the evaluate server under test: the real shipped binary, built from source, spoken to over MCP stdio, never an in-process stand-in. Every eval suite that sends a call through the product uses this one client, so a call and what was observed about it — accepted or refused, the server's text, how many upstream requests it took — come back together.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(t testing.TB) string

Build builds ./cmd/evaluate into the test's temp dir and returns its path. The go build cache makes a second build in one run cheap.

Types

type Call

type Call struct {
	// Valid reports whether the server accepted the call; Output is its text
	// either way.
	Valid  bool
	Output string
	// Attempts is how many upstream requests an accepted call took. An
	// accepted call takes at least one, so 0 means the server did not say:
	// unknown, never "not retried".
	Attempts int
}

Call is what one evaluate call was observed to do.

type Server

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

Server is one running evaluate server. It is not safe for concurrent CallEvaluate: a lane makes one call at a time, and the attempts pairing depends on it.

func Start

func Start(ctx context.Context, binaryPath string) (*Server, error)

Start launches `binaryPath mcp` with call stats on (ADR-004 §2) and completes the MCP initialize handshake. The server inherits the environment, which is where its Jev route comes from.

func (*Server) CallEvaluate

func (s *Server) CallEvaluate(ctx context.Context, argsJSON string) (Call, error)

CallEvaluate forwards one evaluate call. A refusal — arguments that are not an object, a JSON-RPC error, an isError result — is an observation (Valid false plus the server's text). A call that never completed is an error: recording it as a rejection would charge the model's request_validity for a harness fault.

func (*Server) Close

func (s *Server) Close()

func (*Server) EvaluateTool

func (s *Server) EvaluateTool(ctx context.Context) (map[string]any, error)

EvaluateTool is the evaluate tool as the server lists it, in the chat-completions function shape. The schema is the served one: a harness never restates the product schema.

Jump to

Keyboard shortcuts

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