agent

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

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 name of the agent
	Name() string

	// ID returns the unique identifier of the agent
	ID() string

	// FormatFile converts a file reference for this agent's format
	FormatFile(path string) string

	// FormatMCP formats an MCP command for this agent
	FormatMCP(agent, command string, args ...string) string

	// FormatMemory processes a memory context for this agent
	FormatMemory(content string) (string, error)

	// FormatCommand processes a command definition for this agent
	FormatCommand(commands []model.Command) (string, error)

	// MemoryPath returns the default path for memory files based on user scope
	MemoryPath(userScope bool) string

	// CommandPath returns the default path for command files based on user scope
	CommandPath(userScope bool) string

	// FormatMode processes mode definitions for this agent
	FormatMode(modes []model.Mode) (string, error)

	// ModePath returns the default path for mode files based on user scope
	ModePath(userScope bool) string
}

Agent represents a target AI agent that has specific format requirements

type Claude

type Claude struct{}

Claude implements the Claude-specific conversion logic

func (*Claude) CommandPath

func (c *Claude) CommandPath(userScope bool) string

CommandPath returns the default path for Claude agent command files

func (*Claude) FormatCommand

func (c *Claude) FormatCommand(commands []model.Command) (string, error)

FormatCommand processes command definitions for Claude agent

func (*Claude) FormatFile

func (c *Claude) FormatFile(path string) string

FormatFile converts a path to Claude's file reference format

func (*Claude) FormatMCP

func (c *Claude) FormatMCP(agent, command string, args ...string) string

FormatMCP formats an MCP command for Claude agent

func (*Claude) FormatMemory

func (c *Claude) FormatMemory(content string) (string, error)

FormatMemory processes a memory context for Claude agent

func (*Claude) FormatMode added in v0.0.4

func (c *Claude) FormatMode(modes []model.Mode) (string, error)

FormatMode processes mode definitions for Claude agent Claude does not support combining multiple modes.

func (*Claude) ID

func (c *Claude) ID() string

ID returns the unique identifier for Claude agent

func (*Claude) MemoryPath

func (c *Claude) MemoryPath(userScope bool) string

MemoryPath returns the default path for Claude agent memory files

func (*Claude) ModePath added in v0.0.4

func (c *Claude) ModePath(userScope bool) string

ModePath returns the default path for Claude agent mode files

func (*Claude) Name

func (c *Claude) Name() string

Name returns the display name for Claude agent

type Cline

type Cline struct{}

Cline implements the Cline-specific conversion logic

func (*Cline) CommandPath

func (c *Cline) CommandPath(userScope bool) string

CommandPath returns the default path for Cline agent command files

func (*Cline) FormatCommand

func (c *Cline) FormatCommand(commands []model.Command) (string, error)

FormatCommand processes command (workflow) definitions for Cline agent

func (*Cline) FormatFile

func (c *Cline) FormatFile(path string) string

FormatFile converts a path to Cline's file reference format

func (*Cline) FormatMCP

func (c *Cline) FormatMCP(agent, command string, args ...string) string

FormatMCP formats an MCP command for Cline agent

func (*Cline) FormatMemory

func (c *Cline) FormatMemory(content string) (string, error)

FormatMemory processes a memory context for Cline agent

func (*Cline) FormatMode added in v0.0.4

func (c *Cline) FormatMode(modes []model.Mode) (string, error)

FormatMode processes mode definitions for Cline agent

func (*Cline) ID

func (c *Cline) ID() string

ID returns the unique identifier for Cline agent

func (*Cline) MemoryPath

func (c *Cline) MemoryPath(userScope bool) string

MemoryPath returns the default path for Cline agent memory files

func (*Cline) ModePath added in v0.0.4

func (c *Cline) ModePath(userScope bool) string

ModePath returns the default path for Cline agent mode files

func (*Cline) Name

func (c *Cline) Name() string

Name returns the display name for Cline agent

type Copilot

type Copilot struct{}

Copilot implements the Copilot-specific conversion logic

func (*Copilot) CommandPath

func (c *Copilot) CommandPath(userScope bool) string

CommandPath returns the default path for Copilot agent command files

func (*Copilot) DefaultCommandPath

func (c *Copilot) DefaultCommandPath(outputBaseDir string, userScope bool, fileName string) (string, error)

DefaultCommandPath determines the default output path for command tasks

