tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDestructive added in v0.0.7

func IsDestructive(name string) bool

IsDestructive reports whether the named tool performs an approval-gated destructive action.

Types

type Factory

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

Factory owns application dependencies and creates actor-scoped Fantasy tools for a single run. FantasyRunner only receives the resulting factory function and remains independent from PocketBase.

func NewFactory

func NewFactory(app core.App) *Factory

func (*Factory) ForActor

func (f *Factory) ForActor(actorID string) []fantasy.AgentTool

func (*Factory) ForChat added in v0.0.8

func (f *Factory) ForChat(scope workagent.ToolScope) []fantasy.AgentTool

ForChat returns the normal actor tools plus the Chat-only tools: memory tools when the user's memory preference is enabled, and the tools their own MCP servers contribute. MCP deliberately continues to call ForActor, so neither is ever exposed through API keys.

Remote MCP tools stay out of ForActor for a specific reason: an API key's allow_destructive scope is enforced against a known list of built-in destructive tools, and no equivalent judgement can be made about a third-party tool. Exporting them would silently widen what a read-only key can do.

Jump to

Keyboard shortcuts

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