bazel start + mcp start

This commit is contained in:
ari committed 2026-11-01 14:55:33 -05:00
1 parent a90653260a
commit 4c082aca7c
33 files changed
+1728 -79

No files matched your search

+5
View File
@@ -49,6 +49,8 @@ type Config struct {
AgentCwd string `toml:"agent_cwd"`
AgentEnv map[string]string `toml:"agent_env"`
MaxSendFileMB int64 `toml:"max_send_file_mb"`
ROBinds []string `toml:"ro_binds"`
RWBinds []string `toml:"rw_binds"`
@@ -85,6 +87,7 @@ func LoadConfig(path, mode string) (*Config, error) {
AllowIndefinite: true,
BootTimeout: 2 * time.Minute,
AgentCwd: "/root",
MaxSendFileMB: 100,
Container: model.Size{MemoryMB: 2048, CPUs: 1},
MaxContainer: model.Size{MemoryMB: 8192, CPUs: 4},
HostReserve: model.Size{MemoryMB: 2048, CPUs: 1},
@@ -133,6 +136,8 @@ func LoadConfig(path, mode string) (*Config, error) {
return nil, fmt.Errorf("system (the NixOS build) is required")
case c.Container.MemoryMB <= 0 || c.Container.CPUs <= 0:
return nil, fmt.Errorf("container memory_mb and cpus must be above zero")
case c.MaxSendFileMB <= 0 || c.MaxSendFileMB > 1024:
return nil, fmt.Errorf("max_send_file_mb must be between 1 and 1024 (Slack's limit)")
case c.IdleTimeout <= 0:
return nil, fmt.Errorf("idle_timeout must be above zero")
case !c.Container.Fits(c.MaxContainer):