From 4bef835671542d5785c7dc6229662b9d5b0053f8 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 20 May 2026 19:23:45 +0000 Subject: feat: add [runners] config section to toggle each runner on/off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds RunnersConfig{Claude,Gemini,Local,Container *bool} to Config, parsed from a [runners] TOML section. Each field uses the *bool pointer pattern (nil = enabled by default, false = disabled) so existing installs require no config changes. serve.go / run.go now gate each runner registration on the corresponding Enabled() method. The pool's runners map remains the authoritative routing table — absent entries are already skipped by pickAgent and fail-fast in getRunner, so no executor changes are needed. Example: [runners] gemini = false # disable cloud gemini runner local = true # explicit (same as default) Co-Authored-By: Claude Sonnet 4.6 --- internal/cli/run.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'internal/cli/run.go') diff --git a/internal/cli/run.go b/internal/cli/run.go index 48f34b7..771c7b7 100644 --- a/internal/cli/run.go +++ b/internal/cli/run.go @@ -77,8 +77,10 @@ func runTasks(file string, parallel int, dryRun bool) error { apiURL = "http://" + cfg.ServerAddr } - runners := map[string]executor.Runner{ - "claude": &executor.ContainerRunner{ + runners := map[string]executor.Runner{} + + if cfg.Runners.ClaudeEnabled() { + runners["claude"] = &executor.ContainerRunner{ Image: cfg.ClaudeImage, Logger: logger, LogDir: cfg.LogDir, @@ -87,8 +89,10 @@ func runTasks(file string, parallel int, dryRun bool) error { SSHAuthSock: cfg.SSHAuthSock, ClaudeBinary: cfg.ClaudeBinaryPath, GeminiBinary: cfg.GeminiBinaryPath, - }, - "gemini": &executor.ContainerRunner{ + } + } + if cfg.Runners.GeminiEnabled() { + runners["gemini"] = &executor.ContainerRunner{ Image: cfg.GeminiImage, Logger: logger, LogDir: cfg.LogDir, @@ -97,11 +101,11 @@ func runTasks(file string, parallel int, dryRun bool) error { SSHAuthSock: cfg.SSHAuthSock, ClaudeBinary: cfg.ClaudeBinaryPath, GeminiBinary: cfg.GeminiBinaryPath, - }, + } } localClient := buildLocalLLMClient(cfg.LocalModel, logger) - if localClient != nil { + if localClient != nil && cfg.Runners.LocalEnabled() { runners["local"] = &executor.LocalRunner{ Client: localClient, Logger: logger, -- cgit v1.2.3