harbor

package
v3.17.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 42 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 BrowserOpenFunc added in v3.16.16

type BrowserOpenFunc func(url string) error

type CommandRunFunc

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

type CommandStartFunc added in v3.16.16

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

type DashboardReadyFunc added in v3.16.16

type DashboardReadyFunc func(urls []string) (string, 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 EvalCompareOptions added in v3.16.17

type EvalCompareOptions struct {
	JobsDir       string
	Job           string
	DatasetPath   string
	Base          string
	Format        string
	IncludeOracle bool
	AllowErrors   bool
	Stdout        io.Writer
	Stderr        io.Writer
	Git           compareGit
}

type EvalComparer added in v3.16.17

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

func NewEvalComparer added in v3.16.17

func NewEvalComparer(opts EvalCompareOptions) *EvalComparer

func (*EvalComparer) Run added in v3.16.17

func (c *EvalComparer) Run(args []string) error

type EvalOptions

type EvalOptions struct {
	Agent           string
	TaskDir         string
	JobsDir         string
	Ask             bool
	AgentKwargs     []string
	AgentEnv        []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 EvalPromoteOptions added in v3.16.17

type EvalPromoteOptions struct {
	JobsDir       string
	Job           string
	DatasetPath   string
	Latest        bool
	DryRun        bool
	EvidenceOnly  bool
	Artifacts     bool
	IncludeOracle bool
	AllowErrors   bool
	PromoteAnyway bool
	Message       string
	Stdout        io.Writer
	Stderr        io.Writer
	Git           promoteGit
}

type EvalPromoter added in v3.16.17

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

func NewEvalPromoter added in v3.16.17

func NewEvalPromoter(opts EvalPromoteOptions) *EvalPromoter

func (*EvalPromoter) Run added in v3.16.17

func (p *EvalPromoter) Run(args []string) error

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 EvalTaskNewOptions added in v3.17.2

type EvalTaskNewOptions struct {
	TasksDir    string
	Org         string
	Description string
	Authors     []string
	NoSolution  bool
	Force       bool
	GitConfig   GitConfigFunc
	Stdout      io.Writer
	Stderr      io.Writer
}

type EvalTaskNewer added in v3.17.2

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

func NewEvalTaskNewer added in v3.17.2

func NewEvalTaskNewer(opts EvalTaskNewOptions) *EvalTaskNewer

func (*EvalTaskNewer) Run added in v3.17.2

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

type EvalViewOptions added in v3.16.16

type EvalViewOptions struct {
	JobsDir        string
	Port           int
	Open           bool
	RunmeHarborBin string
	Debug          bool
	CommandStart   CommandStartFunc
	BrowserOpen    BrowserOpenFunc
	DashboardReady DashboardReadyFunc
	LookPath       func(string) (string, error)
	Stdin          io.Reader
	Stdout         io.Writer
	Stderr         io.Writer
	ExtraEnv       []string
}

type EvalViewer added in v3.16.16

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

func NewEvalViewer added in v3.16.16

func NewEvalViewer(opts EvalViewOptions) *EvalViewer

func (*EvalViewer) Run added in v3.16.16

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

type ExecResult

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

type GitConfigFunc added in v3.17.2

type GitConfigFunc func(key string) (string, error)

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

type StartedCommand added in v3.16.16

type StartedCommand interface {
	Wait() error
}

Jump to

Keyboard shortcuts

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