bash

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithAskHumanInput

func WithAskHumanInput(askHumanInput bool) Option

func WithPreExecCommands

func WithPreExecCommands(preExecCommands []string) Option

type Options

type Options struct {
	AskHumanInput   bool
	PreExecCommands []string
}

func NewDefaultOptions

func NewDefaultOptions() *Options

type Tool

type Tool struct {
	AskHumanInput   bool
	PreExecCommands []string // List of commands to execute before the main command
	// contains filtered or unexported fields
}

Tool implements the tool.Tool interface for executing shell commands.

func New

func New(opts ...Option) (*Tool, error)

New creates a new Tool instance with the provided options.

func (*Tool) Call

func (t *Tool) Call(_ context.Context, input string) (string, error)

Call executes the provided shell command and returns the output.

func (*Tool) Description

func (t *Tool) Description() string

Description returns a description of the tool, including input format and examples.

func (*Tool) Name

func (t *Tool) Name() string

Name returns the name of the tool.

func (*Tool) Schema

func (t *Tool) Schema() *tool.PropertiesSchema

Schema returns the JSON schema for the tool's input.

func (*Tool) Strict

func (t *Tool) Strict() bool

Strict indicates whether the tool enforces strict input validation.

Jump to

Keyboard shortcuts

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