usertool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package usertool registers user-defined shell-alias tools loaded from [[user_tools]] entries in ~/.bee/config.toml. Each entry maps a tool name to a fixed bash command; optional `args` from the model are parsed POSIX-style and passed as positional parameters ($1, $@) so model input cannot inject shell metacharacters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name, command, description string) (tools.Tool, error)

New builds a usertool from a name + command template + description.

Types

type Tool

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

Tool wraps a fixed bash command as a tool the model can invoke.

func (*Tool) Run

func (t *Tool) Run(ctx context.Context, input map[string]any) (tools.Result, error)

func (*Tool) Spec

func (t *Tool) Spec() llm.ToolSpec

Jump to

Keyboard shortcuts

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