shell

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package shell provides shell execution tools for omniagent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WorkingDir string
	Allowlist  []string
	Logger     *slog.Logger
}

Config configures the shell tool.

type Tool

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

Tool provides shell command execution capabilities.

func New

func New(config Config) (*Tool, error)

New creates a new shell tool.

func (*Tool) Description

func (t *Tool) Description() string

Description returns the tool description.

func (*Tool) Execute

func (t *Tool) Execute(ctx context.Context, args json.RawMessage) (string, error)

Execute runs the shell command.

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool name.

func (*Tool) Parameters

func (t *Tool) Parameters() map[string]interface{}

Parameters returns the JSON schema for tool parameters.

Jump to

Keyboard shortcuts

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