environment

package
v0.6.71 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvConsoleToken   = "PLRL_CONSOLE_TOKEN"
	EnvGitAccessToken = "GIT_ACCESS_TOKEN"
	EnvGitUsername    = "GIT_USERNAME"
	EnvGitAskpass     = "GIT_ASKPASS"
	EnvNoProxy        = "NO_PROXY"
)
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 ConfigurePrebakeGitSafeDirectories added in v0.6.64

func ConfigurePrebakeGitSafeDirectories() error

ConfigurePrebakeGitSafeDirectories marks every repository in the prebake manifest as a git safe.directory so the harness can inspect them.

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 WithFastPrebakeCopy added in v0.6.67

func WithFastPrebakeCopy() Option

WithFastPrebakeCopy enables the fcp-assisted cross-filesystem fallback used by agent-bootstrap. Other environment consumers retain polly/fs behavior.

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