setup

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverTools

func DiscoverTools(backendURL string) ([]model.ToolInfo, error)

DiscoverTools connects to an MCP backend, performs the initialize handshake, and returns the list of available tools.

func GenerateConfig

func GenerateConfig(
	backend BackendInput,
	policies []ToolPolicy,
	agent AgentChoice,
	approvalNotif ApprovalNotificationInput,
	outputPath string,
) error

GenerateConfig builds a config.Config from wizard results and writes it as YAML.

Types

type AgentAdapter

type AgentAdapter interface {
	Name() string
	Verified() bool
	Detect() bool
	ConfigPath() string
	Inject(serverName, aegisURL string) error
	PostSetupHint() string
}

AgentAdapter knows how to detect and configure a specific agent framework.

func AllAdapters

func AllAdapters() []AgentAdapter

AllAdapters returns the list of known agent adapters.

type AgentChoice

type AgentChoice struct {
	Adapter AgentAdapter
	AgentID string
}

AgentChoice holds the selected agent adapter and ID.

func PromptAgent

func PromptAgent(backendName string) (*AgentChoice, error)

PromptAgent asks the user to select an agent framework and enter an agent ID.

type ApprovalNotificationInput added in v0.1.9

type ApprovalNotificationInput struct {
	FeishuWebhookURL  string
	GenericWebhookURL string
	CallbackBaseURL   string
}

ApprovalNotificationInput holds the user's approval notification configuration.

func PromptApprovalNotification added in v0.1.9

func PromptApprovalNotification() (ApprovalNotificationInput, error)

PromptApprovalNotification asks how approval requests should be delivered.

type BackendInput

type BackendInput struct {
	Name string
	URL  string
}

BackendInput holds the user's backend configuration.

func PromptBackend

func PromptBackend() (*BackendInput, []model.ToolInfo, error)

PromptBackend asks for backend name and URL, then discovers tools.

type ClaudeCodeAdapter

type ClaudeCodeAdapter struct{}

func (*ClaudeCodeAdapter) ConfigPath

func (a *ClaudeCodeAdapter) ConfigPath() string

func (*ClaudeCodeAdapter) Detect

func (a *ClaudeCodeAdapter) Detect() bool

func (*ClaudeCodeAdapter) Inject

func (a *ClaudeCodeAdapter) Inject(serverName, aegisURL string) error

func (*ClaudeCodeAdapter) Name

func (a *ClaudeCodeAdapter) Name() string

func (*ClaudeCodeAdapter) PostSetupHint

func (a *ClaudeCodeAdapter) PostSetupHint() string

func (*ClaudeCodeAdapter) Verified

func (a *ClaudeCodeAdapter) Verified() bool

type CustomAdapter

type CustomAdapter struct{}

func (*CustomAdapter) ConfigPath

func (a *CustomAdapter) ConfigPath() string

func (*CustomAdapter) Detect

func (a *CustomAdapter) Detect() bool

func (*CustomAdapter) Inject

func (a *CustomAdapter) Inject(serverName, aegisURL string) error

func (*CustomAdapter) Name

func (a *CustomAdapter) Name() string

func (*CustomAdapter) PostSetupHint

func (a *CustomAdapter) PostSetupHint() string

func (*CustomAdapter) Verified

func (a *CustomAdapter) Verified() bool

type OpenClawAdapter

type OpenClawAdapter struct{}

func (*OpenClawAdapter) ConfigPath

func (a *OpenClawAdapter) ConfigPath() string

func (*OpenClawAdapter) Detect

func (a *OpenClawAdapter) Detect() bool

func (*OpenClawAdapter) Inject

func (a *OpenClawAdapter) Inject(serverName, aegisURL string) error

func (*OpenClawAdapter) Name

func (a *OpenClawAdapter) Name() string

func (*OpenClawAdapter) PostSetupHint

func (a *OpenClawAdapter) PostSetupHint() string

func (*OpenClawAdapter) Verified

func (a *OpenClawAdapter) Verified() bool

type ToolPolicy

type ToolPolicy struct {
	Name       string
	RateLimit  string // e.g. "5/1h", "unlimited"
	Approval   bool
	Queue      bool
	QueueDelay string // e.g. "30s-60s"
	Deny       bool
}

ToolPolicy holds per-tool policy choices.

func PromptToolPolicies

func PromptToolPolicies(tools []model.ToolInfo) ([]ToolPolicy, error)

PromptToolPolicies asks the user to configure each tool's policy.

Jump to

Keyboard shortcuts

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