Documentation
¶
Index ¶
- func GetConfigPath() string
- func ShouldSkipHeartbeatForBootstrap(workspace string) bool
- type BotService
- func (s *BotService) GetComponents() map[string]interface{}
- func (s *BotService) GetConfig() (*config.Config, error)
- func (s *BotService) GetError() error
- func (s *BotService) GetForge() *forge.Forge
- func (s *BotService) GetState() BotState
- func (s *BotService) Restart() error
- func (s *BotService) SaveConfig(cfg interface{}, restart bool) error
- func (s *BotService) Start() error
- func (s *BotService) Stop() error
- type BotState
- type ServiceManager
- func (m *ServiceManager) GetBotComponents() map[string]interface{}
- func (m *ServiceManager) GetBotConfig() (interface{}, error)
- func (m *ServiceManager) GetBotError() error
- func (m *ServiceManager) GetBotService() *BotService
- func (m *ServiceManager) GetBotState() BotState
- func (m *ServiceManager) IsBasicServicesStarted() bool
- func (m *ServiceManager) IsBotRunning() bool
- func (m *ServiceManager) RestartBot() error
- func (m *ServiceManager) SaveBotConfig(cfg interface{}, restart bool) error
- func (m *ServiceManager) Shutdown()
- func (m *ServiceManager) StartBasicServices() error
- func (m *ServiceManager) StartBot() error
- func (m *ServiceManager) StopBot() error
- func (m *ServiceManager) WaitForShutdown()
- func (m *ServiceManager) WaitForShutdownWithDesktop(desktopClosed <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶
func GetConfigPath() string
GetConfigPath returns the path to the configuration file This is a wrapper around path.PathManager to avoid import cycle
func ShouldSkipHeartbeatForBootstrap ¶
ShouldSkipHeartbeatForBootstrap checks if BOOTSTRAP.md exists If it exists, heartbeat LLM call should be skipped
Types ¶
type BotService ¶
type BotService struct {
// contains filtered or unexported fields
}
BotService encapsulates all core bot services It manages the lifecycle of the entire bot functionality
func NewBotService ¶
func NewBotService() *BotService
NewBotService creates a new BotService instance
func (*BotService) GetComponents ¶
func (s *BotService) GetComponents() map[string]interface{}
GetComponents returns the core components for external access
func (*BotService) GetConfig ¶
func (s *BotService) GetConfig() (*config.Config, error)
GetConfig returns the current configuration
func (*BotService) GetError ¶
func (s *BotService) GetError() error
GetError returns the error that caused the error state
func (*BotService) GetForge ¶
func (s *BotService) GetForge() *forge.Forge
GetForge returns the Forge instance if available.
func (*BotService) GetState ¶
func (s *BotService) GetState() BotState
GetState returns the current state of the bot service
func (*BotService) Restart ¶
func (s *BotService) Restart() error
Restart stops and then starts the bot service
func (*BotService) SaveConfig ¶
func (s *BotService) SaveConfig(cfg interface{}, restart bool) error
SaveConfig saves the configuration and optionally restarts the bot
func (*BotService) Start ¶
func (s *BotService) Start() error
Start initializes and starts all bot services This is equivalent to what the gateway command does
type BotState ¶
type BotState int
BotState represents the current state of the Bot service
const ( // BotStateNotStarted indicates the bot has not been started BotStateNotStarted BotState = iota // BotStateStarting indicates the bot is currently starting BotStateStarting // BotStateRunning indicates the bot is running normally BotStateRunning // BotStateError indicates the bot is in an error state BotStateError )
func (BotState) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface
func (*BotState) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface
type ServiceManager ¶
type ServiceManager struct {
// contains filtered or unexported fields
}
ServiceManager manages all services in the application It handles both basic services (always running) and the bot service (on-demand)
func NewServiceManager ¶
func NewServiceManager() *ServiceManager
NewServiceManager creates a new ServiceManager instance
func (*ServiceManager) GetBotComponents ¶
func (m *ServiceManager) GetBotComponents() map[string]interface{}
GetBotComponents returns the bot components for external access
func (*ServiceManager) GetBotConfig ¶
func (m *ServiceManager) GetBotConfig() (interface{}, error)
GetBotConfig returns the current bot configuration
func (*ServiceManager) GetBotError ¶
func (m *ServiceManager) GetBotError() error
GetBotError returns the error from the bot service
func (*ServiceManager) GetBotService ¶
func (m *ServiceManager) GetBotService() *BotService
GetBotService returns the bot service instance
func (*ServiceManager) GetBotState ¶
func (m *ServiceManager) GetBotState() BotState
GetBotState returns the current state of the bot service
func (*ServiceManager) IsBasicServicesStarted ¶
func (m *ServiceManager) IsBasicServicesStarted() bool
IsBasicServicesStarted returns true if basic services are started
func (*ServiceManager) IsBotRunning ¶
func (m *ServiceManager) IsBotRunning() bool
IsBotRunning returns true if the bot service is running
func (*ServiceManager) RestartBot ¶
func (m *ServiceManager) RestartBot() error
RestartBot restarts the bot service
func (*ServiceManager) SaveBotConfig ¶
func (m *ServiceManager) SaveBotConfig(cfg interface{}, restart bool) error
SaveBotConfig saves the bot configuration
func (*ServiceManager) Shutdown ¶
func (m *ServiceManager) Shutdown()
Shutdown gracefully shuts down all services
func (*ServiceManager) StartBasicServices ¶
func (m *ServiceManager) StartBasicServices() error
StartBasicServices starts services that should always run This includes HTTP server for Web UI and Desktop UI Returns an error if critical services fail to start
func (*ServiceManager) StartBot ¶
func (m *ServiceManager) StartBot() error
StartBot starts the bot service This is equivalent to starting the gateway
func (*ServiceManager) StopBot ¶
func (m *ServiceManager) StopBot() error
StopBot stops the bot service
func (*ServiceManager) WaitForShutdown ¶
func (m *ServiceManager) WaitForShutdown()
WaitForShutdown waits for a shutdown signal (Ctrl+C)
func (*ServiceManager) WaitForShutdownWithDesktop ¶
func (m *ServiceManager) WaitForShutdownWithDesktop(desktopClosed <-chan struct{})
WaitForShutdownWithDesktop waits for either shutdown signal or desktop UI close