Documentation
¶
Index ¶
- type BinaryData
- type Config
- type Handler
- func (h *Handler) ConfigureIDEs()
- func (h *Handler) Name() string
- func (h *Handler) OnUIAction(actionFunc func(string))
- func (h *Handler) PublishLog(msg string)
- func (h *Handler) PublishTabLog(tabTitle, handlerName, handlerColor, msg string)
- func (h *Handler) Serve()
- func (h *Handler) SetLog(f func(message ...any))
- func (h *Handler) Stop() error
- func (h *Handler) URL() string
- type IDEInfo
- type LogEntry
- type Loggable
- type ParameterMetadata
- type ToolExecutor
- type ToolMetadata
- type ToolProvider
- type TuiInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryData ¶
BinaryData represents binary response from tools (imported from handlers)
type Config ¶
type Config struct {
Port string
ServerName string // MCP server name
ServerVersion string // MCP server version
AppName string // Application name (used to generate MCP server ID)
AppVersion string // Binary version for /version endpoint (used to detect stale daemons)
}
Config contains the configuration for Handler
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles the Model Context Protocol server and configuration
func NewHandler ¶
func NewHandler(config Config, toolHandlers []ToolProvider, tui TuiInterface, exitChan chan bool) *Handler
NewHandler creates a new MCP handler with minimal dependencies
func (*Handler) ConfigureIDEs ¶
func (h *Handler) ConfigureIDEs()
ConfigureIDEs automatically configures supported IDEs with this MCP server
func (*Handler) OnUIAction ¶ added in v0.0.22
OnUIAction sets the callback for generic UI actions triggered from TUI or IDE
func (*Handler) PublishLog ¶ added in v0.0.22
PublishLog publishes a log message to the BUILD section as a generic MCP log.
func (*Handler) PublishTabLog ¶ added in v0.0.23
PublishTabLog publishes a structured log entry to the SSE stream with full routing metadata. tabTitle must match one of the section titles registered in the client TUI (e.g. "BUILD", "DEPLOY").
func (*Handler) Serve ¶
func (h *Handler) Serve()
Serve starts the Model Context Protocol server for LLM integration via HTTP
type IDEInfo ¶
type IDEInfo struct {
ID string
Name string
GetConfigDir func() (string, error)
ConfigFileName string
// IDE-specific JSON format configuration
ServersKey string // "servers" for VS Code, "mcpServers" for Antigravity
URLKey string // "url" for VS Code, "serverUrl" for Antigravity
ExtraFields map[string]any // Additional fields like "type", "autoStart"
HasInputs bool // VS Code has "inputs" array, Antigravity doesn't
SkipProfiles bool // true = single config file, no profile scanning
}
IDEInfo represents a supported IDE and its MCP configuration format
type LogEntry ¶ added in v0.0.23
type LogEntry struct {
Id string `json:"id"`
Timestamp string `json:"timestamp"`
Content string `json:"content"`
Type uint8 `json:"type"` // matches devtui.MessageType (uint8): 1 = Info
TabTitle string `json:"tab_title"`
HandlerName string `json:"handler_name"`
HandlerColor string `json:"handler_color"`
HandlerType int `json:"handler_type"` // matches devtui.handlerType iota: 4 = loggable
}
type ParameterMetadata ¶
type ParameterMetadata struct {
Name string
Description string
Required bool
Type string // "string", "number", "boolean"
EnumValues []string
Default any
}
ParameterMetadata describes a tool parameter
type ToolExecutor ¶
ToolExecutor defines how a tool should be executed Handlers implement this to provide execution logic without exposing internals args: map of parameter name to value from MCP request
type ToolMetadata ¶
type ToolMetadata struct {
Name string
Description string
Parameters []ParameterMetadata
Execute ToolExecutor // Handler provides execution function
}
ToolMetadata provides MCP tool configuration metadata This is the standard interface that all handlers should implement
type ToolProvider ¶ added in v0.0.16
type ToolProvider interface {
GetMCPToolsMetadata() []ToolMetadata
}
ToolProvider defines the interface for handlers that support MCP tools
type TuiInterface ¶
type TuiInterface interface {
RefreshUI()
}
TuiInterface defines what the MCP handler needs from the TUI