sandbox

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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 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