runtime

package
v0.3.29-beta Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 4 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 Node.js/npx 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 (*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