agents

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package agents contains adapters for writing Atlas integration files for local coding agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	// Name returns the stable adapter id used in Atlas config.
	Name() string
	// DisplayName returns the user-facing agent name.
	DisplayName() string
	// DetectSystem reports whether the agent is installed or configured on this machine.
	DetectSystem(context.Context) bool
	// DetectProject reports whether project-local files imply this agent should be configured.
	DetectProject(root string) bool
	// GuidelinesPath returns the project-local instruction file path.
	GuidelinesPath(root string) string
	// SkillsPath returns the project-local skill or instruction directory path.
	SkillsPath(root string) string
	// MCPConfigPath returns the project-local MCP configuration file path.
	MCPConfigPath(root string) string
	// WriteMCPConfig writes the agent-specific MCP server configuration.
	WriteMCPConfig(ctx context.Context, root string, server MCPServerConfig) error
}

Agent writes project-local integration files for one supported local agent.

func Builtins

func Builtins() []Agent

Builtins returns the first-class Atlas agent adapters.

func ByName

func ByName(name string) (Agent, bool)

ByName returns the supported agent adapter for name.

type Claude

type Claude struct{}

Claude writes project-local integration files for Claude Code.

func (Claude) DetectProject

func (Claude) DetectProject(root string) bool

DetectProject reports whether the project already has Claude Code files.

func (Claude) DetectSystem

func (Claude) DetectSystem(context.Context) bool

DetectSystem reports whether Claude Code appears to be configured.

func (Claude) DisplayName

func (Claude) DisplayName() string

DisplayName returns the user-facing adapter name.

func (Claude) GuidelinesPath

func (Claude) GuidelinesPath(root string) string

GuidelinesPath returns the Claude guideline file path.

func (Claude) MCPConfigPath

func (Claude) MCPConfigPath(root string) string

MCPConfigPath returns the Claude MCP config path.

func (Claude) Name

func (Claude) Name() string

Name returns the stable adapter id.

func (Claude) RemoveMCPConfig added in v0.3.1

func (c Claude) RemoveMCPConfig(_ context.Context, root string, serverName string) error

RemoveMCPConfig removes Atlas's Claude MCP server while preserving unrelated entries.

func (Claude) SkillsPath

func (Claude) SkillsPath(root string) string

SkillsPath returns the Claude skill directory path.

func (Claude) WriteMCPConfig

func (c Claude) WriteMCPConfig(_ context.Context, root string, server MCPServerConfig) error

WriteMCPConfig writes the Claude MCP server configuration.

type Codex

type Codex struct{}

Codex writes project-local integration files for OpenAI Codex.

func (Codex) DetectProject

func (Codex) DetectProject(root string) bool

DetectProject reports whether the project already has Codex instructions.

func (Codex) DetectSystem

func (Codex) DetectSystem(context.Context) bool

DetectSystem reports whether Codex appears to be configured on this machine.

func (Codex) DisplayName

func (Codex) DisplayName() string

DisplayName returns the user-facing adapter name.

func (Codex) GuidelinesPath

func (Codex) GuidelinesPath(root string) string

GuidelinesPath returns the Codex guideline file path.

func (Codex) MCPConfigPath

func (Codex) MCPConfigPath(root string) string

MCPConfigPath returns the Codex MCP config path.

func (Codex) Name

func (Codex) Name() string

Name returns the stable adapter id.

func (Codex) RemoveMCPConfig added in v0.3.1

func (c Codex) RemoveMCPConfig(_ context.Context, root string, serverName string) error

RemoveMCPConfig removes Atlas's Codex MCP table while preserving other project configuration.

func (Codex) SkillsPath

func (Codex) SkillsPath(root string) string

SkillsPath returns the Codex skill directory path.

func (Codex) WriteMCPConfig

func (c Codex) WriteMCPConfig(_ context.Context, root string, server MCPServerConfig) error

WriteMCPConfig writes the Codex MCP server configuration.

type Copilot

type Copilot struct{}

Copilot writes project-local integration files for GitHub Copilot in VS Code.

