Documentation
¶
Index ¶
- type AgentsConfig
- type Config
- type CredentialsConfig
- type DatabaseConfig
- type GameConfig
- type LLMConfig
- type Server
- func (s *Server) KB() knowledge.Base
- func (s *Server) Manager() *agent.Manager
- func (s *Server) Mux() *http.ServeMux
- func (s *Server) Observer() *observe.ObserverServer
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) SpawnConfiguredAgents(ctx context.Context) (int, []string)
- func (s *Server) Start() error
- type ServerConfig
- type StrategiesConfig
- type TeamConfig
- type TeamMemberConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentsConfig ¶
type AgentsConfig struct {
Dir string `yaml:"dir"`
Max int `yaml:"max"`
DecisionInterval time.Duration `yaml:"decision_interval"`
Enabled []string `yaml:"enabled"`
}
AgentsConfig holds agent management settings.
type Config ¶
type Config struct {
Server ServerConfig `yaml:"server"`
Game GameConfig `yaml:"game"`
Agents AgentsConfig `yaml:"agents"`
LLM LLMConfig `yaml:"llm"`
Database DatabaseConfig `yaml:"database"`
Credentials CredentialsConfig `yaml:"credentials"`
Strategies StrategiesConfig `yaml:"strategies"`
Teams []TeamConfig `yaml:"teams"`
}
Config is the unified server configuration.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with sensible defaults.
func LoadConfig ¶
LoadConfig reads a YAML config file and returns the parsed Config. Missing fields are filled with defaults.
type CredentialsConfig ¶
CredentialsConfig holds credential storage settings.
type DatabaseConfig ¶
type DatabaseConfig struct {
Backend string `yaml:"backend"`
Path string `yaml:"path"`
// MarketPath is the path to the separate volatile market DB
// (pkg/market). Empty falls back to market.DefaultConfig().
MarketPath string `yaml:"market_path"`
}
DatabaseConfig holds knowledge base settings.
type GameConfig ¶
type GameConfig struct {
ServerURL string `yaml:"server_url"`
Transport string `yaml:"transport"` // "ws" (default) or "mcp"
}
GameConfig holds game server connection settings.
type LLMConfig ¶
type LLMConfig struct {
URL string `yaml:"url"`
Model string `yaml:"model"`
Timeout time.Duration `yaml:"timeout"`
}
LLMConfig holds LLM provider settings.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the unified spacemolt server that combines agent management, the observer/frontend server, and shared resources.
func (*Server) Observer ¶
func (s *Server) Observer() *observe.ObserverServer
Observer returns the underlying ObserverServer.
func (*Server) SpawnConfiguredAgents ¶
SpawnConfiguredAgents spawns all agents listed in the config.
type ServerConfig ¶
type ServerConfig struct {
HTTPPort int `yaml:"http_port"`
StaticDir string `yaml:"static_dir"`
AdminStaticDir string `yaml:"admin_static_dir"`
RegistryURL string `yaml:"registry_url"`
}
ServerConfig holds HTTP server settings.
type StrategiesConfig ¶
StrategiesConfig holds strategy assignment defaults.
type TeamConfig ¶
type TeamConfig struct {
Name string `yaml:"name"`
Leader string `yaml:"leader"`
Members []TeamMemberConfig `yaml:"members"`
}
TeamConfig defines a team in the configuration.
type TeamMemberConfig ¶
TeamMemberConfig defines a team member in the configuration.