mcp

package
v0.0.0-...-a1f8bd1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MCPVersion = "1.0"
	MCPName    = "simple-container-mcp"
)

Protocol version and constants

View Source
const (
	ErrorCodeParseError     = -32700
	ErrorCodeInvalidRequest = -32600
	ErrorCodeMethodNotFound = -32601
	ErrorCodeInvalidParams  = -32602
	ErrorCodeInternalError  = -32603

	// Simple Container specific error codes
	ErrorCodeProjectNotFound    = -32001
	ErrorCodeConfigurationError = -32002
	ErrorCodeAnalysisError      = -32003
	ErrorCodeEmbeddingError     = -32004
	ErrorCodeGenerationError    = -32005
	ErrorCodeFileOperationError = -32006
	ErrorCodeTimeout            = -32007
)

Standard MCP error codes (following JSON-RPC specification)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddEnvironmentParams

type AddEnvironmentParams struct {
	StackName      string                 `json:"stack_name"`       // Name of new environment/stack
	DeploymentType string                 `json:"deployment_type"`  // "static", "single-image", "cloud-compose"
	Parent         string                 `json:"parent"`           // Parent stack reference (project/stack)
	ParentEnv      string                 `json:"parent_env"`       // Parent environment to map to
	Config         map[string]interface{} `json:"config,omitempty"` // Additional configuration
}

type AddEnvironmentResult

type AddEnvironmentResult struct {
	StackName   string                 `json:"stack_name"`
	FilePath    string                 `json:"file_path"`
	Message     string                 `json:"message"`
	Success     bool                   `json:"success"`
	ConfigAdded map[string]interface{} `json:"config_added"`
}

type AddResourceParams

type AddResourceParams struct {
	ResourceName string                 `json:"resource_name"` // Name of the resource
	ResourceType string                 `json:"resource_type"` // "mongodb-atlas", "redis", "postgres", etc.
	Environment  string                 `json:"environment"`   // Which environment to add it to
	Config       map[string]interface{} `json:"config"`        // Resource configuration
}

type AddResourceResult

type AddResourceResult struct {
	ResourceName string                 `json:"resource_name"`
	Environment  string                 `json:"environment"`
	FilePath     string                 `json:"file_path"`
	Message      string                 `json:"message"`
	Success      bool                   `json:"success"`
	ConfigAdded  map[string]interface{} `json:"config_added"`
}

type AdvancedSearchDocumentationParams

type AdvancedSearchDocumentationParams struct {
	Query string `json:"query"` // Search query
	Limit int    `json:"limit,omitempty"`
}

type AdvancedSearchDocumentationResult

type AdvancedSearchDocumentationResult struct {
	Query   string          `json:"query"`
	Results []DocumentChunk `json:"results"`
	Total   int             `json:"total"`
	Message string          `json:"message"`
	Success bool            `json:"success"`
}

type AnalyzeProjectParams

type AnalyzeProjectParams struct {
	Path string `json:"path"`
}

type DefaultMCPHandler

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

DefaultMCPHandler implements MCPHandler interface with only essential functionality

func (*DefaultMCPHandler) AddEnvironment

func (*DefaultMCPHandler) AddResource

func (*DefaultMCPHandler) AdvancedSearchDocumentation

func (*DefaultMCPHandler) AnalyzeProject

func (h *DefaultMCPHandler) AnalyzeProject(ctx context.Context, params AnalyzeProjectParams) (*ProjectAnalysis, error)

func (*DefaultMCPHandler) GenerateCICD

func (h *DefaultMCPHandler) GenerateCICD(ctx context.Context, stackName, configFile string) (*core.CommandResult, error)

GenerateCICD generates CI/CD workflows for GitHub Actions

func (*DefaultMCPHandler) GenerateCICDWithStaging

func (h *DefaultMCPHandler) GenerateCICDWithStaging(ctx context.Context, stackName, configFile string, staging bool) (*core.CommandResult, error)

GenerateCICDWithStaging generates CI/CD workflows for GitHub Actions with staging support

func (*DefaultMCPHandler) GenerateCICDWithStagingAndLogger

func (h *DefaultMCPHandler) GenerateCICDWithStagingAndLogger(ctx context.Context, logger *MCPLogger, stackName, configFile string, staging bool) (*core.CommandResult, error)

GenerateCICDWithStagingAndLogger generates CI/CD workflows for GitHub Actions with staging support and logging

func (*DefaultMCPHandler) GenerateConfiguration

