shell

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, root string, allowedWorkdirs []string, defaultWorkdir string, maxTimeout time.Duration) (*client.Client, error)

NewClient returns an initialized MCP client backed by the in-process shell server.

func NewServer

func NewServer(rootDir string, allowedWorkdirs []string, defaultWorkdir string, maxTimeout time.Duration) (*server.MCPServer, error)

NewServer constructs an in process MCP server exposing a single shell_run tool

Types

type ExecOutcome

type ExecOutcome struct {
	ExitCode int
	TimedOut bool
	Stdout   string
	Stderr   string
}

ExecOutcome captures the result of a shell execution.

type ShellRunResult

type ShellRunResult struct {
	ExitCode     int    `json:"exit_code"`
	DurationMS   int64  `json:"duration_ms"`
	Stdout       string `json:"stdout"`
	Stderr       string `json:"stderr"`
	TimedOut     bool   `json:"timed_out"`
	EffectiveDir string `json:"effective_dir"`
	Command      string `json:"command"`
}

Jump to

Keyboard shortcuts

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