Documentation
¶
Index ¶
- func ExecuteOAuthCommand(ctx context.Context, toolName string, command string, args map[string]any, ...) error
- func GetBoolArg(args map[string]any, key string, defaultVal bool) bool
- func GetIntArg(args map[string]any, key string, defaultVal int) int
- func GetStringArg(args map[string]any, key, defaultVal string) string
- func RequireAccessToken(toolName string, creds *types.IntegrationCredentials, stdout io.Writer) (string, error)
- func RequirePositiveIntArg(args map[string]any, key string) (int, error)
- func RequireStringArgs(args map[string]any, keys ...string) (map[string]string, error)
- func WriteJSON(w io.Writer, payload any) error
- func WriteToolError(w io.Writer, msg string) error
- type ArticleResponse
- type ContentResponse
- type CurrentWeatherResponse
- type ExaClient
- type ExaSearchResponse
- type ExaSearchResult
- type ForecastDay
- type ForecastResponse
- type GDriveClient
- type GitHubClient
- type GmailClient
- type HourlyForecastItem
- type HourlyForecastResponse
- type IssueInfo
- type LinearClient
- type NotionClient
- type OAuthCommandHandler
- type OutlookToolClient
- type PRFileInfo
- type PRInfo
- type RepoInfo
- type ResearchFinding
- type ResearchResponse
- type SearchResponse
- type SearchResult
- type SlackClient
- type SummaryResponse
- type ViewClient
- type WeatherClient
- type WikipediaClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteOAuthCommand ¶ added in v0.1.71
func ExecuteOAuthCommand( ctx context.Context, toolName string, command string, args map[string]any, creds *types.IntegrationCredentials, handlers map[string]OAuthCommandHandler, stdout io.Writer, ) error
ExecuteOAuthCommand runs a command for OAuth-backed tool clients with consistent auth checking, error shaping, and JSON output.
func GetBoolArg ¶
GetBoolArg extracts a bool argument from args map
func GetStringArg ¶
GetStringArg extracts a string argument from args map
func RequireAccessToken ¶ added in v0.1.71
func RequireAccessToken(toolName string, creds *types.IntegrationCredentials, stdout io.Writer) (string, error)
RequireAccessToken validates OAuth credentials and returns the access token. On failure it writes a structured error to stdout for consistent CLI behavior.
func RequirePositiveIntArg ¶ added in v0.1.71
func RequireStringArgs ¶ added in v0.1.71
Types ¶
type ArticleResponse ¶
type ArticleResponse struct {
Title string `json:"title"`
PageID int `json:"page_id"`
Extract string `json:"extract"`
HTML string `json:"html,omitempty"`
Categories []string `json:"categories"`
URL string `json:"url"`
}
ArticleResponse is the response from a get_article command
type ContentResponse ¶
type ContentResponse struct {
URL string `json:"url"`
Title string `json:"title"`
Content string `json:"content"`
Length int `json:"length"`
}
ContentResponse represents extracted content
type CurrentWeatherResponse ¶
type CurrentWeatherResponse struct {
Location string `json:"location"`
Country string `json:"country"`
Temperature float64 `json:"temperature"`
FeelsLike float64 `json:"feels_like"`
Humidity int `json:"humidity"`
Pressure int `json:"pressure"`
WindSpeed float64 `json:"wind_speed"`
WindDeg int `json:"wind_deg"`
Clouds int `json:"clouds"`
Visibility int `json:"visibility"`
Weather string `json:"weather"`
Description string `json:"description"`
Icon string `json:"icon"`
Sunrise int64 `json:"sunrise"`
Sunset int64 `json:"sunset"`
Timezone int `json:"timezone"`
Units string `json:"units"`
}
CurrentWeatherResponse represents current weather data
type ExaClient ¶
type ExaClient struct {
// contains filtered or unexported fields
}
ExaClient implements the Exa neural search tool
func NewExaClient ¶
NewExaClient creates a new Exa client
func (*ExaClient) Execute ¶
func (e *ExaClient) Execute(ctx context.Context, command string, args map[string]any, creds *types.IntegrationCredentials, stdout, stderr io.Writer) error
Execute runs an Exa command - implements ToolClient interface
func (*ExaClient) Name ¶
func (e *ExaClient) Name() types.IntegrationName
Name returns the tool identifier - implements ToolClient interface
type ExaSearchResponse ¶
type ExaSearchResponse struct {
Query string `json:"query"`
Results []ExaSearchResult `json:"results"`
Total int `json:"total"`
}
SearchResponse represents the search response
type ExaSearchResult ¶
type ExaSearchResult struct {
Title string `json:"title"`
URL string `json:"url"`
Snippet string `json:"snippet,omitempty"`
Score float64 `json:"score"`
Published string `json:"published,omitempty"`
Author string `json:"author,omitempty"`
}
SearchResult represents a single search result
type ForecastDay ¶
type ForecastDay struct {
Date string `json:"date"`
TempMin float64 `json:"temp_min"`
TempMax float64 `json:"temp_max"`
Humidity int `json:"humidity"`
Weather string `json:"weather"`
Description string `json:"description"`
Icon string `json:"icon"`
WindSpeed float64 `json:"wind_speed"`
Pop float64 `json:"precipitation_probability"`
}
ForecastDay represents a single day's forecast
type ForecastResponse ¶
type ForecastResponse struct {
Location string `json:"location"`
Country string `json:"country"`
Days []ForecastDay `json:"days"`
Units string `json:"units"`
}
ForecastResponse represents the forecast data
type GDriveClient ¶ added in v0.1.71
type GDriveClient struct {
// contains filtered or unexported fields
}
func NewGDriveClient ¶ added in v0.1.71
func NewGDriveClient() *GDriveClient
func (*GDriveClient) Name ¶ added in v0.1.71
func (g *GDriveClient) Name() types.IntegrationName
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient() *GitHubClient
func (*GitHubClient) Name ¶
func (g *GitHubClient) Name() types.IntegrationName
type GmailClient ¶ added in v0.1.71
type GmailClient struct {
// contains filtered or unexported fields
}
func NewGmailClient ¶ added in v0.1.71
func NewGmailClient() *GmailClient
func (*GmailClient) Name ¶ added in v0.1.71
func (g *GmailClient) Name() types.IntegrationName
type HourlyForecastItem ¶
type HourlyForecastItem struct {
Time string `json:"time"`
Temperature float64 `json:"temperature"`
FeelsLike float64 `json:"feels_like"`
Humidity int `json:"humidity"`
Weather string `json:"weather"`
Description string `json:"description"`
Icon string `json:"icon"`
WindSpeed float64 `json:"wind_speed"`
Pop float64 `json:"precipitation_probability"`
}
HourlyForecastItem represents a single hour's forecast
type HourlyForecastResponse ¶
type HourlyForecastResponse struct {
Location string `json:"location"`
Country string `json:"country"`
Hours []HourlyForecastItem `json:"hours"`
Units string `json:"units"`
}
HourlyForecastResponse represents hourly forecast data
type LinearClient ¶ added in v0.1.71
type LinearClient struct {
// contains filtered or unexported fields
}
func NewLinearClient ¶ added in v0.1.71
func NewLinearClient() *LinearClient
func (*LinearClient) Name ¶ added in v0.1.71
func (l *LinearClient) Name() types.IntegrationName
type NotionClient ¶ added in v0.1.71
type NotionClient struct {
// contains filtered or unexported fields
}
func NewNotionClient ¶ added in v0.1.71
func NewNotionClient() *NotionClient
func (*NotionClient) Name ¶ added in v0.1.71
func (n *NotionClient) Name() types.IntegrationName
type OAuthCommandHandler ¶ added in v0.1.71
type OutlookToolClient ¶ added in v0.1.143
type OutlookToolClient struct {
// contains filtered or unexported fields
}
func NewOutlookToolClient ¶ added in v0.1.143
func NewOutlookToolClient() *OutlookToolClient
func (*OutlookToolClient) Name ¶ added in v0.1.143
func (o *OutlookToolClient) Name() types.IntegrationName
type PRFileInfo ¶ added in v0.1.71
type RepoInfo ¶
type RepoInfo struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description,omitempty"`
Private bool `json:"private"`
Language string `json:"language,omitempty"`
Stars int `json:"stars"`
Forks int `json:"forks,omitempty"`
OpenIssues int `json:"open_issues,omitempty"`
URL string `json:"url"`
CloneURL string `json:"clone_url,omitempty"`
}
type ResearchFinding ¶
type ResearchFinding struct {
Title string `json:"title"`
URL string `json:"url"`
Summary string `json:"summary"`
Key string `json:"key_insight,omitempty"`
}
ResearchFinding represents a single research finding
type ResearchResponse ¶
type ResearchResponse struct {
Topic string `json:"topic"`
Findings []ResearchFinding `json:"findings"`
Summary string `json:"summary"`
}
ResearchResponse represents the research response
type SearchResponse ¶
type SearchResponse struct {
Results []SearchResult `json:"results"`
Total int `json:"total"`
}
SearchResponse is the response from a search command
type SearchResult ¶
type SearchResult struct {
Title string `json:"title"`
PageID int `json:"page_id"`
Excerpt string `json:"excerpt"`
Description string `json:"description,omitempty"`
}
SearchResult represents a Wikipedia search result
type SlackClient ¶ added in v0.1.71
type SlackClient struct {
// contains filtered or unexported fields
}
func NewSlackClient ¶ added in v0.1.71
func NewSlackClient() *SlackClient
func (*SlackClient) Name ¶ added in v0.1.71
func (s *SlackClient) Name() types.IntegrationName
type SummaryResponse ¶
type SummaryResponse struct {
Title string `json:"title"`
PageID int `json:"page_id"`
Extract string `json:"extract"`
Description string `json:"description,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
URL string `json:"url"`
}
SummaryResponse is the response from a get_summary command
type ViewClient ¶ added in v0.1.124
type ViewClient struct {
// contains filtered or unexported fields
}
func NewViewClient ¶ added in v0.1.124
func NewViewClient(store *views.ViewStore, backend repository.BackendRepository, sync *views.ViewSync) *ViewClient
func (*ViewClient) Name ¶ added in v0.1.124
func (c *ViewClient) Name() types.IntegrationName
type WeatherClient ¶
type WeatherClient struct {
// contains filtered or unexported fields
}
WeatherClient implements the Weather tool using OpenWeatherMap API
func NewWeatherClient ¶
func NewWeatherClient(apiKey string) *WeatherClient
NewWeatherClient creates a new Weather client
func (*WeatherClient) Execute ¶
func (w *WeatherClient) Execute(ctx context.Context, command string, args map[string]any, creds *types.IntegrationCredentials, stdout, stderr io.Writer) error
Execute runs a Weather command - implements ToolClient interface
func (*WeatherClient) Name ¶
func (w *WeatherClient) Name() types.IntegrationName
Name returns the tool identifier - implements ToolClient interface
type WikipediaClient ¶
type WikipediaClient struct {
// contains filtered or unexported fields
}
WikipediaClient implements the Wikipedia tool
func NewWikipediaClient ¶
func NewWikipediaClient() *WikipediaClient
NewWikipediaClient creates a new Wikipedia client
func (*WikipediaClient) Execute ¶
func (w *WikipediaClient) Execute(ctx context.Context, command string, args map[string]any, creds *types.IntegrationCredentials, stdout, stderr io.Writer) error
Execute runs a Wikipedia command - implements ToolClient interface
func (*WikipediaClient) Name ¶
func (w *WikipediaClient) Name() types.IntegrationName
Name returns the tool identifier - implements ToolClient interface