Simplified interface - remove methods we don't need

func (*DefaultMCPHandler) GetCapabilities

func (h *DefaultMCPHandler) GetCapabilities(ctx context.Context) (map[string]interface{}, error)

func (*DefaultMCPHandler) GetCurrentConfig

func (*DefaultMCPHandler) GetHelp

func (h *DefaultMCPHandler) GetHelp(ctx context.Context, params GetHelpParams) (*GetHelpResult, error)

func (*DefaultMCPHandler) GetProjectContext

func (h *DefaultMCPHandler) GetProjectContext(ctx context.Context, params GetProjectContextParams) (*ProjectContext, error)

func (*DefaultMCPHandler) GetStatus

func (h *DefaultMCPHandler) GetStatus(ctx context.Context, params GetStatusParams) (*GetStatusResult, error)

func (*DefaultMCPHandler) GetSupportedResources

func (h *DefaultMCPHandler) GetSupportedResources(ctx context.Context) (*SupportedResourcesResult, error)

func (*DefaultMCPHandler) ModifyStackConfig

func (*DefaultMCPHandler) Ping

func (h *DefaultMCPHandler) Ping(ctx context.Context) (string, error)

func (*DefaultMCPHandler) PreviewCICD

func (h *DefaultMCPHandler) PreviewCICD(ctx context.Context, stackName, configFile string, showContent bool) (*core.CommandResult, error)

PreviewCICD previews CI/CD workflows that would be generated

func (*DefaultMCPHandler) ReadProjectFile

func (*DefaultMCPHandler) SearchDocumentation

func (*DefaultMCPHandler) SetClientCapabilities

func (h *DefaultMCPHandler) SetClientCapabilities(capabilities map[string]interface{})

SetClientCapabilities allows the server to pass client capabilities to the handler

func (*DefaultMCPHandler) SetupSimpleContainer

func (*DefaultMCPHandler) ShowConfigDiff

func (*DefaultMCPHandler) ShowStackConfig

func (*DefaultMCPHandler) SyncCICD

func (h *DefaultMCPHandler) SyncCICD(ctx context.Context, stackName, configFile string, dryRun bool) (*core.CommandResult, error)

SyncCICD syncs CI/CD workflows to GitHub repository

func (*DefaultMCPHandler) ValidateCICD

func (h *DefaultMCPHandler) ValidateCICD(ctx context.Context, stackName, configFile string, showDiff bool) (*core.CommandResult, error)

ValidateCICD validates CI/CD configuration in server.yaml

func (*DefaultMCPHandler) ValidateCICDWithStaging

func (h *DefaultMCPHandler) ValidateCICDWithStaging(ctx context.Context, stackName, configFile string, showDiff bool, staging bool) (*core.CommandResult, error)

ValidateCICDWithStaging validates CI/CD configuration in server.yaml with staging support

func (*DefaultMCPHandler) ValidateCICDWithStagingAndLogger

func (h *DefaultMCPHandler) ValidateCICDWithStagingAndLogger(ctx context.Context, logger *MCPLogger, stackName, configFile string, showDiff bool, staging bool) (*core.CommandResult, error)

ValidateCICDWithStagingAndLogger validates CI/CD configuration in server.yaml with staging support and logging

func (*DefaultMCPHandler) WriteProjectFile

type DocumentChunk

type DocumentChunk struct {
	ID         string            `json:"id"`
	Content    string            `json:"content"`
	Path       string            `json:"path"`
	Type       string            `json:"type"`
	Similarity float32           `json:"similarity,omitempty"`
	Metadata   map[string]string `json:"metadata"`
}

type DocumentationSearchResult

type DocumentationSearchResult struct {
	Documents []DocumentChunk `json:"documents"`
	Total     int             `json:"total"`
	Query     string          `json:"query"`
	Timestamp time.Time       `json:"timestamp"`
	Message   string          `json:"message,omitempty"` // Optional message for errors or info
}

MCP response data structures

type ElicitRequest

type ElicitRequest struct {
	Message         string                 `json:"message"`
	RequestedSchema map[string]interface{} `json:"requestedSchema"`
}

MCP Elicitation types

type ElicitResult

type ElicitResult struct {
	Action  string                 `json:"action"` // "accept", "decline", "cancel"
	Content map[string]interface{} `json:"content,omitempty"`
}

type FileInfo

