Documentation
¶
Index ¶
- Constants
- type GeminiCLIHookAdapter
- func (a *GeminiCLIHookAdapter) Detect() (bool, error)
- func (a *GeminiCLIHookAdapter) FormatOutput(index *types.GraphIndex, format integrations.OutputFormat) (string, error)
- func (a *GeminiCLIHookAdapter) GetCommand(binaryPath string, format integrations.OutputFormat) string
- func (a *GeminiCLIHookAdapter) GetDescription() string
- func (a *GeminiCLIHookAdapter) GetName() string
- func (a *GeminiCLIHookAdapter) GetVersion() string
- func (a *GeminiCLIHookAdapter) IsEnabled() (bool, error)
- func (a *GeminiCLIHookAdapter) Reload(newConfig integrations.IntegrationConfig) error
- func (a *GeminiCLIHookAdapter) Remove() error
- func (a *GeminiCLIHookAdapter) Setup(binaryPath string) error
- func (a *GeminiCLIHookAdapter) Update(binaryPath string) error
- func (a *GeminiCLIHookAdapter) Validate() error
- type GeminiCLIMCPAdapter
- func (a *GeminiCLIMCPAdapter) Detect() (bool, error)
- func (a *GeminiCLIMCPAdapter) FormatOutput(index *types.GraphIndex, format integrations.OutputFormat) (string, error)
- func (a *GeminiCLIMCPAdapter) GetCommand(binaryPath string, format integrations.OutputFormat) string
- func (a *GeminiCLIMCPAdapter) GetDescription() string
- func (a *GeminiCLIMCPAdapter) GetName() string
- func (a *GeminiCLIMCPAdapter) GetVersion() string
- func (a *GeminiCLIMCPAdapter) IsEnabled() (bool, error)
- func (a *GeminiCLIMCPAdapter) Reload(newConfig integrations.IntegrationConfig) error
- func (a *GeminiCLIMCPAdapter) Remove() error
- func (a *GeminiCLIMCPAdapter) Setup(binaryPath string) error
- func (a *GeminiCLIMCPAdapter) Update(binaryPath string) error
- func (a *GeminiCLIMCPAdapter) Validate() error
- func (a *GeminiCLIMCPAdapter) VerifyRegistration() error
- type GeminiHook
- type GeminiHookEvent
- type GeminiHookOutput
- type GeminiHookSpecificOutput
- type GeminiMCPConfig
- type GeminiMCPServer
- type GeminiSettings
Constants ¶
const ( // HookIntegrationName is the unique identifier for this integration HookIntegrationName = "gemini-cli-hook" // HookIntegrationVersion is the adapter version HookIntegrationVersion = "1.0.0" // HookName is the name field for the hook HookName = "memorizer-hook" // HookDescription is the description field for the hook HookDescription = "Load agentic memory index" )
const ( // MCPIntegrationName is the unique identifier for this integration MCPIntegrationName = "gemini-cli-mcp" // MCPIntegrationVersion is the adapter version MCPIntegrationVersion = "2.0.0" // MCPServerName is the identifier used in ~/.gemini/settings.json MCPServerName = "memorizer" )
const (
// SessionStartEvent is the hook event name for Gemini CLI
SessionStartEvent = "SessionStart"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeminiCLIHookAdapter ¶
type GeminiCLIHookAdapter struct {
// contains filtered or unexported fields
}
GeminiCLIHookAdapter implements the Integration interface for Gemini CLI SessionStart hooks
func NewGeminiCLIHookAdapter ¶
func NewGeminiCLIHookAdapter() *GeminiCLIHookAdapter
NewGeminiCLIHookAdapter creates a new Gemini CLI hook integration adapter
func (*GeminiCLIHookAdapter) Detect ¶
func (a *GeminiCLIHookAdapter) Detect() (bool, error)
Detect checks if Gemini CLI is installed on the system
func (*GeminiCLIHookAdapter) FormatOutput ¶
func (a *GeminiCLIHookAdapter) FormatOutput(index *types.GraphIndex, format integrations.OutputFormat) (string, error)
FormatOutput formats the graph index for Gemini CLI (SessionStart JSON wrapper)
func (*GeminiCLIHookAdapter) GetCommand ¶
func (a *GeminiCLIHookAdapter) GetCommand(binaryPath string, format integrations.OutputFormat) string
GetCommand returns the command that should be executed by the hook
func (*GeminiCLIHookAdapter) GetDescription ¶
func (a *GeminiCLIHookAdapter) GetDescription() string
GetDescription returns a human-readable description
func (*GeminiCLIHookAdapter) GetName ¶
func (a *GeminiCLIHookAdapter) GetName() string
GetName returns the integration name
func (*GeminiCLIHookAdapter) GetVersion ¶
func (a *GeminiCLIHookAdapter) GetVersion() string
GetVersion returns the adapter version
func (*GeminiCLIHookAdapter) IsEnabled ¶
func (a *GeminiCLIHookAdapter) IsEnabled() (bool, error)
IsEnabled checks if the integration is currently configured
func (*GeminiCLIHookAdapter) Reload ¶
func (a *GeminiCLIHookAdapter) Reload(newConfig integrations.IntegrationConfig) error
Reload applies configuration changes
func (*GeminiCLIHookAdapter) Remove ¶
func (a *GeminiCLIHookAdapter) Remove() error
Remove removes the integration configuration
func (*GeminiCLIHookAdapter) Setup ¶
func (a *GeminiCLIHookAdapter) Setup(binaryPath string) error
Setup configures the Gemini CLI integration
func (*GeminiCLIHookAdapter) Update ¶
func (a *GeminiCLIHookAdapter) Update(binaryPath string) error
Update updates the integration configuration
func (*GeminiCLIHookAdapter) Validate ¶
func (a *GeminiCLIHookAdapter) Validate() error
Validate checks the health of the integration
type GeminiCLIMCPAdapter ¶
type GeminiCLIMCPAdapter struct {
// contains filtered or unexported fields
}
GeminiCLIMCPAdapter implements the Integration interface for Gemini CLI MCP server
func NewGeminiCLIMCPAdapter ¶
func NewGeminiCLIMCPAdapter() *GeminiCLIMCPAdapter
NewGeminiCLIMCPAdapter creates a new Gemini CLI MCP integration adapter
func (*GeminiCLIMCPAdapter) Detect ¶
func (a *GeminiCLIMCPAdapter) Detect() (bool, error)
Detect checks if Gemini CLI with MCP support is installed on the system
func (*GeminiCLIMCPAdapter) FormatOutput ¶
func (a *GeminiCLIMCPAdapter) FormatOutput(index *types.GraphIndex, format integrations.OutputFormat) (string, error)
FormatOutput is not used by MCP integrations MCP servers provide output through resources and tools, not direct formatting
func (*GeminiCLIMCPAdapter) GetCommand ¶
func (a *GeminiCLIMCPAdapter) GetCommand(binaryPath string, format integrations.OutputFormat) string
GetCommand returns the command that should be executed by Gemini CLI
func (*GeminiCLIMCPAdapter) GetDescription ¶
func (a *GeminiCLIMCPAdapter) GetDescription() string
GetDescription returns a human-readable description
func (*GeminiCLIMCPAdapter) GetName ¶
func (a *GeminiCLIMCPAdapter) GetName() string
GetName returns the integration name
func (*GeminiCLIMCPAdapter) GetVersion ¶
func (a *GeminiCLIMCPAdapter) GetVersion() string
GetVersion returns the adapter version
func (*GeminiCLIMCPAdapter) IsEnabled ¶
func (a *GeminiCLIMCPAdapter) IsEnabled() (bool, error)
IsEnabled checks if the integration is currently configured
func (*GeminiCLIMCPAdapter) Reload ¶
func (a *GeminiCLIMCPAdapter) Reload(newConfig integrations.IntegrationConfig) error
Reload applies configuration changes
func (*GeminiCLIMCPAdapter) Remove ¶
func (a *GeminiCLIMCPAdapter) Remove() error
Remove removes the integration configuration
func (*GeminiCLIMCPAdapter) Setup ¶
func (a *GeminiCLIMCPAdapter) Setup(binaryPath string) error
Setup configures the Gemini CLI MCP integration
func (*GeminiCLIMCPAdapter) Update ¶
func (a *GeminiCLIMCPAdapter) Update(binaryPath string) error
Update updates the integration configuration
func (*GeminiCLIMCPAdapter) Validate ¶
func (a *GeminiCLIMCPAdapter) Validate() error
Validate checks the health of the integration
func (*GeminiCLIMCPAdapter) VerifyRegistration ¶
func (a *GeminiCLIMCPAdapter) VerifyRegistration() error
VerifyRegistration verifies the MCP server is properly registered This can be called after setup to confirm the configuration
type GeminiHook ¶
type GeminiHook struct {
Name string `json:"name,omitempty"`
Type string `json:"type"`
Command string `json:"command"`
Description string `json:"description,omitempty"`
Timeout float64 `json:"timeout,omitempty"`
}
GeminiHook represents a single hook command
type GeminiHookEvent ¶
type GeminiHookEvent struct {
Matcher string `json:"matcher,omitempty"`
Hooks []GeminiHook `json:"hooks"`
}
GeminiHookEvent represents a hook event configuration
type GeminiHookOutput ¶
type GeminiHookOutput struct {
HookSpecificOutput *GeminiHookSpecificOutput `json:"hookSpecificOutput"`
}
GeminiHookOutput represents the Gemini CLI SessionStart hook response format
type GeminiHookSpecificOutput ¶
type GeminiHookSpecificOutput struct {
HookEventName string `json:"hookEventName"`
AdditionalContext string `json:"additionalContext"`
}
GeminiHookSpecificOutput contains the hook-specific output data
type GeminiMCPConfig ¶
type GeminiMCPConfig struct {
MCPServers map[string]GeminiMCPServer `json:"mcpServers,omitempty"`
}
GeminiMCPConfig represents the Gemini CLI settings.json structure Only includes the mcpServers section we care about
type GeminiMCPServer ¶
type GeminiMCPServer struct {
Command string `json:"command,omitempty"` // For stdio: executable path
Args []string `json:"args,omitempty"` // For stdio: command arguments
Env map[string]string `json:"env,omitempty"` // Environment variables
}
GeminiMCPServer represents a single MCP server configuration Note: No "type" field - Gemini CLI defaults to stdio transport
type GeminiSettings ¶
type GeminiSettings struct {
Hooks map[string][]GeminiHookEvent `json:"hooks,omitempty"`
}
GeminiSettings represents the Gemini CLI settings structure