roo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package roo provides an adapter for Roo Code VS Code extension MCP configuration.

Roo Code uses a format similar to Cline, with config at:

  • Global: mcp_settings.json in VS Code globalStorage
  • Workspace: .roo/mcp.json

Index

Constants

View Source
const (
	// AdapterName is the identifier for this adapter.
	AdapterName = "roo"

	// GlobalConfigFileName is the global config file name.
	GlobalConfigFileName = "mcp_settings.json"

	// WorkspaceConfigDir is the workspace config directory.
	WorkspaceConfigDir = ".roo"

	// WorkspaceConfigFileName is the workspace config file name.
	WorkspaceConfigFileName = "mcp.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter implements core.Adapter for Roo Code.

func NewAdapter

func NewAdapter() *Adapter

NewAdapter creates a new Roo Code adapter.

func (*Adapter) DefaultPaths

func (a *Adapter) DefaultPaths() []string

DefaultPaths returns the default config file paths for Roo Code.

func (*Adapter) FromCore

func (a *Adapter) FromCore(cfg *core.Config) *Config

FromCore converts canonical config to Roo Code format.

func (*Adapter) Marshal

func (a *Adapter) Marshal(cfg *core.Config) ([]byte, error)

Marshal converts canonical config to Roo Code format.

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the adapter name.

func (*Adapter) Parse

func (a *Adapter) Parse(data []byte) (*core.Config, error)

Parse parses Roo Code config data into the canonical format.

func (*Adapter) ReadFile

func (a *Adapter) ReadFile(path string) (*core.Config, error)

ReadFile reads a Roo Code config file.

func (*Adapter) ToCore

func (a *Adapter) ToCore(rooCfg *Config) *core.Config

ToCore converts Roo Code config to canonical format.

func (*Adapter) WriteFile

func (a *Adapter) WriteFile(cfg *core.Config, path string) error

WriteFile writes canonical config to a Roo Code format file.

type Config

type Config struct {
	MCPServers map[string]ServerConfig `json:"mcpServers"`
}

Config represents the Roo Code MCP configuration.

func NewConfig

func NewConfig() *Config

NewConfig creates a new Roo Code config.

type ServerConfig

type ServerConfig struct {
	// Type specifies the transport type.
	Type string `json:"type,omitempty"`

	// --- STDIO Server Fields ---
	Command string            `json:"command,omitempty"`
	Args    []string          `json:"args,omitempty"`
	Env     map[string]string `json:"env,omitempty"`

	// --- HTTP/SSE Server Fields ---
	URL     string            `json:"url,omitempty"`
	Headers map[string]string `json:"headers,omitempty"`

	// --- Roo-specific Fields ---
	AlwaysAllow []string `json:"alwaysAllow,omitempty"`
	Disabled    bool     `json:"disabled,omitempty"`
}

ServerConfig represents a Roo Code MCP server configuration.

Jump to

Keyboard shortcuts

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