Documentation
¶
Index ¶
- Variables
- func IsExternalError(err error) bool
- func IsNotFound(err error) bool
- func IsTimeout(err error) bool
- func IsValidationError(err error) bool
- func ValidateSystemConfiguration(config *SystemConfiguration) error
- type AIError
- type CodeModification
- type ConfigValidationError
- type ConfigurationValidationError
- type FileMetadataInfo
- type GitHubError
- type InitializationResponse
- type LogEntryData
- type LogProcessingError
- type LogProcessingService
- type LoggingConfiguration
- type MetricsCollectionService
- type ModelServiceConfiguration
- type ModelServiceProvider
- type NodeError
- type NodeLifecycleManager
- type NodeOperationalStatus
- type ProposedSolution
- type RemoteRepositoryConfiguration
- type RemoteRepositoryService
- type RepositoryConfiguration
- type RepositoryError
- type RepositoryFileNode
- type RepositoryManager
- type SystemConfiguration
- type SystemNode
- type ValidationError
- type VersionControlInfo
- type VirtualRepositorySystem
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidConfig indicates an invalid configuration ErrInvalidConfig = errors.New("invalid configuration") // ErrNodeNotFound indicates a node was not found ErrNodeNotFound = errors.New("node not found") // ErrNodeAlreadyExists indicates a node already exists ErrNodeAlreadyExists = errors.New("node already exists") // ErrInvalidNodeStatus indicates an invalid node status ErrInvalidNodeStatus = errors.New("invalid node status") // ErrRepositoryNotInitialized indicates the repository is not initialized ErrRepositoryNotInitialized = errors.New("repository not initialized") // ErrFileNotFound indicates a file was not found ErrFileNotFound = errors.New("file not found") // ErrFileTooLarge indicates a file exceeds the size limit ErrFileTooLarge = errors.New("file too large") // ErrInvalidLogEntry indicates an invalid log entry ErrInvalidLogEntry = errors.New("invalid log entry") // ErrAIProviderError indicates an error from the AI provider ErrAIProviderError = errors.New("AI provider error") // ErrGitHubError indicates an error from GitHub ErrGitHubError = errors.New("GitHub error") // ErrInvalidSolution indicates an invalid solution ErrInvalidSolution = errors.New("invalid solution") // ErrOperationTimeout indicates an operation timed out ErrOperationTimeout = errors.New("operation timed out") )
Functions ¶
func IsExternalError ¶
IsExternalError checks if an error is from an external service
func IsNotFound ¶
IsNotFound checks if an error is a not found error
func IsValidationError ¶
IsValidationError checks if an error is a validation error
func ValidateSystemConfiguration ¶
func ValidateSystemConfiguration(config *SystemConfiguration) error
ValidateSystemConfiguration performs comprehensive validation of the system configuration
Types ¶
type CodeModification ¶
type CodeModification struct {
TargetFile string `json:"file_path"`
OriginalCode string `json:"original_code"`
ModifiedCode string `json:"updated_code"`
StartLine int `json:"line_start"`
EndLine int `json:"line_end"`
}
CodeModification represents a specific code change in a solution
type ConfigValidationError ¶
ConfigValidationError represents a configuration validation error
func (*ConfigValidationError) Error ¶
func (e *ConfigValidationError) Error() string
type ConfigurationValidationError ¶
ConfigurationValidationError represents a configuration validation error
func (ConfigurationValidationError) Error ¶
func (e ConfigurationValidationError) Error() string
type FileMetadataInfo ¶
type FileMetadataInfo struct {
TotalLines int `json:"line_count"`
Dependencies []string `json:"imports"` // list of imports/dependencies
VersionInfo VersionControlInfo `json:"version_info"`
}
FileMetadataInfo contains extended file information
type GitHubError ¶
GitHubError represents a GitHub API error
func (*GitHubError) Error ¶
func (e *GitHubError) Error() string
func (*GitHubError) Unwrap ¶
func (e *GitHubError) Unwrap() error
type InitializationResponse ¶
type InitializationResponse struct {
OperationalStatus string `json:"status"`
StatusMessage string `json:"message"`
NodeIdentifier string `json:"node_id"`
}
InitializationResponse represents the response from node initialization
type LogEntryData ¶
type LogEntryData struct {
NodeIdentifier string `json:"node_id"`
LogLevel string `json:"level"`
LogMessage string `json:"message"`
LogTimestamp time.Time `json:"timestamp"`
LogMetadata map[string]string `json:"metadata"`
ErrorTrace string `json:"stack_trace"`
}
LogEntryData represents a structured log entry from the client
type LogProcessingError ¶
LogProcessingError represents a log processing error
func (*LogProcessingError) Error ¶
func (e *LogProcessingError) Error() string
func (*LogProcessingError) Unwrap ¶
func (e *LogProcessingError) Unwrap() error
type LogProcessingService ¶
type LogProcessingService interface {
// ProcessLogEntry processes a single log entry
ProcessLogEntry(ctx context.Context, entry *LogEntryData) error
// StreamLogEntries initiates streaming of logs for a specific node
StreamLogEntries(ctx context.Context, nodeIdentifier string) (<-chan *LogEntryData, <-chan error)
}
LogProcessingService handles log entry processing and analysis
type LoggingConfiguration ¶
type LoggingConfiguration struct {
LogLevel string `json:"level" yaml:"level"`
OutputFormat string `json:"format" yaml:"format"`
}
LoggingConfiguration contains logging system settings
type MetricsCollectionService ¶
type MetricsCollectionService interface {
// RecordOperationMetrics records metrics for an operation
RecordOperationMetrics(operationName string, duration time.Duration, successful bool)
// RecordErrorMetrics records error-related metrics
RecordErrorMetrics(componentName string, err error)
// GetCurrentMetrics retrieves current system metrics
GetCurrentMetrics() map[string]interface{}
}
MetricsCollectionService collects and manages system metrics
type ModelServiceConfiguration ¶
type ModelServiceConfiguration struct {
ServiceProvider string `json:"provider" yaml:"provider"`
ServiceAPIKey string `json:"api_key" yaml:"api_key"`
ModelVersion string `json:"model_version" yaml:"model_version"`
}
ModelServiceConfiguration contains model service provider settings
type ModelServiceProvider ¶
type ModelServiceProvider interface {
// GenerateSolutionProposal generates a solution for a given log entry
GenerateSolutionProposal(ctx context.Context, entry *LogEntryData, repo RepositoryManager) (*ProposedSolution, error)
// ValidateSolutionProposal validates a generated solution
ValidateSolutionProposal(ctx context.Context, solution *ProposedSolution) error
}
ModelServiceProvider provides model-based analysis and solution generation
type NodeLifecycleManager ¶
type NodeLifecycleManager interface {
// CreateSystemNode initializes a new node with the provided configuration
CreateSystemNode(ctx context.Context, config *SystemConfiguration) (*SystemNode, error)
// GetSystemNode retrieves node information by identifier
GetSystemNode(ctx context.Context, nodeIdentifier string) (*SystemNode, error)
// DeleteSystemNode removes a node from the system
DeleteSystemNode(ctx context.Context, nodeIdentifier string) error
// UpdateNodeOperationalStatus updates the operational status of a node
UpdateNodeOperationalStatus(ctx context.Context, nodeIdentifier string, status NodeOperationalStatus) error
}
NodeLifecycleManager manages the complete lifecycle of system nodes
type NodeOperationalStatus ¶
type NodeOperationalStatus string
NodeOperationalStatus represents the current operational state of a node
const ( NodeStatusInitializing NodeOperationalStatus = "initializing" NodeStatusOperational NodeOperationalStatus = "operational" NodeStatusProcessing NodeOperationalStatus = "processing" NodeStatusInactive NodeOperationalStatus = "inactive" NodeStatusError NodeOperationalStatus = "error" )
type ProposedSolution ¶
type ProposedSolution struct {
SolutionID string `json:"id"`
NodeIdentifier string `json:"node_id"`
AssociatedLog *LogEntryData `json:"log_entry"`
ProposedChanges string `json:"suggestion"`
AffectedFiles []string `json:"files"`
GenerationTime time.Time `json:"created_at"`
ConfidenceScore float64 `json:"confidence"`
}
ProposedSolution represents a generated fix proposal for an issue
type RemoteRepositoryConfiguration ¶
type RemoteRepositoryConfiguration struct {
AuthToken string `json:"token" yaml:"token"`
RepositoryOwner string `json:"owner" yaml:"owner"`
RepositoryName string `json:"repository" yaml:"repository"`
TargetBranch string `json:"branch" yaml:"branch"`
}
RemoteRepositoryConfiguration contains remote repository integration settings
type RemoteRepositoryService ¶
type RemoteRepositoryService interface {
// CreateChangeRequest creates a change request for a proposed solution
CreateChangeRequest(ctx context.Context, solution *ProposedSolution) (string, error)
// SynchronizeRepository ensures local and remote repositories are in sync
SynchronizeRepository(ctx context.Context) error
}
RemoteRepositoryService manages remote repository operations
type RepositoryConfiguration ¶
type RepositoryConfiguration struct {
RepositoryPath string `json:"path" yaml:"path"`
FileLimit int `json:"max_files" yaml:"max_files"`
FileSizeLimit int64 `json:"max_file_size" yaml:"max_file_size"`
}
RepositoryConfiguration contains repository management settings
type RepositoryError ¶
RepositoryError represents a repository-related error
func (*RepositoryError) Error ¶
func (e *RepositoryError) Error() string
func (*RepositoryError) Unwrap ¶
func (e *RepositoryError) Unwrap() error
type RepositoryFileNode ¶
type RepositoryFileNode struct {
FileIdentifier string `json:"id"`
FilePath string `json:"path"` // relative to repo root
FileContents string `json:"content"`
FileLanguage string `json:"language"` // programming language
LastModified time.Time `json:"last_updated"`
FileMetadata FileMetadataInfo `json:"metadata"`
}
RepositoryFileNode represents a file in the virtual repository system
type RepositoryManager ¶
type RepositoryManager interface {
// InitializeRepository sets up the repository environment
InitializeRepository(ctx context.Context, config *RepositoryConfiguration) error
// GetFileContents retrieves contents of a specific file
GetFileContents(ctx context.Context, filePath string) ([]byte, error)
// UpdateFileContents updates the contents of a specific file
UpdateFileContents(ctx context.Context, filePath string, contents []byte) error
// ListRepositoryFiles lists all files in the repository
ListRepositoryFiles(ctx context.Context) ([]string, error)
}
RepositoryManager manages the virtual repository system
type SystemConfiguration ¶
type SystemConfiguration struct {
RemoteSettings RemoteRepositoryConfiguration `json:"remote" yaml:"remote"`
ModelSettings ModelServiceConfiguration `json:"model" yaml:"model"`
LoggingSettings LoggingConfiguration `json:"log" yaml:"log"`
OperationalMode string `json:"mode" yaml:"mode"`
RepositorySettings RepositoryConfiguration `json:"repository" yaml:"repository"`
}
SystemConfiguration represents the complete configuration for a Hephaestus node
type SystemNode ¶
type SystemNode struct {
NodeIdentifier string
CurrentStatus NodeOperationalStatus
NodeConfig *SystemConfiguration
CreationTime time.Time
LastUpdateTime time.Time
}
SystemNode represents a Hephaestus system node instance
type ValidationError ¶
ValidationError represents a validation error
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type VersionControlInfo ¶
type VersionControlInfo struct {
LastCommitHash string `json:"last_commit"`
LastCommitter string `json:"last_author"`
CommitTime time.Time `json:"last_commit_date"`
}
VersionControlInfo contains version control specific file information
type VirtualRepositorySystem ¶
type VirtualRepositorySystem struct {
RepositoryID string `json:"id"`
RemoteReference string `json:"remote_repo"`
TargetBranch string `json:"branch"`
FileCollection map[string]*RepositoryFileNode `json:"files"`
LastSyncTime time.Time `json:"last_synced"`
SystemConfig *SystemConfiguration `json:"configuration"`
}
VirtualRepositorySystem represents the complete virtual repository