runnercfg

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runnercfg wires the per-harness agent-runner fleet from controller flags: the image and brokered provider for each harness, which harnesses a deployment enables, and the startup validation that every allowlisted model can actually be run. Both job controllers (investigation, remediation) share it so the flag surface and enablement rules never drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalModels added in v0.14.0

func CanonicalModels(log *slog.Logger, allowlist []string, defaults ...string) (allow, defs []string, err error)

CanonicalModels resolves the configured model ids once, at startup: the allowlist and each stage default map to concrete canonical ids (family aliases become the newest registered version; see model.Resolve), so only concrete ids flow downstream into pod env, CRD status and rollups. The allowlist is deduplicated; defaults keep their positions (an empty default stays empty). An unknown alias family or a malformed id is an error. Each pattern-tier id (a well-formed Anthropic version patchy has not registered) is logged once as a warning: it runs on claude only and is unpriced until registered.

func EvolveRunners added in v0.9.3

func EvolveRunners(opts *cli.Options) (map[string]jobs.Runner, error)

EvolveRunners builds the evolve-runner fleet from the flags, mirroring Runners: a harness is a candidate only when its evolve image flag is set, and the claude and codex evolve runners are brokered like their finding siblings.

func ProviderConfig added in v0.14.0

func ProviderConfig(opts *cli.Options, harnessID string) (provider.Config, error)

ProviderConfig builds and validates a brokered harness's provider config from the shared flags: --broker-url plus the --<harness>-provider*, --<harness>-model-map and --<harness>-provider-env flags (the region and project-id flags exist for claude's cloud providers only).

func RegisterEvolveFlags added in v0.9.3

func RegisterEvolveFlags(f *pflag.FlagSet)

RegisterEvolveFlags adds the evolve-runner fleet flags for the evaluation controller: an evolve-runner image per harness plus the same shared broker/provider flags the finding runners use. There is one broker route per model vendor, whichever fleet uses it.

func RegisterFlags

func RegisterFlags(f *pflag.FlagSet)

RegisterFlags adds the per-harness runner flags shared by both job controllers: an image per harness (unset = that runner is not configured), the broker/provider flags, and the harness restrict list. Do not call it together with RegisterEvolveFlags in one binary: both register the shared flags.

func Resolve

func Resolve(ctx context.Context, opts *cli.Options, cs kubernetes.Interface, namespace string,
	runners map[string]jobs.Runner, restrict, allowlist []string, requiredModels ...string) ([]string, error)

Resolve probes the configured runners' credentials, computes the enabled harness set, and validates coverage: the allowlist must be fully runnable, every requiredModel (the investigate/remediate defaults, canonical ids) must resolve to an enabled harness, and each brokered runner's model map must cover every model resolving to its harness. A foundry or azure gap is a startup error here, not a mid-run failure. It also probes the broker's readiness, non-fatally: the broker Deployment may not be up yet, and a deployment-ordering deadlock would be worse than a warning. Returns the sorted enabled harness ids.

func ResolveHarness

func ResolveHarness(canonical string, enabled []string) (harnessID, cliModelID string, err error)

ResolveHarness resolves a model id (model.Lookup: exact, alias or pattern) to its harness and CLI model-id given the enabled set, erroring when the model is unknown or unrunnable.

func Restrict

func Restrict(opts *cli.Options) []string

Restrict parses the --harnesses restrict list; empty means auto-detect.

func Runners

func Runners(opts *cli.Options, models ...string) (map[string]jobs.Runner, error)

Runners builds the configured runner fleet from the flags. A harness is a candidate runner only when its image flag is set. The claude and codex runners are always brokered: their model traffic goes through the egress credential broker and no credential enters the pod. models are the canonical ids the fleet may run (the CanonicalModels output): any pattern-tier id among them gets a derived claude model-map entry alongside the registered models.

func SplitList

func SplitList(s string) []string

SplitList splits a comma-separated flag value, trimming blanks.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL