Skip to content
8 changes: 8 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ type Config struct {
AuditDir string
LogDir string
InferenceURL string
RegistryURL string
AuditInterval int
MCPBinDir string
MCPBridges []string
RawModelPath string
}

var Default = Config{
Expand All @@ -32,6 +34,7 @@ var Default = Config{
AuditDir: "/cognitiveos/audit",
LogDir: "/cognitiveos/logs",
InferenceURL: "http://127.0.0.1:11434",
RegistryURL: "https://registry.cognitiveos.org",
AuditInterval: 60,
MCPBinDir: "/cognitiveos/bin",
MCPBridges: []string{
Expand All @@ -40,7 +43,9 @@ var Default = Config{
"network-mcp",
"gpio-mcp",
"serial-mcp",
"package-mcp",
},
RawModelPath: "/cognitiveos/models/raw/raw-model.gguf",
}

func FromEnv() Config {
Expand All @@ -66,6 +71,9 @@ func FromEnv() Config {
if v := os.Getenv("COGNITIVEOS_MCP_BIN_DIR"); v != "" {
c.MCPBinDir = v
}
if v := os.Getenv("COGNITIVEOS_RAW_MODEL_PATH"); v != "" {
c.RawModelPath = v
}

// Derive paths from base dirs
c.SocketPath = filepath.Join(c.RunDir, "daemon.sock")
Expand Down
Loading
Loading