cursor

package
v0.0.0-...-e0ebc8c Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEventHandlers

func RegisterEventHandlers(bus events.Bus, manager *CursorConfigManager)

RegisterEventHandlers subscribes the manager to relevant events.

Types

type CursorConfigManager

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

CursorConfigManager handles reading and writing the Cursor mcp.json file.

func NewCursorConfigManager

func NewCursorConfigManager(logger log.Logger) (*CursorConfigManager, error)

NewCursorConfigManager creates a new manager instance.

func (*CursorConfigManager) EnsureAgentEntry

func (m *CursorConfigManager) EnsureAgentEntry() error

EnsureAgentEntry checks if the Agent Browser entry exists and is correct, adding/updating it if necessary, and then writes the file back.

func (*CursorConfigManager) HandleLocalToolsRefreshed

func (m *CursorConfigManager) HandleLocalToolsRefreshed(event events.Event)

HandleLocalToolsRefreshed handles the event indicating local tools may have changed. It triggers a debounced rewrite of the mcp.json file.

type MCPServersConfig

type MCPServersConfig struct {
	MCPServers map[string]ServerEntry `json:"mcpServers"`
}

MCPServersConfig represents the structure of the mcp.json file

type ServerEntry

type ServerEntry struct {
	URL string `json:"url"`
}

ServerEntry defines the structure for server entries within mcp.json

Jump to

Keyboard shortcuts

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