harbor

package
v3.16.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultEvalDatasetPath = "evals/tasks"
	DefaultEvalJobsDir     = ".runme/evals/jobs"
)
View Source
const (
	ProtocolName    = "runme.harbor.stdio"
	ProtocolVersion = "v1"
)

Variables

View Source
var ErrRunmeHarborMissing = errors.New("runme-harbor missing")

Functions

func JobDirFromResultPath

func JobDirFromResultPath(resultPath, evalBaseDir string) string

JobDirFromResultPath returns the eval job directory containing Harbor's result file.

func PrintExceptionDetails

func PrintExceptionDetails(w io.Writer, jobDir string)

PrintExceptionDetails appends Harbor exception file details for an eval job.

Types

type CommandRunFunc

type CommandRunFunc func(name string, args []string, workingDir string, env []string, stdin io.Reader, stdout, stderr io.Writer) error

type DockerWorkdirStager

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

func (*DockerWorkdirStager) StageDataset

func (s *DockerWorkdirStager) StageDataset(datasetPath string) error

type DockerWorkdirStagerOptions

type DockerWorkdirStagerOptions struct {
	WorkspaceRoot string
	Stderr        io.Writer
}

type EvalOptions

type EvalOptions struct {
	Agent           string
	TaskDir         string
	JobsDir         string
	Ask             bool
	AgentKwargs     []string
	Model           string
	Env             string
	RunmeBin        string
	RunmeArgs       []string
	RunmeHarborBin  string
	Debug           bool
	JobsDirExplicit bool
	CommandRun      CommandRunFunc
	LookPath        func(string) (string, error)
	Executable      func() (string, error)
	Stdin           io.Reader
	Stdout          io.Writer
	Stderr          io.Writer
	ExtraEnv        []string
	Preflight       bool
}

type EvalRunner

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

func NewEvalRunner

func NewEvalRunner(opts EvalOptions) *EvalRunner

func (*EvalRunner) Run

func (r *EvalRunner) Run(args []string) error

type ExecResult

type ExecResult struct {
	Stdout   []byte
	Stderr   []byte
	ExitCode int
}

type Options

type Options struct {
	Logger     *zap.Logger
	TapFactory stream.TapFactory
}

type ResultPathWriter

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

func NewResultPathWriter

func NewResultPathWriter(dst io.Writer) *ResultPathWriter

NewResultPathWriter returns a writer that forwards Harbor output while capturing the result path.

func (*ResultPathWriter) ResultPath

func (w *ResultPathWriter) ResultPath() string

ResultPath finalizes any pending output line and returns the last result path seen.

func (*ResultPathWriter) StdoutFile

func (w *ResultPathWriter) StdoutFile() *os.File

StdoutFile returns the forwarded stdout file when Harbor output is connected to one.

func (*ResultPathWriter) Write

func (w *ResultPathWriter) Write(p []byte) (int, error)

type Server

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

func NewServer

func NewServer(opts Options) (*Server, error)

func (*Server) Execute

func (s *Server) Execute(ctx context.Context, command, cwd string, env []string) (ExecResult, error)

func (*Server) Handle

func (s *Server) Handle(ctx context.Context, req *harborv1.Request) *harborv1.Response

func (*Server) ServeStdio

func (s *Server) ServeStdio(ctx context.Context, stdin io.Reader, stdout io.Writer) error

Jump to

Keyboard shortcuts

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