Documentation
¶
Index ¶
Constants ¶
const ( SessionHookKey = "session_hook" AnalyticsHookKey = "analytics_hook" SleuthAIQueryMCPKey = "sleuth_ai_query_mcp" CursorSessionHookKey = "cursor_session_hook" )
Option keys as constants for comparison
Variables ¶
var AnalyticsHook = Option{ Key: AnalyticsHookKey, Description: "Claude Code PostToolUse hook - Track skill usage for analytics", Prompt: "Install hook?", Default: true, DeclineNote: "Skill usage analytics will not be tracked.", }
AnalyticsHook is the Claude Code PostToolUse hook option for usage tracking. Integrates with Claude Code's native PostToolUse hook in ~/.claude/settings.json.
var CursorBeforeSubmitHook = Option{ Key: CursorSessionHookKey, Description: "Cursor beforeSubmitPrompt hook - Auto-update assets once per conversation", Prompt: "Install hook? (recommended)", Default: true, DeclineNote: "Without this hook, you'll need to run 'sx install' manually.", }
CursorBeforeSubmitHook is the Cursor hook option for auto-update. Integrates with Cursor's beforeSubmitPrompt hook in ~/.cursor/hooks.json. Runs once per conversation (tracked via conversation IDs).
var SessionHook = Option{ Key: SessionHookKey, Description: "Claude Code SessionStart hook - Auto-update assets when sessions start", Prompt: "Install hook? (recommended)", Default: true, DeclineNote: "Without this hook, you'll need to run 'sx install' manually.", }
SessionHook is the Claude Code SessionStart hook option for auto-update. Integrates with Claude Code's native SessionStart hook in ~/.claude/settings.json.
Functions ¶
func ContainsKey ¶
ContainsKey returns true if the options slice contains an option with the given key
Types ¶
type MCPServerConfig ¶
type MCPServerConfig struct {
Name string // Server name (e.g., "sx")
Command string // Command to run
Args []string // Arguments
Env map[string]string // Environment variables
}
MCPServerConfig contains info to install an MCP server generically
type Option ¶
type Option struct {
Key string // Unique key for config storage
Description string // What to show user
Prompt string // Question to ask
Default bool // Suggested answer
DeclineNote string // Note shown if declined (optional)
MCPConfig *MCPServerConfig // For MCP options - generic install config
}
Option describes a configurable bootstrap item
func SleuthAIQueryMCP ¶
func SleuthAIQueryMCP() Option
SleuthAIQueryMCP returns the Sleuth AI query MCP server option Future: may split into multiple options to enable specific tools