setup

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package setup provides the interactive setup wizard for the agent.

Index

Constants

View Source
const (
	ScenarioLocal      = "local"      // Personal machine, experimenting
	ScenarioDev        = "dev"        // Development/testing with cloud LLMs
	ScenarioTeam       = "team"       // Small team, shared proxy (LiteLLM)
	ScenarioProduction = "production" // Production with full features
	ScenarioDocker     = "docker"     // Container deployment
)

Deployment scenarios

View Source
const (
	ProviderAnthropic   = "anthropic"
	ProviderOpenAI      = "openai"
	ProviderGoogle      = "google"
	ProviderGroq        = "groq"
	ProviderMistral     = "mistral"
	ProviderXAI         = "xai"
	ProviderOpenRouter  = "openrouter"
	ProviderOllamaCloud = "ollama-cloud"
	ProviderOllamaLocal = "ollama-local"
	ProviderLiteLLM     = "litellm"
	ProviderLMStudio    = "lmstudio"
	ProviderCustom      = "custom"
)

Provider options

Variables

This section is empty.

Functions

func Run

func Run() error

Run starts the setup wizard

Types

type Config

type Config struct {
	// Deployment
	Scenario  string
	Workspace string
	ConfigDir string

	// Main LLM
	Provider string
	Model    string
	APIKey   string
	BaseURL  string
	Thinking string

	// Small LLM (for summarization, triage)
	SmallLLMEnabled  bool
	SmallLLMProvider string
	SmallLLMModel    string
	SmallLLMBaseURL  string

	// Profiles
	UseProfiles bool
	Profiles    map[string]ProfileConfig

	// Security
	DefaultDeny  bool
	AllowBash    bool
	AllowWeb     bool
	SecurityMode string // "default" or "paranoid"

	// Features
	EnableMCP       bool
	EnableTelemetry bool
	EnableMemory    bool

	// MCP Servers
	MCPServers map[string]MCPServerSetup

	// Credentials
	CredentialMethod string // "file", "env", "claude-cli"
}

Config holds the setup configuration

type MCPServerSetup

type MCPServerSetup struct {
	Command     string
	Args        []string
	Env         map[string]string
	DeniedTools []string
	// Discovered tools (not persisted, used during setup)
	DiscoveredTools []string
}

MCPServerSetup holds MCP server configuration during setup

type Model

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

Model is the bubbletea model for the setup wizard

func New

func New() Model

New creates a new setup model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles messages

func (Model) View

func (m Model) View() string

View renders the current step

type ProfileConfig

type ProfileConfig struct {
	Provider string
	Model    string
	BaseURL  string
	Thinking string
}

ProfileConfig holds a capability profile configuration

type Step

type Step int

Step represents a setup wizard step

const (
	StepWelcome Step = iota
	StepScenario
	StepProvider
	StepModel
	StepCustomModel // Text input for model name (Ollama Cloud, LiteLLM, Custom)
	StepAPIKey
	StepBaseURL
	StepThinking
	StepSmallLLM
	StepSmallLLMProvider
	StepSmallLLMModel
	StepWorkspace
	StepSecurity
	StepSecurityMode
	StepProfiles
	StepProfilesConfig
	StepFeatures
	StepMCPAdd
	StepMCPName
	StepMCPCommand
	StepMCPArgs
	StepMCPProbe
	StepMCPDenySelect
	StepCredentialMethod
	StepConfirm
	StepWriteFiles
	StepComplete
)

Jump to

Keyboard shortcuts

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