SYMBOL INDEX (207 symbols across 37 files) FILE: cli/cmd/client.go function ClientCommandFunc (line 50) | func ClientCommandFunc(command *cobra.Command, args []string) error { function init (line 76) | func init() { FILE: cli/cmd/config.go function ConfigCommandFunc (line 48) | func ConfigCommandFunc(command *cobra.Command, args []string) error { function init (line 145) | func init() { FILE: cli/cmd/perrun.go function mlsCommandPreFunc (line 28) | func mlsCommandPreFunc(cmd *cobra.Command, args []string) error { FILE: cli/cmd/root.go constant CliName (line 45) | CliName = "moling" constant CliNameZh (line 46) | CliNameZh = "魔灵" constant MCPServerName (line 47) | MCPServerName = "MoLing MCP Server" constant CliDescription (line 48) | CliDescription = "MoLing is a computer-use and browser-use based MCP... constant CliDescriptionZh (line 49) | CliDescriptionZh = "MoLing(魔灵)是一款基于computer-use和浏browser-use的 MCP 服务器,... constant CliHomepage (line 50) | CliHomepage = "https://gojue.cc/moling" constant CliAuthor (line 51) | CliAuthor = "CFC4N " constant CliGithubRepo (line 52) | CliGithubRepo = "https://github.com/gojue/moling" constant CliDescriptionLong (line 53) | CliDescriptionLong = ` constant CliDescriptionLongZh (line 65) | CliDescriptionLongZh = `MoLing(魔灵)是一个computer-use的MCP Server,基于操作系统API实现... constant MLConfigName (line 78) | MLConfigName = "config.json" constant MLRootPath (line 79) | MLRootPath = ".moling" constant MLPidName (line 80) | MLPidName = "moling.pid" constant LogFileName (line 81) | LogFileName = "moling.log" constant MaxLogSize (line 82) | MaxLogSize = 1024 * 1024 * 512 function usageFunc (line 116) | func usageFunc(c *cobra.Command) error { function Execute (line 122) | func Execute() { function init (line 135) | func init() { function initLogger (line 154) | func initLogger(mlDataPath string) zerolog.Logger { function mlsCommandFunc (line 173) | func mlsCommandFunc(command *cobra.Command, args []string) error { FILE: cli/cobrautl/help.go function init (line 50) | func init() { function molingFlagUsages (line 99) | func molingFlagUsages(flagSet *pflag.FlagSet) string { function getSubCommands (line 132) | func getSubCommands(cmd *cobra.Command) []*cobra.Command { function UsageFunc (line 141) | func UsageFunc(cmd *cobra.Command, version string) error { function getTabOutWithWriter (line 164) | func getTabOutWithWriter(writer io.Writer) *tabwriter.Writer { FILE: cli/main.go function Start (line 23) | func Start() { FILE: client/client.go constant MCPServersKey (line 36) | MCPServersKey = "mcpServers" type MCPServerConfig (line 39) | type MCPServerConfig struct function NewMCPServerConfig (line 50) | func NewMCPServerConfig(description string, command string, srvName stri... type Manager (line 63) | type Manager struct method ListClient (line 81) | func (c *Manager) ListClient() { method SetupConfig (line 95) | func (c *Manager) SetupConfig() { method appendConfig (line 125) | func (c *Manager) appendConfig(name string, payload []byte) ([]byte, e... method checkExist (line 147) | func (c *Manager) checkExist(path string) bool { function NewManager (line 70) | func NewManager(lger zerolog.Logger, mcpConfig MCPServerConfig) (cm *Man... FILE: client/client_config.go function init (line 30) | func init() { FILE: client/client_config_windows.go function init (line 28) | func init() { FILE: client/client_test.go function TestClientManager_ListClient (line 30) | func TestClientManager_ListClient(t *testing.T) { function TestClientManager_checkExist (line 96) | func TestClientManager_checkExist(t *testing.T) { FILE: main.go function main (line 19) | func main() { FILE: pkg/comm/comm.go type MoLingServerType (line 29) | type MoLingServerType type contextKey (line 31) | type contextKey constant MoLingConfigKey (line 35) | MoLingConfigKey contextKey = "moling_config" constant MoLingLoggerKey (line 36) | MoLingLoggerKey contextKey = "moling_logger" function InitTestEnv (line 40) | func InitTestEnv() (zerolog.Logger, context.Context, error) { FILE: pkg/config/config.go type Config (line 24) | type Config interface type MoLingConfig (line 30) | type MoLingConfig struct method Check (line 52) | func (cfg *MoLingConfig) Check() error { method Logger (line 56) | func (cfg *MoLingConfig) Logger() zerolog.Logger { method SetLogger (line 60) | func (cfg *MoLingConfig) SetLogger(logger zerolog.Logger) { FILE: pkg/config/config_test.go function TestConfigLoad (line 28) | func TestConfigLoad(t *testing.T) { FILE: pkg/server/server.go type MoLingServer (line 38) | type MoLingServer struct method init (line 81) | func (m *MoLingServer) init() error { method loadService (line 93) | func (m *MoLingServer) loadService(srv abstract.Service) error { method Serve (line 206) | func (m *MoLingServer) Serve() error { function NewMoLingServer (line 48) | func NewMoLingServer(ctx context.Context, srvs []abstract.Service, mlCon... function requireJSONContentType (line 127) | func requireJSONContentType(next http.Handler) http.Handler { type corsRemoverResponseWriter (line 145) | type corsRemoverResponseWriter struct method cleanCORSHeader (line 159) | func (w *corsRemoverResponseWriter) cleanCORSHeader() { method WriteHeader (line 166) | func (w *corsRemoverResponseWriter) WriteHeader(code int) { method Write (line 171) | func (w *corsRemoverResponseWriter) Write(b []byte) (int, error) { method Flush (line 176) | func (w *corsRemoverResponseWriter) Flush() { function newCORSRemoverResponseWriter (line 151) | func newCORSRemoverResponseWriter(w http.ResponseWriter) *corsRemoverRes... function sseSecurityMiddleware (line 186) | func sseSecurityMiddleware(token string, next http.Handler) http.Handler { FILE: pkg/server/server_test.go function TestNewMLServer (line 33) | func TestNewMLServer(t *testing.T) { function TestSSESecurityMiddleware (line 87) | func TestSSESecurityMiddleware(t *testing.T) { function TestRequireJSONContentType (line 156) | func TestRequireJSONContentType(t *testing.T) { function TestNewMoLingServerGeneratesToken (line 201) | func TestNewMoLingServerGeneratesToken(t *testing.T) { FILE: pkg/services/abstract/abstract.go type ServiceFactory (line 29) | type ServiceFactory type Service (line 32) | type Service interface FILE: pkg/services/abstract/mlservice.go type PromptEntry (line 31) | type PromptEntry struct method Prompt (line 36) | func (pe *PromptEntry) Prompt() mcp.Prompt { method Handler (line 40) | func (pe *PromptEntry) Handler() server.PromptHandlerFunc { function NewMLService (line 45) | func NewMLService(ctx context.Context, logger zerolog.Logger, cfg *confi... type MLService (line 54) | type MLService struct method InitResources (line 68) | func (mls *MLService) InitResources() error { method Ctx (line 79) | func (mls *MLService) Ctx() context.Context { method AddResource (line 84) | func (mls *MLService) AddResource(rs mcp.Resource, hr server.ResourceH... method AddResourceTemplate (line 91) | func (mls *MLService) AddResourceTemplate(rt mcp.ResourceTemplate, hr ... method AddPrompt (line 98) | func (mls *MLService) AddPrompt(pe PromptEntry) { method AddTool (line 105) | func (mls *MLService) AddTool(tool mcp.Tool, handler server.ToolHandle... method AddNotificationHandler (line 112) | func (mls *MLService) AddNotificationHandler(name string, handler serv... method Resources (line 119) | func (mls *MLService) Resources() map[mcp.Resource]server.ResourceHand... method ResourceTemplates (line 126) | func (mls *MLService) ResourceTemplates() map[mcp.ResourceTemplate]ser... method Prompts (line 133) | func (mls *MLService) Prompts() []PromptEntry { method Tools (line 140) | func (mls *MLService) Tools() []server.ServerTool { method NotificationHandlers (line 147) | func (mls *MLService) NotificationHandlers() map[string]server.Notific... method MlConfig (line 154) | func (mls *MLService) MlConfig() *config.MoLingConfig { method Config (line 159) | func (mls *MLService) Config() string { method Name (line 164) | func (mls *MLService) Name() string { method LoadConfig (line 169) | func (mls *MLService) LoadConfig(jsonData map[string]any) error { FILE: pkg/services/abstract/mlservice_test.go function TestMLService_AddResource (line 26) | func TestMLService_AddResource(t *testing.T) { function TestMLService_AddResourceTemplate (line 53) | func TestMLService_AddResourceTemplate(t *testing.T) { function TestMLService_AddPrompt (line 80) | func TestMLService_AddPrompt(t *testing.T) { function TestMLService_AddTool (line 117) | func TestMLService_AddTool(t *testing.T) { function TestMLService_AddNotificationHandler (line 147) | func TestMLService_AddNotificationHandler(t *testing.T) { FILE: pkg/services/browser/browser.go constant BrowserDataPath (line 41) | BrowserDataPath = "browser" constant BrowserServerName (line 42) | BrowserServerName comm.MoLingServerType = "Browser" type BrowserServer (line 46) | type BrowserServer struct method Init (line 81) | func (bs *BrowserServer) Init() error { method initBrowser (line 294) | func (bs *BrowserServer) initBrowser(userDataDir string) error { method handlePrompt (line 322) | func (bs *BrowserServer) handlePrompt(ctx context.Context, request mcp... method handleNavigate (line 339) | func (bs *BrowserServer) handleNavigate(ctx context.Context, request m... method handleScreenshot (line 354) | func (bs *BrowserServer) handleScreenshot(ctx context.Context, request... method handleClick (line 391) | func (bs *BrowserServer) handleClick(ctx context.Context, request mcp.... method handleFill (line 411) | func (bs *BrowserServer) handleFill(ctx context.Context, request mcp.C... method handleSelect (line 432) | func (bs *BrowserServer) handleSelect(ctx context.Context, request mcp... method handleHover (line 452) | func (bs *BrowserServer) handleHover(ctx context.Context, request mcp.... method handleEvaluate (line 473) | func (bs *BrowserServer) handleEvaluate(ctx context.Context, request m... method Close (line 489) | func (bs *BrowserServer) Close() error { method Config (line 500) | func (bs *BrowserServer) Config() string { method Name (line 509) | func (bs *BrowserServer) Name() comm.MoLingServerType { method LoadConfig (line 514) | func (bs *BrowserServer) LoadConfig(jsonData map[string]any) error { function NewBrowserServer (line 55) | func NewBrowserServer(ctx context.Context) (abstract.Service, error) { FILE: pkg/services/browser/browser_config.go constant BrowserPromptDefault (line 26) | BrowserPromptDefault = ` type BrowserConfig (line 61) | type BrowserConfig struct method Check (line 75) | func (cfg *BrowserConfig) Check() error { function NewBrowserConfig (line 97) | func NewBrowserConfig() *BrowserConfig { FILE: pkg/services/browser/browser_debugger.go method handleDebugEnable (line 31) | func (bs *BrowserServer) handleDebugEnable(ctx context.Context, request ... method handleSetBreakpoint (line 67) | func (bs *BrowserServer) handleSetBreakpoint(ctx context.Context, reques... method handleRemoveBreakpoint (line 115) | func (bs *BrowserServer) handleRemoveBreakpoint(ctx context.Context, req... method handlePause (line 138) | func (bs *BrowserServer) handlePause(ctx context.Context, request mcp.Ca... method handleResume (line 154) | func (bs *BrowserServer) handleResume(ctx context.Context, request mcp.C... method handleGetCallstack (line 170) | func (bs *BrowserServer) handleGetCallstack(ctx context.Context, request... FILE: pkg/services/browser/browser_test.go function TestBrowserServer (line 27) | func TestBrowserServer(t *testing.T) { function TestHoverSelectorEscaping (line 51) | func TestHoverSelectorEscaping(t *testing.T) { FILE: pkg/services/command/command.go constant CommandServerName (line 44) | CommandServerName comm.MoLingServerType = "Command" type CommandServer (line 48) | type CommandServer struct method Init (line 86) | func (cs *CommandServer) Init() error { method handlePrompt (line 110) | func (cs *CommandServer) handlePrompt(ctx context.Context, request mcp... method handleExecuteCommand (line 126) | func (cs *CommandServer) handleExecuteCommand(ctx context.Context, req... method isAllowedCommand (line 153) | func (cs *CommandServer) isAllowedCommand(command string) bool { method Config (line 226) | func (cs *CommandServer) Config() string { method Name (line 237) | func (cs *CommandServer) Name() comm.MoLingServerType { method Close (line 241) | func (cs *CommandServer) Close() error { method LoadConfig (line 248) | func (cs *CommandServer) LoadConfig(jsonData map[string]any) error { function NewCommandServer (line 56) | func NewCommandServer(ctx context.Context) (abstract.Service, error) { FILE: pkg/services/command/command_config.go constant CommandPromptDefault (line 26) | CommandPromptDefault = ` type CommandConfig (line 68) | type CommandConfig struct method Check (line 96) | func (cc *CommandConfig) Check() error { function NewCommandConfig (line 88) | func NewCommandConfig() *CommandConfig { FILE: pkg/services/command/command_exec.go function ExecCommand (line 29) | func ExecCommand(command string) (string, error) { FILE: pkg/services/command/command_exec_test.go type MockCommandServer (line 31) | type MockCommandServer struct function TestExecuteCommand (line 36) | func TestExecuteCommand(t *testing.T) { function TestAllowCmd (line 68) | func TestAllowCmd(t *testing.T) { function TestIsAllowedCommandInjection (line 95) | func TestIsAllowedCommandInjection(t *testing.T) { function StructToMap (line 160) | func StructToMap(obj any) map[string]any { FILE: pkg/services/command/command_exec_windows.go function ExecCommand (line 27) | func ExecCommand(command string) (string, error) { FILE: pkg/services/filesystem/file_system.go constant MaxInlineSize (line 42) | MaxInlineSize = 1024 * 1024 * 5 constant MaxBase64Size (line 44) | MaxBase64Size = 1024 * 1024 * 1 constant FilesystemServerName (line 47) | FilesystemServerName comm.MoLingServerType = "FileSystem" type FileInfo (line 50) | type FileInfo struct type FilesystemServer (line 60) | type FilesystemServer struct method Init (line 95) | func (fs *FilesystemServer) Init() error { method handlePrompt (line 209) | func (fs *FilesystemServer) handlePrompt(ctx context.Context, request ... method isPathInAllowedDirs (line 225) | func (fs *FilesystemServer) isPathInAllowedDirs(path string) bool { method validatePath (line 252) | func (fs *FilesystemServer) validatePath(requestedPath string) (string... method getFileStats (line 309) | func (fs *FilesystemServer) getFileStats(path string) (FileInfo, error) { method searchFiles (line 326) | func (fs *FilesystemServer) searchFiles(rootPath, pattern string) ([]s... method handleReadResource (line 355) | func (fs *FilesystemServer) handleReadResource(ctx context.Context, re... method handleReadFile (line 472) | func (fs *FilesystemServer) handleReadFile(ctx context.Context, reques... method handleWriteFile (line 628) | func (fs *FilesystemServer) handleWriteFile(ctx context.Context, reque... method handleListDirectory (line 695) | func (fs *FilesystemServer) handleListDirectory(ctx context.Context, r... method handleCreateDirectory (line 762) | func (fs *FilesystemServer) handleCreateDirectory(ctx context.Context,... method handleMoveFile (line 821) | func (fs *FilesystemServer) handleMoveFile(ctx context.Context, reques... method handleSearchFiles (line 880) | func (fs *FilesystemServer) handleSearchFiles(ctx context.Context, req... method handleGetFileInfo (line 937) | func (fs *FilesystemServer) handleGetFileInfo(ctx context.Context, req... method handleListAllowedDirectories (line 1012) | func (fs *FilesystemServer) handleListAllowedDirectories(ctx context.C... method Config (line 1031) | func (fs *FilesystemServer) Config() string { method Name (line 1041) | func (fs *FilesystemServer) Name() comm.MoLingServerType { method Close (line 1045) | func (fs *FilesystemServer) Close() error { method LoadConfig (line 1052) | func (fs *FilesystemServer) LoadConfig(jsonData map[string]any) error { function NewFilesystemServer (line 65) | func NewFilesystemServer(ctx context.Context) (abstract.Service, error) { FILE: pkg/services/filesystem/file_system_config.go constant FileSystemPromptDefault (line 28) | FileSystemPromptDefault = ` type FileSystemConfig (line 67) | type FileSystemConfig struct method Check (line 92) | func (fc *FileSystemConfig) Check() error { function NewFileSystemConfig (line 76) | func NewFileSystemConfig(path string) *FileSystemConfig { FILE: pkg/services/filesystem/file_system_windows.go function init (line 23) | func init() { FILE: pkg/services/register.go function RegisterServ (line 30) | func RegisterServ(n comm.MoLingServerType, f abstract.ServiceFactory) { function ServiceList (line 35) | func ServiceList() map[comm.MoLingServerType]abstract.ServiceFactory { function init (line 39) | func init() { FILE: pkg/utils/pid.go function CreatePIDFile (line 29) | func CreatePIDFile(pidFilePath string) error { function RemovePIDFile (line 67) | func RemovePIDFile(pidFilePath string) error { FILE: pkg/utils/pid_unix.go function lockFile (line 29) | func lockFile(file *os.File) (bool, error) { function unlockFile (line 40) | func unlockFile(file *os.File) error { FILE: pkg/utils/pid_windows.go constant LockfileExclusiveLock (line 37) | LockfileExclusiveLock = 2 constant LockfileFailImmediately (line 38) | LockfileFailImmediately = 1 constant ErrorLockViolation (line 40) | ErrorLockViolation = syscall.Errno(33) function lockFile (line 43) | func lockFile(file *os.File) (bool, error) { function unlockFile (line 68) | func unlockFile(file *os.File) error { FILE: pkg/utils/rotewriter.go type RotateWriter (line 27) | type RotateWriter struct method Write (line 65) | func (rw *RotateWriter) Write(p []byte) (n int, err error) { method CheckFileSize (line 75) | func (rw *RotateWriter) CheckFileSize() error { method Close (line 108) | func (rw *RotateWriter) Close() error { function NewRotateWriter (line 37) | func NewRotateWriter(filePath string, maxSize int64) (*RotateWriter, err... FILE: pkg/utils/utils.go function CreateDirectory (line 30) | func CreateDirectory(path string) error { function StringInSlice (line 46) | func StringInSlice(s string, modules []string) bool { function MergeJSONToStruct (line 56) | func MergeJSONToStruct(target any, jsonMap map[string]any) error { function DetectMimeType (line 87) | func DetectMimeType(path string) string { function IsTextFile (line 116) | func IsTextFile(mimeType string) bool { function IsImageFile (line 127) | func IsImageFile(mimeType string) bool { function PathToResourceURI (line 132) | func PathToResourceURI(path string) string {