Documentation
¶
Index ¶
- func ToolDefs() string
- type Executor
- func (e *Executor) Dispatch(name string, params map[string]string) Result
- func (e *Executor) DownloadFile(rawURL, destPath string) Result
- func (e *Executor) ListFiles(subPath string) Result
- func (e *Executor) PatchFile(path, oldStr, newStr string) Result
- func (e *Executor) ReadFile(path string) Result
- func (e *Executor) RunCommand(command string) Result
- func (e *Executor) WriteFile(path, content string) Result
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Executor ¶
type Executor struct {
WorkDir string
}
Executor выполняет инструменты с привязкой к рабочей директории
func (*Executor) DownloadFile ¶
DownloadFile скачивает файл по URL и сохраняет в рабочую директорию
func (*Executor) RunCommand ¶
RunCommand выполняет shell-команду в рабочей директории Использует безопасный парсинг аргументов вместо sh -c где возможно
type Result ¶
type Result struct {
Output string
Error string
OK bool
// Extra — дополнительные данные для специальных инструментов (например ask_user)
Extra map[string]any
}
Result — результат выполнения инструмента
Click to show internal directories.
Click to hide internal directories.