sandbox

package
v0.1.52 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSandboxURL added in v0.1.49

func GetSandboxURL(ctx context.Context, workspace, sandboxName string) (string, error)

GetSandboxURL fetches the sandbox metadata from the control plane and returns its direct URL

Types

type CompletionItem

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

Completion item for the list

func (CompletionItem) Description

func (i CompletionItem) Description() string

func (CompletionItem) FilterValue

func (i CompletionItem) FilterValue() string

func (CompletionItem) Title

func (i CompletionItem) Title() string

type Directory

type Directory struct {
	Path           string          `json:"path"`
	Name           string          `json:"name"`
	Files          []*File         `json:"files"`
	Subdirectories []*Subdirectory `json:"subdirectories"`
}

type File

type File struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
}

File and Directory structures for MCP responses

type ProcessResponse

type ProcessResponse struct {
	PID string `json:"pid"`
}

Process structures for MCP responses

type ProcessResponseWithLogs

type ProcessResponseWithLogs struct {
	ProcessResponse
	Logs string `json:"logs"`
}

type SandboxClient

type SandboxClient struct {
	MCPClient   *mcp.MCPClient
	Workspace   string
	SandboxName string
}

func NewSandboxClient added in v0.1.49

func NewSandboxClient(workspace, sandboxName string) (*SandboxClient, error)

NewSandboxClient creates a new sandbox client, fetching the URL from the control plane

func NewSandboxClientWithURL

func NewSandboxClientWithURL(workspace, sandboxName, serverURL string, authHeaders map[string]string) (*SandboxClient, error)

func (*SandboxClient) Close

func (c *SandboxClient) Close() error

func (*SandboxClient) ExecuteCommand

func (c *SandboxClient) ExecuteCommand(ctx context.Context, command, name, workingDir string) (*ProcessResponseWithLogs, error)

func (*SandboxClient) ListDirectory

func (c *SandboxClient) ListDirectory(ctx context.Context, path string) (*Directory, error)

type SandboxShell

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

Model

func NewSandboxShell added in v0.1.49

func NewSandboxShell(ctx context.Context, workspace, sandboxName string) (*SandboxShell, error)

func NewSandboxShellWithURL

func NewSandboxShellWithURL(ctx context.Context, workspace, sandboxName, url string, authHeaders map[string]string) (*SandboxShell, error)

func (*SandboxShell) Init

func (m *SandboxShell) Init() tea.Cmd

func (*SandboxShell) Update

func (m *SandboxShell) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*SandboxShell) View

func (m *SandboxShell) View() string

type Subdirectory

type Subdirectory struct {
	Path string `json:"path"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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