summaryrefslogtreecommitdiff
path: root/internal/cli/run.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-05-20 19:23:45 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-05-20 19:23:45 +0000
commit4bef835671542d5785c7dc6229662b9d5b0053f8 (patch)
tree1645363944f59831d249f1dc4d14c4be0e1f712d /internal/cli/run.go
parentbf5ea107f6aec57c1fc3d094cd42aef239d46f15 (diff)
feat: add [runners] config section to toggle each runner on/off
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/cli/run.go')
-rw-r--r--internal/cli/run.go16
1 files changed, 10 insertions, 6 deletions
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,