env

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandRequest

type CommandRequest struct {
	Command string
	Workdir string
	Timeout time.Duration
	Env     map[string]string
}

CommandRequest describes one shell execution request.

type CommandResult

type CommandResult struct {
	Stdout     string
	Stderr     string
	ExitCode   int
	Duration   time.Duration
	OutputFile string
}

CommandResult captures the command output and status.

type CommandStreamCallbacks

type CommandStreamCallbacks struct {
	OnStdout func(string)
	OnStderr func(string)
}

CommandStreamCallbacks receives incremental command output.

type EditRequest

type EditRequest struct {
	Path       string
	OldText    string
	NewText    string
	ReplaceAll bool
}

EditRequest captures one edit operation.

type ExecutionEnvironment

ExecutionEnvironment abstracts how commands and file operations are executed.

type GVisorOptions

type GVisorOptions struct {
	Enabled                    bool
	DefaultGuestCwd            string
	AutoCreateSessionWorkspace bool
	SessionWorkspaceBase       string
	HelperModeFlag             string
	Mounts                     []MountSpec
}

GVisorOptions configures the gVisor-backed sandbox mode.

type GovmOptions

type GovmOptions struct {
	Enabled                    bool
	DefaultGuestCwd            string
	AutoCreateSessionWorkspace bool
	SessionWorkspaceBase       string
	RuntimeHome                string
	Image                      string
	OfflineImage               string
	CPUs                       int
	MemoryMB                   int
	Mounts                     []MountSpec
}

GovmOptions configures the govm-backed sandbox mode.

type GrepMatch

type GrepMatch struct {
	Path    string
	Line    int
	Column  int
	Preview string
}

GrepMatch is one grep result in environment-native path space.

type GrepRequest

type GrepRequest struct {
	Pattern       string
	Path          string
	Literal       bool
	CaseSensitive bool
}

GrepRequest captures one text search request.

type MountSpec

type MountSpec struct {
	HostPath        string
	GuestPath       string
	ReadOnly        bool
	CreateIfMissing bool
}

MountSpec describes one host-to-guest filesystem exposure.

type PreparedSession

type PreparedSession struct {
	SessionID   string
	GuestCwd    string
	SandboxType string
	Meta        map[string]any
}

PreparedSession stores environment-specific execution state.

type SessionContext

type SessionContext struct {
	SessionID   string
	ProjectRoot string
}

SessionContext identifies one logical runtime session.

type StreamingExecutionEnvironment

type StreamingExecutionEnvironment interface {
	ExecutionEnvironment
	RunCommandStream(context.Context, *PreparedSession, CommandRequest, CommandStreamCallbacks) (*CommandResult, error)
}

StreamingExecutionEnvironment adds incremental command output support.

Jump to

Keyboard shortcuts

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