brief

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func (t *BriefTool) IsConcurrencySafe() bool

IsConcurrencySafe returns whether tool is concurrency safe

func (*BriefTool) IsReadOnly

func (t *BriefTool) IsReadOnly(input tool.CallInput) bool

IsReadOnly returns whether tool is read-only

func (*BriefTool) ValidateInput

func (t *BriefTool) ValidateInput(ctx context.Context, input map[string]any) (map[string]any, error)

ValidateInput validates tool input

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

type Status

type Status string

Status enum for message urgency

const (
	StatusNormal    Status = "normal"
	StatusProactive Status = "proactive"
)

Jump to

Keyboard shortcuts

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