environment

package
v0.6.49 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvConsoleToken   = "PLRL_CONSOLE_TOKEN"
	EnvGitAccessToken = "GIT_ACCESS_TOKEN"
)
View Source
const (
	EnvOverrideSystemPrompt = "PLRL_AGENT_SYSTEM_PROMPT_OVERRIDE"
)

Variables

View Source
var Version = dev

Version of this binary

Functions

func ConfigureGitSafeDirectory added in v0.6.48

func ConfigureGitSafeDirectory(repoDirPath string) error

ConfigureGitSafeDirectory marks the repository as trusted for git when the directory is owned by a different user than the current process (for example when agent-bootstrap clones into a shared volume and the harness runs later).

func IsDev

func IsDev() bool

func New

func New(options ...Option) types.Environment

New creates a new Environment.

Types

type Config

type Config struct {
	BaseBranch string
	BaseCommit string
	HeadBranch string
	Dir        string
}

func Load

func Load() (*Config, error)

func (*Config) Save

func (c *Config) Save() error

type Option

type Option func(*environment)

Option allows modifying Environment behavior.

func WithAgentRun

func WithAgentRun(agentRun *v1.AgentRun) Option

WithAgentRun provides information about agent run used to initialize the Environment.

func WithConsoleTokenClient

func WithConsoleTokenClient(client console.Client) Option

func WithWorkingDir

func WithWorkingDir(dir string) Option

WithWorkingDir allows changing the default working directory of the Environment.

Jump to

Keyboard shortcuts

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