process

package
v0.35.7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMModel added in v0.22.0

type LLMModel struct {
	ID   string
	Name string
}

LLMModel describes a model available to a sandbox.

type Manager

type Manager interface {
	Start(id, command string, args, env []string, opts StartOptions) (Process, error)
	// StartContainer creates/starts the container without exec-ing into it.
	// Used by the chat flow where the sidecar handles exec via the SDK.
	StartContainer(id string, opts StartOptions) error
	Get(id string) (Process, bool)
	Stop(id string) error
	Pause(id string) error
	Resume(id, sandboxName, command string, args []string) (Process, error)
	Close() error
}

Manager manages process lifecycles.

type Process

type Process interface {
	Read(buf []byte) (int, error)
	Write(data []byte) (int, error)
	Resize(rows, cols uint16) error
	Done() <-chan struct{}
}

Process represents a running process with PTY-like I/O.

type StartOptions

type StartOptions struct {
	Namespace            string        // K8s namespace to create sandbox in
	WorkspaceVolumes     []VolumeMount // workspace drive volume mounts
	OpencodeToken        string        // per-sandbox token for opencode server auth
	ProxyToken           string        // per-sandbox token for Anthropic API proxy auth
	SandboxType          string        // "opencode", "openclaw", or "nanoclaw"
	OpenclawToken        string        // openclaw only: gateway auth token
	CPU                  int           // CPU limit in millicores (e.g. 2000 = 2 cores)
	Memory               int64         // memory limit in bytes (e.g. 2147483648 = 2Gi)
	BYOKBaseURL          string        // BYOK: user's LLM provider base URL (non-empty enables BYOK)
	BYOKAPIKey           string        // BYOK: user's LLM provider API key
	BYOKModels           []LLMModel    // BYOK: user's custom model list
	CustomModels         []LLMModel    // modelserver models (for OpenClaw, independent of BYOK)
	NanoclawBridgeSecret string        // nanoclaw only: shared secret for bridge HTTP auth
	SandboxID            string        // sandbox ID (used for nanoclaw bridge URL construction)
	WorkspaceID          string        // workspace ID (used for claudecode MCP bridge config)
	AssistantName        string        // nanoclaw only: configurable assistant name (default "Andy")
}

StartOptions holds optional parameters for starting a process.

type VolumeMount added in v0.9.0

type VolumeMount struct {
	PVCName   string // PVC name (K8s) or Docker volume name
	MountPath string // container mount path
}

VolumeMount describes a PVC or Docker volume to mount into a sandbox.

Jump to

Keyboard shortcuts

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