Documentation
¶
Index ¶
- type CommandResult
- type CustomConfigVersionProvider
- func (p *CustomConfigVersionProvider) GetCurrent(stackName, configType string) (*configdiff.ResolvedConfig, error)
- func (p *CustomConfigVersionProvider) GetFromGit(stackName, configType, gitRef string) (*configdiff.ResolvedConfig, error)
- func (p *CustomConfigVersionProvider) GetFromLocal(stackName, configType, filePath string) (*configdiff.ResolvedConfig, error)
- type Manager
- func (m *Manager) GetCacheStats() map[string]interface{}
- func (m *Manager) GetCachedResult(ctx context.Context, cacheType string, key string) (interface{}, bool)
- func (m *Manager) GetOrSetCachedResult(ctx context.Context, cacheType string, key string, ...) (interface{}, error)
- func (m *Manager) GetPerformanceMetrics() map[string]interface{}
- func (m *Manager) GetPlugin(pluginID string) (plugins.Plugin, error)
- func (m *Manager) GetPluginsByType(pluginType plugins.PluginType) []plugins.Plugin
- func (m *Manager) GetSecurityStats() map[string]interface{}
- func (m *Manager) GetSystemHealth(ctx context.Context) map[string]interface{}
- func (m *Manager) Initialize(ctx context.Context) error
- func (m *Manager) RunTests(ctx context.Context, projectPath string) (map[string]*testing.TestSuite, error)
- func (m *Manager) SearchDocumentation(ctx context.Context, query string, limit int) ([]embeddings.SearchResult, error)
- func (m *Manager) SetCachedResult(ctx context.Context, cacheType string, key string, value interface{}, ...)
- func (m *Manager) Shutdown(ctx context.Context) error
- func (m *Manager) ValidateRequest(ctx context.Context, req *security.SecurityRequest) error
- type ManagerConfig
- type UnifiedCommandHandler
- func (h *UnifiedCommandHandler) AddEnvironment(ctx context.Context, stackName, deploymentType, parent, parentEnv string, ...) (*CommandResult, error)
- func (h *UnifiedCommandHandler) AddResource(ctx context.Context, resourceName, resourceType, environment string, ...) (*CommandResult, error)
- func (h *UnifiedCommandHandler) AnalyzeProject(ctx context.Context, path string, withLLM bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) CheckExistingSimpleContainerProject(projectPath string, forceOverwrite, skipConfirmation bool) error
- func (h *UnifiedCommandHandler) GenerateCICD(ctx context.Context, stackName, configFile string) (*CommandResult, error)
- func (h *UnifiedCommandHandler) GenerateCICDWithStaging(ctx context.Context, stackName, configFile string, staging bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) GenerateCICDWithStagingAndLogger(ctx context.Context, logger cicd.Logger, stackName, configFile string, ...) (*CommandResult, error)
- func (h *UnifiedCommandHandler) GetCurrentConfig(ctx context.Context, configType, stackName string) (*CommandResult, error)
- func (h *UnifiedCommandHandler) GetProjectContext(ctx context.Context, path string) (*CommandResult, error)
- func (h *UnifiedCommandHandler) ListAvailableStacks() ([]string, error)
- func (h *UnifiedCommandHandler) ModifyStackConfig(ctx context.Context, stackName, environmentName string, ...) (*CommandResult, error)
- func (h *UnifiedCommandHandler) PreviewCICD(ctx context.Context, stackName, configFile string, showContent bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) SearchDocumentation(ctx context.Context, query string, limit int) (*CommandResult, error)
- func (h *UnifiedCommandHandler) SetupSimpleContainer(ctx context.Context, path, environment, parent, deploymentType string, ...) (*CommandResult, error)
- func (h *UnifiedCommandHandler) ShowConfigDiff(ctx context.Context, stackName, configType, compareWith, format string) (*CommandResult, error)
- func (h *UnifiedCommandHandler) SyncCICD(ctx context.Context, stackName, configFile string, dryRun bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) ValidateCICD(ctx context.Context, stackName, configFile string, showDiff bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) ValidateCICDWithStaging(ctx context.Context, stackName, configFile string, showDiff bool, staging bool) (*CommandResult, error)
- func (h *UnifiedCommandHandler) ValidateCICDWithStagingAndLogger(ctx context.Context, logger cicd.Logger, stackName, configFile string, ...) (*CommandResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandResult ¶
type CommandResult struct {
Success bool `json:"success"`
Message string `json:"message"`
Data map[string]interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
CommandResult represents the result of any command execution
type CustomConfigVersionProvider ¶
type CustomConfigVersionProvider struct {
// contains filtered or unexported fields
}
CustomConfigVersionProvider implements configdiff.ConfigVersionProvider for our specific use case
func (*CustomConfigVersionProvider) GetCurrent ¶
func (p *CustomConfigVersionProvider) GetCurrent(stackName, configType string) (*configdiff.ResolvedConfig, error)
GetCurrent gets the current configuration for a specific stack
func (*CustomConfigVersionProvider) GetFromGit ¶
func (p *CustomConfigVersionProvider) GetFromGit(stackName, configType, gitRef string) (*configdiff.ResolvedConfig, error)
GetFromGit gets configuration from a git reference
func (*CustomConfigVersionProvider) GetFromLocal ¶
func (p *CustomConfigVersionProvider) GetFromLocal(stackName, configType, filePath string) (*configdiff.ResolvedConfig, error)
GetFromLocal gets configuration from a local file path
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager coordinates all AI Assistant components
func NewManager ¶
func NewManager(config ManagerConfig, logger logger.Logger) *Manager
NewManager creates a new AI Assistant manager
func (*Manager) GetCacheStats ¶
GetCacheStats returns cache statistics
func (*Manager) GetCachedResult ¶
func (m *Manager) GetCachedResult(ctx context.Context, cacheType string, key string) (interface{}, bool)
GetCachedResult retrieves a cached result
func (*Manager) GetOrSetCachedResult ¶
func (m *Manager) GetOrSetCachedResult(ctx context.Context, cacheType string, key string, factory func() (interface{}, error), ttl ...time.Duration) (interface{}, error)
GetOrSetCachedResult gets a cached result or creates it
func (*Manager) GetPerformanceMetrics ¶
GetPerformanceMetrics returns current performance metrics
func (*Manager) GetPluginsByType ¶
func (m *Manager) GetPluginsByType(pluginType plugins.PluginType) []plugins.Plugin
GetPluginsByType retrieves plugins by type
func (*Manager) GetSecurityStats ¶
GetSecurityStats returns security statistics
func (*Manager) GetSystemHealth ¶
GetSystemHealth returns overall system health
func (*Manager) Initialize ¶
Initialize starts all manager components
func (*Manager) RunTests ¶
func (m *Manager) RunTests(ctx context.Context, projectPath string) (map[string]*testing.TestSuite, error)
RunTests executes comprehensive tests
func (*Manager) SearchDocumentation ¶
func (m *Manager) SearchDocumentation(ctx context.Context, query string, limit int) ([]embeddings.SearchResult, error)
SearchDocumentation performs cached semantic search
func (*Manager) SetCachedResult ¶
func (m *Manager) SetCachedResult(ctx context.Context, cacheType string, key string, value interface{}, ttl ...time.Duration)
SetCachedResult stores a result in cache
func (*Manager) ValidateRequest ¶
ValidateRequest validates a request using security manager
type ManagerConfig ¶
type ManagerConfig struct {
EnablePerformanceMonitoring bool `json:"enable_performance_monitoring"`
EnableCaching bool `json:"enable_caching"`
EnableSecurity bool `json:"enable_security"`
SecurityConfig security.SecurityConfig `json:"security_config"`
CacheTTL time.Duration `json:"cache_ttl"`
PerformanceMonitorInterval time.Duration `json:"performance_monitor_interval"`
EnablePlugins bool `json:"enable_plugins"`
EnableTesting bool `json:"enable_testing"`
}
ManagerConfig holds configuration for the AI Assistant manager
func DefaultManagerConfig ¶
func DefaultManagerConfig() ManagerConfig
DefaultManagerConfig returns a default configuration
type UnifiedCommandHandler ¶
type UnifiedCommandHandler struct {
// contains filtered or unexported fields
}
UnifiedCommandHandler provides a shared layer for both MCP and chat interfaces
func NewUnifiedCommandHandler ¶
func NewUnifiedCommandHandler() (*UnifiedCommandHandler, error)
NewUnifiedCommandHandler creates a new unified command handler
func (*UnifiedCommandHandler) AddEnvironment ¶
func (h *UnifiedCommandHandler) AddEnvironment(ctx context.Context, stackName, deploymentType, parent, parentEnv string, config map[string]interface{}) (*CommandResult, error)
AddEnvironment adds a new environment/stack to client.yaml using LLM when available
func (*UnifiedCommandHandler) AddResource ¶
func (h *UnifiedCommandHandler) AddResource(ctx context.Context, resourceName, resourceType, environment string, config map[string]interface{}) (*CommandResult, error)
func (*UnifiedCommandHandler) AnalyzeProject ¶
func (h *UnifiedCommandHandler) AnalyzeProject(ctx context.Context, path string, withLLM bool) (*CommandResult, error)
AnalyzeProject performs detailed tech stack analysis
func (*UnifiedCommandHandler) CheckExistingSimpleContainerProject ¶
func (h *UnifiedCommandHandler) CheckExistingSimpleContainerProject(projectPath string, forceOverwrite, skipConfirmation bool) error
CheckExistingSimpleContainerProject checks if project is already using Simple Container and warns user Delegates to shared utility function for consistency
func (*UnifiedCommandHandler) GenerateCICD ¶
func (h *UnifiedCommandHandler) GenerateCICD(ctx context.Context, stackName, configFile string) (*CommandResult, error)
GenerateCICD generates CI/CD workflows for GitHub Actions
func (*UnifiedCommandHandler) GenerateCICDWithStaging ¶
func (h *UnifiedCommandHandler) GenerateCICDWithStaging(ctx context.Context, stackName, configFile string, staging bool) (*CommandResult, error)
GenerateCICDWithStaging generates CI/CD workflows for GitHub Actions with staging support
func (*UnifiedCommandHandler) GenerateCICDWithStagingAndLogger ¶
func (h *UnifiedCommandHandler) GenerateCICDWithStagingAndLogger(ctx context.Context, logger cicd.Logger, stackName, configFile string, staging bool) (*CommandResult, error)
GenerateCICDWithStagingAndLogger generates CI/CD workflows for GitHub Actions with staging support and logging
func (*UnifiedCommandHandler) GetCurrentConfig ¶
func (h *UnifiedCommandHandler) GetCurrentConfig(ctx context.Context, configType, stackName string) (*CommandResult, error)
GetCurrentConfig reads and parses existing configuration files
func (*UnifiedCommandHandler) GetProjectContext ¶
func (h *UnifiedCommandHandler) GetProjectContext(ctx context.Context, path string) (*CommandResult, error)
GetProjectContext returns basic project information and Simple Container config status
func (*UnifiedCommandHandler) ListAvailableStacks ¶
func (h *UnifiedCommandHandler) ListAvailableStacks() ([]string, error)
func (*UnifiedCommandHandler) ModifyStackConfig ¶
func (h *UnifiedCommandHandler) ModifyStackConfig(ctx context.Context, stackName, environmentName string, changes map[string]interface{}) (*CommandResult, error)
ModifyStackConfig modifies existing stack environment configuration in client.yaml using LLM when available
func (*UnifiedCommandHandler) PreviewCICD ¶
func (h *UnifiedCommandHandler) PreviewCICD(ctx context.Context, stackName, configFile string, showContent bool) (*CommandResult, error)
PreviewCICD previews CI/CD workflows that would be generated
func (*UnifiedCommandHandler) SearchDocumentation ¶
func (h *UnifiedCommandHandler) SearchDocumentation(ctx context.Context, query string, limit int) (*CommandResult, error)
SearchDocumentation searches Simple Container documentation
func (*UnifiedCommandHandler) SetupSimpleContainer ¶
func (h *UnifiedCommandHandler) SetupSimpleContainer(ctx context.Context, path, environment, parent, deploymentType string, interactive bool) (*CommandResult, error)
SetupSimpleContainer initializes Simple Container configuration
func (*UnifiedCommandHandler) ShowConfigDiff ¶
func (h *UnifiedCommandHandler) ShowConfigDiff(ctx context.Context, stackName, configType, compareWith, format string) (*CommandResult, error)
AddResource adds a new resource to server.yaml ShowConfigDiff shows configuration differences between versions or environments
func (*UnifiedCommandHandler) SyncCICD ¶
func (h *UnifiedCommandHandler) SyncCICD(ctx context.Context, stackName, configFile string, dryRun bool) (*CommandResult, error)
SyncCICD syncs CI/CD workflows to GitHub repository
func (*UnifiedCommandHandler) ValidateCICD ¶
func (h *UnifiedCommandHandler) ValidateCICD(ctx context.Context, stackName, configFile string, showDiff bool) (*CommandResult, error)
ValidateCICD validates CI/CD configuration in server.yaml
func (*UnifiedCommandHandler) ValidateCICDWithStaging ¶
func (h *UnifiedCommandHandler) ValidateCICDWithStaging(ctx context.Context, stackName, configFile string, showDiff bool, staging bool) (*CommandResult, error)
ValidateCICDWithStaging validates CI/CD configuration in server.yaml with staging support
func (*UnifiedCommandHandler) ValidateCICDWithStagingAndLogger ¶
func (h *UnifiedCommandHandler) ValidateCICDWithStagingAndLogger(ctx context.Context, logger cicd.Logger, stackName, configFile string, showDiff bool, staging bool) (*CommandResult, error)
ValidateCICDWithStagingAndLogger validates CI/CD configuration in server.yaml with staging support and logging