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 ¶
CommandStreamCallbacks receives incremental command output.
type EditRequest ¶
EditRequest captures one edit operation.
type ExecutionEnvironment ¶
type ExecutionEnvironment interface {
PrepareSession(context.Context, SessionContext) (*PreparedSession, error)
RunCommand(context.Context, *PreparedSession, CommandRequest) (*CommandResult, error)
ReadFile(context.Context, *PreparedSession, string) ([]byte, error)
WriteFile(context.Context, *PreparedSession, string, []byte) error
EditFile(context.Context, *PreparedSession, EditRequest) error
Glob(context.Context, *PreparedSession, string) ([]string, error)
Grep(context.Context, *PreparedSession, GrepRequest) ([]GrepMatch, error)
CloseSession(context.Context, *PreparedSession) error
}
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 GrepRequest ¶
GrepRequest captures one text search request.
type PreparedSession ¶
type PreparedSession struct {
SessionID string
GuestCwd string
SandboxType string
Meta map[string]any
}
PreparedSession stores environment-specific execution state.
type SessionContext ¶
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.