Help us shape the future of Go! Take the 2026 Go Developer Survey

shell

package
v0.12.13 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassifyEffect added in v0.6.2

func ClassifyEffect(args map[string]any) tool.Effect

func Command added in v0.9.4

func Command(ctx context.Context, command, workingDir string) *exec.Cmd

Command builds an *exec.Cmd that runs a script with the same interpreter the shell tool uses on this platform.

func ExecTools added in v0.10.0

func ExecTools(manager *ExecManager, workDir string, elicit *tool.Elicitation, appr *Approvals) []tool.Tool

func IsDangerousCommand added in v0.6.2

func IsDangerousCommand(command string) bool

func IsReadOnlyCommand added in v0.6.2

func IsReadOnlyCommand(command string) bool

func Tools

func Tools(workDir string, elicit *tool.Elicitation, appr *Approvals) []tool.Tool

Types

type Approvals added in v0.10.0

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

func NewApprovals added in v0.10.0

func NewApprovals() *Approvals

type ExecExit added in v0.11.4

type ExecExit struct {
	SessionID   int
	Command     string
	Description string
	Output      string
	Notice      string
	Failed      bool
	Elapsed     time.Duration
}

ExecExit reports the exit of a backgrounded exec_command session that no tool call was waiting on, so the host can deliver it as a notification instead of leaving the model to poll.

type ExecManager added in v0.10.0

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

func NewExecManager added in v0.10.0

func NewExecManager(onExit func(ExecExit)) *ExecManager

func (*ExecManager) Close added in v0.10.0

func (m *ExecManager) Close()

Jump to

Keyboard shortcuts

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