Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ClaudeJSONPath is the relative path to the claude.json file. ClaudeJSONPath = ".claude.json" // ClaudeSettingsPath is the relative path to the Claude settings file. ClaudeSettingsPath = ".claude/settings.json" )
View Source
const CursorCLIConfigPath = ".cursor/cli-config.json"
CursorCLIConfigPath is the path to Cursor's CLI configuration file.
View Source
const (
// GooseConfigPath is the relative path to the Goose configuration file.
GooseConfigPath = ".config/goose/config.yaml"
)
View Source
const (
// OpenCodeConfigPath is the relative path to the OpenCode configuration file.
OpenCodeConfigPath = ".config/opencode/opencode.json"
)
Variables ¶
View Source
var ( // ErrAgentNotFound is returned when an agent is not found in the registry. ErrAgentNotFound = errors.New("agent not found") )
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface {
// Name returns the agent name (e.g., "claude", "goose").
Name() string
// SkipOnboarding modifies agent settings to skip onboarding prompts.
// It takes the current agent settings map (path -> content) and the workspace
// sources path inside the container, and returns the modified settings with
// onboarding flags set appropriately.
// Returns the modified settings map, or an error if modification fails.
SkipOnboarding(settings map[string][]byte, workspaceSourcesPath string) (map[string][]byte, error)
// SetModel configures the model ID in the agent settings.
// It takes the current agent settings map (path -> content) and the model ID,
// and returns the modified settings with the model configured.
// If the agent does not support model configuration, settings are returned unchanged.
// Returns the modified settings map, or an error if modification fails.
SetModel(settings map[string][]byte, modelID string) (map[string][]byte, error)
// SkillsDir returns the container path (using $HOME variable) under which skill
// directories should be mounted (e.g., "$HOME/.claude/skills" for Claude Code).
// Returns "" if the agent does not support skills mounting.
SkillsDir() string
// SetMCPServers configures MCP servers in the agent settings.
// It takes the current agent settings map (path -> content) and the MCP configuration,
// and returns the modified settings with MCP servers configured.
// If the agent does not support MCP configuration, settings are returned unchanged.
// If mcp is nil, settings are returned unchanged.
// Returns the modified settings map, or an error if modification fails.
SetMCPServers(settings map[string][]byte, mcp *workspace.McpConfiguration) (map[string][]byte, error)
}
Agent is an interface for agent-specific configuration and setup operations.
func NewOpenCode ¶ added in v0.6.0
func NewOpenCode() Agent
NewOpenCode creates a new OpenCode agent implementation.
type Registry ¶
type Registry interface {
// Register registers an agent implementation by name.
Register(name string, agent Agent) error
// Get retrieves an agent implementation by name.
// Returns ErrAgentNotFound if the agent is not registered.
Get(name string) (Agent, error)
// List returns all registered agent names.
List() []string
}
Registry manages agent implementations.
Click to show internal directories.
Click to hide internal directories.