orchestrator

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentServiceFactory

type AgentServiceFactory func(address string) (agentapi.AgentService, error)

AgentServiceFactory creates an AgentService bound to a launched remote agent address.

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

Orchestrator implements agentapi.AgentService and proxies sessions to placement-specific backends.

func New

func (*Orchestrator) Abort

func (*Orchestrator) Close

func (o *Orchestrator) Close() error

func (*Orchestrator) Continue

func (*Orchestrator) FollowUp

func (*Orchestrator) PauseSession

func (o *Orchestrator) PauseSession(ctx context.Context, sessionID string) error

PauseSession pauses a session's sandbox. For agent-direct (lossy pause), the agent process is aborted first since EC2 stop kills all processes.

func (*Orchestrator) ResumeSession

func (*Orchestrator) ResumeSessionSandbox

func (o *Orchestrator) ResumeSessionSandbox(ctx context.Context, sessionID string) error

ResumeSessionSandbox resumes a paused session. For agent-direct (lossy), re-launches the agent process and reconnects the agent service.

func (*Orchestrator) SendMessage

func (*Orchestrator) Steer

func (*Orchestrator) SubscribeEvents

type OrchestratorConfig

type OrchestratorConfig struct {
	DirectControl    control.SandboxControl
	NodeControl      control.SandboxControl
	AgentLoopService agentapi.AgentService

	// SandboxHostAddrs are the configured --sandbox-host-addr values.
	// Used by resolveToolsSandboxHostAddr in Node mode (single host)
	// where CreateSandboxResponse.Address is a mountpoint, not an RPC addr.
	SandboxHostAddrs []string

	MaxSessions     int
	HealthInterval  time.Duration
	CreateTimeout   time.Duration
	ShutdownTimeout time.Duration
	Logger          *slog.Logger

	AgentBinary string
	AgentPort   int
	AgentArgs   []string
	AgentEnv    map[string]string

	AgentServiceFactory AgentServiceFactory
}

OrchestratorConfig configures orchestrator behavior.

type PlacementMode

type PlacementMode string

PlacementMode controls where and how a session runs.

const (
	PlacementAgentDirect  PlacementMode = "agent-direct"
	PlacementAgentSandbox PlacementMode = "agent-sandbox"
	PlacementToolsSandbox PlacementMode = "tools-sandbox"
)

Jump to

Keyboard shortcuts

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