executor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Execute(ctx context.Context, entrypoint *manifest.Entrypoint, bundlePath string) error
}

Executor defines the interface for executing MCP servers

type HTTPExecutor

type HTTPExecutor struct{}

HTTPExecutor executes MCP servers using HTTP transport. Note: HTTP transport support is a future enhancement beyond v1.0. Currently, only STDIO transport is supported.

func NewHTTPExecutor

func NewHTTPExecutor() *HTTPExecutor

NewHTTPExecutor creates a new HTTP executor. Note: This is a placeholder for future HTTP transport support.

func (*HTTPExecutor) Execute

func (e *HTTPExecutor) Execute(ctx context.Context, entrypoint *manifest.Entrypoint, bundlePath string) error

Execute starts the MCP server process with HTTP transport. Note: HTTP executor implementation is deferred to a future version. Current implementation returns not-implemented error.

func (*HTTPExecutor) Stop

func (e *HTTPExecutor) Stop() error

Stop terminates the MCP server process. Note: Placeholder for future HTTP transport support.

type STDIOExecutor

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

STDIOExecutor executes MCP servers using STDIO transport

func NewSTDIOExecutor

func NewSTDIOExecutor(workDir string, limits *policy.ExecutionLimits, perms *manifest.PermissionsInfo, env map[string]string) (*STDIOExecutor, error)

NewSTDIOExecutor creates a new STDIO executor CRITICAL SECURITY: Validates that execution limits are properly set Returns error if limits are nil or incomplete (execution without limits is forbidden) perms may be nil if no manifest permissions are available.

func (*STDIOExecutor) Execute

func (e *STDIOExecutor) Execute(ctx context.Context, entrypoint *manifest.Entrypoint, bundlePath string) error

Execute starts the MCP server process via STDIO and waits for completion

func (*STDIOExecutor) SetLogger

func (e *STDIOExecutor) SetLogger(logger *slog.Logger)

SetLogger sets the logger

func (*STDIOExecutor) SetNoSandbox

func (e *STDIOExecutor) SetNoSandbox(noSandbox bool)

SetNoSandbox disables sandbox restrictions

func (*STDIOExecutor) SetStderr added in v0.2.0

func (e *STDIOExecutor) SetStderr(w io.Writer)

SetStderr sets the writer for subprocess stderr output. Use io.Discard to silence subprocess output in non-verbose mode.

Jump to

Keyboard shortcuts

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