type FileInfo struct {
	Path      string            `json:"path"`
	Type      string            `json:"type"`
	Size      int64             `json:"size"`
	Language  string            `json:"language,omitempty"`
	Framework string            `json:"framework,omitempty"`
	Purpose   string            `json:"purpose,omitempty"`
	Metadata  map[string]string `json:"metadata,omitempty"`
}

type GenerateConfigurationParams

type GenerateConfigurationParams struct {
	ProjectPath   string                 `json:"project_path"`
	ProjectType   string                 `json:"project_type,omitempty"`   // "node", "python", "go", etc.
	CloudProvider string                 `json:"cloud_provider,omitempty"` // "aws", "gcp", "azure"
	ConfigType    string                 `json:"config_type"`              // "dockerfile", "compose", "sc-structure"
	Options       map[string]interface{} `json:"options,omitempty"`
}

type GeneratedConfiguration

type GeneratedConfiguration struct {
	ConfigType string                 `json:"config_type"`
	Files      []GeneratedFile        `json:"files"`
	Messages   []string               `json:"messages,omitempty"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
}

type GeneratedFile

type GeneratedFile struct {
	Path        string `json:"path"`
	Content     string `json:"content"`
	ContentType string `json:"content_type"` // "yaml", "dockerfile", "json", etc.
	Description string `json:"description,omitempty"`
}

type GetCurrentConfigParams

type GetCurrentConfigParams struct {
	ConfigType string `json:"config_type"`          // "client" or "server"
	StackName  string `json:"stack_name,omitempty"` // For client.yaml, optional stack name
}

type GetCurrentConfigResult

type GetCurrentConfigResult struct {
	ConfigType string                 `json:"config_type"`
	FilePath   string                 `json:"file_path"`
	Content    map[string]interface{} `json:"content"`
	Message    string                 `json:"message"`
	Success    bool                   `json:"success"`
}

type GetHelpParams

type GetHelpParams struct {
	ToolName string `json:"tool_name,omitempty"` // Specific tool to get help for (optional)
}

type GetHelpResult

type GetHelpResult struct {
	ToolName string `json:"tool_name,omitempty"`
	Message  string `json:"message"`
	Success  bool   `json:"success"`
}

type GetProjectContextParams

type GetProjectContextParams struct {
	Path string `json:"path,omitempty"`
}

type GetStatusParams

type GetStatusParams struct {
	Detailed bool   `json:"detailed,omitempty"` // Show detailed diagnostic information
	Path     string `json:"path,omitempty"`     // Project path to analyze (default: current directory)
}

type GetStatusResult

type GetStatusResult struct {
	Status  string                 `json:"status"`
	Message string                 `json:"message"`
	Details map[string]interface{} `json:"details,omitempty"`
	Success bool                   `json:"success"`
}

type MCPError

type MCPError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type MCPHandler

type MCPHandler interface {
	SearchDocumentation(ctx context.Context, params SearchDocumentationParams) (*DocumentationSearchResult, error)
	GetProjectContext(ctx context.Context, params GetProjectContextParams) (*ProjectContext, error)
	GenerateConfiguration(ctx context.Context, params GenerateConfigurationParams) (*GeneratedConfiguration, error)
	AnalyzeProject(ctx context.Context, params AnalyzeProjectParams) (*ProjectAnalysis, error)
	GetSupportedResources(ctx context.Context) (*SupportedResourcesResult, error)
	SetupSimpleContainer(ctx context.Context, params SetupSimpleContainerParams) (*SetupSimpleContainerResult, error)

	// Configuration modification methods
	GetCurrentConfig(ctx context.Context, params GetCurrentConfigParams) (*GetCurrentConfigResult, error)
	AddEnvironment(ctx context.Context, params AddEnvironmentParams) (*AddEnvironmentResult, error)
	ModifyStackConfig(ctx context.Context, params ModifyStackConfigParams) (*ModifyStackConfigResult, error)
	AddResource(ctx context.Context, params AddResourceParams) (*AddResourceResult, error)

	// New chat command equivalent methods
	ReadProjectFile(ctx context.Context, params ReadProjectFileParams) (*ReadProjectFileResult, error)
	ShowStackConfig(ctx context.Context, params ShowStackConfigParams) (*ShowStackConfigResult, error)
	ShowConfigDiff(ctx context.Context, params ShowConfigDiffParams) (*ShowConfigDiffResult, error)
	AdvancedSearchDocumentation(ctx context.Context, params AdvancedSearchDocumentationParams) (*AdvancedSearchDocumentationResult, error)
	GetHelp(ctx context.Context, params GetHelpParams) (*GetHelpResult, error)
	GetStatus(ctx context.Context, params GetStatusParams) (*GetStatusResult, error)
	WriteProjectFile(ctx context.Context, params WriteProjectFileParams) (*WriteProjectFileResult, error)

	// CI/CD pipeline management methods
	GenerateCICD(ctx context.Context, stackName, configFile string) (*core.CommandResult, error)
	GenerateCICDWithStaging(ctx context.Context, stackName, configFile string, staging bool) (*core.CommandResult, error)
	GenerateCICDWithStagingAndLogger(ctx context.Context, logger *MCPLogger, stackName, configFile string, staging bool) (*core.CommandResult, error)
	ValidateCICD(ctx context.Context, stackName, configFile string, showDiff bool) (*core.CommandResult, error)
	ValidateCICDWithStaging(ctx context.Context, stackName, configFile string, showDiff bool, staging bool) (*core.CommandResult, error)
	ValidateCICDWithStagingAndLogger(ctx context.Context, logger *MCPLogger, stackName, configFile string, showDiff bool, staging bool) (*core.CommandResult, error)
	PreviewCICD(ctx context.Context, stackName, configFile string, showContent bool) (*core.CommandResult, error)
	SyncCICD(ctx context.Context, stackName, configFile string, dryRun bool) (*core.CommandResult, error)

	GetCapabilities(ctx context.Context) (map[string]interface{}, error)
	Ping(ctx context.Context) (string, error)
}

MCP method handler interface

func NewDefaultMCPHandler

func NewDefaultMCPHandler(chatInterface *chat.ChatInterface) MCPHandler

NewDefaultMCPHandler creates a new default MCP handler with optional chat interface

type MCPLogEntry

type MCPLogEntry struct {
	Timestamp  string                 `json:"timestamp"`
	Level      string                 `json:"level"`
	Component  string                 `json:"component"`
	Message    string                 `json:"message"`
	Method     string                 `json:"method,omitempty"`
	Error      string                 `json:"error,omitempty"`
	ErrorType  string                 `json:"error_type,omitempty"`
	Duration   string                 `json:"duration,omitempty"`
	RequestID  string                 `json:"request_id,omitempty"`
	ClientID   string                 `json:"client_id,omitempty"`
	UserAgent  string                 `json:"user_agent,omitempty"`
	RemoteAddr string                 `json:"remote_addr,omitempty"`
	Mode       string                 `json:"mode"`
	ProcessID  int                    `json:"process_id"`
	ThreadID   string                 `json:"thread_id,omitempty"`
	Context    map[string]interface{} `json:"context,omitempty"`
	SessionID  string                 `json:"session_id"`
	StackTrace string                 `json:"stack_trace,omitempty"`
}

MCPLogEntry represents a structured log entry in JSON format

type MCPLogger

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

MCPLogger implements the Simple Container Logger interface with multiple sinks

func NewMCPLogger

func NewMCPLogger(component string, mode MCPMode, verboseMode bool) (*MCPLogger, error)

NewMCPLogger creates a new MCP logger with mode-aware multiple sinks

func (*MCPLogger) Close

func (m *MCPLogger) Close() error

Close closes the log file writer

func (*MCPLogger) Debug

func (m *MCPLogger) Debug(ctx context.Context, format string, a ...any)

Debug logs a debug message with mode-aware multiple sinks

func (*MCPLogger) Error

func (m *MCPLogger) Error(ctx context.Context, format string, a ...any)

Error logs an error message with mode-aware multiple sinks

func (*MCPLogger) GetLogFilePath

func (m *MCPLogger) GetLogFilePath() string

GetLogFilePath returns the path to the current log file

func (*MCPLogger) GetSessionID

func (m *MCPLogger) GetSessionID() string

GetSessionID returns the current session ID

func (*MCPLogger) Info

func (m *MCPLogger) Info(ctx context.Context, format string, a ...any)

Info logs an info message with mode-aware multiple sinks

func (*MCPLogger) LogMCPError

func (m *MCPLogger) LogMCPError(method string, err error, additionalContext map[string]interface{})

LogMCPError logs an MCP error with enhanced structured data

func (*MCPLogger) LogMCPPanic

func (m *MCPLogger) LogMCPPanic(method string, recovered interface{}, additionalContext map[string]interface{})

LogMCPPanic logs an MCP panic recovery with comprehensive context

func (*MCPLogger) LogMCPRequest

func (m *MCPLogger) LogMCPRequest(method string, params interface{}, duration time.Duration, requestID string)

LogMCPRequest logs an MCP request with rich structured data

func (*MCPLogger) SetLogLevel

func (m *MCPLogger) SetLogLevel(ctx context.Context, logLevel int) context.Context

SetLogLevel sets the log level for the underlying logger

func (*MCPLogger) Silent

func (m *MCPLogger) Silent(ctx context.Context) context.Context

Silent sets the logger to silent mode for the context

func (*MCPLogger) Warn

func (m *MCPLogger) Warn(ctx context.Context, format string, a ...any)

Warn logs a warning message with mode-aware multiple sinks

type MCPMode

type MCPMode string

MCPMode represents the MCP server mode for logging behavior

const (
	MCPModeHTTP  MCPMode = "http"
	MCPModeStdio MCPMode = "stdio"
)

type MCPRequest

type MCPRequest struct {
	JSONRPC string      `json:"jsonrpc"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params,omitempty"`
	ID      interface{} `json:"id,omitempty"`
}