func (*Copilot) DefaultMemoryPath

func (c *Copilot) DefaultMemoryPath(outputBaseDir string, userScope bool, fileName string) (string, error)

DefaultMemoryPath determines the default output path for memory tasks

func (*Copilot) FormatCommand

func (c *Copilot) FormatCommand(commands []model.Command) (string, error)

FormatCommand processes command definitions for Copilot agent

func (*Copilot) FormatFile

func (c *Copilot) FormatFile(path string) string

FormatFile converts a path to Copilot's file reference format

func (*Copilot) FormatMCP

func (c *Copilot) FormatMCP(agent, command string, args ...string) string

FormatMCP formats an MCP command for Copilot agent

func (*Copilot) FormatMemory

func (c *Copilot) FormatMemory(content string) (string, error)

FormatMemory processes a memory context for Copilot agent

func (*Copilot) FormatMode added in v0.0.4

func (c *Copilot) FormatMode(modes []model.Mode) (string, error)

FormatMode processes mode definitions for Copilot agent

func (*Copilot) ID

func (c *Copilot) ID() string

ID returns the unique identifier for Copilot agent

func (*Copilot) MemoryPath

func (c *Copilot) MemoryPath(userScope bool) string

MemoryPath returns the default path for Copilot agent memory files

func (*Copilot) ModePath added in v0.0.4

func (c *Copilot) ModePath(userScope bool) string

ModePath returns the default path for Copilot agent mode files

func (*Copilot) Name

func (c *Copilot) Name() string

Name returns the display name for Copilot agent

func (*Copilot) ShouldConcatenate

func (c *Copilot) ShouldConcatenate(taskType string) bool

ShouldConcatenate determines whether content should be concatenated

type Registry

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

Registry maintains a registry of available agents

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new agent registry

func (*Registry) Get

func (r *Registry) Get(id string) (Agent, bool)

Get returns an agent by ID

func (*Registry) List

func (r *Registry) List() []Agent

List returns all registered agents

func (*Registry) Register

func (r *Registry) Register(agent Agent)

Register registers an agent

func (*Registry) RegisterDefaults

func (r *Registry) RegisterDefaults()

RegisterDefaults registers all default agents

type Roo

type Roo struct{}

Roo implements the Roo-specific conversion logic

func (*Roo) CommandPath

func (r *Roo) CommandPath(userScope bool) string

CommandPath returns the default path for Roo agent command files (directory, non-concatenated)

func (*Roo) FormatCommand

func (r *Roo) FormatCommand(commands []model.Command) (string, error)

FormatCommand processes command definitions for Roo agent (slash command markdown)

func (*Roo) FormatFile

func (r *Roo) FormatFile(path string) string

FormatFile converts a path to Roo's file reference format

func (*Roo) FormatMCP

func (r *Roo) FormatMCP(agent, command string, args ...string) string

FormatMCP formats an MCP command for Roo agent

func (*Roo) FormatMemory

func (r *Roo) FormatMemory(content string) (string, error)

FormatMemory processes a memory context for Roo agent

func (*Roo) FormatMode added in v0.0.4

func (r *Roo) FormatMode(modes []model.Mode) (string, error)

FormatMode processes mode definitions for Roo agent Roo supports combining multiple modes into a single YAML output, similar to FormatCommand.

func (*Roo) ID

func (r *Roo) ID() string

ID returns the unique identifier for Roo agent

func (*Roo) MemoryPath

func (r *Roo) MemoryPath(userScope bool) string

MemoryPath returns the default path for Roo agent memory files

func (*Roo) ModePath added in v0.0.4

func (r *Roo) ModePath(userScope bool) string

ModePath returns the default path for Roo agent mode files Project scope aggregates into a single file ".roomodes" User scope aggregates into VS Code globalStorage custom_modes.yaml under the user's home directory

func (*Roo) Name

func (r *Roo) Name() string

Name returns the display name for Roo agent

type RooSlashMeta added in v0.0.4

type RooSlashMeta struct {
	// Description: Optional Roo-specific description that overrides top-level Command.Description when provided
	Description  string `yaml:"description,omitempty"`
	ArgumentHint string `yaml:"argument-hint,omitempty"`
}

RooSlashMeta is a simple struct for Roo-specific metadata.

Jump to

Keyboard shortcuts

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