Documentation
¶
Index ¶
- Constants
- type Attachment
- type BriefTool
- func (t *BriefTool) Call(ctx context.Context, input tool.CallInput, toolCtx tool.ToolUseContext) (tool.CallResult, error)
- func (t *BriefTool) CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult
- func (t *BriefTool) Definition() tool.Definition
- func (t *BriefTool) IsConcurrencySafe() bool
- func (t *BriefTool) IsReadOnly(input tool.CallInput) bool
- func (t *BriefTool) ValidateInput(ctx context.Context, input map[string]any) (map[string]any, error)
- type BriefToolConfig
- type Input
- type Output
- type Status
Constants ¶
View Source
const Description = `` /* 831-byte string literal not displayed */
View Source
const ToolNameBrief = "brief"
Tool name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// Path is the file path
Path string `json:"path"`
// Size is the file size in bytes
Size int64 `json:"size"`
// IsImage indicates if the file is an image
IsImage bool `json:"isImage"`
// FileUUID is the file identifier
FileUUID string `json:"file_uuid,omitempty"`
}
Attachment represents a resolved attachment
type BriefTool ¶
type BriefTool struct {
// contains filtered or unexported fields
}
BriefTool sends messages to the user
func NewBriefTool ¶
func NewBriefTool(config *BriefToolConfig) *BriefTool
NewBriefTool creates a new brief tool
func (*BriefTool) Call ¶
func (t *BriefTool) Call(ctx context.Context, input tool.CallInput, toolCtx tool.ToolUseContext) (tool.CallResult, error)
Call executes the tool
func (*BriefTool) CheckPermissions ¶
func (t *BriefTool) CheckPermissions(ctx context.Context, input map[string]any, toolCtx tool.ToolUseContext) types.PermissionResult
CheckPermissions checks permissions
func (*BriefTool) Definition ¶
func (t *BriefTool) Definition() tool.Definition
Definition returns the tool definition
func (*BriefTool) IsConcurrencySafe ¶
IsConcurrencySafe returns whether tool is concurrency safe
func (*BriefTool) IsReadOnly ¶
IsReadOnly returns whether tool is read-only
type BriefToolConfig ¶
type BriefToolConfig struct {
// WorkingDir is the working directory
WorkingDir string
}
Config for the tool
func DefaultBriefToolConfig ¶
func DefaultBriefToolConfig() *BriefToolConfig
DefaultConfig returns default configuration
type Input ¶
type Input struct {
// Message is the message for the user
Message string `json:"message"`
// Attachments is optional list of file paths to attach
Attachments []string `json:"attachments,omitempty"`
// Status indicates message urgency
Status Status `json:"status,omitempty"`
}
Input represents the tool input
type Output ¶
type Output struct {
// Message is the message
Message string `json:"message"`
// Attachments is resolved attachment metadata
Attachments []Attachment `json:"attachments,omitempty"`
// SentAt is the ISO timestamp when the message was sent
SentAt string `json:"sentAt"`
}
Output represents the tool output
Click to show internal directories.
Click to hide internal directories.