runtime

package
v0.4.25-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runtime provides code execution runtime implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAvailability

func CheckAvailability(ctx context.Context) error

CheckAvailability checks if the Node.js/tsx runtime is available.

Types

type NodeRuntime

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

NodeRuntime provides TypeScript/JavaScript execution via Node.js with tsx

func NewNodeRuntime

func NewNodeRuntime(workspaceDir string, socketPath string) *NodeRuntime

NewNodeRuntime creates a new Node.js runtime

func NewNodeRuntimeWithRPC

func NewNodeRuntimeWithRPC(workspaceDir, rpcTransport, socketPath, endpointURL, bearerToken string) *NodeRuntime

NewNodeRuntimeWithRPC creates a new Node.js runtime with explicit MCP RPC configuration.

func (*NodeRuntime) Execute

func (n *NodeRuntime) Execute(ctx context.Context, codePath string) (string, error)

Execute runs a TypeScript/JavaScript file using tsx. codePath can be absolute or relative to workspaceDir.

func (*NodeRuntime) Name

func (n *NodeRuntime) Name() string

Name returns the name of the runtime

func (*NodeRuntime) WorkspaceDir

func (n *NodeRuntime) WorkspaceDir() string

WorkspaceDir returns the runtime workspace directory.

Jump to

Keyboard shortcuts

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