builtin

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Overview

Package builtin provides Alchemy blockchain API handler implementation

Package builtin provides blockchain monitoring handler implementation

Package builtin provides IPFS skill implementation using Kubo RPC client.

Package builtin provides crypto utility functions using modern Go crypto libraries

Package builtin provides wallet security monitoring handler implementation

Index

Constants

This section is empty.

Variables

View Source
var AlchemyNetworks = map[string]struct {
	Name    string
	ChainID int64
}{
	"eth-mainnet":      {"Ethereum Mainnet", 1},
	"eth-sepolia":      {"Ethereum Sepolia Testnet", 11155111},
	"polygon-mainnet":  {"Polygon Mainnet", 137},
	"polygon-amoy":     {"Polygon Amoy Testnet", 80002},
	"arbitrum-mainnet": {"Arbitrum One", 42161},
	"arbitrum-sepolia": {"Arbitrum Sepolia", 421614},
	"optimism-mainnet": {"Optimism Mainnet", 10},
	"optimism-sepolia": {"Optimism Sepolia", 11155420},
	"base-mainnet":     {"Base Mainnet", 8453},
	"base-sepolia":     {"Base Sepolia", 84532},
}

Supported Alchemy networks with chain IDs

Functions

func BuildAlchemyURL

func BuildAlchemyURL(network, apiKey string) string

BuildAlchemyURL constructs the Alchemy API URL

func EtherToWei

func EtherToWei(etherStr string) (*big.Int, error)

EtherToWei converts Ether string to Wei (*big.Int) Uses params.Ether from go-ethereum for accurate conversion

func GetChainID

func GetChainID(network string) (int64, error)

GetChainID returns the chain ID for a given network

func GweiToWei

func GweiToWei(gwei int64) *big.Int

GweiToWei converts Gwei to Wei (useful for gas prices)

func IsValidEthereumAddress

func IsValidEthereumAddress(addr string) bool

IsValidEthereumAddress validates an Ethereum address using go-ethereum This uses the official implementation with proper checksum validation

func NormalizeAddress

func NormalizeAddress(addr string) (string, error)

NormalizeAddress returns a checksummed Ethereum address using EIP-55 This is the proper way to handle Ethereum addresses

func ParseAddress

func ParseAddress(addr string) (common.Address, error)

ParseAddress parses a string into a common.Address (go-ethereum type)

func RegisterAll

func RegisterAll(registry *tools.Registry, workspace string, configLoader ConfigLoader, tracker *checkpoints.FileTracker, snapshots *checkpoints.SnapshotManager)

RegisterAll registers all built-in tools with the registry. tracker and snapshots are optional; pass nil to disable file checkpointing.

func RegisterCodeGraphTools added in v1.8.0

func RegisterCodeGraphTools(registry *tools.Registry, indexer *codegraph.Indexer)

RegisterCodeGraphTools registers code graph tools with the given indexer. Called after the indexer is initialized during startup.

func RegisterCollectionsTools added in v1.8.3

func RegisterCollectionsTools(registry *tools.Registry, cfg *config.Config)

RegisterCollectionsTools registers collections search if active collections exist.

func RegisterCryptoTools

func RegisterCryptoTools(registry *tools.Registry, configLoader ConfigLoader)

RegisterCryptoTools registers all crypto/blockchain tools.

func RegisterReadOnlyDevTools

func RegisterReadOnlyDevTools(registry *tools.Registry, workspace string)

RegisterReadOnlyDevTools registers only read-only dev tools (for restricted agent mode).

func ValidateAlchemyNetwork

func ValidateAlchemyNetwork(network string) error

ValidateAlchemyNetwork checks if a network identifier is valid

func WalletSecurityHandlerFunc

func WalletSecurityHandlerFunc(args map[string]any, configLoader ConfigLoader) (any, error)

