tools

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWebAuthRequired = errors.New("Not authenticated. Run `ollama signin` and try again.")

Functions

This section is empty.

Types

type Bash

type Bash struct{}

func (*Bash) ApprovalScope added in v0.32.2

func (b *Bash) ApprovalScope(args map[string]any) string

ApprovalScope scopes shell approval to the exact, trimmed command string using a NUL separator: "<tool>\x00<command>". "Always allow this command" matches ONLY that precise string — any whitespace, quoting, or casing variant re-prompts. The NUL separator is safe because a shell command string cannot contain a literal NUL.

func (*Bash) Description

func (b *Bash) Description() string

func (*Bash) Execute

func (b *Bash) Execute(ctx context.Context, toolCtx agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*Bash) Name

func (b *Bash) Name() string

func (*Bash) RequiresApproval

func (b *Bash) RequiresApproval(map[string]any) bool

func (*Bash) Schema

func (b *Bash) Schema() api.ToolFunction

type Edit

type Edit struct{}

func (*Edit) Description

func (e *Edit) Description() string

func (*Edit) Execute

func (e *Edit) Execute(ctx context.Context, toolCtx agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*Edit) Name

func (e *Edit) Name() string

func (*Edit) RequiresApproval

func (e *Edit) RequiresApproval(map[string]any) bool

func (*Edit) Schema

func (e *Edit) Schema() api.ToolFunction

type Read

type Read struct{}

func (*Read) Description

func (r *Read) Description() string

func (*Read) Execute

func (r *Read) Execute(ctx context.Context, toolCtx agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*Read) Name

func (r *Read) Name() string

func (*Read) RequiresApproval

func (r *Read) RequiresApproval(map[string]any) bool

func (*Read) Schema

func (r *Read) Schema() api.ToolFunction

type Skill added in v0.32.2

type Skill struct{ Catalog *agent.SkillCatalog }

Skill is the model-facing adapter for the core agent skill catalog. It only supplies instructions; regular tools retain their own approval requirements for filesystem or network access.

func (*Skill) Description added in v0.32.2

func (t *Skill) Description() string

func (*Skill) Execute added in v0.32.2

func (t *Skill) Execute(_ context.Context, _ agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*Skill) Name added in v0.32.2

func (t *Skill) Name() string

func (*Skill) Schema added in v0.32.2

func (t *Skill) Schema() api.ToolFunction

type WebFetch

type WebFetch struct{}

func (*WebFetch) Description

func (w *WebFetch) Description() string

func (*WebFetch) Execute

func (w *WebFetch) Execute(ctx context.Context, _ agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*WebFetch) Name

func (w *WebFetch) Name() string

func (*WebFetch) RequiresApproval

func (w *WebFetch) RequiresApproval(map[string]any) bool

func (*WebFetch) Schema

func (w *WebFetch) Schema() api.ToolFunction

type WebSearch

type WebSearch struct{}

func (*WebSearch) Description

func (w *WebSearch) Description() string

func (*WebSearch) Execute

func (w *WebSearch) Execute(ctx context.Context, _ agent.ToolContext, args map[string]any) (agent.ToolResult, error)

func (*WebSearch) Name

func (w *WebSearch) Name() string

func (*WebSearch) RequiresApproval

func (w *WebSearch) RequiresApproval(map[string]any) bool

func (*WebSearch) Schema

func (w *WebSearch) Schema() api.ToolFunction

Jump to

Keyboard shortcuts

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