workbench

package
v0.10.260 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package workbench prepares isolated repository workspaces for reviews.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRepositoryIdentity = errors.New("workbench: invalid repository identity")

ErrInvalidRepositoryIdentity marks repository coordinates that cannot form a safe remote.

View Source
var ErrUnsafeFetchRef = errors.New("workbench: unsafe fetch ref")

ErrUnsafeFetchRef marks a provider ref that cannot be passed to Git safely.

Functions

func Prepare

func Prepare(ctx context.Context, deps Deps, req Request) error

Prepare creates a clean checkout pinned to the requested review commits.

func PrepareReviewerRequest

func PrepareReviewerRequest(ctx context.Context, deps Deps, adapter llm.Adapter, artifacts runartifact.Paths, headSHA string, agentID string, allowedFiles []string, model, effort, prompt, logPath string) (llm.Request, func() error, error)

PrepareReviewerRequest creates a disposable reviewer workspace and LLM request.

Types

type Deps

type Deps struct {
	GitCommand func(context.Context, string, ...string) ([]byte, error)
}

Deps contains the injected repository operations used to prepare workspaces.

type Request

type Request struct {
	PRRef        gitprovider.PRRef
	ReviewPR     gitprovider.PR
	ChangedFiles []string
	Artifacts    runartifact.Paths
}

Request identifies the review checkout and artifact paths to prepare.

type RunPreparer added in v0.10.255

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

RunPreparer creates and validates durable review workbenches.

func NewRunPreparer added in v0.10.255

func NewRunPreparer(gitCommand func(context.Context, string, ...string) ([]byte, error)) *RunPreparer

NewRunPreparer constructs a durable workbench preparer.

func (*RunPreparer) Prepare added in v0.10.255

func (p *RunPreparer) Prepare(ctx context.Context, req Request) error

Prepare creates or reuses a clean checkout pinned to the requested commits.

Jump to

Keyboard shortcuts

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