Core MCP request/response structures following JSON-RPC 2.0 specification

func ParseMCPRequest

func ParseMCPRequest(data []byte) (*MCPRequest, error)

Utility functions for MCP protocol

func (*MCPRequest) ToJSON

func (r *MCPRequest) ToJSON() ([]byte, error)

type MCPResponse

type MCPResponse struct {
	JSONRPC string      `json:"jsonrpc"`
	Result  interface{} `json:"result,omitempty"`
	Error   *MCPError   `json:"error,omitempty"`
	ID      interface{} `json:"id,omitempty"`
}

func NewMCPError

func NewMCPError(id interface{}, code int, message string, data interface{}) *MCPResponse

func NewMCPResponse

func NewMCPResponse(id interface{}, result interface{}) *MCPResponse

Helper functions for creating MCP responses

func (*MCPResponse) ToJSON

func (r *MCPResponse) ToJSON() ([]byte, error)

type MCPServer

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

MCPServer implements the Model Context Protocol for Simple Container

func NewMCPServer

func NewMCPServer(host string, port int, mode MCPMode, verboseMode bool, chatInterface *chat.ChatInterface) *MCPServer

NewMCPServer creates a new MCP server instance with mode-aware logging

func (*MCPServer) Start

func (s *MCPServer) Start(ctx context.Context) error