func (Copilot) DetectProject

func (Copilot) DetectProject(root string) bool

DetectProject reports whether the project already has Copilot files.

func (Copilot) DetectSystem

func (Copilot) DetectSystem(context.Context) bool

DetectSystem reports whether Copilot should be offered.

func (Copilot) DisplayName

func (Copilot) DisplayName() string

DisplayName returns the user-facing adapter name.

func (Copilot) GuidelinesPath

func (Copilot) GuidelinesPath(root string) string

GuidelinesPath returns the Copilot guideline file path.

func (Copilot) MCPConfigPath

func (Copilot) MCPConfigPath(root string) string

MCPConfigPath returns the VS Code MCP config path used by Copilot.

func (Copilot) Name

func (Copilot) Name() string

Name returns the stable adapter id.

func (Copilot) PromptsPath

func (Copilot) PromptsPath(root string) string

PromptsPath returns the Copilot prompt directory path.

func (Copilot) RemoveMCPConfig added in v0.3.1

func (c Copilot) RemoveMCPConfig(_ context.Context, root string, serverName string) error

RemoveMCPConfig removes Atlas's VS Code MCP server while preserving unrelated entries.

func (Copilot) SkillsPath

func (Copilot) SkillsPath(root string) string

SkillsPath returns the Copilot instruction directory path.

func (Copilot) WriteMCPConfig

func (c Copilot) WriteMCPConfig(_ context.Context, root string, server MCPServerConfig) error

WriteMCPConfig writes the VS Code MCP server configuration.

type Gemini added in v0.2.0

type Gemini struct{}

Gemini writes project-local integration files for Gemini CLI.

func (Gemini) DetectProject added in v0.2.0

func (Gemini) DetectProject(root string) bool

DetectProject reports whether the project already has Gemini CLI files.

func (Gemini) DetectSystem added in v0.2.0

func (Gemini) DetectSystem(context.Context) bool

DetectSystem reports whether Gemini CLI appears to be configured or installed.

func (Gemini) DisplayName added in v0.2.0

func (Gemini) DisplayName() string

DisplayName returns the user-facing adapter name.

func (Gemini) GuidelinesPath added in v0.2.0

func (Gemini) GuidelinesPath(root string) string

GuidelinesPath returns the Gemini guideline file path.

func (Gemini) MCPConfigPath added in v0.2.0

func (Gemini) MCPConfigPath(root string) string

MCPConfigPath returns the Gemini project settings path.

func (Gemini) Name added in v0.2.0

func (Gemini) Name() string

Name returns the stable adapter id.

func (Gemini) RemoveMCPConfig added in v0.3.1

func (g Gemini) RemoveMCPConfig(_ context.Context, root string, serverName string) error

RemoveMCPConfig removes Atlas's Gemini MCP server while preserving unrelated settings.

func (Gemini) SkillsPath added in v0.2.0

func (Gemini) SkillsPath(root string) string

SkillsPath returns the Gemini skill context directory path.

func (Gemini) WriteMCPConfig added in v0.2.0

func (g Gemini) WriteMCPConfig(_ context.Context, root string, server MCPServerConfig) error

WriteMCPConfig writes the Gemini MCP server configuration.

type MCPConfigRemover added in v0.3.1

type MCPConfigRemover interface {
	RemoveMCPConfig(ctx context.Context, root string, serverName string) error
}

MCPConfigRemover removes only Atlas-owned MCP configuration for an agent.

type MCPServerConfig

type MCPServerConfig struct {
	Name    string `json:"name"`
	Command string `json:"command"`
	CWD     string `json:"cwd"`
}

MCPServerConfig describes the project-level Atlas MCP server for an agent.

func DefaultMCPServerConfig

func DefaultMCPServerConfig(root string) MCPServerConfig

DefaultMCPServerConfig returns the conventional GoForj Atlas MCP server config.

func (MCPServerConfig) Args

func (c MCPServerConfig) Args() []string

Args returns the stable command arguments for running Atlas through GoForj.

Jump to

Keyboard shortcuts

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