agent

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ContainerUseBinary = "container-use"

Variables

View Source
var AgentCmd = &cobra.Command{
	Use:   "agent [agent]",
	Short: "Configure MCP server for different agents",
	Long:  `Setup the container-use MCP server according to the specified agent including Claude Code, Goose, Cursor, and others.`,
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return interactiveConfiguration()
		}
		agent, err := selectAgent(args[0])
		if err != nil {
			return err
		}
		return configureAgent(agent)
	},
}

Functions

func RunAgentSelector

func RunAgentSelector() (string, error)

RunAgentSelector runs the interactive agent selector and returns the selected agent key

Types

type Agent

type Agent struct {
	Key         string
	Name        string
	Description string
}

Agent represents an agent configuration option

type AgentSelectorModel

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

AgentSelectorModel represents the bubbletea model for agent selection

func InitialModel

func InitialModel() AgentSelectorModel

InitialModel creates the initial model for agent selection

func (AgentSelectorModel) Init

func (m AgentSelectorModel) Init() tea.Cmd

Init initializes the model

func (AgentSelectorModel) Update

func (m AgentSelectorModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles incoming messages and updates the model

func (AgentSelectorModel) View

func (m AgentSelectorModel) View() string

View renders the interface

type ClaudePermissions

type ClaudePermissions struct {
	Allow []string `json:"allow,omitempty"`
	Deny  []string `json:"deny,omitempty"`
}

type ClaudeSettingsLocal

type ClaudeSettingsLocal struct {
	Permissions *ClaudePermissions `json:"permissions,omitempty"`
	Env         map[string]string  `json:"env,omitempty"`
}

type ConfigurableAgent

type ConfigurableAgent interface {
	// contains filtered or unexported methods
}

type ConfigureClaude

type ConfigureClaude struct {
	Name        string
	Description string
}

func NewConfigureClaude

func NewConfigureClaude() *ConfigureClaude

type ConfigureCodex

type ConfigureCodex struct {
	Name        string
	Description string
}

func NewConfigureCodex

func NewConfigureCodex() *ConfigureCodex

type ConfigureCursor

type ConfigureCursor struct {
	Name        string
	Description string
}

func NewConfigureCursor

func NewConfigureCursor() *ConfigureCursor

type ConfigureGoose

type ConfigureGoose struct {
	Name        string
	Description string
}

func NewConfigureGoose

func NewConfigureGoose() *ConfigureGoose

type ConfigureQ

type ConfigureQ struct {
	Name        string
	Description string
}

func NewConfigureQ

func NewConfigureQ() *ConfigureQ

type MCPServer

type MCPServer struct {
	Command       string            `json:"command"`
	Args          []string          `json:"args"`
	Env           map[string]string `json:"env,omitempty"`
	Timeout       *int              `json:"timeout,omitempty"`
	Disabled      *bool             `json:"disabled,omitempty"`
	AutoApprove   []string          `json:"autoApprove,omitempty"`
	AlwaysAllow   []string          `json:"alwaysAllow,omitempty"`
	WorkingDir    *string           `json:"working_directory,omitempty"`
	StartOnLaunch *bool             `json:"start_on_launch,omitempty"`
}

type MCPServersConfig

type MCPServersConfig struct {
	MCPServers map[string]MCPServer `json:"mcpServers"`
}

Jump to

Keyboard shortcuts

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