Documentation
¶
Overview ¶
Package settings implements the lango settings command.
Index ¶
- func FetchEmbeddingModelOptions(providerID string, cfg *config.Config, currentModel string) []string
- func FetchEmbeddingModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
- func FetchModelOptions(providerID string, cfg *config.Config, currentModel string) []string
- func FetchModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
- func FetchModelOptionsWithError(providerID string, cfg *config.Config, currentModel string) ([]string, error)
- func NewA2AForm(cfg *config.Config) *tuicore.FormModel
- func NewAgentForm(cfg *config.Config) *tuicore.FormModel
- func NewAgentMemoryForm(cfg *config.Config) *tuicore.FormModel
- func NewBackgroundForm(cfg *config.Config) *tuicore.FormModel
- func NewChannelsForm(cfg *config.Config) *tuicore.FormModel
- func NewCommand() *cobra.Command
- func NewCronForm(cfg *config.Config) *tuicore.FormModel
- func NewDBEncryptionForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyEscrowForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyEscrowOnChainForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyNegotiationForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyPricingForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyRiskForm(cfg *config.Config) *tuicore.FormModel
- func NewEmbeddingForm(cfg *config.Config) *tuicore.FormModel
- func NewGraphForm(cfg *config.Config) *tuicore.FormModel
- func NewHooksForm(cfg *config.Config) *tuicore.FormModel
- func NewKMSForm(cfg *config.Config) *tuicore.FormModel
- func NewKnowledgeForm(cfg *config.Config) *tuicore.FormModel
- func NewLibrarianForm(cfg *config.Config) *tuicore.FormModel
- func NewMCPForm(cfg *config.Config) *tuicore.FormModel
- func NewMCPServerForm(name string, srv config.MCPServerConfig) *tuicore.FormModel
- func NewMultiAgentForm(cfg *config.Config) *tuicore.FormModel
- func NewOIDCProviderForm(id string, cfg config.OIDCProviderConfig) *tuicore.FormModel
- func NewObservabilityForm(cfg *config.Config) *tuicore.FormModel
- func NewObservationalMemoryForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PForm(cfg *config.Config) *tuicore.FormModel
- func NewP2POwnerProtectionForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PPricingForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PSandboxForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PZKPForm(cfg *config.Config) *tuicore.FormModel
- func NewPaymentForm(cfg *config.Config) *tuicore.FormModel
- func NewProviderForm(id string, cfg config.ProviderConfig) *tuicore.FormModel
- func NewProviderFromConfig(id string, pCfg config.ProviderConfig) provider.Provider
- func NewSecurityForm(cfg *config.Config) *tuicore.FormModel
- func NewServerForm(cfg *config.Config) *tuicore.FormModel
- func NewSessionForm(cfg *config.Config) *tuicore.FormModel
- func NewSkillForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountModulesForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountPaymasterForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountSessionForm(cfg *config.Config) *tuicore.FormModel
- func NewToolsForm(cfg *config.Config) *tuicore.FormModel
- func NewWorkflowForm(cfg *config.Config) *tuicore.FormModel
- func ParseCustomPatterns(val string) map[string]string
- type AuthProviderItem
- type AuthProvidersListModel
- type Category
- type Editor
- type EditorStep
- type MCPServerItem
- type MCPServersListModel
- type MenuModel
- type ProviderItem
- type ProvidersListModel
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchEmbeddingModelOptions ¶
func FetchEmbeddingModelOptions(providerID string, cfg *config.Config, currentModel string) []string
FetchEmbeddingModelOptions fetches models and filters for embedding-capable ones. Falls back to the full model list if no embedding models are found.
func FetchEmbeddingModelOptionsCmd ¶ added in v0.4.0
func FetchEmbeddingModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
FetchEmbeddingModelOptionsCmd returns a Bubble Tea Cmd that fetches embedding model options asynchronously.
func FetchModelOptions ¶
FetchModelOptions fetches available models from a provider. Returns a sorted list of model IDs, or nil if fetching fails. The currentModel (if non-empty) is always included in the result.
func FetchModelOptionsCmd ¶ added in v0.4.0
func FetchModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
FetchModelOptionsCmd returns a Bubble Tea Cmd that fetches model options asynchronously and sends a FieldOptionsLoadedMsg when complete.
func FetchModelOptionsWithError ¶
func FetchModelOptionsWithError(providerID string, cfg *config.Config, currentModel string) ([]string, error)
FetchModelOptionsWithError is like FetchModelOptions but also returns the error when model fetching fails, for diagnostic feedback.
func NewA2AForm ¶
NewA2AForm creates the A2A Protocol configuration form.
func NewAgentForm ¶
NewAgentForm creates the Agent configuration form.
func NewAgentMemoryForm ¶ added in v0.4.0
NewAgentMemoryForm creates the Agent Memory configuration form.
func NewBackgroundForm ¶
NewBackgroundForm creates the Background Tasks configuration form.
func NewChannelsForm ¶
NewChannelsForm creates the Channels configuration form.
func NewCronForm ¶
NewCronForm creates the Cron Scheduler configuration form.
func NewDBEncryptionForm ¶
NewDBEncryptionForm creates the Security DB Encryption configuration form.
func NewEconomyEscrowForm ¶ added in v0.5.0
NewEconomyEscrowForm creates the Economy Escrow configuration form.
func NewEconomyEscrowOnChainForm ¶ added in v0.5.0
NewEconomyEscrowOnChainForm creates the on-chain escrow configuration form.
func NewEconomyForm ¶ added in v0.5.0
NewEconomyForm creates the Economy configuration form.
func NewEconomyNegotiationForm ¶ added in v0.5.0
NewEconomyNegotiationForm creates the Economy Negotiation configuration form.
func NewEconomyPricingForm ¶ added in v0.5.0
NewEconomyPricingForm creates the Economy Dynamic Pricing configuration form.
func NewEconomyRiskForm ¶ added in v0.5.0
NewEconomyRiskForm creates the Economy Risk configuration form.
func NewEmbeddingForm ¶
NewEmbeddingForm creates the Embedding & RAG configuration form.
func NewGraphForm ¶
NewGraphForm creates the Graph Store configuration form.
func NewHooksForm ¶ added in v0.4.0
NewHooksForm creates the Hooks configuration form.
func NewKMSForm ¶
NewKMSForm creates the Security KMS configuration form.
func NewKnowledgeForm ¶
NewKnowledgeForm creates the Knowledge configuration form.
func NewLibrarianForm ¶
NewLibrarianForm creates the Librarian configuration form.
func NewMCPForm ¶ added in v0.4.0
NewMCPForm creates the MCP Servers configuration form.
func NewMCPServerForm ¶ added in v0.4.0
func NewMCPServerForm(name string, srv config.MCPServerConfig) *tuicore.FormModel
NewMCPServerForm creates a form for adding or editing a single MCP server.
func NewMultiAgentForm ¶
NewMultiAgentForm creates the Multi-Agent configuration form.
func NewOIDCProviderForm ¶
func NewOIDCProviderForm(id string, cfg config.OIDCProviderConfig) *tuicore.FormModel
NewOIDCProviderForm creates the OIDC Provider configuration form.
func NewObservabilityForm ¶ added in v0.5.0
NewObservabilityForm creates the Observability configuration form.
func NewObservationalMemoryForm ¶
NewObservationalMemoryForm creates the Observational Memory configuration form.
func NewP2PForm ¶
NewP2PForm creates the P2P Network configuration form.
func NewP2POwnerProtectionForm ¶
NewP2POwnerProtectionForm creates the P2P Owner Protection configuration form.
func NewP2PPricingForm ¶
NewP2PPricingForm creates the P2P Pricing configuration form.
func NewP2PSandboxForm ¶
NewP2PSandboxForm creates the P2P Sandbox configuration form.
func NewP2PZKPForm ¶
NewP2PZKPForm creates the P2P ZKP configuration form.
func NewPaymentForm ¶
NewPaymentForm creates the Payment configuration form.
func NewProviderForm ¶
func NewProviderForm(id string, cfg config.ProviderConfig) *tuicore.FormModel
NewProviderForm creates a Provider configuration form.
func NewProviderFromConfig ¶
func NewProviderFromConfig(id string, pCfg config.ProviderConfig) provider.Provider
NewProviderFromConfig creates a lightweight provider instance from config. Returns nil if the provider cannot be created (missing API key, unknown type, etc.). Environment variable references (${VAR}) in APIKey and BaseURL are expanded.
func NewSecurityForm ¶
NewSecurityForm creates the Security configuration form.
func NewServerForm ¶
NewServerForm creates the Server configuration form.
func NewSessionForm ¶
NewSessionForm creates the Session configuration form.
func NewSkillForm ¶
NewSkillForm creates the Skill configuration form.
func NewSmartAccountForm ¶ added in v0.5.0
NewSmartAccountForm creates the Smart Account configuration form.
func NewSmartAccountModulesForm ¶ added in v0.5.0
NewSmartAccountModulesForm creates the Smart Account Modules configuration form.
func NewSmartAccountPaymasterForm ¶ added in v0.5.0
NewSmartAccountPaymasterForm creates the Smart Account Paymaster configuration form.
func NewSmartAccountSessionForm ¶ added in v0.5.0
NewSmartAccountSessionForm creates the Smart Account Session configuration form.
func NewToolsForm ¶
NewToolsForm creates the Tools configuration form.
func NewWorkflowForm ¶
NewWorkflowForm creates the Workflow Engine configuration form.
func ParseCustomPatterns ¶
ParseCustomPatterns parses a comma-separated "name:regex" string into a map.
Types ¶
type AuthProviderItem ¶
AuthProviderItem represents an OIDC provider in the list.
type AuthProvidersListModel ¶
type AuthProvidersListModel struct {
Providers []AuthProviderItem
Cursor int
Selected string // ID of selected provider, or "NEW"
Deleted string // ID of provider to delete
Exit bool // True if user wants to go back
}
AuthProvidersListModel manages the OIDC provider list UI.
func NewAuthProvidersListModel ¶
func NewAuthProvidersListModel(cfg *config.Config) AuthProvidersListModel
NewAuthProvidersListModel creates a new model from config.
func (AuthProvidersListModel) Init ¶
func (m AuthProvidersListModel) Init() tea.Cmd
Init implements tea.Model.
func (AuthProvidersListModel) Update ¶
func (m AuthProvidersListModel) Update(msg tea.Msg) (AuthProvidersListModel, tea.Cmd)
Update handles key events for the OIDC provider list.
func (AuthProvidersListModel) View ¶
func (m AuthProvidersListModel) View() string
View renders the OIDC provider list.
type Editor ¶
type Editor struct {
// Public status
Completed bool
Cancelled bool
// contains filtered or unexported fields
}
Editor is the main bubbletea model for the settings editor.
func NewEditor ¶
func NewEditor() *Editor
NewEditor creates a new settings editor with default config.
func NewEditorWithConfig ¶
NewEditorWithConfig creates a new settings editor pre-loaded with the given config.
type EditorStep ¶
type EditorStep int
EditorStep represents the current step in the settings editor.
const ( StepWelcome EditorStep = iota StepMenu StepForm StepProvidersList StepAuthProvidersList StepMCPServersList StepComplete )
type MCPServerItem ¶ added in v0.4.0
MCPServerItem represents an MCP server in the list.
type MCPServersListModel ¶ added in v0.4.0
type MCPServersListModel struct {
Servers []MCPServerItem
Cursor int
Selected string // Name of selected server, or "NEW"
Deleted string // Name of server to delete
Exit bool // True if user wants to go back
}
MCPServersListModel manages the MCP server list UI.
func NewMCPServersListModel ¶ added in v0.4.0
func NewMCPServersListModel(cfg *config.Config) MCPServersListModel
NewMCPServersListModel creates a new model from config.
func (MCPServersListModel) Init ¶ added in v0.4.0
func (m MCPServersListModel) Init() tea.Cmd
Init implements tea.Model.
func (MCPServersListModel) Update ¶ added in v0.4.0
func (m MCPServersListModel) Update(msg tea.Msg) (MCPServersListModel, tea.Cmd)
Update handles key events for the MCP server list.
func (MCPServersListModel) View ¶ added in v0.4.0
func (m MCPServersListModel) View() string
View renders the MCP server list.
type MenuModel ¶
type MenuModel struct {
Sections []Section
Cursor int
Selected string
Width int
Height int
// contains filtered or unexported fields
}
MenuModel manages the configuration menu.
func NewMenuModel ¶
func NewMenuModel() MenuModel
NewMenuModel creates a new menu model with grouped configuration categories.
func (MenuModel) AllCategories ¶
AllCategories returns a flat list of all categories (public, for tests).
func (MenuModel) IsSearching ¶
IsSearching returns true when the menu is in search mode.
type ProviderItem ¶
ProviderItem represents a provider in the list.
type ProvidersListModel ¶
type ProvidersListModel struct {
Providers []ProviderItem
Cursor int
Selected string // ID of selected provider, or "NEW"
Deleted string // ID of provider to delete
Exit bool // True if user wants to go back
}
ProvidersListModel manages the provider list UI.
func NewProvidersListModel ¶
func NewProvidersListModel(cfg *config.Config) ProvidersListModel
NewProvidersListModel creates a new model from config.
func (ProvidersListModel) Init ¶
func (m ProvidersListModel) Init() tea.Cmd
Init implements tea.Model.
func (ProvidersListModel) Update ¶
func (m ProvidersListModel) Update(msg tea.Msg) (ProvidersListModel, tea.Cmd)
Update handles key events for the provider list.
func (ProvidersListModel) View ¶
func (m ProvidersListModel) View() string
View renders the provider list.