sandbox

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

internal/cmd/sandbox/command.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(gf *flags.Global) *cobra.Command

NewCommand returns the top-level "sandbox" cobra command.

Types

type DataLane added in v0.6.0

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

DataLane manages the persistent reverse WebSocket to sandbox-proxy. It dispatches control messages to a SessionManager.

func (*DataLane) Run added in v0.6.0

func (dl *DataLane) Run(ctx context.Context)

Run connects to the data lane and dispatches messages until ctx is cancelled or a delete_sandbox message is received. Reconnects with exponential backoff.

func (*DataLane) Send added in v0.6.0

func (dl *DataLane) Send(msg dataLaneMsg)

Send queues a message to be written to the active data lane connection. Drops silently if the buffer is full or no connection is active.

type SessionManager added in v0.6.0

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

SessionManager creates and tracks one agentfleet Runner per active sandbox session.

func (*SessionManager) Remove added in v0.6.0

func (sm *SessionManager) Remove(sessionID string)

Remove stops the session's PTY and removes it from the fleet so it disappears from the TUI immediately. Used for delete_session messages.

func (*SessionManager) Start added in v0.6.0

func (sm *SessionManager) Start(ctx context.Context, sessionID, token, name, initCommand string, env map[string]string)

Start handles a new_session event: launches PTY and connects session lane. initCommand and env come from the data lane new_session message.

func (*SessionManager) Stop added in v0.6.0

func (sm *SessionManager) Stop(sessionID string)

Stop sends SIGTERM to the session's PTY process.

func (*SessionManager) StopAll added in v0.6.0

func (sm *SessionManager) StopAll()

StopAll stops every active session.

Jump to

Keyboard shortcuts

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