WalletSecurityHandlerFunc is the exported entry point for wallet security operations. It is used by the monitor daemon to perform periodic wallet checks.

func WeiToEther

func WeiToEther(wei *big.Int) string

WeiToEther converts Wei (*big.Int) to Ether as a formatted string Uses params.Ether from go-ethereum for accurate conversion

func WeiToGwei

func WeiToGwei(wei *big.Int) int64

WeiToGwei converts Wei to Gwei (useful for displaying gas prices)

Types

type AlchemyConfig

type AlchemyConfig struct {
	APIKey         string
	DefaultNetwork string
	TimeoutSeconds int
}

AlchemyConfig holds Alchemy API configuration.

type AlchemyTool

type AlchemyTool struct {
	BaseTool
	// contains filtered or unexported fields
}

AlchemyTool provides blockchain data and analytics via Alchemy API.

func NewAlchemyTool

func NewAlchemyTool(configLoader ConfigLoader) *AlchemyTool

NewAlchemyTool creates an AlchemyTool.

func (*AlchemyTool) Execute

func (t *AlchemyTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type AlertsLog

type AlertsLog struct {
	Alerts []SecurityAlert `json:"alerts"`
}

AlertsLog stores all security alerts

type ApprovalEvent

type ApprovalEvent struct {
	Owner         string   // Wallet that granted approval
	Spender       string   // Contract/address that can spend
	Value         *big.Int // Approved amount
	TokenContract string   // ERC20 contract address
	TxHash        string
	BlockNumber   string
	IsUnlimited   bool // True if value == max uint256
}

ApprovalEvent represents an ERC20 token approval

type AssetTransfer

type AssetTransfer struct {
	Category        string
	BlockNum        string
	From            string
	To              string
	Value           float64
	Asset           string
	Hash            string
	RawContract     struct{ Address string }
	TokenId         string
	ERC721TokenId   string
	ERC1155Metadata []struct {
		TokenId string
		Value   string
	}
}

AssetTransfer represents a blockchain asset transfer

type Base64DecodeTool

type Base64DecodeTool struct {
	BaseTool
}

Base64DecodeTool decodes a base64 string.

func NewBase64DecodeTool

func NewBase64DecodeTool() *Base64DecodeTool

NewBase64DecodeTool creates a Base64DecodeTool.

func (*Base64DecodeTool) Execute

func (t *Base64DecodeTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type Base64EncodeTool

type Base64EncodeTool struct {
	BaseTool
}

Base64EncodeTool encodes text to base64.

func NewBase64EncodeTool

func NewBase64EncodeTool() *Base64EncodeTool

NewBase64EncodeTool creates a Base64EncodeTool.

func (*Base64EncodeTool) Execute

func (t *Base64EncodeTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type BaseTool

type BaseTool struct {
	ToolName        string
	ToolDescription string
	ToolParameters  json.RawMessage
	ReadOnly        bool
	ConcurrencySafe bool
	Interrupt       tools.InterruptBehavior
	RequiredFields  []string
}

BaseTool provides a reusable base implementation of the tools.Tool interface. Concrete tools can embed BaseTool and override Execute.

func (*BaseTool) Description

func (b *BaseTool) Description() string

func (*BaseTool) Execute

func (b *BaseTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

Execute is a default implementation that returns an error. Concrete tools should override this method.

func (*BaseTool) InterruptBehavior

func (b *BaseTool) InterruptBehavior() tools.InterruptBehavior

func (*BaseTool) IsConcurrencySafe

func (b *BaseTool) IsConcurrencySafe(input map[string]any) bool

func (*BaseTool) IsReadOnly

func (b *BaseTool) IsReadOnly() bool

func (*BaseTool) Name

func (b *BaseTool) Name() string

func (*BaseTool) Parameters

func (b *BaseTool) Parameters() json.RawMessage

func (*BaseTool) ValidateInput

func (b *BaseTool) ValidateInput(input map[string]any) error

ValidateInput checks that all required fields are present and non-empty.

type BashTool

type BashTool struct {
	BaseTool
	// contains filtered or unexported fields
}

BashTool executes shell commands in the workspace directory.

func NewBashTool

func NewBashTool(workspace string) *BashTool

NewBashTool creates a BashTool bound to the given workspace directory.

func (*BashTool) Execute

func (t *BashTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type BlockmonConfig

type BlockmonConfig struct {
	AlchemyAPIKey       string
	WebhookURL          string
	DefaultNetwork      string
	PollIntervalSeconds int
}

BlockmonConfig holds blockchain monitoring configuration.

type BlockmonTool

type BlockmonTool struct {
	BaseTool
	// contains filtered or unexported fields
}

BlockmonTool provides real-time blockchain monitoring.

func NewBlockmonTool

func NewBlockmonTool(configLoader ConfigLoader) *BlockmonTool

NewBlockmonTool creates a BlockmonTool.

func (*BlockmonTool) Execute

func (t *BlockmonTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type CodeGraphTool added in v1.8.0

type CodeGraphTool struct {
	BaseTool
	// contains filtered or unexported fields
}

CodeGraphTool queries structural relationships in the code graph. Supports queries like "what calls X", "what implements Y", "callers of Z".

func NewCodeGraphTool added in v1.8.0

func NewCodeGraphTool(indexer *codegraph.Indexer) *CodeGraphTool

NewCodeGraphTool creates a CodeGraphTool backed by the given indexer.

func (*CodeGraphTool) Execute added in v1.8.0

func (t *CodeGraphTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type CodeReviewTool added in v1.8.3

type CodeReviewTool struct {
	BaseTool
	// contains filtered or unexported fields
}

CodeReviewTool performs automated code review using structural analysis of the code graph. It detects issues that grep alone can't find by combining graph connectivity (edges, call chains) with body content analysis in a single pass over all indexed functions.

func NewCodeReviewTool added in v1.8.3

func NewCodeReviewTool(indexer *codegraph.Indexer) *CodeReviewTool

NewCodeReviewTool creates the unified graph-based code review tool.

func (*CodeReviewTool) Execute added in v1.8.3

func (t *CodeReviewTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type CodeSearchTool added in v1.8.0

type CodeSearchTool struct {
	BaseTool
	// contains filtered or unexported fields
}

CodeSearchTool searches the code graph for symbols matching a query. Supports semantic search (MinHash similarity) and keyword search (exact match).

func NewCodeSearchTool added in v1.8.0

func NewCodeSearchTool(indexer *codegraph.Indexer) *CodeSearchTool

NewCodeSearchTool creates a CodeSearchTool backed by the given indexer.

func (*CodeSearchTool) Execute added in v1.8.0

func (t *CodeSearchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type CodeSymbolsTool added in v1.8.0

type CodeSymbolsTool struct {
	BaseTool
	// contains filtered or unexported fields
}

CodeSymbolsTool lists symbols in a file or package without reading full source. Solves the "main.go is 3000 lines" problem by showing what's in a file before the model decides what to read.

func NewCodeSymbolsTool added in v1.8.0

func NewCodeSymbolsTool(indexer *codegraph.Indexer) *CodeSymbolsTool

NewCodeSymbolsTool creates a CodeSymbolsTool backed by the given indexer.

func (*CodeSymbolsTool) Execute added in v1.8.0

func (t *CodeSymbolsTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type CollectionsSearchTool added in v1.8.3

type CollectionsSearchTool struct {
	BaseTool
	// contains filtered or unexported fields
}

CollectionsSearchTool searches xAI collections using the documents/search API. This is the explicit RAG search — not the implicit collection_ids parameter on chat completions, which xAI doesn't reliably use for retrieval.

func NewCollectionsSearchTool added in v1.8.3

func NewCollectionsSearchTool(cfg *config.Config) *CollectionsSearchTool

NewCollectionsSearchTool creates a collections search tool.

func (*CollectionsSearchTool) Execute added in v1.8.3

func (t *CollectionsSearchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type ConfigLoader

type ConfigLoader interface {
	GetTarotConfig() (TarotConfig, error)
	GetVeniceConfig() (VeniceConfig, error)
	GetWeatherConfig() (WeatherConfig, error)
	GetTwitchConfig() (TwitchConfig, error)
	GetYouTubeConfig() (YouTubeConfig, error)
	GetIPFSConfig() (IPFSConfig, error)
	GetAlchemyConfig() (AlchemyConfig, error)
	GetBlockmonConfig() (BlockmonConfig, error)
	GetWalletSecurityConfig() (WalletSecuritySettingsConfig, error)
}

ConfigLoader provides access to configuration values. This interface mirrors skills.ConfigLoader exactly so that config.NewConfigLoader(cfg) satisfies both.

type CurrencyTool

type CurrencyTool struct {
	BaseTool
}

CurrencyTool converts between currencies.

func NewCurrencyTool

func NewCurrencyTool() *CurrencyTool

NewCurrencyTool creates a CurrencyTool.

func (*CurrencyTool) Execute

func (t *CurrencyTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type GitLogTool added in v1.8.0

type GitLogTool struct {
	BaseTool
	// contains filtered or unexported fields
}

GitLogTool runs git log with configurable options.

func NewGitLogTool added in v1.8.0

func NewGitLogTool(workspace string) *GitLogTool

NewGitLogTool creates a GitLogTool bound to the given workspace.

func (*GitLogTool) Execute added in v1.8.0

func (t *GitLogTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type GitStatusTool added in v1.8.0

type GitStatusTool struct {
	BaseTool
	// contains filtered or unexported fields
}

GitStatusTool runs git status and git diff --stat in the workspace.

func NewGitStatusTool added in v1.8.0

func NewGitStatusTool(workspace string) *GitStatusTool

NewGitStatusTool creates a GitStatusTool bound to the given workspace.

func (*GitStatusTool) Execute added in v1.8.0

func (t *GitStatusTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type HashTool

type HashTool struct {
	BaseTool
}

HashTool generates cryptographic hashes.

func NewHashTool

func NewHashTool() *HashTool

NewHashTool creates a HashTool.

func (*HashTool) Execute

func (t *HashTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type IPFSConfig

type IPFSConfig struct {
	Provider       string
	APIKey         string
	APISecret      string
	ProjectID      string
	GatewayURL     string
	TimeoutSeconds int
}

IPFSConfig holds IPFS configuration.

type IPFSTool

type IPFSTool struct {
	BaseTool
	// contains filtered or unexported fields
}

IPFSTool provides IPFS decentralized storage operations.

func NewIPFSTool

func NewIPFSTool(configLoader ConfigLoader) *IPFSTool

NewIPFSTool creates an IPFSTool.

func (*IPFSTool) Execute

func (t *IPFSTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type ListFilesTool

type ListFilesTool struct {
	BaseTool
	// contains filtered or unexported fields
}

ListFilesTool lists files and directories inside the workspace.

func NewListFilesTool

func NewListFilesTool(workspace string) *ListFilesTool

NewListFilesTool creates a ListFilesTool bound to the given workspace directory.

func (*ListFilesTool) Execute

func (t *ListFilesTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type MonitoredWallet

type MonitoredWallet struct {
	Address string    `json:"address"` // EIP-55 checksummed
	Label   string    `json:"label"`
	Network string    `json:"network"`
	AddedAt time.Time `json:"added_at"`
}

MonitoredWallet represents a wallet being monitored

type Note

type Note struct {
	Title   string    `json:"title"`
	Content string    `json:"content"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`
}

Note represents a note entry.

type NoteGetTool

type NoteGetTool struct {
	BaseTool
}

NoteGetTool retrieves a note by title.

func NewNoteGetTool

func NewNoteGetTool() *NoteGetTool

NewNoteGetTool creates a NoteGetTool.

func (*NoteGetTool) Execute

func (t *NoteGetTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type NoteListTool

type NoteListTool struct {
	BaseTool
}

NoteListTool lists all saved notes.

func NewNoteListTool

func NewNoteListTool() *NoteListTool

NewNoteListTool creates a NoteListTool.

func (*NoteListTool) Execute

func (t *NoteListTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type NoteSaveTool

type NoteSaveTool struct {
	BaseTool
}

NoteSaveTool saves a note.

func NewNoteSaveTool

func NewNoteSaveTool() *NoteSaveTool

NewNoteSaveTool creates a NoteSaveTool.

func (*NoteSaveTool) Execute

func (t *NoteSaveTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type PasswordTool

type PasswordTool struct {
	BaseTool
}

PasswordTool generates secure random passwords.

func NewPasswordTool

func NewPasswordTool() *PasswordTool

NewPasswordTool creates a PasswordTool.

func (*PasswordTool) Execute

func (t *PasswordTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type PatchFileOption added in v1.8.0

type PatchFileOption func(*PatchFileTool)

PatchFileOption configures optional dependencies for PatchFileTool.

func WithPatchFileSnapshots added in v1.8.0

func WithPatchFileSnapshots(sm *checkpoints.SnapshotManager) PatchFileOption

WithPatchFileSnapshots attaches a SnapshotManager for file checkpointing.

func WithPatchFileTracker added in v1.8.0

func WithPatchFileTracker(ft *checkpoints.FileTracker) PatchFileOption

WithPatchFileTracker attaches a FileTracker for stale detection.

type PatchFileTool

type PatchFileTool struct {
	BaseTool
	// contains filtered or unexported fields
}

PatchFileTool performs surgical string replacements in workspace files.

func NewPatchFileTool

func NewPatchFileTool(workspace string, opts ...PatchFileOption) *PatchFileTool

NewPatchFileTool creates a PatchFileTool bound to the given workspace directory. Optional dependencies can be provided for stale detection and file checkpointing.

func (*PatchFileTool) Execute

func (t *PatchFileTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type QRCodeTool

type QRCodeTool struct {
	BaseTool
}

QRCodeTool generates QR codes from text.

func NewQRCodeTool

func NewQRCodeTool() *QRCodeTool

NewQRCodeTool creates a QRCodeTool.

func (*QRCodeTool) Execute

func (t *QRCodeTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type RateLimiter

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

RateLimiter wraps golang.org/x/time/rate.Limiter Provides production-ready token bucket rate limiting

func NewRateLimiter

func NewRateLimiter(requestsPerSecond int) *RateLimiter

NewRateLimiter creates a rate limiter with specified requests per second Uses the official golang.org/x/time/rate package

func (*RateLimiter) Allow

func (rl *RateLimiter) Allow() bool

Allow checks if a request is allowed without blocking

func (*RateLimiter) SetRate

func (rl *RateLimiter) SetRate(requestsPerSecond int)

SetRate updates the rate limit dynamically

func (*RateLimiter) Wait

func (rl *RateLimiter) Wait(ctx context.Context) error

Wait blocks until a token is available or context is cancelled

type ReadFileOption added in v1.8.0

type ReadFileOption func(*ReadFileTool)

ReadFileOption configures optional dependencies for ReadFileTool.

func WithReadFileTracker added in v1.8.0

func WithReadFileTracker(ft *checkpoints.FileTracker) ReadFileOption

WithReadFileTracker attaches a FileTracker for stale detection.

type ReadFileTool

type ReadFileTool struct {
	BaseTool
	// contains filtered or unexported fields
}

ReadFileTool reads text files from the workspace.

func NewReadFileTool

func NewReadFileTool(workspace string, opts ...ReadFileOption) *ReadFileTool

NewReadFileTool creates a ReadFileTool bound to the given workspace directory. An optional FileTracker records mtimes after each read for stale detection.

func (*ReadFileTool) Execute

func (t *ReadFileTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type Reminder

type Reminder struct {
	ID      string    `json:"id"`
	Message string    `json:"message"`
	Time    time.Time `json:"time"`
	Created time.Time `json:"created"`
}

Reminder represents a reminder entry.

type ReminderListTool

type ReminderListTool struct {
	BaseTool
}

ReminderListTool lists all active reminders.

func NewReminderListTool

func NewReminderListTool() *ReminderListTool

NewReminderListTool creates a ReminderListTool.

func (*ReminderListTool) Execute

func (t *ReminderListTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type ReminderSetTool

type ReminderSetTool struct {
	BaseTool
}

ReminderSetTool sets a reminder.

func NewReminderSetTool

func NewReminderSetTool() *ReminderSetTool

NewReminderSetTool creates a ReminderSetTool.

func (*ReminderSetTool) Execute

func (t *ReminderSetTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type SaveMemoryTool added in v1.8.3

type SaveMemoryTool struct {
	BaseTool
	// contains filtered or unexported fields
}

SaveMemoryTool allows the LLM to persist learned facts about the project or user across conversations.

func NewSaveMemoryTool added in v1.8.3

func NewSaveMemoryTool(workspace string) *SaveMemoryTool

NewSaveMemoryTool creates a tool for saving memories to the project store.

func (*SaveMemoryTool) Execute added in v1.8.3

func (t *SaveMemoryTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type SearchTool

type SearchTool struct {
	BaseTool
	// contains filtered or unexported fields
}

SearchTool searches for text patterns in workspace files.

func NewSearchTool

func NewSearchTool(workspace string) *SearchTool

NewSearchTool creates a SearchTool bound to the given workspace directory.

func (*SearchTool) Execute

func (t *SearchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type SecurityAlert

type SecurityAlert struct {
	ID             string         `json:"id"`             // alert_<timestamp>_<random>
	WalletAddress  string         `json:"wallet_address"` // Affected wallet
	AlertType      string         `json:"alert_type"`     // dust_attack, nft_scam, dangerous_approval, large_transfer
	Severity       string         `json:"severity"`       // low, medium, high, critical
	TxHash         string         `json:"tx_hash"`        // Transaction hash
	BlockNumber    string         `json:"block_number"`
	Description    string         `json:"description"` // Human-readable description
	Details        map[string]any `json:"details"`     // Type-specific details
	DetectedAt     time.Time      `json:"detected_at"`
	Acknowledged   bool           `json:"acknowledged"`
	AcknowledgedAt *time.Time     `json:"acknowledged_at,omitempty"`
}

SecurityAlert represents a detected security threat

type TarotConfig

type TarotConfig struct {
	FunctionURL string
	AuthToken   string
}

TarotConfig holds tarot function configuration.

type TarotTool

type TarotTool struct {
	BaseTool
	// contains filtered or unexported fields
}

TarotTool generates tarot card readings.

func NewTarotTool

func NewTarotTool(configLoader ConfigLoader) *TarotTool

NewTarotTool creates a TarotTool.

func (*TarotTool) Execute

func (t *TarotTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type TimezoneConverterTool

type TimezoneConverterTool struct {
	BaseTool
}

TimezoneConverterTool converts time between timezones.

func NewTimezoneConverterTool

func NewTimezoneConverterTool() *TimezoneConverterTool

NewTimezoneConverterTool creates a TimezoneConverterTool.

func (*TimezoneConverterTool) Execute

func (tool *TimezoneConverterTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type TodoItem added in v1.8.0

type TodoItem struct {
	ID          int    `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
	Status      string `json:"status"` // "pending", "in_progress", "done"
}

TodoItem represents a single task.

type TodoStore added in v1.8.0

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

TodoStore is a thread-safe file-backed store for todo items.

func NewTodoStore added in v1.8.0

func NewTodoStore(workspace string) *TodoStore

NewTodoStore creates a TodoStore. If workspace is non-empty, persists to .celeste/tasks.json in the workspace directory.

func (*TodoStore) ClearDone added in v1.8.3

func (s *TodoStore) ClearDone() int

ClearDone removes all completed items.

func (*TodoStore) Create added in v1.8.0

func (s *TodoStore) Create(title, description string) TodoItem

Create adds a new todo item and returns it.

func (*TodoStore) Delete added in v1.8.3

func (s *TodoStore) Delete(id int) error

Delete removes an item by ID.

func (*TodoStore) List added in v1.8.0

func (s *TodoStore) List() []TodoItem

List returns all items.

func (*TodoStore) Update added in v1.8.0

func (s *TodoStore) Update(id int, status string) (TodoItem, error)

Update changes the status of an item by ID.

type TodoTool added in v1.8.0

type TodoTool struct {
	BaseTool
	// contains filtered or unexported fields
}

TodoTool is a built-in tool for managing task lists during a session.

func NewTodoTool added in v1.8.0

func NewTodoTool(workspace string) *TodoTool

NewTodoTool creates a TodoTool with file-backed persistence in the workspace.

func (*TodoTool) Execute added in v1.8.0

func (t *TodoTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

Execute runs the todo action.

func (*TodoTool) GetStore added in v1.8.3

func (t *TodoTool) GetStore() *TodoStore

GetStore returns the underlying store (for TUI access).

type TwitchConfig

type TwitchConfig struct {
	ClientID        string
	ClientSecret    string
	DefaultStreamer string
}

TwitchConfig holds Twitch API configuration.

type TwitchTool

type TwitchTool struct {
	BaseTool
	// contains filtered or unexported fields
}

TwitchTool checks if a Twitch streamer is live.

func NewTwitchTool

func NewTwitchTool(configLoader ConfigLoader) *TwitchTool

NewTwitchTool creates a TwitchTool.

func (*TwitchTool) Execute

func (t *TwitchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type UUIDTool

type UUIDTool struct {
	BaseTool
}

UUIDTool generates UUID v4 values.

func NewUUIDTool

func NewUUIDTool() *UUIDTool

NewUUIDTool creates a UUIDTool.

func (*UUIDTool) Execute

func (t *UUIDTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type UnitConverterTool

type UnitConverterTool struct {
	BaseTool
}

UnitConverterTool converts between units of measurement.

func NewUnitConverterTool

func NewUnitConverterTool() *UnitConverterTool

NewUnitConverterTool creates a UnitConverterTool.

func (*UnitConverterTool) Execute

func (t *UnitConverterTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type UpscaleImageTool

type UpscaleImageTool struct {
	BaseTool
	// contains filtered or unexported fields
}

UpscaleImageTool upscales images using Venice.ai.

func NewUpscaleImageTool

func NewUpscaleImageTool(configLoader ConfigLoader) *UpscaleImageTool

NewUpscaleImageTool creates an UpscaleImageTool.

func (*UpscaleImageTool) Execute

func (t *UpscaleImageTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type VeniceConfig

type VeniceConfig struct {
	APIKey     string
	BaseURL    string
	Model      string // Chat model (venice-uncensored)
	ImageModel string // Image generation model (lustify-sdxl, animewan, hidream, wai-Illustrious)
	Upscaler   string
}

VeniceConfig holds Venice.ai configuration.

type WalletSecurityConfig

type WalletSecurityConfig struct {
	MonitoredWallets    []MonitoredWallet `json:"monitored_wallets"`
	LastCheckedBlock    string            `json:"last_checked_block"`
	PollIntervalSeconds int               `json:"poll_interval_seconds"`
}

WalletSecurityConfig holds wallet security configuration

type WalletSecuritySettingsConfig

type WalletSecuritySettingsConfig struct {
	Enabled      bool
	PollInterval int    // seconds
	AlertLevel   string // minimum severity to alert on
}

WalletSecuritySettingsConfig holds wallet security settings.

type WalletSecurityTool

type WalletSecurityTool struct {
	BaseTool
	// contains filtered or unexported fields
}

WalletSecurityTool monitors wallet addresses for security threats.

func NewWalletSecurityTool

func NewWalletSecurityTool(configLoader ConfigLoader) *WalletSecurityTool

NewWalletSecurityTool creates a WalletSecurityTool.

func (*WalletSecurityTool) Execute

func (t *WalletSecurityTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type WeatherConfig

type WeatherConfig struct {
	DefaultZipCode string
}

WeatherConfig holds weather skill configuration.

type WeatherTool

type WeatherTool struct {
	BaseTool
	// contains filtered or unexported fields
}

WeatherTool gets weather forecast for a location.

func NewWeatherTool

func NewWeatherTool(configLoader ConfigLoader) *WeatherTool

NewWeatherTool creates a WeatherTool.

func (*WeatherTool) Execute

func (t *WeatherTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type WebFetchTool added in v1.8.0

type WebFetchTool struct {
	BaseTool
}

WebFetchTool fetches a URL and converts the HTML content to markdown.

func NewWebFetchTool added in v1.8.0

func NewWebFetchTool() *WebFetchTool

NewWebFetchTool creates a WebFetchTool.

func (*WebFetchTool) Execute added in v1.8.0

func (t *WebFetchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type WebSearchTool added in v1.8.0

type WebSearchTool struct {
	BaseTool
	// contains filtered or unexported fields
}

WebSearchTool performs web searches via DuckDuckGo HTML.

func NewWebSearchTool added in v1.8.0

func NewWebSearchTool() *WebSearchTool

NewWebSearchTool creates a WebSearchTool.

func (*WebSearchTool) Execute added in v1.8.0

func (t *WebSearchTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type WriteFileOption added in v1.8.0

type WriteFileOption func(*WriteFileTool)

WriteFileOption configures optional dependencies for WriteFileTool.

func WithWriteFileSnapshots added in v1.8.0

func WithWriteFileSnapshots(sm *checkpoints.SnapshotManager) WriteFileOption

WithWriteFileSnapshots attaches a SnapshotManager for file checkpointing.

func WithWriteFileTracker added in v1.8.0

func WithWriteFileTracker(ft *checkpoints.FileTracker) WriteFileOption

WithWriteFileTracker attaches a FileTracker for stale detection.

type WriteFileTool

type WriteFileTool struct {
	BaseTool
	// contains filtered or unexported fields
}

WriteFileTool writes text files to the workspace.

func NewWriteFileTool

func NewWriteFileTool(workspace string, opts ...WriteFileOption) *WriteFileTool

NewWriteFileTool creates a WriteFileTool bound to the given workspace directory. Optional dependencies can be provided for stale detection and file checkpointing.

func (*WriteFileTool) Execute

func (t *WriteFileTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

type YouTubeConfig

type YouTubeConfig struct {
	APIKey         string
	DefaultChannel string
}

YouTubeConfig holds YouTube API configuration.

type YouTubeTool

type YouTubeTool struct {
	BaseTool
	// contains filtered or unexported fields
}

YouTubeTool gets recent videos from a YouTube channel.

func NewYouTubeTool

func NewYouTubeTool(configLoader ConfigLoader) *YouTubeTool

NewYouTubeTool creates a YouTubeTool.

func (*YouTubeTool) Execute

func (t *YouTubeTool) Execute(ctx context.Context, input map[string]any, progress chan<- tools.ProgressEvent) (tools.ToolResult, error)

Jump to

Keyboard shortcuts

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