Documentation
¶
Overview ¶
Package clip provides agent tools for creating and reading shareable markdown clips.
Index ¶
Constants ¶
const ( // CreateToolName is the agent tool name for creating clips. CreateToolName = "create_clip" // GetToolName is the agent tool name for reading clips by slug. GetToolName = "get_clip" )
Variables ¶
This section is empty.
Functions ¶
func AbsoluteURL ¶
AbsoluteURL builds a full clip URL from an optional public base and a relative path or slug.
func ActiveToolNames ¶
func ActiveToolNames() []string
ActiveToolNames returns the default clip tool names.
Types ¶
type CreateTool ¶
type CreateTool struct {
// PublicBaseURL is the absolute site origin (e.g. https://flowbot.example.com).
// When empty, config.App.Flowbot.URL is used.
PublicBaseURL string
}
CreateTool creates a shareable markdown clip via the clip capability.
func (CreateTool) Description ¶
func (CreateTool) Description() string
Description explains the tool to the model.
func (CreateTool) Execute ¶
func (t CreateTool) Execute(ctx context.Context, id string, args map[string]any, _ tool.UpdateHandler) (msg.ToolResultMessage, error)
Execute creates a clip and returns the absolute public URL.
func (CreateTool) Parameters ¶
func (CreateTool) Parameters() map[string]any
Parameters returns the JSON schema for tool arguments.
type GetTool ¶
type GetTool struct{}
GetTool reads a shareable markdown clip by slug via the clip capability.
func (GetTool) Description ¶
Description explains the tool to the model.
func (GetTool) Execute ¶
func (GetTool) Execute(ctx context.Context, id string, args map[string]any, _ tool.UpdateHandler) (msg.ToolResultMessage, error)
Execute loads a clip and returns its metadata and markdown content.
func (GetTool) Parameters ¶
Parameters returns the JSON schema for tool arguments.