shell

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExecuteTools

func GetExecuteTools() []tool.BaseTool

GetExecuteTools 获取命令执行工具

func GetTools

func GetTools() []tool.BaseTool

GetTools 获取全部 Shell 工具

Types

type ExecuteParams

type ExecuteParams struct {
	Command    string `json:"command" jsonschema:"description=要执行的shell命令,required"`
	WorkingDir string `json:"workingDir,omitempty" jsonschema:"description=命令执行的工作目录"`
	Timeout    int    `json:"timeout,omitempty" jsonschema:"description=超时时间(秒),默认为60秒"`
}

ExecuteParams 表示命令执行的参数

type ShellTool

type ShellTool struct{}

type ToolResult

type ToolResult struct {
	Output  string `json:"output"`  // 命令输出的结果
	IsError bool   `json:"isError"` // 是否发生错误
}

ToolResult 表示命令执行的可读结果

Jump to

Keyboard shortcuts

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