Start starts the MCP JSON-RPC server

func (*MCPServer) StartStdio

func (s *MCPServer) StartStdio(ctx context.Context) error

StartStdio starts the MCP server in stdio mode for IDE integration

type ModifyStackConfigParams

type ModifyStackConfigParams struct {
	StackName string                 `json:"stack_name"` // Which stack to modify
	Changes   map[string]interface{} `json:"changes"`    // What to change
}

type ModifyStackConfigResult

type ModifyStackConfigResult struct {
	StackName      string                 `json:"stack_name"`
	FilePath       string                 `json:"file_path"`
	Message        string                 `json:"message"`
	Success        bool                   `json:"success"`
	ChangesApplied map[string]interface{} `json:"changes_applied"`
}

type ProjectAnalysis

type ProjectAnalysis struct {
	Path            string                 `json:"path"`
	TechStacks      []TechStackInfo        `json:"tech_stacks"`
	Architecture    string                 `json:"architecture,omitempty"`
	Recommendations []Recommendation       `json:"recommendations"`
	Files           []FileInfo             `json:"files,omitempty"`
	Timestamp       time.Time              `json:"timestamp"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

type ProjectContext

type ProjectContext struct {
	Path            string                 `json:"path"`
	Name            string                 `json:"name"`
	SCConfigExists  bool                   `json:"sc_config_exists"`
	SCConfigPath    string                 `json:"sc_config_path,omitempty"`
	TechStack       *TechStackInfo         `json:"tech_stack,omitempty"`
	Resources       []ResourceInfo         `json:"resources,omitempty"`
	Recommendations []string               `json:"recommendations,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

type ProviderInfo

type ProviderInfo struct {
	Name        string   `json:"name"`
	DisplayName string   `json:"display_name"`
	Resources   []string `json:"resources"`
	Description string   `json:"description,omitempty"`
}

type ReadProjectFileParams

type ReadProjectFileParams struct {
	Filename string `json:"filename"` // Name of the file to read
}

New tool parameter types

type ReadProjectFileResult

type ReadProjectFileResult struct {
	Filename string `json:"filename"`
	Content  string `json:"content"`
	Message  string `json:"message"`
	Success  bool   `json:"success"`
}

type Recommendation

type Recommendation struct {
	Type        string `json:"type"`     // "resource", "template", "configuration"
	Category    string `json:"category"` // "database", "storage", "compute", etc.
	Priority    string `json:"priority"` // "high", "medium", "low"
	Title       string `json:"title"`
	Description string `json:"description"`
	Action      string `json:"action,omitempty"`
}

type ResourceInfo

type ResourceInfo struct {
	Type        string            `json:"type"`
	Name        string            `json:"name"`
	Provider    string            `json:"provider"`
	Description string            `json:"description,omitempty"`
	Properties  map[string]string `json:"properties,omitempty"`
	SchemaURL   string            `json:"schema_url,omitempty"`
}

type SearchDocumentationParams

type SearchDocumentationParams struct {
	Query string `json:"query"`
	Limit int    `json:"limit,omitempty"`
	Type  string `json:"type,omitempty"` // "docs", "examples", "schemas", or empty for all
}

MCP method parameter structures

type SetupSimpleContainerParams

type SetupSimpleContainerParams struct {
	Path           string `json:"path"`
	Environment    string `json:"environment,omitempty"`
	Parent         string `json:"parent,omitempty"`
	DeploymentType string `json:"deployment_type,omitempty"`
	Interactive    bool   `json:"interactive,omitempty"`
}

type SetupSimpleContainerResult

type SetupSimpleContainerResult struct {
	Message      string                 `json:"message"`
	FilesCreated []string               `json:"files_created"`
	Success      bool                   `json:"success"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
}

type ShowConfigDiffParams

type ShowConfigDiffParams struct {
	StackName   string `json:"stack_name"`             // Stack name to show diff for
	ConfigType  string `json:"config_type,omitempty"`  // "client" or "server" (default: "client")
	CompareWith string `json:"compare_with,omitempty"` // Git ref to compare with (default: "HEAD~1")
	Format      string `json:"format,omitempty"`       // "unified", "split", "inline", "compact" (default: "split")
}

Config diff types

type ShowConfigDiffResult

type ShowConfigDiffResult struct {
	StackName   string                 `json:"stack_name"`
	ConfigType  string                 `json:"config_type"`
	CompareFrom string                 `json:"compare_from"`
	CompareTo   string                 `json:"compare_to"`
	Message     string                 `json:"message"`
	Success     bool                   `json:"success"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type ShowStackConfigParams

type ShowStackConfigParams struct {
	StackName  string `json:"stack_name"`            // Stack name to show
	ConfigType string `json:"config_type,omitempty"` // "client" or "server" (optional)
}

type ShowStackConfigResult

type ShowStackConfigResult struct {
	StackName  string `json:"stack_name"`
	ConfigType string `json:"config_type"`
	FilePath   string `json:"file_path"`
	Content    string `json:"content"`
	Message    string `json:"message"`
	Success    bool   `json:"success"`
}

type StackDiscovery

type StackDiscovery struct {
	ClientStacks []string // Stacks with client.yaml (developer applications)
	ParentStacks []string // Stacks with server.yaml (infrastructure/parent stacks)
}

StackDiscovery holds information about discovered stacks

type SupportedResourcesResult

type SupportedResourcesResult struct {
	Resources []ResourceInfo `json:"resources"`
	Providers []ProviderInfo `json:"providers"`
	Total     int            `json:"total"`
}

type TechStackInfo

type TechStackInfo struct {
	Language     string            `json:"language,omitempty"`
	Framework    string            `json:"framework,omitempty"`
	Runtime      string            `json:"runtime,omitempty"`
	Dependencies []string          `json:"dependencies,omitempty"`
	Architecture string            `json:"architecture,omitempty"`
	Confidence   float32           `json:"confidence"`
	Metadata     map[string]string `json:"metadata,omitempty"`
}

type WriteProjectFileParams

type WriteProjectFileParams struct {
	Filename string `json:"filename"`         // File name to write
	Content  string `json:"content"`          // Content to write to the file
	Lines    string `json:"lines,omitempty"`  // Line range to replace (e.g., '10-20' or '5' for single line)
	Append   bool   `json:"append,omitempty"` // Append content to end of file instead of replacing
}

type WriteProjectFileResult

type WriteProjectFileResult struct {
	Message string   `json:"message"`
	Files   []string `json:"files,omitempty"`
	Success bool     `json:"success"`
}

Jump to

Keyboard shortcuts

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