config

package
v0.206.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 27 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 config loads harness configuration.

Index

Constants

View Source
const (
	// RemoteClassPublic marks a node whose operator is not this box's operator: it takes public-data work only.
	RemoteClassPublic = "public"
	// RemoteClassPrivateOK is the class of every node that is not listed: it may be placed any contract.
	RemoteClassPrivateOK = "private-ok"
)

The two data classes a fleet node can be declared (delegate_remote_classes, register SF-40).

View Source
const (
	ToolsProfileFull    = "full"
	ToolsProfileCompact = "compact"
)

The two tools_schema_profile values.

View Source
const (
	PlacementSingle    = "single"
	PlacementMulticard = "multicard"
)

The values of imagegen_placement and gen_edit_placement: "" and "single" are the one-card lease every box has always taken.

View Source
const (
	SpreadLocalSkipWhenBusy = "skip-when-busy"
	SpreadLocalAlways       = "always"
)

Spread local-slot policies (AgentSpreadLocalSlot).

View Source
const (
	FleetPollLeaseSecDefault = 60
	FleetPollLeaseSecFloor   = 15
)

FleetPollLeaseSecDefault / FleetPollLeaseSecFloor bound fleet_poll_lease_sec: the default is five times the slowest healthy poll gap, the floor is one gap with room to spare (see Config.FleetPollLeaseSec).

View Source
const (
	EngineComfy    = "comfy"
	EngineSdcpp    = "sdcpp"
	EngineAudiocpp = "audiocpp"
)

Engine names. "" and "comfy" are today's ComfyUI/python paths on every route.

View Source
const (
	DefaultAudiocppVoiceFamily = "chatterbox"
	DefaultAudiocppMusicFamily = "ace_step"
)

Defaults an audio.cpp family key falls back to when it is unset (the families the reference node's models were verified for).

View Source
const (
	ExtraArgsSdcpp    = "sdcpp"
	ExtraArgsDepth    = "da3"
	ExtraArgsAudiocpp = "audiocpp"
)

Engines whose extra args are screened (ExtraArgsRefusal): they differ only in which flags the runner owns (audio.cpp's --device is the audiocpp_device key's).

View Source
const AnimateSdcppFootprintFamily = "wan-vace"

AnimateSdcppFootprintFamily is the footprint-store family the sd.cpp VACE animate lane records under, and the family the fleet advertises for animate on a box that runs it (CT-51 I1): one constant so the writer (internal/pipeline) and the advertiser (internal/fleetnode) cannot drift.

View Source
const BrowseMaxActionsCeiling = 60

BrowseMaxActionsCeiling is the most executed actions one browse run may take: jev-ultrafast's own loop budget (MAX_STEPS = 60).

View Source
const BrowserAuto = "auto"

BrowserAuto is the hyperframes_browser_path value that means "the managed browser of the installed HyperFrames release, resolved at render time" rather than a file path.

View Source
const DefaultCallDeadlineSec = 1500

DefaultCallDeadlineSec is the built-in whole-call deadline of the MCP delegation doors: 25 minutes. It sits above the longest single subtask that starts at once (timeout_sec cap 900 s, plus the 300 s admission allowance and the 60 s poll grace the delegator holds a job open for = 1,260 s), and below the MCP client's 1,800 s abort by the margin a response needs to be built and delivered (the live check is "call wall <= deadline + 30 s").

It does NOT promise that no healthy subtask is ever cut. Time a job spends queued on a node is credited back to its wall (up to the queue budget the node's own estimate sets, ADR 0063: 1.5 x its estimate + 30 s, at least 60 s, at most the contract's poll budget; the lesser of that budget and 300 s for a node that publishes none) and a capacity wait comes before placement, so a worst-case auto-sized subtask can run past the default and be cut. That is the deadline doing its job; a workload that needs longer sets agent_call_deadline_sec, below the client's abort.

View Source
const DefaultGPUDisplayCapPct = 60

DefaultGPUDisplayCapPct is the share of the display card's VRAM the card allocator may fill when gpu_display_cap_pct is unset: the operator's rule of 2026-10-11 ("the display card may be used up to 60 percent at all times unless I say I need it"). It is the operator's figure, not a measurement.

View Source
const DefaultGPUHostRAMHeadroomGiB = gpuprobe.DefaultHostRAMHeadroomGiB

DefaultGPUHostRAMHeadroomGiB is the host RAM every GPU lease grant, and the card allocator, keep uncommitted beyond what a lease declares, when gpu_host_ram_headroom_gib is unset. It is the probe's own default (8 GiB, gpuprobe.DefaultHostRAMHeadroomGiB: it was 4 while only the `--cards` path read it, and the paging incident of 2026-10-09 showed 4 is inside the noise of the desktop's own growth). A floor chosen to keep declared loads away from paging, not a measurement of any one job.

View Source
const DefaultGPUHostRAMHoldMaxSec = 600

DefaultGPUHostRAMHoldMaxSec is how long a lease that unloaded the seat may hold its cards waiting for the host to have the room for its declared RAM, when gpu_hostram_hold_max_sec is unset. A chosen figure, not a measurement: ten minutes is several times the minutes a seat's memory takes to come back after its unload, and short enough that a lease whose figure the host can never meet frees the cards for the queue behind it.

View Source
const DefaultMediaInputsMaxMB = 256

DefaultMediaInputsMaxMB is the media-job bundle cap when fleet_media_inputs_max_mb is unset.

View Source
const DefaultPlacementWait = 120 * time.Second

DefaultPlacementWait is the capacity wait of a call that has no whole-call deadline when agent_placement_wait_sec is unset. A call WITH a deadline waits until it instead (ADR 0073).

View Source
const DisplayDeviceAuto = "auto"

DisplayDeviceAuto is the display_device that names no card: the display_floor guard asks the driver which card drives the monitor (display_active / display_attached) and guards that one, on every decision, so a monitor that moves needs no edit to display_device (the display seat's own pin is a different key and still has to be on that card). It cannot be mistaken for the other two forms: a CUDA index is all digits and a GPU UUID pin starts "GPU-".

View Source
const EditFamily2511 = "qwen-image-edit-2511"

EditFamily2511 names the default edit graph (Qwen-Image-Edit 2511), which an empty gen_edit_family selects.

View Source
const FamilyFlux3Klein = "flux3-klein"

FamilyFlux3Klein is the FLUX 3 Image Klein graph family (render/wf-flux3-klein.mjs on ComfyUI; sd.cpp's flux3 support on the sd.cpp engine): the only family that reads imagegen_upsampler.

View Source
const FamilyQwenImage21 = "qwen-image-2.1"

FamilyQwenImage21 is the Qwen-Image-2.1 graph family (render/wf-qwen-image-21.mjs): the only family with an RGBA VAE, so the only one transparent output applies to.

View Source
const FleetNodePort = "18811"

FleetNodePort is the port a fleet node's dispatcher listens on — the port half of FleetListen's default, spelled once so the delegate_remotes shape check and the operator guide cannot drift from it. It is a STRING because every consumer here compares it against url.URL.Port().

View Source
const MaxGPUHostRAMHoldMaxSec = 7 * 24 * 60 * 60

MaxGPUHostRAMHoldMaxSec is the largest gpu_hostram_hold_max_sec (and `--ram-hold-max`) accepted: 7 days. A chosen figure: it is above the longest lease life the harness grants by default (gpu_max_total_min, 48 h) and the longest `--wait` anyone uses (8 h by default), so no honest bound is refused, and a value this large that is not 0 is a typo. 0 is the explicit "no bound". The ceiling is also what keeps the seconds-to-Duration conversion from wrapping: past about 9.2e9 seconds time.Duration overflows and reads negative or zero, which would turn the bound off.

Variables

View Source
var (
	ComposeQualities = []string{"draft", "standard", "high"}
	ComposeFormats   = []string{"mp4", "webm", "mov", "png-sequence", "gif"}
)

ComposeQualities / ComposeFormats are the closed sets the compose lane accepts (HyperFrames' own names; `looks`/`delivery` aliases and `hls` are deliberately not exposed). Exported so the pipeline, the MCP schema tests and the config warning share one list.

View Source
var BrowseBrowsers = []string{"chrome", "edge", "brave", "chromium"}

BrowseBrowsers is the closed set browse_browser accepts ("" = discovery).

View Source
var WanDecodeModes = []string{"auto", "plain", "tiled"}

WanDecodeModes is the vocabulary of videogen_wan_decode and of a videogen_families entry's wan_decode, with "" reading as the runner's default, tiled: render/wf-wan22-i2v.mjs WAN_DECODE_MODES is the same list (TestWanDecodeMirrorsTheBuilder reads it), so a mode the runner would refuse is refused here, at load, instead of as a runner exit on every render.

Functions

func AudiocppBackendRefusal added in v0.206.0

func AudiocppBackendRefusal(backend string) error

AudiocppBackendRefusal returns an error unless backend is audio.cpp's vulkan backend. It is the audiocpp_backend twin of CPUBackendRefusal, which validates sd.cpp's vulkanN spelling.

func AudiocppDeviceRefusal added in v0.206.0

func AudiocppDeviceRefusal(device string) error

AudiocppDeviceRefusal validates audiocpp_device: empty (= device 0) or a non-negative index.

func BrowseCDPURLAllowed added in v0.206.0

func BrowseCDPURLAllowed(u string) bool

BrowseCDPURLAllowed reports whether u is a browser endpoint the lane may attach to (browse_cdp_url): plain http (resolved through /json/version) or ws on a LOOPBACK host with an explicit port and no credentials. The lane drives a browser with the operator's sessions, so it never attaches to a browser on another machine.

func BrowseDecisionURLAllowed added in v0.206.0

func BrowseDecisionURLAllowed(u string) bool

BrowseDecisionURLAllowed reports whether u is a decision endpoint the harness will call: plain http on a loopback host (127.0.0.0/8, ::1, localhost). The harness holds no provider key (ADR 0001, Invariant 2), so the one shape it calls is a local service that holds its own — a provider URL here would otherwise turn the lane into a cloud fallback.

func CPUBackendRefusal added in v0.206.0

func CPUBackendRefusal(backend string) error

CPUBackendRefusal returns an error when backend is not purely Vulkan devices, and nil for a backend that names only Vulkan devices. The empty string is refused too: an engine with no backend would let the binary pick its own, and the binary's own choice is CPU on a box whose GPU it cannot open.

sd-cli's --backend takes either one value ("vulkan0") or per-module assignments ("diffusion=vulkan0,vae=cpu", with "&" joining devices of one module), so every assignment is checked, not just the bare word.

func CallDeadlineFindings added in v0.206.0

func CallDeadlineFindings(c Config) []string

CallDeadlineFindings returns the non-fatal findings about agent_call_deadline_sec: two shapes that load, run, and then quietly void the protection the key exists for. A value at or above the client's abort cannot beat it — the client drops the call, with the results it holds, at its own limit. Any negative value means "no deadline", so -1500 written for 1500 switches it off without a word. The documented settings (unset, an in-range number, -1) are silent.

func DefaultBase added in v0.206.0

func DefaultBase() string

Default returns a config suitable for the verified E4B-QAT+MTP setup. DefaultBase is the install root used when nothing overrides it: $LOCAL_OFFLOAD_HOME when set, else ~/.local-offload. A relative or "~/"-prefixed env value is resolved against the user's home so the variable is usable from a shell profile without absolute-path ceremony.

func DefaultComfyDir added in v0.206.0

func DefaultComfyDir() string

DefaultComfyDir is the ComfyUI install a machine drives when nothing is bound. It is the ONE platform-dependent default in this file, deliberately: the old "C:/ComfyUI" applied on every OS, so a Linux node reported a ComfyUI install it cannot have — and, because the ComfyUI-backed scripts were bound, its fleet health advertised video-gen / audio-gen / run-graph that fail on arrival. Off Windows an unset comfy_dir is UNBOUND: mediacap then reports NOT CONFIGURED (a legitimate machine) instead of BOUND-BUT-MISSING (a promise it cannot keep), and the installer writes the real path per machine. render/comfy-lifecycle.mjs resolveComfyDir mirrors this rule on the runner side.

func EndpointWarnings added in v0.206.0

func EndpointWarnings(c Config) []string

EndpointWarnings returns the non-fatal findings about this box's FLEET and CASCADE base URLs — shapes that load, dial, and then fail in a way that names neither the key nor the value (register S-38).

They warn rather than refuse for one release, on purpose. A strict validator that refuses a working odd config is a worse outage than the dial timeout it replaces, so the operator gets a named `doctor` row and a startup line first; the refusal can follow once the fleet is known clean.

Every message names the KEY, the INDEX or map key, and the VALUE: a box with four remotes must not leave the operator guessing which one is wrong.

func ExpandTilde added in v0.6.1

func ExpandTilde(p, home string) string

ExpandTilde expands a leading "~/" (or "~\" or a bare "~") in p to home. Anything else — including "~user/..." — is returned unchanged.

func ExtraArgsRefusal added in v0.206.0

func ExtraArgsRefusal(key, engine string, args []string) error

ExtraArgsRefusal is the typed refusal for an *_extra_args list (key names it in the error): nil for a clean list. The message starts EXTRA_ARGS_REFUSED, the class the runner and the pipeline both report.

func FleetVisibleAccelerators added in v0.206.0

func FleetVisibleAccelerators(ids []string) []string

FleetVisibleAccelerators is ids without the local-only devices: the order is kept (ADR 0037's first-listed-owner rule rides on it), the result is always a fresh slice, and it is nil when nothing is left, so an `omitempty` health key stays absent.

It is THE filter behind the three fleet-visible points: the /fleet/health accelerators list, the `accel` task advertisement and accel job acceptance. It is applied on the way OUT only — Accelerators, HasAccelerator and every local registration (the MCP tools, the agent loop, the pipeline lanes) keep the device, because the decision is "never leaves the box", not "off".

func ImageOverlayClearKeys added in v0.206.0

func ImageOverlayClearKeys() []string

ImageOverlayClearKeys lists the image route's model-binding keys a family replaces wholesale (the overlay's clear list). internal/mediacap reads it to prove that its recipe classifies every one of them, so a key cannot join the list without someone deciding whether it is part of what an image family IS.

func IsAutoDisplayDevice added in v0.206.0

func IsAutoDisplayDevice(s string) bool

IsAutoDisplayDevice reports whether a display_device is the DisplayDeviceAuto sentinel (case and surrounding whitespace do not matter; the guards trim a declaration before they read it).

func IsParseError added in v0.206.0

func IsParseError(err error) bool

IsParseError reports whether err is (or wraps) a config ParseError.

func LatentTokens added in v0.206.0

func LatentTokens(width, height, frames, stride, refLatentFrames int) int

LatentTokens is the number of latent tokens one attention pass of a Wan-family DiT sees: the VAE downsamples stride times per side, the DiT patch is 2x2, time is /4 with the first frame kept, and a VACE reference image adds refLatentFrames latent frames:

ceil(W/(stride*2)) * ceil(H/(stride*2)) * (floor((frames-1)/4) + 1 + refLatentFrames)

render/igpu-engine.mjs latentTokens is the Node twin; render/testdata/token-cap-table.json pins both.

func LayerKeysOf added in v0.206.0

func LayerKeysOf() []string

LayerKeysOf lists the json tags of LayerSpec ("layers[].<key>") and LayerSeat ("layers[].seats[].<key>") in the spelling the tier table's _fields block documents them under, so a table lint can hold the docs and the struct to the same set in both directions.

func LoadFailure added in v0.206.0

func LoadFailure(err error) string

LoadFailure names how a config load failed, for messages that wrap LoadErr: a file that could not be parsed (nothing from it in effect) or one that failed validation (its other settings in effect).

func LoadWithSource added in v0.206.0

func LoadWithSource(flagPath string) (Config, Source)

LoadWithSource resolves (flag > env > cwd > home), loads, and reports the true source.

func LocalOnlyAccelerator added in v0.206.0

func LocalOnlyAccelerator(id string) bool

LocalOnlyAccelerator reports whether id stays on the box that carries it. The id is compared trimmed and case-folded so a hand-edited spelling cannot walk past the guard; the registration gates (HasAccelerator) stay exact, so such a spelling also registers no tool.

func LocalOnlyAcceleratorFindings added in v0.206.0

func LocalOnlyAcceleratorFindings(c Config) []string

LocalOnlyAcceleratorFindings returns the non-fatal findings about fleet_accelerators: an entry naming a local-only device asks the fleet for something it never serves, so every forwarded call for it would defer. The box that CARRIES the device lists it in accelerators, which is the normal case and says nothing here. It loads (a finding, never a refusal), is named once per entry with its index, and rides the same two doors as CallDeadlineFindings: a `doctor` FAIL row and a startup warning.

func RedactBase added in v0.206.0

func RedactBase(raw string) string

RedactBase is a configured base URL as it may be PRINTED: unchanged unless it carries what a URL can carry that is a secret (userinfo, a query string, a fragment), in which case those are dropped and the scheme, host, port and path remain. It is netguard.RedactBase, which lives below this package so the tailnet guard's own refusal can use it; every message that names a configured base goes through this one function.

func ResolvePath added in v0.206.0

func ResolvePath(flagPath, envPath, home string, exists func(string) bool) string

ResolvePath picks the config file by precedence: explicit flag > $LOCAL_OFFLOAD_CONFIG > ./config.json if it exists > ~/.local-offload/config.json if it exists > "" (defaults). exists is injected for testability. Flag/env paths are returned WITHOUT an existence check on purpose — an explicit path that is missing must surface as NotFound (loud), never fall through to a different file the operator did not name.

func ScreenExtraArgs added in v0.206.0

func ScreenExtraArgs(engine string, args []string) (index int, arg, why string, found bool)

ScreenExtraArgs returns the first *_extra_args element that changes the backend or the placement: its index, the element, why, and true; false when the list is clean. engine is one of the ExtraArgs* constants.

func SourceLine added in v0.206.0

func SourceLine(src Source) string

SourceLine renders a one-line, truthful config-source disclosure (doctor's first line). It must never credit a file that was not actually read.

func StripBOM added in v0.206.0

func StripBOM(b []byte) []byte

StripBOM drops one leading UTF-8 byte-order mark. Every reader of an operator-written JSON file calls it before decoding: a config saved from PowerShell 5.1 is otherwise "not valid JSON" while it looks perfect in every editor (<node-e>, 2026-09-23: a run-graph ran on built-in defaults because of exactly this).

func TokenCapRefusal added in v0.206.0

func TokenCapRefusal(key string, width, height, frames, stride, refLatentFrames, capTokens int) error

TokenCapRefusal is the typed, non-retryable refusal for a request over the configured latent-token cap, or nil: no cap configured (capTokens <= 0) is no check. key names the config key (sdcpp_max_tokens / animategen_sdcpp_max_tokens) in the message. The message starts TOKEN_CAP_EXCEEDED, the class the runner reports as well.

func ValidComposeWorkers added in v0.206.0

func ValidComposeWorkers(v string) bool

ValidComposeWorkers reports whether a compose_workers value is one the runner accepts: "" / "auto", or an integer 1-24 (HyperFrames caps --workers at 24).

func ValidateKVCacheServer added in v0.206.0

func ValidateKVCacheServer(k *KVCacheServer) error

ValidateKVCacheServer refuses a block that could not work, BY NAME, and normalizes Address (trimmed) so every consumer dials what was vetted. Exported so the status view can re-check a block on a server that was started against a refused config. A disabled block is never inspected: the tier is optional and an install that never enables it must not be able to fail on it.

func ValidateKVCacheServers added in v0.206.0

func ValidateKVCacheServers(l KVCacheServers) error

ValidateKVCacheServers validates every binding AND the two rules that exist only BETWEEN bindings:

  1. One binding per seat, and at most one box default. Two bindings for one seat is not a merge — it is two stores whose order in the file decides which one the seat gets.
  2. A key_prefix shared by two seats must be shared DELIBERATELY: every binding on it must declare the SAME stack generation (kv_dtype + tensor_parallel). Pages written under another layout are not stale, they are unreadable — LMCache fails the read with "value size exceeds buffer capacity" and the tier serves nothing while reporting success (measured 2026-09-03 00:25). An UNDECLARED generation on a shared prefix is refused for the same reason: it cannot be shown to be safe, and "probably fine" is how that one shipped.

func ValidateLayerKeys added in v0.206.0

func ValidateLayerKeys(rawLayers []byte) error

ValidateLayerKeys is the strict-key companion of ValidateLayers for the two readers that still hold the raw JSON: tierseed.ParseDoc (the tier table, and the copy embedded in the installer) and Load (a hand-edited config.json). encoding/json drops a key it cannot match WITHOUT A WORD, and ValidateLayers sees only the decoded struct — so `host_ram_gb` on the triple layer's seat decoded as host_ram_gib 0, the host_ram guard became `free ≥ 0`, and a ~70 GB load was admissible on a box with 20 GB free, from one dropped character with no signal at authoring, install or load. Every layers[] and layers[].seats[] key must be a json tag on LayerSpec / LayerSeat, spelled exactly (the table is lowercase; a case-insensitive match would let `Host_RAM_GiB` through here and nowhere else). The known sets are read off the structs by reflection so this lint cannot drift from the shape it guards; the error names the JSON path the way ValidateLayers does. A nil / null `layers` is not composite and passes.

func WarnOnDefaults added in v0.206.0

func WarnOnDefaults(src Source, w io.Writer) bool

WarnOnDefaults prints one stderr-style warning when cfg is effectively built-in defaults, naming why and the escape hatches. Returns whether it warned.

func WarnOnShadowedAgentModel added in v0.206.0

func WarnOnShadowedAgentModel(src Source, cfg Config, w io.Writer) bool

WarnOnShadowedAgentModel prints one line when cfg's agent_model is shadowed by the layers it also declares (AgentModelShadowNote), naming the file that supplied both so a config copy is the first suspect rather than the node's own configuration. Returns whether it warned. Register C-95.

func WarnOnShadowedAgentModelOnce added in v0.206.0

func WarnOnShadowedAgentModelOnce(src Source, cfg Config, w io.Writer) bool

WarnOnShadowedAgentModelOnce is WarnOnShadowedAgentModel for the shared config-loading path: every entry point that loads a config (the MCP server, agent_delegate and agent_run through it, acceptance, report, delegate, the local-agent binary) calls it, and a process says each distinct (file, note) once however many times it loads the config. Callers pass stderr only: the MCP server's stdout is the JSON-RPC stream. Register C-95.

Types

type Config

type Config struct {
	// Endpoint is the llama-server base URL (e.g. http://127.0.0.1:11436).
	Endpoint string `json:"endpoint"`
	// CompletionPath is the native completion route used to pass a GBNF grammar.
	CompletionPath string `json:"completion_path"`
	// SeatEndpoints maps a model seat (the exact llama-swap model id or alias a
	// call names) to a REMOTE OpenAI-compatible base URL serving that model —
	// Phase A of multi-node delegation: {"node-c-e4b": "http://node-c:11436"}
	// makes every completion for that seat resolve to <node-c>'s llama-swap
	// instead of Endpoint, with zero job machinery. Empty/absent = every seat
	// stays on Endpoint, byte-identical to a pre-seat build (pinned by test).
	// Values are vetted TWICE to hold the never-cloud rule (ADR 0001): at load
	// by netguard.TailnetURL (loopback, 100.64.0.0/10 literals, dotless MagicDNS
	// names, or hosts under the house tailnet suffix — anything else fails the
	// load loudly, naming the key), and at every dial by netguard.SafeTransport
	// (the RESOLVED address must be loopback/tailnet — the DNS-rebinding guard
	// a load-time string check cannot provide).
	// TailnetSuffix is the operator's OWN tailnet DNS zone (e.g. "tailnnnnnn.ts.net"),
	// the one netguard.TailnetURL admits dotted hostnames under. It lives in config
	// rather than compiled into the binary because this is a public repo: one
	// operator's zone is private to them and wrong for everyone else. Empty is
	// FAIL-CLOSED and is the default — loopback, 100.64.0.0/10 literals and dotless
	// MagicDNS names still pass, a dotted tailnet FQDN does not. A generic ".ts.net"
	// rule is deliberately NOT the fallback: it would admit ANY tailnet's
	// Funnel-published hostname, i.e. a public-internet endpoint wearing a
	// tailnet-looking name.
	TailnetSuffix string `json:"tailnet_suffix,omitempty"`
	// TailnetSuffixes are MORE tailnet DNS zones netguard.TailnetURL admits dotted
	// hostnames under, beside tailnet_suffix (ADR 0074). Tailscale names a node shared in
	// from another tailnet under the SHARER's zone and nowhere else, so a delegator that
	// takes such a node by name needs that zone listed; before this list the only form
	// that passed was the node's raw tailnet CGNAT-range address. Every entry is a zone the
	// operator names on purpose, normalized like tailnet_suffix and refused at load when
	// it is not a DNS zone; empty (the default) adds none. It does NOT loosen the dial
	// gate, which still refuses any name that resolves outside loopback and
	// the tailnet CGNAT range, and it is not a generic ".ts.net" rule.
	TailnetSuffixes []string          `json:"tailnet_suffixes,omitempty"`
	SeatEndpoints   map[string]string `json:"seat_endpoints,omitempty"`
	// CascadeRemoteLanes maps a model seat (same key rule as SeatEndpoints) to a
	// remote OpenAI-compatible base URL that ALSO serves that model — the
	// busy-aware failover lane for the daily cascade (roast delta 7), distinct
	// from SeatEndpoints' static always-remote pin: a lane is consulted per call
	// and taken only while this box would make the call WAIT — the machine-wide
	// GPU lease is held, or another model holds the local llama-swap and a swap
	// to this one would queue behind its in-flight requests (register C-41: the
	// mutually-exclusive interactive set means every cascade tier needs a swap
	// while an agent seat is loaded, and the tier used to sit there until its own
	// HTTP deadline) — AND a cached roster probe confirms the lane serves the
	// model; every other call stays on Endpoint. Quality-identical models only — the SAME model id served
	// remotely, never a downgrade: routing never changes WHICH model answers,
	// only WHERE. Empty/absent = the cascade never leaves this box. Values are
	// vetted by the same double guard as SeatEndpoints: netguard.TailnetURL at
	// load (naming the key) and the SafeTransport dial gate on every request.
	CascadeRemoteLanes map[string]string `json:"cascade_remote_lanes,omitempty"`
	// CascadeSeatGuard keeps a Tier-1 cascade call (summarize / classify /
	// extract / triage) from EVICTING a loaded vLLM seat (internal/seatguard):
	// while a seat `vllm_seats` declares is loaded on this box, a rung whose
	// load llama-swap's own routing (serving_config_path: matrix sets or
	// groups) says would unload that seat is served off this box through its
	// cascade_remote_lanes lane when one is resident, and otherwise by the
	// loaded seat itself (a vLLM seat is an eligible cascade rung since D-129).
	// Measured cost of the eviction it prevents on the reference box: a 3–5
	// minute cold load and the loss of the seat's whole prefix cache in the
	// middle of a long session. With no vLLM seat loaded, or none declared,
	// the cascade is exactly what it was. *bool because the guard defaults ON
	// and an absent key must not read as an opt-out; false switches it off.
	CascadeSeatGuard *bool `json:"cascade_seat_guard,omitempty"`
	// Model is the default workhorse (E4B) — used for summarize/extract and as
	// the fallback for any task without a specific route. Empty = dedicated server.
	Model string `json:"model"`
	// TriageModel serves the fast tier (triage/classify). Empty = use Model.
	// NOTE on 8GB: the tiers are swap-exclusive, so routing a few triages to a
	// cold E2B costs a model swap; for latency-critical mixed workloads set this
	// to "" (let E4B handle triage) or batch same-tier calls.
	TriageModel string `json:"triage_model"`
	// EscalationModel is tried once when the primary defers (validation fail / low
	// confidence) BEFORE deferring to Opus. Empty = no escalation (defer directly).
	EscalationModel string `json:"escalation_model"`
	// ReasoningModel is the terminal LOCAL tier (grammar tasks only): after the whole
	// cascade defers, a thinking model gets one shot under a think-wrapped grammar
	// (gbnf.WrapThinking) to reclaim the deferral before falling through to Opus. Run
	// it thinking-OFF — the grammar, not the chat template, supplies the <think> span.
	// Empty = no reasoning tier (defer straight to Opus, the prior behavior).
	ReasoningModel string `json:"reasoning_model,omitempty"`
	// AgentModel is the coding agent's PLANNER seat (single-loop agent_run / local-agent).
	// Empty = the planner falls back to Model, the pre-seat behavior — and the chain
	// stays LIVE: nothing may materialize the fallback into this field at rest.
	// Distinct from Model on purpose: the cascade's economics want the small fast
	// workhorse; the agent's judgment wants the strongest model the tier serves. Seeded
	// per tier (derived from the tier row's resident_tier when the two differ). The
	// two-tier seats are NOT this key (architect=EscalationModel, editor=Model), and
	// the agent's in-loop offload cascade stays on Model.
	AgentModel string `json:"agent_model,omitempty"`
	// AgentProfile is this box's DEFAULT agent tool profile — the one the loop uses
	// when the caller names none. Empty = "general", the pre-key behavior, and the
	// chain stays LIVE exactly like AgentModel: nothing may materialize the fallback
	// into this field at rest.
	//
	// It exists because "general" is a MEASURED trap on a small planner. general
	// advertises every enabled tool with no tuned prompt and no exemplars; on the
	// ampere-6 reference box (RTX 3050 6GB) the SAME model on the SAME contract
	// scored 0% under general — twelve steps burned calling tools, zero output bytes
	// — and 72% under a narrowed profile. That is the single largest factor measured
	// on that tier, larger than the choice of model. The house recorded it
	// qualitatively in July 2026 as ampere-6 "decision 8, never enforced in config";
	// this key is the enforcement.
	//
	// Per-tier because it is a property of the SEAT's capability, not of the task: a
	// 27B planner handles the full tool set, a 4B does not. The caller's explicit
	// profile always wins, so a box seeded "research" can still run an edit task with
	// --profile edit. An unknown name here NEVER silently falls back to the one
	// configuration measured to fail — it fails by name. Where that surfaces differs
	// by door, so be precise: `local-agent` exits 2 before any network work, `doctor`
	// reports it, and `tierseed` refuses it at tier-authoring time; the MCP `agent_run`
	// door returns a per-call defer naming the valid profiles, because a long-lived
	// server must not die on a config it can report instead.
	AgentProfile string `json:"agent_profile,omitempty"`
	// AgentEnvRules is this seat's environment-rule table (ADR 0036): the closed
	// vocabulary of interceptors the agent loop runs every tool call through —
	// deny/allow tools, per-tool call caps, numeric argument caps, an
	// observation size cap, strip patterns, error rewrites. nil = no hooks, the
	// pre-key loop byte-for-byte. Per box because it is a property of the SEAT
	// (what a 4B needs is not what a 27B needs); the rigger proposes edits to
	// it, an operator applies them. Validated at every door that builds a loop.
	AgentEnvRules *core.AgentEnvRules `json:"agent_env_rules,omitempty"`
	// AgentSeedContextReads (0.113.24, ADR 0036 P2): when true, a grounded
	// contract run on THIS box gets one read_file setup action per context doc
	// prepended to the contract's own setup_actions (core.SeedContextReads),
	// so the model's first turn already holds the documents the node wrote
	// into the read root instead of spending its first two steps finding
	// them (the corpus's dominant 4B failure shape). Node-side because the
	// node, not the delegator, knows the file names. Off by default until the
	// A/B on the seat says otherwise; a property of the seat like the rules.
	AgentSeedContextReads bool `json:"agent_seed_context_reads,omitempty"`
	// Update configures `local-offload update` (docs/systems/update.md): the release channel, each component's
	// live path, how the llama-swap daemon restarts, and the smoke gate. Every key is optional; nil/absent = the
	// verb's own defaults. The verb reads the same object itself (internal/update.FileConfig); it is declared here so
	// the key is a known one and the typed config carries it.
	Update *UpdateConfig `json:"update,omitempty"`
	// KVCacheServers is the OPTIONAL "cache server" tier: a second machine's RAM
	// behind LMCache MP, bound ONE BINDING PER vLLM SEAT (see kvcacheserver.go and
	// kvcacheservers.go). Empty = no tier, the pre-key behavior; nothing in the
	// install depends on it. The pre-0.121 single object still decodes, as a
	// one-element list.
	KVCacheServers KVCacheServers `json:"kv_cache_server,omitempty"`
	// VLLMSeats names the llama-swap seats on THIS box served by a vLLM engine —
	// the box's vLLM roster, and the only thing that can say which seats the
	// cache-server gate applies to. It is declared rather than sniffed because
	// /v1/models reports model ids, not engines: a llama.cpp cascade seat and a vLLM
	// seat are indistinguishable there, and the cascade deliberately STAYS on
	// llama.cpp (Gemma-4 hybrids crash LMCache's V2 path, upstream #4263), so a
	// sniffed roster would fail doctor on every seat that must never have a store.
	// Empty = this box runs no vLLM seat and the gate is inert, which is the default
	// and the common case.
	VLLMSeats []string `json:"vllm_seats,omitempty"`
	// UnconstrainedSeats names the seats on THIS box whose runtime cannot constrain decoding
	// at all: it refuses (HTTP 400 constrained_decoding_unsupported) any `grammar`,
	// `json_schema` or `response_format`, and ignores logprobs. The RKLLM runtime on an
	// RK3588 NPU is the one today. The cascade's structured lanes (classify, extract)
	// always send a constraint, so on such a seat they would defer every call; for a
	// seat listed here the pipeline sends NO constraint and NO logprobs, puts the exact JSON
	// shape in the prompt instead, and accepts a reply only after strict validation against
	// the task's schema (required keys, types, the classify label in the allowed set, no
	// extra keys). The decision-margin gate needs logprobs and is inert on these seats.
	// Matched case-insensitively against the model id (DeclaresUnconstrainedSeat). Written
	// by the tier's rkllm media seat (mediaseat.Bindings), like vision_model, never by
	// config_seed.
	UnconstrainedSeats []string `json:"unconstrained_seats,omitempty"`
	// TextTasks is the subset of the text tasks (classify, extract) this node's unconstrained
	// seat is declared to serve on the FLEET text lane (POST /fleet/text). Empty = the node
	// advertises no text lane at all: the lane ships dark and a seat opts in only after its
	// measured data passes. summarize and triage are never in it. The node refuses a task
	// outside the list at ack time (400 naming the set) and publishes the list in health as
	// text_tasks. It gates the fleet lane only: a local call never goes through a node's ack.
	// Written by the tier's media seat (mediaseat.Bindings), never by config_seed.
	TextTasks []string `json:"text_tasks,omitempty"`
	// AgentTimeoutSec is the default wall-clock budget for an agent run when the call
	// passes no timeout. 0 = the built-in default (180s). Tiers binding a big planner
	// seat seed this higher: a cold big-model load plus low tok/s inside 180s is a
	// timeout machine, not an agent.
	AgentTimeoutSec int `json:"agent_timeout_sec,omitempty"`
	// SeatContentionWaitSec bounds how long ONE agent contract waits on the SAME
	// seat after llama-swap answers 429 (concurrencyLimit reached by parallel
	// sessions), 503 "process is not ready" or a 500 from llama-swap itself,
	// before the failure stands (seatwait). Shared by every chat and re-pack
	// call of the contract. 0 = 90 s, negative = never wait (the pre-2026-09-02
	// behaviour: the first busy answer defers the contract).
	SeatContentionWaitSec int `json:"seat_contention_wait_sec,omitempty"`
	// AgentAdmissionWaitSec bounds the pre-flight an agent contract spends
	// waiting for llama-swap to finish swapping (any model on the endpoint in
	// a non-"ready" state) BEFORE the contract's wall clock starts. Swaps queue
	// silently in llama-swap; without this the "600 s timeouts" reported on
	// 2026-09-01 were contracts paying for another session's model load.
	// Since 0.115.11 the same budget also WARMS an absent seat before the wall
	// starts (a vLLM cold load is 125–250 s; it used to be charged to the
	// contract). 0 = 300 s (was 120), negative = disabled.
	AgentAdmissionWaitSec int `json:"agent_admission_wait_sec,omitempty"`
	// AgentWarmFailureDefer (register C-76, R-05a) makes the admission warm-up
	// ENFORCE a start failure: when the warm request is refused with a 5xx and
	// there is positive evidence the seat's process did not start (llama-swap did
	// not answer a busy shape, /running lists no row for the seat in any state,
	// nothing else is mid-swap, /running was readable), the run defers at once as
	// infrastructure ("seat warm-up failed: …") instead of spending its wall on it,
	// and the delegator gives that defer one retry on another node. false (the
	// default) is today's behaviour and the audit mode of the house security
	// standard: admission proceeds into the wall and admission_note says the run
	// WOULD have deferred, so would-be defers can be counted before enforcing.
	AgentWarmFailureDefer bool `json:"agent_warm_failure_defer,omitempty"`
	// AgentCoherenceProbe (register D-118) is this box's policy for the
	// post-warm SEAT COHERENCE probe: one ≤ 96-token completion, on the
	// admission budget and BEFORE the contract's wall starts, that asks the seat
	// to call read_file and answer DONE.
	//
	// It exists because a numerically broken seat is INVISIBLE to every other
	// gate. On 2026-09-16/17 a Qwen3.8-27B GSQ seat on an RTX 5060 Ti (vLLM 0.29,
	// fp8_e5m2 KV through FlashInfer) passed /health, /v1/models, the speed probe
	// and the READY smoke, and then answered every contract with
	// `<tool_call>!!!!!!!!!!!!!!!!!!!!…` to the cap — 126–336 s of degenerate
	// output per contract, filed as `unparsed_tool_call`, and two GPU leases spent
	// on parser hypotheses before one raw completion was read.
	//
	// Values: "" or "cold" (the default — probe only when THIS run observed a
	// cold load, which is when a freshly loaded seat can be freshly broken),
	// "off" (never), "always" (every run, warm or cold). Anything else is refused
	// at the config door by name.
	AgentCoherenceProbe string `json:"agent_coherence_probe,omitempty"`
	// AgentCtxTokens is the agent seat's SERVED context window in tokens — the tier
	// profile's agent_ctx_tokens value (setup/templates/profiles.json; the installer
	// records it in installed.json). It exists as a config key so /fleet/health can
	// advertise the ceiling (agent_ctx_tokens, §S3 of the multi-node delegation spec)
	// from CONFIG rather than probing: the live-window probe (/upstream/{model}/props)
	// can cold-start a multi-GB model, which is unacceptable on a health cadence.
	// 0 (the default) = not advertised — the delegator's placement gate then never
	// selects this node for remote agent work (its ctx arithmetic cannot pass), which
	// is the safe reading of "ceiling unknown". Set it to the tier's agent_ctx_tokens
	// when opting a node in with fleet_agent_enabled.
	AgentCtxTokens int `json:"agent_ctx_tokens,omitempty"`
	// AgentMaxTokens is the planner's completion budget per call for agent_run and
	// for delegated agent jobs served by this node (the loop's max_tokens). 0 = the
	// loop default (1,024). A THINKING seat spends its reasoning inside this budget:
	// on <node-b>'s Qwen3.8-27B seat (`--reasoning-parser qwen3`) a digest used 839
	// reasoning tokens of 1,024 and returned nothing (2026-09-04). The loop already
	// raises a starved budget once, to 4x (cap 8,192), but that costs a failed attempt
	// per contract; set 4096 here for a thinking seat so the first attempt fits. The
	// local-agent CLI has its own -max-tokens flag (default 4096) and ignores this key.
	AgentMaxTokens int `json:"agent_max_tokens,omitempty"`
	// AgentThinking (0.115.8) is this seat's planner think-block policy for
	// agent_run and the delegated jobs this node serves: "" / "auto" (every
	// step thinks; an empty final is re-issued ONCE with thinking off at the
	// final budget, then the run stops as `reasoning_starved` / `empty`),
	// "off" (every planner call renders in non-thinking mode — for grounded
	// extraction on a seat measured to spend its whole budget in the think
	// block), "on" (never send the non-thinking kwarg; for a template that
	// rejects it). A contract's own `thinking` overrides it. The knob is
	// `chat_template_kwargs: {"enable_thinking": false}`, the one the
	// structured re-pack has sent since 0.81.0 — Qwen3/Gemma-class templates;
	// a Flash-Next-class seat takes `reasoning_effort` instead (register D-80).
	AgentThinking string `json:"agent_thinking,omitempty"`
	// AgentSampling / AgentSamplingFinal (0.123.3, register D-95b) are this
	// seat's planner decoding policy and, optionally, a separate one for the
	// FINAL answer turn (the thinking-off prose turn, which is where a
	// Qwen3-class family's non-thinking recommendation applies and a tool step
	// is not). Every knob is optional; an unset one is absent from the request,
	// so an empty/absent object is the request this harness has always sent —
	// `temperature: 0` and no other sampling key.
	//
	// There is no recommended value here on purpose. Greedy decoding is what
	// makes a small seat fall into a degenerate repetition loop (the <node-c> 4B
	// METHODOLOGY.md digest, 2026-09-14, repeated one four-line block ~20 times
	// until the budget ran out), and the model card's cure — temperature 0.7,
	// top_p 0.8, top_k 20, presence_penalty 1.5 for Qwen3.5 non-thinking — is a
	// number to MEASURE on the seat, not a default to inherit fleet-wide.
	AgentSampling      *core.AgentSampling `json:"agent_sampling,omitempty"`
	AgentSamplingFinal *core.AgentSampling `json:"agent_sampling_final,omitempty"`
	// AgentAllowWrite (0.122.0, register D-06) is this node's opt-in to the
	// delegation WRITE door: false (the default, and every config that predates
	// the key) means a contract carrying `write_root` is REFUSED here — at ack
	// on the fleet path, so the delegator re-places it on a node that has opted
	// in, and as a `write`-class defer on the in-process local path, which has
	// no ack hop to refuse at.
	//
	// Opting in grants a delegated seat create+overwrite inside ONE directory
	// of the node's own throwaway copy of the contract's context docs, capped
	// at core.AgentWriteMaxFiles / AgentWriteMaxBytes, with no delete, no
	// shell, no `run`, no fetch and no github. The write set never touches the
	// delegator: it comes back as a unified diff for a human to apply. It is
	// still an opt-in rather than a default because a node that opens it is
	// spending its own disk on whatever a 4B decides to write.
	AgentAllowWrite bool `json:"agent_allow_write,omitempty"`
	// AgentAllowBrowse (0.141.0, ADR 0060) is this node's opt-in to the agent
	// `browse` tool on the AGENT doors (agent_run, agent_delegate, fleet
	// contracts). false (the default) refuses a contract carrying allow_browse —
	// at ack on the fleet path, as a `config`-class defer on the local path. Even
	// opted in, an agent-door run needs a non-empty host allowlist and the browse
	// lane configured (BrowseConfigured); the deny-list cannot be lifted there.
	AgentAllowBrowse bool `json:"agent_allow_browse,omitempty"`
	// AuditAllDoors (register SF-02) attaches the broker decision audit trail
	// (<home>/.local-offload/agent-audit.jsonl) to EVERY agent door: agent_run,
	// agent_delegate and fleet contracts, not only to a run that asks for browse.
	// "" / "off" (the default) keeps today's behaviour: no trail unless browse asks
	// for one, zero new rows, result payloads unchanged. "warn" writes every
	// decision and reports a failed write once without changing any decision.
	// "enforce" makes a failed write deny the action, as a browse run's trail
	// always has; it is the operator's call (a new way for a door to fail).
	AuditAllDoors string `json:"audit_all_doors,omitempty"`
	// FleetIngressGuard (register SF-16) guards the harness's own HTTP listeners (the fleet
	// node, fleet-ui and local-agent --serve) against cross-site and DNS-rebinding requests: a
	// Host outside loopback, the tailnet and every zone in tailnet_suffix / tailnet_suffixes, any Origin header
	// (fleet-ui: other than its own page's), and (fleet node, local-agent) a POST that is not
	// application/json. "" / "warn" (the default) logs what enforce would refuse, once per kind
	// of violation, peer and offending value, with a bounded log, and serves the request;
	// "enforce" refuses (421 / 403 / 415, naming this key); "off" skips the checks.
	FleetIngressGuard string `json:"fleet_ingress_guard,omitempty"`
	// AgentReadFloor (register SF-07) is the read floor every agent read tool
	// (read_file, summarize_file, search_files) consults: reads of secret material
	// (.env* except .env.example/.env.sample, *.pem, *.key, id_rsa*, id_ed25519*,
	// .npmrc, .git-credentials, .claude.json, anything under .ssh/) and of a rule
	// table's read rules. "" / "warn" (the default) lets the read through and leaves a
	// warn row on the audit trail and a log line; "enforce" refuses it; "off" checks
	// nothing. The CLI's --rules off also switches it off.
	AgentReadFloor string `json:"agent_read_floor,omitempty"`
	// AuditChain (register SF-08) hash-chains each agent run's rows on the broker
	// audit trail: every row carries run_id, seq and prev_sha256, and the run ends
	// with a run_end row (count, head). `local-offload agent-audit verify` then names
	// the run and seq of any edited, removed or reordered row. false (the default)
	// writes today's rows unchanged. Applies wherever a trail is attached (see
	// audit_all_doors); the local-agent CLI honours it for its own trail too.
	AuditChain bool `json:"audit_chain,omitempty"`
	// AgentEvidenceReducer turns on the evidence-preserving reducer for the agent's
	// build and test results (internal/agent/rung_reducer.go). false (the default)
	// leaves every tool result exactly as the tool printed it. true: a `run` or
	// `run_shell` build or test result of 4 KiB or more is replaced by a receipt, a
	// few claims each over a quote the delegator found in the output, written by the
	// cascade seat the agent's offload tools already use; any quote it cannot find, a
	// credential-shaped output, a seat failure or a receipt that is not smaller keeps
	// the raw output. The key stays off until a seat A/B passes.
	AgentEvidenceReducer bool `json:"agent_evidence_reducer,omitempty"`
	// PairWorkloadsEnabled (0.126.0) reports every job this box runs or
	// delegates to NVIDIA Personal AI Router's Jobs list, through the loopback
	// workload ingress of PAIR's workload manager (fork
	// dmmdea/Personal-AI-Router, worker 0.14.0; docs/systems/pair-workloads.md).
	// Off by default. Enable on EVERY box with PAIR (0.140.6): work a fleet node
	// serves for another box (agent rows, the "fleet" door) is skipped, so a job
	// never shows twice. Before 0.140.6 this said delegator boxes only: a fleet
	// node that reported the delegation it serves would show the same job twice, once
	// per origin. Inert when PAIR is not installed (no node-id.json).
	PairWorkloadsEnabled bool `json:"pair_workloads_enabled,omitempty"`
	// PairWorkloadsEndpoint is the ingress URL; the default is the port every
	// node's workload-ingress.json binds.
	PairWorkloadsEndpoint string `json:"pair_workloads_endpoint,omitempty"`
	// PairNodeInfoURL is PAIR's loopback node-info (default http://127.0.0.1:14318/v1/node-info),
	// asked for this node's UUID (`hostUuid`) when PAIR's node-id.json is missing or unreadable: a box
	// where the harness runs as a different OS user than PAIR (a small ARM node). The fallback identity counts
	// only while the pair_workloads_endpoint ingress answers HTTP, so a box with node-info and no
	// ingress stays off. Loopback only: any other host is refused at load. Empty = the default,
	// except where OFFLOAD_PAIR_APPDIR is set (docs/systems/pair-workloads.md).
	PairNodeInfoURL string `json:"pair_node_info_url,omitempty"`
	// PairWorkloadsRelay is where this box's PAIR frames go when it has NO PAIR identity of its own
	// (no readable node-id.json and no node-info fallback: a view-only box, a thin client where PAIR
	// is not installed): the base URLs of fleet-serve members that serve POST /fleet/pair-relay
	// (docs/systems/pair-workloads.md, *The card relay*). Absent or empty = "auto": every
	// delegate_remotes base whose /fleet/health advertises pair_relay. The entry "auto" says so
	// outright, "off" turns the relay off, and any other entry is an explicit member base (a box with
	// no delegate_remotes sets it by hand). Used only while pair_workloads_enabled is on and the box
	// has no identity; the fleet_auth_token is the bearer.
	PairWorkloadsRelay []string `json:"pair_workloads_relay,omitempty"`
	// PairSeatActivityEnabled (0.133.0) makes fleet-serve report traffic that
	// reaches this box's vLLM seats WITHOUT the harness (a curl soak, an editor
	// pointed at llama-swap) as PAIR cards, one per busy stretch of a seat. The
	// harness's own requests are subtracted (internal/seatinflight), so a
	// harness job never shows twice. Unlike pair_workloads_enabled it belongs on
	// every box that SERVES a vLLM seat. Off by default; same ingress URL.
	PairSeatActivityEnabled bool `json:"pair_seat_activity_enabled,omitempty"`
	// TierProfile (0.116.0, ADR 0052) is the tier this box is INSTALLED as
	// (installed.json's profile, e.g. "blackwell-3x16"), seeded by tierseed so
	// status, health and every placement record carry the identity from CONFIG
	// rather than re-reading the install. "" = not recorded (a pre-0.116.0 box,
	// or one seeded from a plain tier); nothing keys on it alone.
	TierProfile string `json:"tier_profile,omitempty"`
	// Tiers is every tier this box is a COMPLETE instance of: the installed one
	// plus the tiers it composes (<node-b> is a full blackwell-16 and a full
	// blackwell-2x16 as well as blackwell-3x16). Advertised in health and status
	// so the fleet and the matrix reason about three capacity rows, not one.
	// Must include tier_profile. nil = one tier, byte-identical to before.
	Tiers []string `json:"tiers,omitempty"`
	// Layers are the device layers a composite box places work on (see
	// layers.go). Seeded from the tier table's `layers`; a box that seeds none
	// has ONE implicit layer and every result, health, status and ledger surface
	// is byte-identical to the pre-layer build — Composite() is the gate.
	Layers []LayerSpec `json:"layers,omitempty"`
	// OperatorPresence is how the presence guard decides whether the display
	// card may take a load: "present" (never), "away" (always, the operator
	// says so), "auto" (console session locked ⇒ away; else last input idle
	// ≥ operator_idle_sec and the shell not busy/fullscreen ⇒ away). Defaults
	// to present — the display card fails closed until the operator has read
	// the probe's readings in offload_status and set auto or away. The layer's
	// presence guard is the key's only reader since 0.183.0: the card allocator (gpu
	// reserve --cards, an auto-placed media call) no longer reads presence, it admits
	// the display card by gpu_display_cap_pct (GPUDisplayCapPct) at all times.
	OperatorPresence string `json:"operator_presence,omitempty"`
	// OperatorIdleSec is the last-input idle threshold behind presence mode
	// "auto". 0 = 900 (15 min): long enough that a coffee break does not admit
	// a 10 GB load onto the desktop's card.
	OperatorIdleSec int `json:"operator_idle_sec,omitempty"`
	// DisplayWatchSec (ADR 0075) is how often fleet-serve re-checks the display layer's desktop
	// guards (presence and the display_floor) WHILE one of the layer's seats is loaded, and unloads
	// the seat when either refuses. The admission guards decide once, at the placement; a twin
	// then sits on the desktop's card until llama-swap's 300 s idle ttl, however soon the operator
	// is back or a game takes the card's memory. 0 = 10 s; negative = off (the layer then has its
	// admission guards and the idle ttl only); above 300 is refused, since a check slower than the
	// idle ttl guards nothing the ttl does not.
	DisplayWatchSec int `json:"display_watch_sec,omitempty"`
	// AgentLeaseWaitSec bounds how long a LOCAL agent placement (agent_delegate /
	// delegate, route auto or spread) waits for a foreign TEXT-class GPU lease to
	// clear before deferring. `gpu reserve --class text` (a benchmark, eval or
	// measured run) exists so nobody else loads the reserved cards; until 0.113.14
	// delegate placement read the lease only to PREFER a remote and still ran the
	// contract locally when no remote qualified — three foreign contracts landed on
	// a reserved two-card seat mid-measurement (2026-09-05 08:04–08:09). A held text
	// lease now makes the local seat a non-target: an eligible remote takes the
	// work; with none, the placement waits up to this many seconds (re-reading the
	// lease once a second) and then defers, class infrastructure, naming the holder
	// and its expiry. The wait is the larger of this and agent_placement_wait_sec
	// (default 120 s), so 0 (the default) leaves it to the placement wait. Both are
	// the wait of a call with no whole-call deadline, and of a subtask that holds a
	// run slot while others of its call have not started (ADR 0073). A wait that the
	// call's own deadline bounds (the MCP doors, for the last subtask to start) ends
	// at that deadline less a reserve even when this key is longer: a wait past the
	// deadline cannot help, the call is over before it ends. route=local is the caller's
	// explicit choice and is not gated; a media lease is arbitrated by the
	// model-affinity gate as before (ADR 0026) and is not a placement gate either.
	AgentLeaseWaitSec int `json:"agent_lease_wait_sec,omitempty"`
	// AgentRetryMinSec (0.115.9, register D-46) is the least `timeout_sec`
	// budget a delegation subtask's cross-seat verification retry is worth
	// starting with, on THIS delegator. The retry runs inside what the first
	// attempt left of the subtask's budget; below this floor it is skipped with
	// a `retry_note`. 0 (the default) keeps the historical 10 s floor. Set it
	// from the retry seats' own numbers: a cold vLLM load (125–250 s) plus one
	// turn at max_tokens / tok_s (the 27B at ~30 tok/s needs ~140 s for 4,096
	// tokens) — 300 on the reference box. Measured motivation (2026-09-10): a
	// 603 s first attempt of a 900 s contract left the 27B a 296 s retry that
	// generated 4,178 tokens and timed out mid-think; retries passed 13 % over
	// 318 rows, 0/9 that day. The re-placement floor after a REFUSED dispatch
	// (no seat time spent) stays at 10 s and is not this knob.
	AgentRetryMinSec int `json:"agent_retry_min_sec,omitempty"`
	// AgentSeatTokS (0.115.21, register D-03) is the planner seat's decode rate
	// in tokens per second, used for the wall estimate (`wall_estimate_sec` /
	// `min_turn_sec` / `wall_note` on every agent result) ONLY until the seat
	// has recorded a measured rate of its own in <state root>/seat-rates.json
	// (the first run whose completion generates ≥ 1,024 tokens records one; the
	// store then wins). 0 = no estimate until measured. Reference numbers:
	// the <node-b> 27B TP2 seat ≈ 30, the <node-c> 4B ≈ 30–35.
	AgentSeatTokS float64 `json:"agent_seat_tok_s,omitempty"`
	// AgentPlacementWaitSec (0.113.18) is how long a delegation subtask WAITS
	// FOR CAPACITY when every node that could run it is full right now — each
	// eligible remote refused at dispatch (queue full, leased, draining) and the
	// local seat is reserved or already used — instead of failing "placement
	// refused" on the spot. During the wait the delegator re-reads the fleet's
	// health every few seconds and places the subtask on the FIRST node that
	// frees (a remote whose saturation clears, or the local lease being
	// released), so a contract is no longer lost because one node was busy for
	// the minute it was dispatched ("<node-b> timed out", 2026-09-06). The wait is
	// NOT charged to the contract's timeout_sec (like time provably spent queued
	// on a node). What bounds it depends on the call (ADR 0073): a call that has a
	// whole-call deadline (the MCP doors agent_delegate and offload_research,
	// agent_call_deadline_sec) waits until that deadline less a short reserve for
	// a placed job to run in, whatever this key says, so production work never
	// defers for capacity while the call still has time to place it (once every
	// subtask of the call has started: see below); this key is
	// the wait of a call with NO deadline (the CLI verbs, agent_run, offload_ask),
	// where 0 = the built-in default (120 s), and the wait of a subtask that holds
	// one of the call's run slots while others have not started (only the last
	// subtask to start waits for the deadline). Negative = do not wait (the
	// pre-0.113.18 behaviour), for every call. A sheddable contract (priority -1)
	// never waits: with no idle node it is shed at once.
	AgentPlacementWaitSec int `json:"agent_placement_wait_sec,omitempty"`
	// AgentCallDeadlineSec (ADR 0065, register C-67) is the WHOLE-CALL deadline of
	// the MCP doors agent_delegate and offload_research: how long one call may run
	// before it returns what has finished and defers the rest ("call deadline
	// reached; N unfinished", class budget), cancelling the outstanding work. It
	// exists because the MCP client aborts a tool call at its own limit (1,800 s in
	// the reference setup) and DROPS the response with it — a call that ran 2,103 s
	// lost a finished 423 s answer to that abort. It bounds the call as the CLIENT
	// sees it (the offload_research page fetch included), not any one subtask's
	// timeout_sec, so keep it BELOW the client's limit with room for the answer to
	// travel; the built-in default is 1,500 s. 0 = the built-in default; negative =
	// no whole-call deadline (a client that never aborts). The CLI verbs have no
	// client to abort and take no deadline.
	AgentCallDeadlineSec int `json:"agent_call_deadline_sec,omitempty"`
	// AgentSpreadLocalSlot (0.113.20) decides what route=spread does with the
	// LOCAL rotation slot when the local agent seat is already busy at deal time:
	//   ""/"skip-when-busy" (default) — the local slot is dealt to the best
	//     eligible remote WITH ROOM instead, so K delegating sessions do not all
	//     stack their slot-0/3/6 subtasks on one local seat (operator decision
	//     2026-09-06: the K×8 gate's remaining tail was exactly that stacking —
	//     first-local subtask 155–189 s under K=3 vs 91–105 s for its siblings).
	//     Busy = the seat holds at least one request (vLLM running+waiting, or a
	//     llama-server slot processing), read ONCE through llama-swap when the deal
	//     is computed; an idle seat keeps every slot it had. With no remote that
	//     has room the slot stays local and the reason says why.
	//   "always" — the pre-0.113.20 deal: subtask 0 (and every i mod len == 0
	//     slot) lands local whatever the seat is doing.
	// A text lease still removes the local seat from the rotation in both modes.
	AgentSpreadLocalSlot string `json:"agent_spread_local_slot,omitempty"`
	// VisionModel is the VLM alias used for the vqa task (multimodal). Empty = no
	// vision route (vqa defers).
	VisionModel string `json:"vision_model,omitempty"`
	// VisionTasks is the subset of the three single-image vision tasks (vqa, ocr,
	// assess_image) this node's vision seat serves on the FLEET vision lane. Empty =
	// all three, which is every node's behaviour until a tier declares otherwise. A seat
	// narrows it when its runtime cannot do one of them: the RKLLM runtime cannot
	// constrain sampling, and assess_image always sends a grammar, so the RK3588 tier's
	// seat lists vqa and ocr only. The node then refuses a task outside the list at ack
	// time (400 naming the allowed set), publishes the list in health as vision_tasks, and
	// a delegator skips the node for a task it does not list. It gates the fleet lane only:
	// a local call never goes through a fleet node's ack. Written by the tier's media seat
	// (mediaseat.Bindings), like vision_model, never by config_seed.
	VisionTasks []string `json:"vision_tasks,omitempty"`
	// OCRModel is an OPTIONAL dedicated alias for the ocr task. Purpose-built OCR
	// models (GLM-OCR and friends) beat a general VLM on dense text, but they are
	// text-recognition ONLY — they cannot answer a vqa question or judge an image,
	// which is exactly why this is a separate binding and not a replacement for
	// VisionModel. Empty = ocr rides VisionModel, as it always did.
	OCRModel string `json:"ocr_model,omitempty"`
	// VisionMaxImageBytes caps a single decoded image before it is rejected
	// (guards context/VRAM blowups). 0 = use the loader default.
	VisionMaxImageBytes int `json:"vision_max_image_bytes,omitempty"`
	// OCRMaxTokens caps the OCR (image transcription) output. A dense document page
	// exceeds the built-in 1024 default, hits finish_reason=length, and defers the
	// whole OCR to cloud — so a machine with a strong VLM (e.g. qwen3-vl-8b) can raise
	// this to transcribe long pages locally. 0 = the in-package default (1024).
	OCRMaxTokens int `json:"ocr_max_tokens,omitempty"`
	// VideoFPS is the frame-sampling rate for video_describe (frames/second).
	VideoFPS float64 `json:"video_fps,omitempty"`
	// VideoMaxFrames caps how many sampled frames are sent to the VLM (bounds the
	// 8GB activation budget — frames, not weights, are the VRAM pressure).
	VideoMaxFrames int `json:"video_max_frames,omitempty"`
	// VideoFrameWidth scales each sampled frame to this width (px), aspect kept.
	VideoFrameWidth int `json:"video_frame_width,omitempty"`
	// FFmpegPath is the ffmpeg executable used to sample frames. Default "ffmpeg".
	FFmpegPath string `json:"ffmpeg_path,omitempty"`
	// FFmpegVideoEncoder is the video encoder offload_media uses for the two ops that
	// RE-ENCODE video: `trim` with reencode=true (exact cuts) and `convert` with video kept.
	// "" (default) = ffmpeg's container default, libx264 on the CPU. "h264_nvenc" (or
	// hevc_nvenc / av1_nvenc) moves those draft/QA re-encodes to the GPU's NVENC block,
	// which frees CPU threads and never touches CUDA cores — measured 2026-09-05 on the
	// workstation (CUDA-X plan task 4.2). Stream-copy ops (trim default, concat, mux_audio) and
	// frame extraction are unaffected. Requires an ffmpeg built with the encoder (the
	// gyan full builds are); an absent encoder fails the op loudly, it does not fall back.
	FFmpegVideoEncoder string `json:"ffmpeg_video_encoder,omitempty"`
	// --- STT / transcribe (Phase A.2) ---
	// STTModel is the llama-swap alias for the default whisper-server upstream
	// (large-v3-turbo). Empty = no STT route (transcribe defers).
	STTModel string `json:"stt_model,omitempty"`
	// STTModelHQ is the quality-escalation STT upstream, used when a transcribe
	// request passes hq=true. Empty = hq falls back to STTModel.
	STTModelHQ string `json:"stt_model_hq,omitempty"`
	// STTHQAPI names the protocol the HQ upstream speaks. "" or "whisper" = the
	// whisper-server /inference multipart protocol (large-v3-class upstreams).
	// "openai" = the OpenAI /v1/audio/transcriptions shape served by llama-server for
	// mtmd STT models (e.g. Qwen3-ASR) — binding such a model WITHOUT this field made
	// the HQ path 404 against the whisper endpoint (live finding 2026-07-21, rolled
	// back; this field is what makes the binding possible). Timestamps are not
	// available on this path: the result carries one full-span segment.
	STTHQAPI string `json:"stt_hq_api,omitempty"`
	// STTLanguage forces the transcription language ("en"/"es"); "" = auto-detect.
	// Per-call params["language"] overrides this. Forcing is more reliable on
	// noisy/code-switching field audio than auto-detect.
	STTLanguage string `json:"stt_language,omitempty"`
	// STTVAD enables Silero VAD (server launched with -vm + --vad) — the biggest
	// hallucination reducer on noisy field audio. Default true.
	STTVAD bool `json:"stt_vad,omitempty"`
	// STTMaxInlineSegments caps how many timestamped segments are inlined in the
	// result (the rest live in the on-disk .segments.json pointer). Default 120.
	STTMaxInlineSegments int `json:"stt_max_inline_segments,omitempty"`
	// STTUnloadAfter force-unloads the whisper upstream once the last transcription of
	// a burst is done (zero-always-warm): concurrent calls share one load and the last
	// one out frees it, every model the burst warmed (stt_model and stt_model_hq can
	// share a burst), because an unload after EACH would land on the next call's
	// inference (register C-91). A failed unload is logged and never fails the
	// transcription. Default true; set false for a known batch loop.
	STTUnloadAfter bool `json:"stt_unload_after,omitempty"`
	// STTRequestTimeoutSec bounds one transcription HTTP call (long audio at
	// 5-8x realtime). Default 1800 (30 min). Separate from RequestTimeoutSec.
	// It does NOT set how long a transcription waits for a card a render holds: that
	// is gpu_wait_ms (90 s by default) and this timeout only caps it (register C-89).
	// It used to BE that wait, which is the limit at which the MCP client aborts an
	// idle call.
	STTRequestTimeoutSec int `json:"stt_request_timeout_sec,omitempty"`
	// --- Forecast (Timestral) ---
	// ForecastModel is the llama-swap alias of the forecast seat. It is bound by a tier's
	// `forecast` media seat, never hand-seeded. Empty = no forecast route (a forecast defers
	// locally, or forwards to a fleet node that serves one).
	ForecastModel string `json:"forecast_model,omitempty"`
	// ForecastRequestTimeoutSec bounds one forecast HTTP call, cold model load included
	// (cold 19 s, warm batch under a second on the reference card). Default 300. Like
	// stt_request_timeout_sec it only caps the GPU-lease fence wait, which is gpu_wait_ms.
	ForecastRequestTimeoutSec int `json:"forecast_request_timeout_sec,omitempty"`
	// MediaDir is where transcribe writes .srt/.txt/.segments.json. Default
	// <base>/media.
	MediaDir string `json:"media_dir,omitempty"`
	// SVGDir is where generate_svg writes rendered .svg files. Default <base>/svg.
	SVGDir string `json:"svg_dir,omitempty"`
	// --- image generation (generate_image) ---
	// ImageGenScript is the absolute path to render/comfy-generate.mjs (the Node
	// lifecycle wrapper around comfy-render.mjs). Empty = no image route (the task
	// defers), exactly like an empty STTModel/VisionModel.
	ImageGenScript string `json:"imagegen_script,omitempty"`
	// NodePath is the node executable used to run the image script. Default "node".
	NodePath string `json:"node_path,omitempty"`
	// ComfyDir is the local ComfyUI install dir (passed to the script as COMFY_DIR).
	// Default: "C:/ComfyUI" on Windows, "" (unbound) elsewhere — see DefaultComfyDir.
	ComfyDir string `json:"comfy_dir,omitempty"`
	// --- ComfyUI launch profile (the harness launches ComfyUI on demand) ---
	// ComfyCudaDevice pins the SINGLE-CARD ComfyUI routes to one card: the render
	// runner launches ComfyUI with `--cuda-device <n>`, which hides every other card.
	// The index is in ComfyUI's own order (fastest first unless CUDA_DEVICE_ORDER says
	// otherwise) — the SAME order the *_pool_* "cuda:N" keys use, which is NOT
	// nvidia-smi's PCI order on a mixed box. A comma list ("1,2") is accepted. Applied
	// to image generation when the binding is not pooled, generative edit, upscale,
	// inpaint, animate and music; never to a pooled image/video seat (the pool keys
	// place those) and never to run-graph (the caller's graph owns its placement).
	// "" = no pin: ComfyUI's default device, i.e. its fastest card.
	ComfyCudaDevice string `json:"comfy_cuda_device,omitempty"`
	// ComfyDynamicVRAM is ComfyUI's dynamic VRAM (weight streaming) for launches this
	// binding makes: "on" strips --disable-dynamic-vram from the extra args (a bf16 DiT
	// larger than one card streams instead of falling back to partial offload), "off"
	// adds it (DisTorch2 pooled seats need it off, ComfyUI-MultiGPU #191), "" leaves
	// the extra args alone.
	ComfyDynamicVRAM string `json:"comfy_dynamic_vram,omitempty"`
	// ComfyExtraArgs are extra ComfyUI launch flags, whitespace-split, handed to the
	// runner as COMFY_EXTRA_ARGS. "" = inherit the process's COMFY_EXTRA_ARGS env, the
	// only seam before this key existed. Device flags here lose to comfy_cuda_device.
	ComfyExtraArgs string `json:"comfy_extra_args,omitempty"`
	// ImageGenTimeoutSec bounds one render: ComfyUI cold-start (~4min) + first SDXL
	// render (~6min) + margin. Default 720 (12min).
	ImageGenTimeoutSec int `json:"imagegen_timeout_sec,omitempty"`
	// ImageGenReserveVRAM is ComfyUI's --reserve-vram (GiB held back for the
	// display/WDDM) for the generate_image comfy path. 0 = the script default (1.0).
	// Lowering it on a box whose display needs less keeps MORE model weights resident
	// during diffusion (less per-step offload streaming) for a small speed-up; too low
	// risks OOM at the VAE-decode peak. Per-machine (measure before lowering).
	ImageGenReserveVRAM float64 `json:"imagegen_reserve_vram,omitempty"`
	// --- image model binding (PER-MACHINE; the harness stays model-agnostic) ---
	// Each box serves the image model its hardware can actually run — an 8GB laptop
	// runs SDXL; a 16GB workstation may run a DiT (HiDream) instead. NONE of those
	// names may be baked into shared code, so the model + its sampler tuning are
	// config, not constants. Every field below is OPTIONAL: leave it empty/zero and
	// comfy-render.mjs keeps its own defaults, so a machine that never sets them
	// (e.g. the laptop's SDXL path) is byte-for-byte unchanged.
	//
	// ImageGenCkpt is the ComfyUI checkpoint filename (CheckpointLoaderSimple), e.g.
	// "RealVisXL_V5.0_fp16.safetensors" (SDXL) or "hidream_o1_image_dev_mxfp8.safetensors"
	// (HiDream, a DiT). Empty = the script's default.
	ImageGenCkpt string `json:"imagegen_ckpt,omitempty"`
	// ImageGenFamily selects the model-correct render graph for this machine's
	// checkpoint: "" = generic SDXL-shaped graph; "hidream-o1" / "hidream-o1-dev" =
	// the official HiDream-O1 pixel-space graph (ModelNoiseScale, patch-seam
	// smoothing, SamplerCustom stack, native 2048); "qwen-image" = the official
	// Qwen-Image 2512 graph (SD3-class latent, AuraFlow shift; ImageGenCkpt carries
	// the UNET filename and ImageGenVAE must NOT be "builtin" — the UNET file has
	// no VAE weights). Quality-first: a DiT on the generic graph produces
	// measurable 32px patch blocking.
	ImageGenFamily string `json:"imagegen_family,omitempty"`
	// ImageGenVAE is the standalone VAE filename, or "builtin" to decode with the VAE
	// the CHECKPOINT LOADER supplies. "builtin" is REQUIRED for HiDream: that
	// checkpoint carries no VAE weights (it is pixel-space), so a standalone
	// 4-channel sdxl_vae cannot decode its output. Empty = the script's default
	// (a standalone SDXL VAE).
	ImageGenVAE string `json:"imagegen_vae,omitempty"`
	// ImageGenSteps / ImageGenCFG / ImageGenSampler / ImageGenScheduler are the
	// sampler defaults for THIS machine's image model (SDXL wants cfg~7 + karras;
	// HiDream wants cfg~5 + simple). A per-request "steps" param still overrides.
	// Zero/empty = the script's default.
	ImageGenSteps     int     `json:"imagegen_steps,omitempty"`
	ImageGenCFG       float64 `json:"imagegen_cfg,omitempty"`
	ImageGenSampler   string  `json:"imagegen_sampler,omitempty"`
	ImageGenScheduler string  `json:"imagegen_scheduler,omitempty"`
	// ImageGenPreset / ImageGenCLIP / ImageGenLoRA / ImageGenLoRAStrength /
	// ImageGenShift thread the qwen-image family's remaining knobs
	// (comfy-render --preset/--clip/--lora/--lora-strength/--shift) so a
	// harness-driven qwen-image seat can bind e.g. the lightning4 recipe.
	// Preset selects a steps+cfg+LoRA PAIRING ("full" | "lightning4"); the
	// others override its fields one by one. Families that don't read a flag
	// ignore it. NOTE: an empty ImageGenLoRA means UNSET (omitempty), not
	// "strip the preset's LoRA" — bind preset "full" for a LoRA-free run.
	// Like ImageGenCkpt these are ComfyUI FILENAMES, not paths. Zero/empty =
	// the script's default.
	ImageGenPreset       string  `json:"imagegen_preset,omitempty"`
	ImageGenCLIP         string  `json:"imagegen_clip,omitempty"`
	ImageGenLoRA         string  `json:"imagegen_lora,omitempty"`
	ImageGenLoRAStrength float64 `json:"imagegen_lora_strength,omitempty"`
	ImageGenShift        float64 `json:"imagegen_shift,omitempty"`
	// ImageGenPoolVvramGB / PoolCompute / PoolDonor thread the 32GB-pool
	// doctrine knobs (krea2 family, comfy-render --pool-vvram/--pool-compute/
	// --pool-donor): GiB of DiT weights donated to the donor card through the
	// DisTorch2 ratio-mode loader. 0/empty = single-GPU loader, no flags —
	// which boxes pool is per-machine config, never shared code. NOTE pooled
	// safetensor serving also requires launching ComfyUI with
	// --disable-dynamic-vram until ComfyUI-MultiGPU #191 lands (the harness
	// COMFY_EXTRA_ARGS env seam carries it).
	ImageGenPoolVvramGB float64 `json:"imagegen_pool_vvram_gb,omitempty"`
	ImageGenPoolCompute string  `json:"imagegen_pool_compute,omitempty"`
	ImageGenPoolDonor   string  `json:"imagegen_pool_donor,omitempty"`
	// ImageGenPlacement asks the typed image door for the CARD-ONLY placement ("multicard"; ""/"single" = today's one-card lease): two leased
	// non-display cards, the text encoder and VAE on one and the DiT on the other or split between them, no host RAM (render/multicard-recipes.json
	// names the families that have a recipe: qwen-image-2.1 and the qwen-image Q5_1 GGUF). It is a binding key of the named-family overlays. UNSET by
	// default on every box: a box binds it only once its rows have been measured live (docs/systems/media-generation.md, "Card-only image and edit").
	ImageGenPlacement string `json:"imagegen_placement,omitempty"`
	// ImageGenSchedule picks the qwen-image-2.1 sigma schedule: "official" (the
	// model repo's diffusers scheduler — dynamic mu, exponential shift,
	// shift_terminal 0.02 — computed by the builder), "comfy" (ComfyUI's fixed model
	// shift, KSampler), "turbo" (the Qwen-Image-2.1-Turbo checkpoint's saved 8-step
	// sigmas; steps must be 8) or "" (the builder default, official). Other families ignore it.
	ImageGenSchedule string `json:"imagegen_schedule,omitempty"`
	// ImageGenUpsampler is the binding's PROMPT UPSAMPLER, the step FLUX 3 Image Klein requires before every render (BFL: the model takes full scene
	// captions; a short prompt sent as typed gives generic output). Two forms (Config.UpsamplerFile / Config.UpsamplerModel): a value ending in
	// .safetensors is BFL's upsampler file in text_encoders (e.g. qwen3.5_9b_flux3_prompt_upsampler_int8_convrot.safetensors), which the ComfyUI
	// flux3-klein graph runs in-graph (TextGenerate, BFL's t2i system prompt); any other value names a llama-swap model this node serves, which the
	// harness calls with the same system prompt before the media lease, on either engine (the sd.cpp engine takes only this form). The model form is
	// the fast one: BFL's upsampler as a GGUF on llama.cpp captions at 86 tok/s on a 5070 Ti where the in-graph file runs 5 to 8 (2026-10-24), and
	// it keeps the 9 GiB upsampler out of the render's cards and host commit. A request with refine:false renders its prompt verbatim. Only the
	// flux3-klein graph reads it. A binding key of the named-family overlays; "" = none.
	ImageGenUpsampler string `json:"imagegen_upsampler,omitempty"`
	// ImageGenLicense / ImageGenCommercialUse declare the license of THIS box's default
	// image binding (ADR 0058). When set, every generate_image result from the default
	// binding carries them. Both or
	// neither: a license with no commercial_use verdict is refused at load. Named
	// families declare their own inside imagegen_families.
	ImageGenLicense       string `json:"imagegen_license,omitempty"`
	ImageGenCommercialUse *bool  `json:"imagegen_commercial_use,omitempty"`
	// ImageGenFamilies are NAMED, opt-in image bindings beside the default one
	// (ADR 0058): name -> an overlay of imagegen_*/sdcpp_*/comfy_* keys plus the
	// REQUIRED "license" (string) and "commercial_use" (bool). A request selects one
	// with the `family` param; the default binding answers when it is absent. An
	// overlay starts from this config with every model-binding key cleared (see
	// imageBindingKeys) — so a family is a complete binding and never inherits the
	// default's checkpoint, LoRA or pool — keeps the route keys (script, engine,
	// timeout, reserve) and the launch keys (comfy_*), then applies its own keys.
	// Unknown/forbidden keys or a missing license refuse the load.
	ImageGenFamilies map[string]FamilyOverlay `json:"imagegen_families,omitempty"`
	// --- opt-in prompt refiner (generate_image; all engines + batch) ---
	// ImageGenRefinerModel is the llama-swap model id (e.g. "gemma-4-12b") that
	// expands an image prompt with concrete photographic detail before the render.
	// Empty = the feature is OFF and the render path is byte-identical to a
	// harness without it (compatibility pinned by test). The refiner is fail-safe:
	// any refiner problem (transport error, timeout, empty/short output, a dropped
	// "double-quoted" text span) falls back to the raw prompt and the render
	// proceeds — refinement never makes a render fail.
	ImageGenRefinerModel string `json:"imagegen_refiner_model,omitempty"`
	// ImageGenRefinerTimeoutSec bounds one refiner call (the text tier may need a
	// llama-swap cold swap first). Default 30; <=0 = the default.
	ImageGenRefinerTimeoutSec int `json:"imagegen_refiner_timeout_sec,omitempty"`
	// --- sd.cpp image engine (J2: the AMD/Vulkan tier's backend; per-task media_engine seam) ---
	// ImageGenEngine selects the generate_image backend: ""/"comfy" = the ComfyUI path
	// above (unchanged default); "sdcpp" = stable-diffusion.cpp via SdcppScript — a
	// single native binary (Vulkan-first, GGUF models, no Python/ComfyUI). On the sdcpp
	// path the runner env carries NO COMFY_DIR and gpugen skips the post-run ComfyUI
	// /free (there is nothing to free) — same shape the TTS path proved.
	ImageGenEngine string `json:"imagegen_engine,omitempty"`
	// SdcppBin is the absolute path to the sd.cpp CLI (sd-cli.exe from the newest
	// win-vulkan release the installer resolved). Required when ImageGenEngine is "sdcpp"; empty = defer.
	SdcppBin string `json:"sdcpp_bin,omitempty"`
	// SdcppScript is the Node runner (default "render/sdcpp-generate.mjs", resolved
	// against the executable dir like every render script).
	SdcppScript string `json:"sdcpp_script,omitempty"`
	// SdcppModel is the FULL path to the main model file (GGUF or safetensors).
	// sd.cpp has no ComfyUI-style model dir convention, so sdcpp bindings are full
	// paths, not filenames.
	SdcppModel string `json:"sdcpp_model,omitempty"`
	// SdcppModelKind tells the runner which sd.cpp flag loads SdcppModel:
	// ""/"checkpoint" = an all-in-one checkpoint (-m); "diffusion" = a bare
	// diffusion/DiT model (--diffusion-model) that needs the companion files below.
	SdcppModelKind string `json:"sdcpp_model_kind,omitempty"`
	// Companion weights (FULL paths; empty = not passed). A DiT-class model
	// (model_kind "diffusion") typically needs its VAE + text encoder(s); an
	// all-in-one checkpoint needs none of them.
	SdcppVAE   string `json:"sdcpp_vae,omitempty"`
	SdcppClipL string `json:"sdcpp_clip_l,omitempty"`
	SdcppClipG string `json:"sdcpp_clip_g,omitempty"`
	SdcppT5    string `json:"sdcpp_t5xxl,omitempty"`
	// SdcppLLM is the LLM-class text encoder some DiT families use instead of
	// CLIP/T5 (Z-Image: a Qwen3 GGUF, sd.cpp's --llm). Full path; "" = not passed.
	SdcppLLM string `json:"sdcpp_llm,omitempty"`
	// SdcppExtraArgs are appended verbatim to the sd.cpp invocation — the stability
	// toggles the AMD/Phoenix canaries decide (e.g. "--vae-on-cpu", "--clip-on-cpu",
	// a flash-attention toggle). Config-driven so a canary-gated promotion is a
	// config edit, never a code change.
	SdcppExtraArgs []string `json:"sdcpp_extra_args,omitempty"`
	// --- generative inpainting (inpaint_image) ---
	// InpaintScript is the absolute path to render/comfy-inpaint.mjs. Empty = no
	// inpaint route (the task defers cleanly), like an empty ImageGenScript.
	InpaintScript string `json:"inpaint_script,omitempty"`
	// InpaintCkpt is the SDXL-class checkpoint this machine inpaints with. Inpainting
	// is a latent-space technique (VAEEncodeForInpaint); a pixel-space DiT binding
	// (HiDream) is NOT valid here even when it is the machine's imagegen_ckpt.
	InpaintCkpt      string  `json:"inpaint_ckpt,omitempty"`
	InpaintVAE       string  `json:"inpaint_vae,omitempty"`
	InpaintSteps     int     `json:"inpaint_steps,omitempty"`
	InpaintCFG       float64 `json:"inpaint_cfg,omitempty"`
	InpaintSampler   string  `json:"inpaint_sampler,omitempty"`
	InpaintScheduler string  `json:"inpaint_scheduler,omitempty"`
	// InpaintTimeoutSec bounds one inpaint render (default 900).
	InpaintTimeoutSec int `json:"inpaint_timeout_sec,omitempty"`
	// --- generative, mask-free image edit (edit_image_generative) ---
	// A THIRD edit-shaped route, deliberately distinct from its two siblings:
	// edit_image is deterministic PIL ops, inpaint_image re-denoises inside a
	// user-supplied mask, and this rewrites the whole frame from a text
	// instruction with no mask (Qwen-Image-Edit class).
	// NAMED GenEdit*, not Edit*: Edit* is already taken by the DETERMINISTIC PIL
	// route (EditPython, EditTimeoutSec). Two different routes sharing an `edit_`
	// prefix would collide in Go and, worse, in the JSON config.
	// GenEditScript is the absolute path to render/comfy-edit.mjs. Empty = no
	// generative-edit route (the task defers cleanly), like an empty ImageGenScript.
	GenEditScript string `json:"gen_edit_script,omitempty"`
	// GenEditUnet is the diffusion-transformer unet this machine edits with — a .gguf
	// (loaded via UnetLoaderGGUF) or a .safetensors (UNETLoader). NOT a checkpoint:
	// the text encoder and VAE are bound separately below.
	GenEditUnet string `json:"gen_edit_unet,omitempty"`
	// GenEditPreset pairs steps+cfg+LoRA as a matched triple: full | lightning8 |
	// lightning4. Overriding half the pairing renders successfully and looks wrong,
	// so prefer switching preset over hand-setting GenEditSteps/GenEditCFG.
	GenEditPreset string `json:"gen_edit_preset,omitempty"`
	// GenEditLoRA overrides the preset's distillation LoRA. Normally leave empty.
	GenEditLoRA         string  `json:"gen_edit_lora,omitempty"`
	GenEditLoRAStrength float64 `json:"gen_edit_lora_strength,omitempty"`
	// GenEditCLIP / GenEditVAE are the companion text encoder and VAE. Empty = the
	// runner's own defaults (qwen_2.5_vl_7b_fp8_scaled / qwen_image_vae).
	GenEditCLIP      string  `json:"gen_edit_clip,omitempty"`
	GenEditVAE       string  `json:"gen_edit_vae,omitempty"`
	GenEditSteps     int     `json:"gen_edit_steps,omitempty"`
	GenEditCFG       float64 `json:"gen_edit_cfg,omitempty"`
	GenEditSampler   string  `json:"gen_edit_sampler,omitempty"`
	GenEditScheduler string  `json:"gen_edit_scheduler,omitempty"`
	// GenEditSchedule picks the qwen-image-2.1 edit graph's sigma schedule: "comfy"
	// (KSampler on ComfyUI's fixed model shift, the default) or "turbo" (the
	// Qwen-Image-2.1-Turbo checkpoint's saved 8-step sigmas; steps must be 8). The
	// 2511 graph ignores it.
	GenEditSchedule string `json:"gen_edit_schedule,omitempty"`
	// GenEditMegapixels fixes the edit's working canvas — and therefore its OUTPUT
	// resolution, since the scaled image is what the sampler denoises. 0 (the default)
	// means "follow the source": the runner measures the source file and targets its
	// actual megapixels, held inside 0.9-2.0 so an in-band source renders at exactly its
	// own size. Set this only to pin every edit on the machine to one fixed size.
	//
	// Sized in the same megapixels*1024*1024 units as ComfyUI's ImageScaleToTotalPixels
	// (so 2.0 is exactly 2048x1024), range 0.01-16.0. Raising it costs VRAM and time
	// roughly linearly in total pixels, on a seat bound to a ~15 GB unet.
	GenEditMegapixels float64 `json:"gen_edit_megapixels,omitempty"`
	// GenEditTimeoutSec bounds one generative edit (default 1800). Measured on a
	// 2-card 16 GB box: ~4.5 min of fixed overhead (ComfyUI cold start + a 15.4 GB
	// GGUF load) before sampling starts, then ~7 s/step.
	GenEditTimeoutSec int `json:"gen_edit_timeout_sec,omitempty"`
	// GenEditFamily selects the edit graph: "" / "qwen-image-edit-2511" = the 2511
	// graph (one image, presets), "qwen-image-2.1" = the 2.1 multi-reference graph
	// (up to 10 images, the first the target; no presets). The 2.1 weights are
	// non-commercial, so bind it as a named gen_edit_families overlay (ADR 0058).
	GenEditFamily string `json:"gen_edit_family,omitempty"`
	// GenEditPlacement is ImageGenPlacement for the generative edit door ("multicard"; ""/"single" = one card): the 2511 fp8mixed or Q5_1 GGUF
	// DiT split over two leased non-display cards. Unset by default; a binding key of the gen_edit_families overlays.
	GenEditPlacement string `json:"gen_edit_placement,omitempty"`
	// GenEditResolution is the 2.1 encoder's reference size (px, a multiple of 32 up
	// to 4096; references are resized to about resolution^2). 0 = the builder default,
	// 1024 (the official default). qwen-image-2.1 only.
	GenEditResolution int `json:"gen_edit_resolution,omitempty"`
	// GenEditCacheDevice places the 2.1 prefix KV cache (QwenImage21Cache): auto |
	// gpu | cpu | off; "" = auto. "gpu" and "off" stay out of the host-RAM prefetch
	// path that ComfyUI #16443 aborts in on dynamic-VRAM edits. qwen-image-2.1 only.
	GenEditCacheDevice string `json:"gen_edit_cache_device,omitempty"`
	// GenEditLicense / GenEditCommercialUse: the default edit binding's license tag,
	// same contract as imagegen_license / imagegen_commercial_use.
	GenEditLicense       string `json:"gen_edit_license,omitempty"`
	GenEditCommercialUse *bool  `json:"gen_edit_commercial_use,omitempty"`
	// GenEditFamilies are NAMED, opt-in edit bindings (gen_edit_*/comfy_* overlays +
	// license + commercial_use), selected by the edit request's `family` param. Same
	// rules as ImageGenFamilies; the cleared set is editBindingKeys.
	GenEditFamilies map[string]FamilyOverlay `json:"gen_edit_families,omitempty"`
	// --- ESRGAN-family image upscale (upscale_image) ---
	// UpscaleScript is the path to render/comfy-upscale.mjs; shipped as a default like
	// RunGraphScript because the runner is generic — only the MODEL is per-machine.
	UpscaleScript string `json:"upscale_script,omitempty"`
	// UpscaleModel is the ComfyUI upscale_models filename this machine enlarges with
	// (e.g. 4x-UltraSharp.pth, RealESRGAN_x4plus.pth). Empty falls back to
	// VideoGenUpscaleModel — the same ESRGAN file the video route already binds — so a
	// box that upscales video upscales stills with no extra key (EffectiveUpscaleModel).
	// Both empty = no upscale route (the task defers cleanly).
	UpscaleModel string `json:"upscale_model,omitempty"`
	// UpscaleTimeoutSec bounds one upscale (default 600): the render itself is seconds,
	// the budget is the cold ComfyUI start.
	UpscaleTimeoutSec int `json:"upscale_timeout_sec,omitempty"`
	// --- video / audio generation (generate_video / generate_audio) ---
	// VideoGenScript is the path to render/comfy-video.mjs (the I2V lifecycle wrapper).
	// Empty = no video route (the task defers cleanly), like an empty ImageGenScript.
	VideoGenScript string `json:"videogen_script,omitempty"`
	// RunGraphScript is the generic run-graph runner (offload_run_graph / run-graph):
	// render/comfy-run-graph.mjs. It executes an arbitrary ComfyUI API-format graph and
	// satisfies its per-workflow node manifest. Empty = no run-graph route (defers).
	RunGraphScript string `json:"run_graph_script,omitempty"`
	// VoiceGenScript is the path to render/tts.mjs (Chatterbox TTS; comfyManaged:false).
	// It serves generate_audio kind=voice. Empty = voice defers.
	VoiceGenScript string `json:"voicegen_script,omitempty"`
	// TTSEndpoint (0.113.25) is an OpenAI-compatible speech server — base URL,
	// no /v1 (e.g. VoiceStudio on http://127.0.0.1:3900). It serves
	// generate_audio kind=voice when the request says voice=endpoint, or by
	// default when no voicegen_script is bound on this box. The server owns
	// its GPU: this lane takes no media lease. Empty = the lane is absent.
	TTSEndpoint string `json:"tts_endpoint,omitempty"`
	// TTSModel / TTSVoice are what the endpoint is asked for; empty = the
	// OpenAI alias `tts-1` (every compatible server maps it to its default
	// engine — VoiceStudio rejects `default` as a model) and the server's
	// default voice. TTSAPIKey is sent as a bearer token when set.
	TTSModel  string `json:"tts_model,omitempty"`
	TTSVoice  string `json:"tts_voice,omitempty"`
	TTSAPIKey string `json:"tts_api_key,omitempty"`
	// VoiceGenRef is the default reference clip for the GENERALIST voice path (es-MX
	// zero-shot clone). Empty = Chatterbox's built-in voice. Used only when the request
	// has no "clone" param. Per-machine path — never a hardcoded voice.
	VoiceGenRef string `json:"voicegen_ref,omitempty"`
	// VoiceGenFTModel / VoiceGenFTBaseDir / VoiceGenFTRef locate a per-machine FINE-TUNED
	// voice: the merged Chatterbox T3 safetensors, the base engine dir it loads from
	// (ve/s3gen/t3_cfg + grapheme tokenizer.json), and a reference clip. All empty = this
	// box has no fine-tuned voice, so voice=finetuned defers. Shared code ships NO path.
	VoiceGenFTModel   string `json:"voicegen_ft_model,omitempty"`
	VoiceGenFTBaseDir string `json:"voicegen_ft_base_dir,omitempty"`
	VoiceGenFTRef     string `json:"voicegen_ft_ref,omitempty"`
	// VoiceGenFTLang is metadata/record for the fine-tuned voice (e.g. "es"). The FT
	// English-engine path does NOT thread language_id; kept for record + future use.
	VoiceGenFTLang string `json:"voicegen_ft_lang,omitempty"`
	// VoiceGenFT{Temperature,CFGWeight,Exaggeration,RepetitionPenalty} are the per-machine
	// generate() recipe for the fine-tuned voice. 0 = no flag passed (the worker's own
	// default). The tuned values live only in this machine's config, never in shared code.
	VoiceGenFTTemperature       float64 `json:"voicegen_ft_temperature,omitempty"`
	VoiceGenFTCFGWeight         float64 `json:"voicegen_ft_cfg_weight,omitempty"`
	VoiceGenFTExaggeration      float64 `json:"voicegen_ft_exaggeration,omitempty"`
	VoiceGenFTRepetitionPenalty float64 `json:"voicegen_ft_repetition_penalty,omitempty"`
	// MusicGenScript is the path to the ACE-Step music worker (render/comfy-music.mjs,
	// ComfyUI). It serves generate_audio kind=music. Default render/comfy-music.mjs (the
	// B3 worker); set "" to disable (music defers) if the ACE-Step checkpoint isn't present.
	MusicGenScript string `json:"musicgen_script,omitempty"`
	// VideoGenTimeoutSec bounds one video render: ComfyUI cold-start + a long I2V
	// render (Wan native two-stage is slow). Default 1500 (25min).
	VideoGenTimeoutSec int `json:"videogen_timeout_sec,omitempty"`
	// VideoGenWidth / VideoGenHeight / VideoGenFrames are this machine's DEFAULT I2V
	// output size — a per-machine knob so a 16GB box renders 720p while an 8GB box
	// stays at the builder's 480p default. A per-request width/height/frames always
	// wins; 0 = use the builder default (no flag passed). Keeps the harness
	// hardware-agnostic (resolution is config, not a constant).
	VideoGenWidth  int `json:"videogen_width,omitempty"`
	VideoGenHeight int `json:"videogen_height,omitempty"`
	VideoGenFrames int `json:"videogen_frames,omitempty"`
	// VideoGenUpscaleModel is this machine's post-decode upscale model (e.g. an ESRGAN
	// "4x-UltraSharp.pth"); when a request asks to upscale, the video runner uses it +
	// the target size below. Empty = the machine has no upscale model, so upscale is a
	// no-op there. Per-machine + config-driven — never a hardcoded model name.
	VideoGenUpscaleModel  string `json:"videogen_upscale_model,omitempty"`
	VideoGenUpscaleWidth  int    `json:"videogen_upscale_width,omitempty"`
	VideoGenUpscaleHeight int    `json:"videogen_upscale_height,omitempty"`
	// EditPython is the PIL engine for edit_image (a python with Pillow). Empty =
	// derive <comfy_dir>/.venv python (mediaops.ResolveEditPython); unresolvable =
	// edit ops defer. GimpConsolePath is the gimp-console binary for flatten_design
	// (.xcf/.psd -> flat raster + layer list); empty = that op defers. Both are pure
	// CPU (no GPU lock). EditTimeoutSec bounds one edit/media op (default 300).
	EditPython      string `json:"edit_python,omitempty"`
	GimpConsolePath string `json:"gimp_console_path,omitempty"`
	EditTimeoutSec  int    `json:"edit_timeout_sec,omitempty"`
	// YtDlpPath is the absolute path to a yt-dlp executable, the subtitle adapter of offload_research. Empty (the
	// default) = the adapter is OFF and a YouTube URL is read as an ordinary page: the harness never searches PATH for
	// the binary and never installs it. The binary is invoked subtitles-only (--skip-download, no cookies, no config
	// file, no retry) after the URL has passed the public-web guard; see docs/systems/delegation-client.md. On Windows
	// it must name an .exe or a wrapper .cmd: the zipapp is a shebang script, launchable directly only on POSIX.
	YtDlpPath string `json:"ytdlp_path,omitempty"`
	// YtDlpSHA256 is the optional sha256 (64 hexadecimal digits) of the file at YtDlpPath. Empty (the default) = the
	// path is trusted as written and nothing is hashed. When set, the file is hashed before every run and a mismatch
	// refuses to run it. On Windows with a wrapper .cmd the hash covers the wrapper, not the interpreter or the
	// script it calls.
	YtDlpSHA256 string `json:"ytdlp_sha256,omitempty"`
	// --- composition (offload_compose_video / compose-video; ADR 0059) ---
	// A CPU-class lane: HyperFrames renders an HTML/CSS composition to video with
	// headless Chrome in SOFTWARE GL + ffmpeg, so it takes NO GPU lease and no
	// withGpuSlot (ADR 0026: a media lease would stall text-seat loads) — only its
	// own in-process slot. Every key defaults EMPTY: the route is NOT CONFIGURED
	// until the installer's hyperframes step (or an operator) binds all three of
	// compose_script, hyperframes_dir and hyperframes_browser_path.
	//
	// ComposeScript is the runner, render/compose-hyperframes.mjs — the ONLY door
	// to the HyperFrames CLI (env allowlist, --json on every call, subcommand
	// allowlist, typed COMPOSE-FAIL classes).
	ComposeScript string `json:"compose_script,omitempty"`
	// HyperframesDir holds the project-local install
	// (<dir>/node_modules/hyperframes, the newest npm release at install, no lockfile). Never a
	// global npm install: a global HyperFrames self-upgrades in a detached process.
	// HyperFrames' own state (~/.hyperframes, the managed Chrome cache) lives in
	// <dir>/home — the runner gives the CLI that directory as HOME.
	HyperframesDir string `json:"hyperframes_dir,omitempty"`
	// HyperframesBrowserPath is the chrome-headless-shell the runner hands HyperFrames
	// (HYPERFRAMES_BROWSER_PATH). "auto" (BrowserAuto, what the installers write) is the
	// managed chrome-headless-shell that HyperFrames' installed release resolves at render
	// time under <hyperframes_dir>/home (fetched on first use when the release wants a
	// newer one), kept current by `install hyperframes` and `update`. An explicit path
	// binds that one file and never follows a release; it stays valid for operators who
	// want a specific browser. Explicit because the CLI's own resolution prefers a NEWER
	// build in ~/.cache/puppeteer over the managed one.
	HyperframesBrowserPath string `json:"hyperframes_browser_path,omitempty"`
	// ComposeTimeoutSec bounds one composition end to end (lint + check + render +
	// verify + snapshots). Default 1800.
	ComposeTimeoutSec int `json:"compose_timeout_sec,omitempty"`
	// ComposeWorkers is the render worker count: "" or "auto" = HyperFrames' own
	// sizing, else an integer 1-24 (each worker is one Chrome, ~256 MB). A request's
	// workers wins. On the 36-thread reference box neither setting wins consistently for
	// a 150-frame 1080p card (two sessions: 1 worker 21.2 s vs auto 24-25 s, then 16.4 s
	// vs 14.6-15.3 s), so the default stays HyperFrames' own sizing.
	ComposeWorkers string `json:"compose_workers,omitempty"`
	// ComposeCacheDir holds the runner's work dirs, HyperFrames' extracted-frame
	// cache and its temp frames (#4060: the disk-capture headroom gate refuses a
	// render on a small system drive). "" = <media_dir>/.compose-cache.
	ComposeCacheDir string `json:"compose_cache_dir,omitempty"`
	// ComposeQuality is the default encoder preset: draft | standard | high.
	// Default "high" (libx264 slow, CRF 15) — quality first; a request may ask for less.
	ComposeQuality string `json:"compose_quality,omitempty"`
	// --- browse lane (offload_browse / agent `browse`; ADR 0060) ---
	// An OPT-IN lane that drives the operator's own, already-running Chromium
	// browser toward a natural-language goal. A Python sidecar
	// (setup/browse/runner.py: browser-use's jev-ultrafast loop over
	// browser-harness/CDP) owns the browser; the harness owns every model call.
	// Every key defaults EMPTY: the lane is NOT CONFIGURED until browse_python,
	// browse_script and a LOOPBACK browse_decision_url are all bound.
	//
	// BrowsePython is the sidecar venv's interpreter (setup/browse/install.ps1
	// prints it); BrowseScript is the installed runner.py.
	BrowsePython string `json:"browse_python,omitempty"`
	BrowseScript string `json:"browse_script,omitempty"`
	// BrowseDecisionURL is a TypeSafe-shaped decision endpoint (POST
	// /v1/systemone) that the harness proxies the sidecar's typed choices to. It
	// MUST be plain http on a loopback host: the harness holds no provider key,
	// so the only shape it will call is a local service that holds its own
	// (BrowseDecisionURLAllowed). The bearer, if the endpoint wants one, comes
	// from the LOCAL_OFFLOAD_BROWSE_BEARER env var at call time — never a config
	// field, and never passed to the sidecar.
	BrowseDecisionURL string `json:"browse_decision_url,omitempty"`
	// BrowseBrowser pins which running browser the sidecar attaches to:
	// "chrome" | "edge" | "brave" | "chromium", or "" for browser-harness's own
	// discovery order (Chrome, then Edge, then Brave — the first one with remote
	// debugging allowed wins). The browser must already run with "Allow remote
	// debugging for this browser instance" ticked at <browser>://inspect.
	BrowseBrowser string `json:"browse_browser,omitempty"`
	// BrowseCDPURL pins the lane to ONE browser endpoint instead of discovery: a
	// dedicated agent profile started with its own --remote-debugging-port and
	// --user-data-dir (e.g. "http://127.0.0.1:9333"). It wins over browse_browser.
	// Recent Chromium builds ask the operator to approve EVERY new debugging
	// connection to the main profile ("Allow remote debugging for this browser
	// instance"); a dedicated instance started with the flag does not, and keeps the
	// agent out of the operator's everyday profile. http:// (resolved through
	// /json/version) or ws://, loopback host, explicit port — anything else leaves
	// the lane unregistered (BrowseCDPURLAllowed).
	BrowseCDPURL string `json:"browse_cdp_url,omitempty"`
	// BrowseActivateTab makes the sidecar bring the lane's own tab to the front of its
	// window once per run (CDP Target.activateTarget), so the page renders frames like a
	// foreground tab. The lane opens that tab in the background, and Chromium produces
	// almost no frames for a background tab: a dialog's open transition starts late or
	// not at all and the model reads an empty page. OPT-IN, default false, and honoured
	// only together with browse_cdp_url (EffectiveBrowseActivateTab): activating the tab
	// switches the window's active tab, which must never be the tab the operator is looking
	// at, so it is for a dedicated agent browser that nobody watches. Against the
	// operator's everyday browser (discovery or browse_browser) it is ignored, and the
	// load says so.
	BrowseActivateTab bool `json:"browse_activate_tab,omitempty"`
	// BrowseTimeoutSec bounds one browse run end to end. Default 300.
	BrowseTimeoutSec int `json:"browse_timeout_sec,omitempty"`
	// BrowseMaxActions is the default executed-action budget for one run (a
	// request may ask for fewer or more, never above BrowseMaxActionsCeiling,
	// which is jev-ultrafast's own loop cap). Default 30.
	BrowseMaxActions int `json:"browse_max_actions,omitempty"`
	// BrowseCaptureDir holds network captures a caller asked for (redacted
	// JSONL). "" = <state_dir>/browse-captures, or the OS temp dir if no state dir.
	BrowseCaptureDir string `json:"browse_capture_dir,omitempty"`
	// VideoGenUnetHigh / VideoGenUnetLow / VideoGenTextEncoder bind THIS machine's Wan 2.2
	// expert weights + text encoder by filename (quality-first weight binding — e.g. a box
	// with the VRAM/RAM headroom names fp8_scaled/fp16 files instead of the render script's
	// Q4 GGUF defaults). Empty = the render script's defaults, exactly as before. The loader
	// is chosen by extension in the script (.gguf vs .safetensors); no model name is baked
	// into shared code.
	VideoGenUnetHigh    string `json:"videogen_unet_high,omitempty"`
	VideoGenUnetLow     string `json:"videogen_unet_low,omitempty"`
	VideoGenTextEncoder string `json:"videogen_text_encoder,omitempty"`
	// VideoGenWanVirtualVramGB is the Wan 2.2 graph's DisTorch2 `virtual_vram_gb`: GiB of
	// EACH expert the loader parks in system RAM (donor "cpu"), so the card holds the
	// rest. It was a constant 7 in render/wf-wan22-i2v.mjs, which is a per-card number:
	// on an 8 GB card under the driver's "Prefer No Sysmem Fallback" policy, 7 on a
	// 15.4 GB Q8_0 expert asks for ~8.4 GB and OOMs (<node-e> reg3b, 2026-09-22), while
	// 11 got through the load and hung the card. Each node sets its MEASURED value.
	// Default 7 = the builder's value, so a config without the key renders exactly as
	// before; 0 or unset passes nothing and the builder keeps its own default; negative
	// is a config finding. Not the LTX-2.5 pool (videogen_pool_vvram_gb): that one is
	// VRAM borrowed from a donor CARD, this one is RAM.
	VideoGenWanVirtualVramGB float64 `json:"videogen_wan_virtual_vram_gb,omitempty"`
	// VideoGenWanLoader picks the Wan 2.2 expert loader (render/wf-wan22-i2v.mjs):
	// "" or "auto" = decide per expert file by extension, exactly as before this
	// key existed (.gguf -> the DisTorch2/MultiGPU wrapper, .safetensors -> the
	// plain native UNETLoader — no virtual_vram, ComfyUI's own dynamic-VRAM
	// streaming does the offload instead); "native" forces the plain loader
	// (refused if either expert is a .gguf — DynamicVRAM cannot stream GGUF, see
	// videogen_family's doc); "gguf-distorch" forces the DisTorch2/MultiGPU
	// wrapper on BOTH experts regardless of extension (the historical behavior,
	// still needed on a card too small for the native/streaming path or while
	// ComfyUI-MultiGPU still serves a mixed-precision box). A config that never
	// sets this key renders byte-identical to before the key existed.
	VideoGenWanLoader string `json:"videogen_wan_loader,omitempty"`
	// VideoGenWanDecode picks how the Wan 2.2 graph turns its latent into frames
	// (render/wf-wan22-i2v.mjs, passed as --wan-decode): "tiled" (the default; "" reads the
	// same) keeps the tiled VAEDecodeTiled node the graph always used, so a config that never
	// sets the key renders exactly as before; "plain" forces the plain VAEDecode; "auto" runs
	// it on a render card of at least 12 GiB and the tiled node below that, reading the card's
	// size from the ComfyUI the runner submits to (GET /system_stats), and falls back to tiled
	// when it cannot. "plain" and "auto" are an explicit opt-in. The graph used to hard-code
	// the tiled node. Why tiled and not auto: auto would run the plain decode by default on
	// every 16 GB card, but no render at the 16 GB tiers' own shape (1280x720x81) was ever run
	// with plain. ComfyUI's own estimate there is 12.0 GiB of a 15.9 GiB card, its VAE.decode
	// retries an out-of-memory plain decode tiled only once, and a second out-of-memory fails a
	// ~70-minute render after sampling (the harness runs ComfyUI with --cache-none, so a failed
	// decode is a failed render). The one measurement, on an RTX 5060 Ti 16 GB (A/B
	// 2026-10-03): plain 38 s at a 10.3 GB peak against tiled 412 s at 3.2 GB (that A/B's
	// tiled arm was one chunk), 45 dB PSNR between them, was taken with ComfyUI dynamic VRAM
	// on and a clip of unrecorded shape. The default flips to "auto" only after a live
	// acceptance render at the tier shape shows a ~40 s decode with no "Ran out of memory when
	// regular VAE decoding" line in the ComfyUI log (docs/systems/media-generation.md, "The Wan
	// decode is per card"). Only the Wan graph reads it: LTX 2.5 and Hunyuan 1.5 decode through
	// other VAEs nobody measured and keep VAEDecodeTiled. Default "tiled" = the runner's own
	// default (WAN_DECODE_DEFAULT; TestWanDecodeMirrorsTheBuilder keeps them equal).
	VideoGenWanDecode string `json:"videogen_wan_decode,omitempty"`
	// VideoGenPlacement is the placement of the Wan 2.2 video seat ("" or "single" = one render card, today's; "multicard" = the card-only
	// placement on the box's two non-display cards, render/wan-multicard.mjs: no host RAM, the experts are the fp8 safetensors files or the
	// Q8_0 GGUF files, named by videogen_unet_high / videogen_unet_low, which the placement requires). The door leases the pair, passes
	// --wan-placement multicard and drops the single-card pin and dynamic VRAM, the way gen_edit_placement does for the edit door. The Wan 2.2 graph
	// has it, and so has LTX-2.5 (videogen_family ltx25: one int8 DiT split over the pair with the compute card as cuda:0, the text encoder released
	// after the prompt is encoded; it has no experts and needs a .safetensors transformer, not the bf16 one); any other family renders as before. An
	// unknown value is a config error.
	VideoGenPlacement string `json:"videogen_placement,omitempty"`
	// VideoGenWanResidentGB is videogen_placement multicard's --wan-resident-gb: the GiB of each expert kept on the compute card (0 = the
	// runner's own default, 3; the lower bound of 0 GiB resident is therefore set on the runner, not here). 0..64. For LTX-2.5 it is the GiB of the
	// DiT kept on the compute card (0 = the runner's default, 9).
	VideoGenWanResidentGB float64 `json:"videogen_wan_resident_gb,omitempty"`
	// VideoGenFamily selects the I2V graph family the video route renders with:
	// "" or "wan22" = the Wan 2.2 two-expert graph (legacy default, unchanged);
	// "ltx25" = the LTX-2.5 22B distilled joint-audio two-pass graph (the measured
	// 2026-08-12 video-seat verdict, bound by Seat Frontier Leg 3). Mirrors the
	// imagegen_family switch introduced for the krea2 image seat.
	VideoGenFamily string `json:"videogen_family,omitempty"`
	// VideoGenFamilies binds PER-FAMILY weight/behavior overrides, keyed by the
	// same family spelling as videogen_family (ltx25 | wan22 | hunyuan | h3) —
	// see VideoFamilyBinding. It exists because every videogen_* weight key below
	// (transformer, text encoder, VAEs, unet high/low, frames/fps/width/height)
	// used to be a SINGLE machine-wide value applied to whichever family actually
	// rendered — so a request's explicit `model` override (offload_generate_video's
	// documented per-request family switch) silently handed a DIFFERENT family's
	// text encoder/transformer to the graph it built (bigger-models-2026-09-24.md,
	// "Interim Phase 2 round 2": a bare Wan override on an ltx25-bound <node-b> would
	// have received the LTX Gemma text encoder). videogen_families[name] is
	// consulted ONLY when the resolved render family differs from this box's own
	// videogen_family; the box's default family keeps reading the flat keys above
	// exactly as before. A family with no entry here — including the box's own
	// default, and any OTHER family nobody has scoped yet — falls back to those
	// same flat keys unchanged: deliberate back-compat, since a box's flat keys
	// may intentionally carry a DIFFERENT family's weights as a fallback (e.g.
	// Wan GGUF files bound here on an ltx25-seated box so a bare `model:"wan"`
	// override still renders with them). A config that has never set
	// videogen_families is therefore byte-for-byte unaffected; an operator closes
	// one family's cross-family leak by adding only that family's entry here —
	// see (Config).ResolveVideoFamilyBinding.
	VideoGenFamilies map[string]VideoFamilyBinding `json:"videogen_families,omitempty"`
	// VideoGenSdcppScript is the runner for a videogen_families entry whose engine is
	// "sdcpp" (CT-49; default render/sdcpp-video.mjs, resolved against the executable dir).
	VideoGenSdcppScript string `json:"videogen_sdcpp_script,omitempty"`
	// LTX-2.5 per-machine weight bindings (filenames under the ComfyUI model dirs;
	// empty = the render script's family defaults). Transformer = the int8 convrot
	// DiT; the conv VIDEO VAE pairs with it; the AUDIO VAE and ×2 latent spatial
	// upscaler complete the two-pass joint-AV recipe. VideoGenFPS is the family's
	// native frame rate (LTX 24; the Wan graph keeps its own 16 default).
	VideoGenTransformer    string `json:"videogen_transformer,omitempty"`
	VideoGenVideoVAE       string `json:"videogen_video_vae,omitempty"`
	VideoGenAudioVAE       string `json:"videogen_audio_vae,omitempty"`
	VideoGenLatentUpscaler string `json:"videogen_latent_upscaler,omitempty"`
	VideoGenFPS            int    `json:"videogen_fps,omitempty"`
	// Pooled loading for the video DiT (house 32GB-pool doctrine, same shape as the
	// imagegen_pool_* keys): >0 routes the transformer through DisTorch2 ratio mode
	// with this much VRAM borrowed from the donor card. 0 = plain single-card loader.
	VideoGenPoolVvramGB float64 `json:"videogen_pool_vvram_gb,omitempty"`
	VideoGenPoolCompute string  `json:"videogen_pool_compute,omitempty"`
	VideoGenPoolDonor   string  `json:"videogen_pool_donor,omitempty"`
	// AnimateGenScript is the path to render/comfy-animate.mjs (WAN-Animate-2
	// character animation: driver video + reference image → retargeted clip).
	// Empty = the route defers ("no animate route configured").
	AnimateGenScript string `json:"animategen_script,omitempty"`
	// AnimateGenTimeoutSec bounds one animate render: ComfyUI cold-start + an
	// 81-frame Motion Transfer chunk (measured 298.5s warm at 480x854 on the
	// reference box) + decode. Default 1800 (30min).
	AnimateGenTimeoutSec int `json:"animategen_timeout_sec,omitempty"`
	// AnimateGenUnet / AnimateGenTextEncoder / AnimateGenClipVision / AnimateGenVAE
	// bind THIS machine's WAN-Animate-2 files by ComfyUI filename (quality-first
	// weight binding, same pattern as the videogen_* keys). Unset = the render
	// script's defaults (the reference box's on-disk names).
	AnimateGenUnet        string `json:"animategen_unet,omitempty"`
	AnimateGenTextEncoder string `json:"animategen_text_encoder,omitempty"`
	AnimateGenClipVision  string `json:"animategen_clip_vision,omitempty"`
	AnimateGenVAE         string `json:"animategen_vae,omitempty"`
	// AnimateGenWidth / AnimateGenHeight are this machine's default working
	// resolution for the driver resize (0 = the builder's 482x854 template default).
	AnimateGenWidth  int `json:"animategen_width,omitempty"`
	AnimateGenHeight int `json:"animategen_height,omitempty"`
	// --- iGPU media engines (CT-49): animate / voice / music on a Vulkan iGPU ---
	// Every key below is optional and a box that sets none of them behaves exactly as
	// before. The engines are spawn-per-job native CLIs under the media lease, and NO
	// model runs on CPU on any of them: a cpu (or unset) backend is refused at config
	// load (doctor fails), in mediacap and in the pipeline (a typed defer), and the
	// render scripts fail with CPU_PLACEMENT when their engine's log shows a module on
	// the CPU.
	//
	// AnimateGenEngine: "" = ComfyUI WAN-Animate-2 (animategen_script, above);
	// "sdcpp" = render/sdcpp-animate.mjs: ffmpeg frames -> depth-anything.cpp depth
	// PNGs -> sd.cpp Wan2.1 VACE 1.3B with the depth directory as --control-video.
	AnimateGenEngine string `json:"animategen_engine,omitempty"`
	// AnimateGenSdcppScript is the runner (default render/sdcpp-animate.mjs, resolved
	// against the executable dir like every render script).
	AnimateGenSdcppScript string `json:"animategen_sdcpp_script,omitempty"`
	// AnimateGenSdcppBin / Model / VAE / T5xxl are full paths: sd-cli, the VACE GGUF,
	// the Wan2.1 VAE and the T5 text encoder. AnimateGenSdcppBackend is sd-cli's
	// --backend (required, never cpu); the depth step runs on the same device.
	AnimateGenSdcppBin     string `json:"animategen_sdcpp_bin,omitempty"`
	AnimateGenSdcppModel   string `json:"animategen_sdcpp_model,omitempty"`
	AnimateGenSdcppVAE     string `json:"animategen_sdcpp_vae,omitempty"`
	AnimateGenSdcppT5xxl   string `json:"animategen_sdcpp_t5xxl,omitempty"`
	AnimateGenSdcppBackend string `json:"animategen_sdcpp_backend,omitempty"`
	// AnimateGenSdcppModel is the VACE model: a .safetensors file (the Comfy-Org
	// wan2.1_vace_1.3B_fp16 loads) because the public VACE GGUFs lack
	// vace_patch_embedding.weight and sd-cli refuses them.
	// AnimateGenSdcppTAE is the OPT-IN tiny-autoencoder decode (sd-cli --taesd): a request
	// with fast=true uses it. Unset, fast is a no-op on this lane and the result says so.
	AnimateGenSdcppTAE string `json:"animategen_sdcpp_tae,omitempty"`
	// AnimateGenSdcppExtraArgs are appended to the sd-cli invocation (an element that
	// changes the backend or placement is refused).
	AnimateGenSdcppExtraArgs []string `json:"animategen_sdcpp_extra_args,omitempty"`
	// AnimateGenSdcppMaxTokens / AnimateGenSdcppVAEStride: the latent-token cap for the VACE
	// animate route (the reference image adds one latent frame); see
	// VideoFamilyBinding.SdcppMaxTokens. 0 = no cap; the stride (8 or 16) is required with a cap.
	AnimateGenSdcppMaxTokens int `json:"animategen_sdcpp_max_tokens,omitempty"`
	AnimateGenSdcppVAEStride int `json:"animategen_sdcpp_vae_stride,omitempty"`
	// AnimateGenDepthBin / AnimateGenDepthModel are the depth-anything.cpp binary and its
	// GGUF (full paths). AnimateGenDepthExtraArgs are appended to its invocation (its CLI
	// flags are bound in render/sdcpp-animate.mjs; this is the escape hatch).
	AnimateGenDepthBin       string   `json:"animategen_depth_bin,omitempty"`
	AnimateGenDepthModel     string   `json:"animategen_depth_model,omitempty"`
	AnimateGenDepthExtraArgs []string `json:"animategen_depth_extra_args,omitempty"`
	// AnimateGenSteps / CFG / FlowShift are the sdcpp animate recipe (0 = sd-cli's own
	// default); a per-request steps wins.
	AnimateGenSteps     int     `json:"animategen_steps,omitempty"`
	AnimateGenCFG       float64 `json:"animategen_cfg,omitempty"`
	AnimateGenFlowShift float64 `json:"animategen_flow_shift,omitempty"`
	// AnimateGenFrames is the frame count the sdcpp animate lane renders when a request names
	// none (a per-request frames always wins). 0 = the runner's own default (49). It is sized
	// together with animategen_width/height and animategen_sdcpp_max_tokens: the latent-token cap
	// is checked on the frame count the lane will actually render, so a box whose cap fits only
	// a short clip (the amd-gcn seed: 33 frames at 288x512) must name that clip here, or every
	// call that omits `frames` renders the default 49 and is refused as token_cap_exceeded.
	// sdcpp lane only (animategen_engine "sdcpp"): the ComfyUI route has its own 81-frame chunk
	// and ignores this key.
	AnimateGenFrames int `json:"animategen_frames,omitempty"`
	// VoiceGenEngine: "" = today's Chatterbox python worker (voicegen_script, tts.mjs);
	// "audiocpp" = render/audiocpp-generate.mjs --kind voice (audio.cpp's chatterbox
	// family, `--task tts`, or `clon` when a clone reference is given).
	VoiceGenEngine string `json:"voicegen_engine,omitempty"`
	// MusicGenEngine: "" = ComfyUI ACE-Step (musicgen_script, comfy-music.mjs);
	// "audiocpp" = render/audiocpp-generate.mjs --kind music (audio.cpp's ace_step
	// family, `--task gen`).
	MusicGenEngine string `json:"musicgen_engine,omitempty"`
	// AudiocppScript is the runner for both audio kinds (default
	// render/audiocpp-generate.mjs). AudiocppBin is audiocpp_cli (full path).
	// AudiocppBackend (required, never cpu) and AudiocppDevice (a device index; "" = 0)
	// are its --backend and --device. AudiocppVoiceFamily / AudiocppMusicFamily are the
	// --family values ("" = chatterbox / ace_step); the *Model keys are the --model
	// paths (a GGUF file or a model package directory). AudiocppExtraArgs are appended.
	AudiocppScript      string   `json:"audiocpp_script,omitempty"`
	AudiocppBin         string   `json:"audiocpp_bin,omitempty"`
	AudiocppBackend     string   `json:"audiocpp_backend,omitempty"`
	AudiocppDevice      string   `json:"audiocpp_device,omitempty"`
	AudiocppVoiceFamily string   `json:"audiocpp_voice_family,omitempty"`
	AudiocppVoiceModel  string   `json:"audiocpp_voice_model,omitempty"`
	AudiocppMusicFamily string   `json:"audiocpp_music_family,omitempty"`
	AudiocppMusicModel  string   `json:"audiocpp_music_model,omitempty"`
	AudiocppExtraArgs   []string `json:"audiocpp_extra_args,omitempty"`
	// AudioGenTimeoutSec bounds one audio synthesis (TTS or ACE-Step). Default 720 (12min).
	AudioGenTimeoutSec int `json:"audiogen_timeout_sec,omitempty"`
	// GPUWaitMs is how long ANY GPU job queues behind the current lease holder before it
	// defers with the holder's detail. One knob for every GPU task.
	//
	// A busy card must QUEUE the job rather than drop it — that is what the single GPU
	// slot has always been for. It is BOUNDED because the caller is usually one tool
	// call, and a tool call that blocks for tens of minutes is indistinguishable from a
	// hang; past the window an honest "held by <class>, <n>s in" is more useful to a
	// caller that can retry. Default 90000 (90s), matching VisionGPUWaitSec so the two
	// GPU waiters behave alike.
	//
	// It REPLACES videogen_wait_ms (20min) and audiogen_wait_ms (2min), which are now
	// ignored. Those existed only so a cheap TTS was not starved behind a long video;
	// at a 90s ceiling that distinction buys nothing, and keeping them would have been
	// a trap — every install shipped with videogen_wait_ms=1200000 in its config, so
	// per-task overrides would have silently restored the 20-minute wait on upgrade.
	GPUWaitMs int `json:"gpu_wait_ms,omitempty"`
	// GPULockPath overrides the single-slot GPU lock DIRECTORY shared with the render
	// runners (render/gpu-lock.mjs). Empty = the runners' own default (the GPU_LOCK env,
	// else <os-tmpdir>/local-offload-gpu.lock). When set it is also threaded to every gen
	// runner as the GPU_LOCK env, so the Go-side vision gate (LO-1) and the Node runners
	// always contend on the SAME lock.
	GPULockPath string `json:"gpu_lock_path,omitempty"`
	// GPUCardScopedLeases (plan P2, default false) lets this host WRITE card-scoped GPU
	// leases: a lease that names its cards (record v2, per-card claims) instead of
	// fencing the whole node. Reading them is never gated. Setting this key is not
	// enough: the writer also needs the green reader audit marker (gpu/reader-audit.json)
	// that `gpu doctor` writes once no binary or Node reader on the host predates the
	// format, because such a reader sees a directory holding only device leases as a
	// free card. Without the marker the key is ignored with a warning.
	GPUCardScopedLeases bool `json:"gpu_card_scoped_leases,omitempty"`
	// GPULegacyScopeInference (plan P4, default false) lets the seat gates scope a LEGACY
	// whole-node lease, one an older binary wrote, by what its process tree actually runs
	// (a `--cuda-device N` on a command line, a launch marker tied to the lease, two sampled
	// readings of the cards its processes hold) instead of fencing every card. Only such a
	// record is ever scoped: a whole-node lease this binary wrote, an explicit --whole-node
	// included, is the whole node by its writer's word. Off, a legacy lease fences every seat,
	// exactly as it always did. It stays off until the read-only capture of what a real legacy
	// tree shows (plan P4 step 1, milestone P6) has been made on the host.
	GPULegacyScopeInference bool `json:"gpu_legacy_scope_inference,omitempty"`
	// GPUComfyOrder declares ComfyUI's device order for this box (plan P3): a comma
	// list naming EVERY card once, fastest first, each as an nvidia-smi index or a UUID
	// prefix ("1,0,2"). nvidia-smi cannot report CUDA's FASTEST_FIRST order and two
	// same-model cards cannot be ordered by anything it does report, so a command that
	// says `--cuda-device N` or COMFY_CUDA_DEVICE=N is turned into a card only when this
	// is set (or the box has one card). Unset, such a lease stays whole-node and says
	// why; nothing is ever guessed. Measure it with a CUDA_VISIBLE_DEVICES=<uuid> probe.
	GPUComfyOrder string `json:"gpu_comfy_order,omitempty"`
	// GPUHostRAMHeadroomGiB is the host memory every GPU lease grant keeps free beyond what
	// the lease declares (`gpu reserve --ram` and --ram-commit, the estimate from its model files, the class
	// default; internal/hostneed): a grant is admitted only while the available RAM, less the working set it
	// touches and what the leases already granted have yet to touch, stays at or above this, and the commit charge now, plus the
	// commit it declares, stays at or under physical RAM less this (a commit nobody stated, which is the --ram figure), or, for a
	// commit stated with --ram-commit where the OS enforces a commit limit, under the commit limit less this with what the leases
	// already granted have yet to be charged. It is also the margin of the NEAR verdict
	// `gpu status` reports. The card allocator applies the same rule before it picks cards. A load that pushes the host
	// into paging stalls every seat on the box, so a DECLARED load is held back while it would pass either line. That
	// bounds declarations, not what a lane then commits (gpu-lease.md, "Known limits").
	// 0 = DefaultGPUHostRAMHeadroomGiB (8).
	GPUHostRAMHeadroomGiB float64 `json:"gpu_host_ram_headroom_gib,omitempty"`
	// GPUHostRAMHoldMaxSec (F82, 2026-10-14 incident) bounds how long a `gpu reserve --unload-seat` lease may hold its
	// cards while it waits for the host to have the room for its declared RAM AFTER the unload: past it the lease is
	// released (the seat warmed back as for any release), the command never runs and the reserve exits non-zero. Seconds;
	// a pointer because unset (600, a chosen figure) and 0 (no bound: the wait runs the whole --wait, as before the bound)
	// must differ. `gpu reserve --ram-hold-max` overrides it for one reserve.
	GPUHostRAMHoldMaxSec *int `json:"gpu_hostram_hold_max_sec,omitempty"`
	// GPUDisplayCapPct (A-RAM-15, default 60) is how much of the display card's total VRAM jobs may use, the
	// desktop's own memory included: the card allocator (`gpu reserve --cards`, the media admission path) takes the
	// screen's card only while the VRAM in use now plus the job's declared footprint stays at or under this share of
	// the card. The operator's rule of 2026-10-11: the display card may be used up to 60 percent at all times unless
	// he says he needs it, so no presence reading opens or closes it any more; 0 is the "I need it" switch and keeps
	// the card closed to the allocator. A pointer because unset (60) and 0 (closed) must differ; 1..100 are shares, and
	// a value outside 0..100 refuses the load by name (and reads as closed where a caller goes on with it anyway). The
	// switch is read from this file as it is when the allocator builds its input or a status surface prints the card
	// table (LiveGPUDisplayCap), not as it was at start, so a 0 written while a request is in line or a server is running takes effect. It bounds ADMISSION only: nothing limits a job after it is placed, and a job that declares no footprint (`--vram`)
	// is not given the card, except at 100 with no display_floor_gib declared: that is the whole card, nothing is held
	// back to hold a footprint to, and a job that declares none (every media call) is given it with no VRAM check on
	// that card, as on any other. The llama-swap twin guards
	// (display_floor, presence on the display layer) are separate and unchanged. The display card's row of the card table
	// (`gpu status`, `gpu cards`, the offload_status brief) reports the VRAM in use against this share live, whoever's memory it is, and
	// audit-yaml's display-cap-unseen note names the llama-swap entries it cannot judge against it.
	GPUDisplayCapPct *int `json:"gpu_display_cap_pct,omitempty"`

	// AgentSeatHostRAMGiB is the host RAM the agent seat holds once it is loaded (resident set plus any staged
	// KV cache, GiB): what the warm-back of a seat a lease unloaded must find room for before it loads the seat
	// again (gpu_drain.go; internal/hostneed.SeatNeed). It is a figure to MEASURE on the node that runs the seat
	// and to record beside the value as `measured <date> <node>`; 0 = unset, and an unset seat is not assumed to
	// be small: hostneed.DefaultSeatHostGiB stands in, a chosen fail-closed figure and never 0. The vLLM seat launcher
	// (setup/templates/vllm-seat/seat_fg.sh) logs `host rss N GiB (L1 N GiB)` for its LMCache MP server at every start,
	// and `doctor` warns while this key is unset on a box that runs a vLLM seat (register B-56 / H-08).
	AgentSeatHostRAMGiB float64 `json:"agent_seat_host_ram_gib,omitempty"`
	// GPUOrphanGraceMin (plan P8, default 15) is how many minutes an attended lease's
	// owner may be gone before `gpu status`, offload_status and the fleet health read the
	// lease as orphaned. It only changes what is REPORTED: nothing reclaims, releases or
	// kills a lease on it. 0 or negative = 15. Load installs it where every reader sees it.
	GPUOrphanGraceMin int `json:"gpu_orphan_grace_min,omitempty"`
	// GPUMaxTermMin (plan P9, default 360) is the cap on a lease's renewal term, in minutes:
	// a renewal POINT, never a release point. A request above it is recorded, warned about
	// and accepted whole; it renews in terms of this length. 0 or negative = 360.
	GPUMaxTermMin int `json:"gpu_max_term_min,omitempty"`
	// GPUMaxTotalMin (plan P9, default 2880) is how long after acquisition a lease is
	// renewed at all, in minutes. Past it a lease that is still held reads overdue however
	// healthy its owner looks; it is still never freed by that. 0 or negative = 2880.
	GPUMaxTotalMin int `json:"gpu_max_total_min,omitempty"`
	// GPUOnOverdue (plan P11, ADR 0086) is what the harness does about a lease that outlived its
	// declared window while someone waits for its cards: "" (unset) behaves as before the key existed
	// and asks nobody; "request" asks the lease's HOLDER to yield, which runs the job's own recorded
	// --on-yield, and nothing is ever killed, released or taken; "hold" says in words that nobody is
	// asked. Matching trims and lower-cases. Anything else (yield, kill, takeover, a typo) is refused by
	// name at load, and a one-shot verb that proceeds anyway is held, never asking. Load installs it.
	GPUOnOverdue string `json:"gpu_on_overdue,omitempty"`
	// ForeignGPUMinMiB overrides the per-process VRAM floor `gpu status`/`gpu
	// reserve`'s foreign-GPU-memory warning (gpu_foreign.go) uses to decide a
	// resident desktop process is worth a line — see foreignDefaultMinMiB for
	// the built-in default and the incident (D-1xx-4 follow-up, 2026-09-24)
	// that set it. 0/negative = the built-in default.
	ForeignGPUMinMiB int `json:"foreign_gpu_min_mib,omitempty"`
	// Home is the install root every DERIVED path hangs off: the cache, ledger,
	// media/svg output, exemplars, thresholds and the router/confhead stores. Empty =
	// $LOCAL_OFFLOAD_HOME, else ~/.local-offload.
	//
	// It exists so an install can live on the volume that has room WITHOUT hand-writing
	// a dozen absolute paths into this file — the hand-patching that put a model tree on
	// an OS drive and then drifted. Precedence per path: an explicit value in this file
	// always wins; anything still at its built-in default follows Home. The MACHINE-WIDE
	// state root (state_dir / gpu_lock_path) is deliberately NOT rebased: it must stay
	// machine-wide or the GPU lease silently becomes per-user again.
	Home string `json:"home,omitempty"`
	// StateDir overrides the MACHINE-WIDE state root that holds the GPU lease
	// (<state_dir>/gpu/lease), the media ticket queue (<state_dir>/media-queue) and
	// future durable harness state. Empty = LOCAL_OFFLOAD_STATE_DIR, else the platform
	// default: %ProgramData%\local-offload on Windows, /var/lib/local-offload elsewhere.
	// Nothing needs it set: every consumer resolves the root through
	// gpulease.ResolveStateRoot.
	//
	// It is machine-wide ON PURPOSE. The previous GPU lock defaulted under the OS temp
	// dir, which is PER-USER on Windows, so a process in another security context took a
	// DIFFERENT lock and mutual exclusion silently evaporated. An unwritable or
	// cloud-synced root is REFUSED at startup rather than silently falling back — a
	// sync client replicating a lock file between machines would hand one GPU to two
	// hosts. See internal/gpulease.
	StateDir string `json:"state_dir,omitempty"`
	// VisionGPUWaitSec is how long a vision call (vqa/ocr/assess_image/video_describe)
	// waits for the GPU lock held by a generation job before deferring (polled every 2s).
	// While a gen job owns the GPU, llama-swap cannot (re)load the VLM — calling anyway
	// just burns a doomed HTTP call and returns an http_5xx defer (LO-1: 295 of the 337
	// all-time defers landed in ONE such hour). A defer is not a cloud API call: the
	// harness never calls a cloud model, it hands the work back to the calling session,
	// which is the expensive path this wait exists to avoid. Default 90.
	VisionGPUWaitSec int `json:"vision_gpu_wait_sec,omitempty"`
	// VisionColdLoadWaitSec is how long a vision call (vqa/ocr/assess_image/video_describe/
	// video_watch) waits for its seat to LOAD before the request is sent, when llama-swap does
	// not list the seat as ready (the seat unloads after its idle ttl, so the first call after
	// an idle gap meets a cold seat). llama-swap holds a request open for the whole load, and
	// the request's own timeout (request_timeout_sec, 120 s) then has to cover the load AND the
	// inference: a 32B vision seat's cold load plus a many-frame video prefill outlasted it, and
	// the call failed with "Client.Timeout exceeded while awaiting headers" while the load was
	// still running. The wait is a separate passthrough request that triggers the load and holds
	// for it (the warm-up the agent door already runs), so the vision request that follows rides
	// its full request_timeout_sec for inference alone. A seat already listed ready costs one
	// /running read; a seat the call is routed away from this box (seat_endpoints) is not warmed
	// here. It is a BOUND, not a promise: when the load outlasts it the call proceeds anyway and
	// the load carries on behind the request. 0 or negative turns the wait off (the request
	// then carries the load, as before). Default 180: CHOSEN, not measured as a single figure.
	// Observed on the reference box: the first chat completion logged after each of the last 25
	// cold starts (load plus its own inference) took 14-84 s in the 21 that completed, and one
	// load outlasted a 120 s client timeout; 180 s is about twice the slowest completed one and
	// sits far inside llama-swap's own 600 s health-check ceiling. Worst case a cold call now
	// costs this wait plus request_timeout_sec (and vision_gpu_wait_sec before both, when a
	// render holds the card first).
	VisionColdLoadWaitSec int `json:"vision_coldload_wait_sec,omitempty"`
	// MemoryStack lists the llama-swap models of the load-bearing mem0 stack, which
	// nothing that clears cards for a GPU job may unload: not the render runner's
	// helper and not `gpu reserve --unload-seat` (register C-87). They are small and,
	// on the reference box, pinned to the utility card, not the render card (they ran
	// on the CPU only from 2026-09-07 to 09-10). Sourced here (not a buried const) so a
	// renamed/added 3rd member is honored. Threaded to the runner via the
	// MEMORY_STACK env. Default {embeddinggemma, bge-reranker-v2-m3, embeddinggemma-ams,
	// embeddinggemma2}: the third is the id the memory authority node serves its embedder
	// under (register A-122b, 2026-10-01), which the first two did not cover, so a lease's
	// --unload-seat and the render runner's helper would have unloaded it; the fourth is the
	// EmbeddingGemma-2 entry (with its multimodal projector on the authority, text-only on the
	// replicas) the memory stack is moving to
	// (2026-10-09, serving templates' embeddinggemma2, tier flag include_embeddinggemma2),
	// appended for the same reason. A name a box does not serve is inert: the set only
	// filters what llama-swap reports. A config that NAMES a memory_stack replaces this
	// default, so a node that carries its own list must add embeddinggemma2 itself (the tiers that
	// render the entry, ampere-6, ampere-8 and blackwell-3x16, seed a list that names it, projector
	// or not). Keep embeddinggemma FIRST:
	// EmbedModel() falls back to MemoryStack[0]. render/gpu-lock.mjs's DEFAULT_MEMORY_STACK
	// is the same list, and a test keeps the two in step. This is an
	// UNORDERED keep-alive set — do NOT infer roles from position (use EmbedModel).
	MemoryStack []string `json:"memory_stack,omitempty"`
	// EmbedModelName is the embedding model the judge/kNN embedder requests. Kept
	// separate from MemoryStack (an unordered keep-alive set) so it is unambiguous and
	// reorder-proof. Empty falls back to MemoryStack[0] then "embeddinggemma".
	// Read via the EmbedModel() accessor.
	EmbedModelName string `json:"embed_model,omitempty"`
	// Temperature for deterministic structured output (default 0).
	Temperature float64 `json:"temperature"`
	// MaxRetries is how many correction re-prompts before deferring.
	MaxRetries int `json:"max_retries"`
	// ClassifyMinConfidence: classify results below this (self-reported) defer.
	// Default 0.88, calibrated 2026-08-14 from the confcal probe (120 items,
	// difficulty-graded): the lowest self-report observed ANYWHERE was 0.85 —
	// carried by two accepted-WRONG escalated rows — while every non-escalated
	// emission sat at ≥0.90. The prior 0.45 sat below the entire observed
	// distribution and never fired once (probe + 1487 production rows).
	ClassifyMinConfidence float64 `json:"classify_min_confidence"`
	// ConfidenceMarginThreshold: for triage/classify, if the logprob-derived
	// top-2 legal-class margin at the decision token is below this, escalate to a
	// larger tier (catches genuinely torn calls, e.g. eager-YES). 0 disables the
	// logprob gate. Per-task conformal thresholds (thresholds.json, `calibrate`)
	// override this constant. Default 0.65, calibrated 2026-08-14: the margin is
	// the stronger signal (AUC 0.930 vs the self-report's 0.874 on the same 120
	// decisions) and 0.65 sits above all three observed wrong-row margins
	// (max 0.618) while firing on 0/43 easy production classify rows (min margin
	// 0.985 there). The prior 0.35 sat below the entire observed support
	// (min 0.372) and never fired.
	ConfidenceMarginThreshold float64 `json:"confidence_margin_threshold"`
	// ConfidenceMarginFullDenominator switches the decision margin to the FULL
	// denominator (register D-130). Default false = today's MATCHED denominator,
	// which normalises over matched class tokens only and so excludes mass on
	// unmatched tokens and on legal labels outside the top_logprobs window.
	// Research measured the declared (matched) mass at ~0.097 on llama.cpp, so
	// the matched margin runs about an order of magnitude high and the gate
	// under-escalates exactly on hard, many-label contracts.
	//
	// It ships behind a flag because THREE consumers (health baselines, the
	// exemplar harvest gate, conformal calibration) compare a margin against
	// stored history, and the two scales are not comparable. Every ledger row
	// carries margin_scale so the re-derivation data accumulates before a flip.
	ConfidenceMarginFullDenominator bool `json:"confidence_margin_full_denominator,omitempty"`
	// ConfidenceMarginThresholdFull is the escalation threshold ON THE FULL
	// SCALE. It has NO calibrated default: 0 (the default) means the margin gate
	// never fires while the full denominator is on. The matched-scale 0.65 must
	// never be reused here - on a ~0.097-mass scale it turns never-fires into
	// fires-on-everything. Derive it from rows carrying margin_scale: full.
	ConfidenceMarginThresholdFull float64 `json:"confidence_margin_threshold_full,omitempty"`
	// MaxInputChars caps input length before context-budget trimming.
	MaxInputChars int `json:"max_input_chars"`

	// GCFCompact enables LOSSLESS columnar re-encoding (internal/gcf) of
	// eligible JSON arrays inside over-budget inputs BEFORE the lossy
	// context-budget head/tail trim — content that would have been cut can
	// then fit the local window instead (a defer/truncation converted into a
	// full-fidelity completion). Default ON (flip decision 2026-07-24:
	// lossless + fail-closed by construction, measured live defer→completion
	// win); an explicit false in the config file still disables it. No
	// omitempty: with a TRUE default, omitting a false value on any future
	// re-marshal would silently flip an operator's explicit choice.
	GCFCompact bool `json:"gcf_compact"`
	// CachePath / LedgerPath are bbolt files.
	CachePath  string `json:"cache_path"`
	LedgerPath string `json:"ledger_path"`
	// --- self-learning artifacts (written by the offline `calibrate`/`health`/
	// `train-router`/`optimize` jobs; read at pipeline startup). Empty = feature off. ---
	ThresholdsPath         string             `json:"thresholds_path,omitempty"`          // Phase 2: per-task conformal margin thresholds
	TierOverridesPath      string             `json:"tier_overrides_path,omitempty"`      // Phase 4: health-driven entry-tier bumps + P95 timeouts
	RouterWeightsPath      string             `json:"router_weights_path,omitempty"`      // Phase 5: logistic entry-tier router
	ConfHeadPath           string             `json:"confhead_path,omitempty"`            // Phase 2: logistic correctness head
	RouterLabelsPath       string             `json:"router_labels_path,omitempty"`       // Phase B: synthesized E2B-counterfactual router label sidecar
	ConfHeadLabelsPath     string             `json:"confhead_labels_path,omitempty"`     // Phase 2: cascade-agreement correctness-label sidecar (classify/triage)
	ConfHeadThresholdsPath string             `json:"confhead_thresholds_path,omitempty"` // Phase 2: per-task conformal p(correct) escalation thresholds (Task 3)
	ConfHeadEnabled        bool               `json:"confhead_enabled,omitempty"`         // Phase 2 Task 4: opt-in — gate ADOPT tasks on the head's p(correct). Default false.
	ExemplarsDir           string             `json:"exemplars_dir,omitempty"`            // Phase 6: few-shot exemplar sidecar + selected pool
	ExemplarShots          int                `json:"exemplar_shots,omitempty"`           // Phase 6: 0 = disabled
	AutoHeal               bool               `json:"auto_heal,omitempty"`                // Phase 7: opt-in autonomous tier reload
	TargetErrorRate        map[string]float64 `json:"target_error_rate,omitempty"`        // Phase 2: per-task α for calibration
	// OpusInputPricePerMTok estimates dollar savings ($ per 1M input tokens).
	OpusInputPricePerMTok float64 `json:"opus_input_price_per_mtok"`
	// OpusOutputPricePerMTok prices the OTHER half of what a local seat produced
	// ($ per 1M output tokens). Output bills at 5x input on Opus, and the savings
	// ledger multiplied it by zero until 0.117.7 - so the harness under-reported
	// itself by exactly the expensive half. An absent or non-positive value falls
	// back to ledger.DefaultPrices.OutputPerMTok rather than re-creating the zero.
	OpusOutputPricePerMTok float64 `json:"opus_output_price_per_mtok"`
	// RequestTimeoutSec for a single model call.
	RequestTimeoutSec int `json:"request_timeout_sec"`
	// --- shadow-labeling flywheel (Phase A.3) ---
	// ShadowEnabled gates sampled capture of non-escalated classify/triage/extract
	// entry-tier rows to the shadow queue for nightly counterfactual labeling.
	// Default false (off by default; never affects request latency or behavior).
	ShadowEnabled bool `json:"shadow_enabled,omitempty"`
	// ShadowRate is the fraction of eligible rows to capture (0.0–1.0).
	// Default 0.10 (10 %). A value of 0 disables capture even when ShadowEnabled.
	ShadowRate float64 `json:"shadow_rate,omitempty"`
	// ShadowQueuePath is the append-only JSONL file for captured shadow items.
	// Default <DataDir>/shadow-queue.jsonl.
	ShadowQueuePath string `json:"shadow_queue_path,omitempty"`
	// SummarizeSimThreshold is the minimum cosine similarity (0..1) between the
	// entry-tier and escalation-tier summary embeddings to count as "agreed".
	// Used by the B2 summarize judge in shadow-label. Default 0.80.
	SummarizeSimThreshold float64 `json:"summarize_sim_threshold,omitempty"`
	// --- P6: agentic-trajectory flywheel (off by default; mirrors ShadowEnabled) ---
	// AgentTrajectoryCaptureEnabled gates sampled capture of standalone agent
	// trajectories to the trajectory queue for offline counterfactual labeling.
	// Default false (off; never affects request latency or agent behavior).
	AgentTrajectoryCaptureEnabled bool `json:"agent_trajectory_capture_enabled,omitempty"`
	// AgentTrajectoryRate is the fraction of completed goals to capture (0.0–1.0).
	// Default 0.10. A value of 0 disables capture even when enabled.
	AgentTrajectoryRate float64 `json:"agent_trajectory_rate,omitempty"`
	// AgentTrajectoryQueuePath is the append-only JSONL capture queue.
	// Default <DataDir>/agent-trajectory-queue.jsonl.
	AgentTrajectoryQueuePath string `json:"agent_trajectory_queue_path,omitempty"`
	// AgentTrajectoryLabelsPath is the correctness-label SIDECAR the P6 flywheel
	// writes (via ledger.AppendLabel — NEVER the savings ledger).
	// Default <DataDir>/agent-trajectory-labels.jsonl.
	AgentTrajectoryLabelsPath string `json:"agent_trajectory_labels_path,omitempty"`
	// --- zero-training kNN entry-tier pre-filter (meta-router v2) ---
	// KNNPreFilterEnabled gates the kNN pre-filter — a bridge before the LR
	// router (router_weights) is trained. When on, classify/triage inputs are
	// embedded and matched against KNNIndexPath to decide whether to skip the
	// E2B tier; it yields to the LR router once that task is trained. Default
	// false; with it off the request path is byte-identical to the prior build.
	KNNPreFilterEnabled bool `json:"knn_prefilter_enabled,omitempty"`
	// KNNIndexPath is the JSONL substrate (task, vec, accept) appended by the
	// nightly shadow-label drain. Default <base>/knn-index.jsonl.
	KNNIndexPath string `json:"knn_index_path,omitempty"`
	// KNNPreFilterK is how many nearest neighbors to poll. Default 7.
	KNNPreFilterK int `json:"knn_prefilter_k,omitempty"`
	// KNNMinNeighbors is the minimum usable rows-per-task before the kNN acts
	// (guards against a too-thin substrate). Default 20.
	KNNMinNeighbors int `json:"knn_min_neighbors,omitempty"`
	// KNNPreFilterThreshold: skip E2B when the fraction of the k nearest
	// neighbors that accepted at E2B is below this. Default 0.5.
	KNNPreFilterThreshold float64 `json:"knn_prefilter_threshold,omitempty"`
	// KNNEmbedTimeoutMs bounds the request-path embedding call (fail-open on
	// timeout). Default 2000.
	KNNEmbedTimeoutMs int `json:"knn_embed_timeout_ms,omitempty"`
	// --- media artifact addressing (T2-A2) ---
	// MediaHashMaxFullBytes selects how audio/video cache keys identify a file.
	//
	// 0 (the default) = always hash the WHOLE file. That is the only mode with an
	// exact identity guarantee, and it is cheap RELATIVE TO WHAT IT GUARDS: both
	// call sites already read the same file through ffmpeg (whisper conversion,
	// frame sampling) before hashing it, and the model pass that follows takes
	// seconds to minutes. Note the cost is a cold file read — I/O-bound, not
	// SHA-bound — so on V: or a Drive-backed mount it tracks that device, not
	// memory bandwidth.
	//
	// A positive value switches files LARGER than it to a sampled digest (size +
	// three 8 MiB windows). That is opt-in on purpose: its failure mode is a
	// FALSE HIT between two same-size files that agree on the sampled windows —
	// i.e. serving one file's transcript for another, the exact defect
	// content-addressing was introduced to remove. The mode is encoded in the
	// digest, so sampled and full digests can never be confused.
	MediaHashMaxFullBytes int64 `json:"media_hash_max_full_bytes,omitempty"`
	// --- embed memo (T2-C): memoize embedding vectors by exact input bytes ---
	// Embedding is a pure function of (model, text) and the harness re-embeds the
	// same strings by construction (kNN pre-filter inputs, the shadow drain
	// re-reading stored inputs, a fixed exemplar pool). The larger payoff is not
	// the saved compute but the saved SWAP: the embedder carries ttl=300 like
	// every other seat, so the first embed after an idle gap pays a ~1-2 s cold
	// load — a memo hit skips the HTTP call and therefore skips the load.
	//
	// EmbedMemoEnabled gates it. On by default: a hit returns the identical
	// vector the embedder would have returned (see internal/embedmemo for why the
	// key is exact bytes and never normalized), and every failure path degrades
	// to a plain live call.
	EmbedMemoEnabled *bool `json:"embed_memo_enabled,omitempty"`
	// EmbedMemoPath is the bbolt store. Default <base>/embed-memo.db. Empty
	// disables the memo as surely as the flag does.
	EmbedMemoPath string `json:"embed_memo_path,omitempty"`
	// EmbedMemoMaxEntries bounds the store; the oldest entries by insertion order
	// are pruned back to 90% of the cap when it is exceeded.
	//
	// SIZING, measured rather than derived: a 768-dim float64 vector is ~6 KB of
	// payload, but bbolt costs ~12.8 KB per entry once fill factor and overflow
	// pages are counted — so the 50000 default is roughly **640 MB**, not the
	// ~300 MB the payload arithmetic suggests. bbolt also never shrinks the file
	// after a prune, so that is a high-water mark. 0 = unbounded.
	EmbedMemoMaxEntries int `json:"embed_memo_max_entries,omitempty"`
	// EmbedMemoEpoch is the manual invalidation lever. The memo key already binds
	// the embedder ID, so switching embedders can never serve stale vectors — but
	// a re-quantized or re-trained model republished under the SAME id is
	// invisible at this layer. Bump this string in that case and every prior
	// entry becomes unreachable. Normally "".
	EmbedMemoEpoch string `json:"embed_memo_epoch,omitempty"`
	// --- explicit remote NIM tool (`nim` subcommand / offload_nim) ---
	// An opt-in path to an OpenAI-compatible NVIDIA NIM endpoint, separate from the
	// local cascade: the GBNF grammar path and the savings ledger are untouched.
	// NIMEndpoint is the base (with the /v1 segment): NVIDIA's hosted API by
	// default, or a self-hosted NIM container (e.g. http://127.0.0.1:8000/v1).
	NIMEndpoint string `json:"nim_endpoint,omitempty"`
	// NIMModel is the default model id (override per call with --model). The hosted
	// catalog has dozens of free endpoints — browse with `nim --list-models`.
	NIMModel string `json:"nim_model,omitempty"`
	// NIMMaxTokens caps a nim completion when the caller sets none. Reasoning models
	// need headroom (they spend tokens thinking before answering). Default 1024.
	NIMMaxTokens int `json:"nim_max_tokens,omitempty"`
	// NIMTimeoutSec bounds one nim call (large hosted models can be slow). Default 120.
	NIMTimeoutSec int `json:"nim_timeout_sec,omitempty"`
	// NIMBases lists the extra bases an offload_nim call may name besides NVIDIA's
	// hosted hosts and nim_endpoint: self-hosted NIMs on loopback, the LAN or the
	// tailnet (security standard L5, ADR 0067). Compared by scheme, host and port,
	// with each entry's path as a prefix.
	NIMBases []string `json:"nim_bases,omitempty"`
	// NIMBasePolicy is what happens when offload_nim is called with a base outside
	// that allowlist: "audit" (the default — the call runs, the result says it
	// would be refused, and a would-refuse row is appended to
	// <state_dir>/nim-base-audit.jsonl) or "enforce" (the call is deferred before
	// any request leaves). Promotion from audit to enforce follows ADR 0067:
	// counted would-refuses first.
	NIMBasePolicy string `json:"nim_base_policy,omitempty"`
	// NOTE: the NIM API key is deliberately NOT a config field — it is read from the
	// NVIDIA_API_KEY (or NGC_API_KEY) env var so a secret never lands in a tracked
	// config file or the public repo. A self-hosted NIM needs no key.
	// --- accelerators (ADR 0024): devices that ride BESIDE the GPU tier ---
	// Accelerators lists the additive accelerator ids present on this box
	// ("hailo-8l", "coral-edgetpu", "rknpu"). `profile` stays the one GPU tier; an empty list is
	// byte-identical to a box with no accelerator — tools/list does not change.
	Accelerators []string `json:"accelerators,omitempty"`
	// FleetAccelerators lists accelerator ids this box does NOT carry but may
	// reach over the fleet (Coral design Phase B, 0.115.0): each id's tools
	// register locally and forward to the first delegate_remotes node whose
	// /fleet/health lists the id, the image travelling inside the job (cap
	// 8 MiB). Explicit opt-in keeps tools/list byte-identical for a box that
	// declares nothing; a local device wins over a remote one for the same
	// capability name unless AcceleratorToolOwners names the remote one. A local-only
	// device (hailo-8l, register E-08) is never served over the fleet: listing it here
	// is a doctor finding and a startup warning, and its forwarded calls could only defer.
	FleetAccelerators []string `json:"fleet_accelerators,omitempty"`
	// AcceleratorToolOwners names the device that serves a shared accelerator
	// tool, by tool name: {"offload_object_detect": "rknpu"} (ADR 0068). It
	// overrides the first-listed rule (ADR 0037) for that name only; every
	// other name still goes to the first listed owner. An entry applies only
	// when the device is listed in accelerators or fleet_accelerators and its
	// table has that tool — otherwise it is ignored (the MCP server logs it at
	// startup) and the first-listed rule decides, so a typo never removes a
	// tool. Keys and values are compared with spaces trimmed.
	AcceleratorToolOwners map[string]string `json:"accelerator_tool_owners,omitempty"`
	// HailoEndpoint is the loopback HTTP sidecar base (server/http_server.py in
	// the Hailo repo). Loopback only — the sidecar is not an authenticated service.
	HailoEndpoint string `json:"hailo_endpoint,omitempty"`
	// HailoSidecarCmd launches the sidecar on demand (hailo-http.cmd). Empty =
	// never spawn: the harness expects something else to have started it and
	// defers when /health is unreachable.
	HailoSidecarCmd string `json:"hailo_sidecar_cmd,omitempty"`
	// HailoTimeoutSec bounds one NPU call (cold HEF load is ~1-8 s). Default 60.
	HailoTimeoutSec int `json:"hailo_timeout_sec,omitempty"`
	// HailoIdleSec is passed to the sidecar as its self-exit idle window. Default 300.
	HailoIdleSec int `json:"hailo_idle_sec,omitempty"`
	// CoralEndpoint is the Coral Edge TPU sidecar base (accelerators/coral/server.py),
	// loopback only, port 18814 so a box carrying both devices never collides with
	// the Hailo's 18813. Inert while Accelerators lacks "coral-edgetpu" (Coral D3).
	CoralEndpoint string `json:"coral_endpoint,omitempty"`
	// CoralSidecarCmd launches the Coral sidecar on demand (coral-http.sh). Empty =
	// never spawn; the harness defers when /health is unreachable.
	CoralSidecarCmd string `json:"coral_sidecar_cmd,omitempty"`
	// CoralTimeoutSec bounds one Edge TPU call. A cold model load on the TPU is
	// ~0.5-2 s (the 60 s Hailo figure is HEF-load driven), so 30 is ample. Default 30.
	CoralTimeoutSec int `json:"coral_timeout_sec,omitempty"`
	// CoralIdleSec is passed to the sidecar as its self-exit idle window. Default 300.
	CoralIdleSec int `json:"coral_idle_sec,omitempty"`
	// RknpuEndpoint is the Rockchip RK3588 NPU sidecar base (accelerators/rknpu/server.py),
	// loopback only, port 18815 so a box carrying several devices never collides with the
	// Hailo's 18813 or the Coral's 18814. Inert while Accelerators lacks "rknpu".
	RknpuEndpoint string `json:"rknpu_endpoint,omitempty"`
	// RknpuSidecarCmd launches the RKNPU sidecar on demand (rknpu-http.sh). Empty =
	// never spawn; the harness defers when /health is unreachable.
	RknpuSidecarCmd string `json:"rknpu_sidecar_cmd,omitempty"`
	// RknpuTimeoutSec bounds one RKNPU call. The NPU itself answers in milliseconds, but a
	// cold call also pays the RKNN runtime init and the model load, so 60 is ample. It must
	// stay under accelremote.Budget less the 45 s cold-spawn window: a forwarded call is
	// cut off at the Budget whatever this says. Default 60.
	RknpuTimeoutSec int `json:"rknpu_timeout_sec,omitempty"`
	// RknpuIdleSec is passed to the sidecar as its self-exit idle window, which is also how
	// long its resident models keep their RAM (the NPU shares system memory). Default 300.
	RknpuIdleSec int `json:"rknpu_idle_sec,omitempty"`
	// --- fleet-node server (`fleet-serve` / `fleet-measure`; docs/FLEET-NODE.md) ---
	// FleetListen is the fleet-serve bind address. Loopback by default; the
	// production binding is the machine's TAILSCALE address behind
	// --listen-trusted-network (never 0.0.0.0). Port 18811 — the dispatcher
	// owns 18810.
	FleetListen string `json:"fleet_listen,omitempty"`
	// FleetNodeID names this node in /fleet/health. Empty = the OS hostname,
	// resolved at serve time (so a shared config never bakes one box's name).
	// fleet-serve's --node-id flag overrides it, and the id fleet-serve resolves
	// is applied to the config its pipeline reads, so the result envelope, health
	// and the queue claim carry one id.
	FleetNodeID string `json:"fleet_node_id,omitempty"`
	// FleetMaxQueueDepth caps how many jobs this node will hold in
	// accepted/running at once — i.e. it is the ceiling on health's
	// `queue_depth` field, which counts exactly those two states. A NEW
	// dispatch beyond it is refused 503. 0 = the built-in default (2x
	// FleetConcurrencyLimit — see FleetQueueLimit); negative = unlimited (the
	// pre-cap behavior).
	//
	// 0.100.0 SPLIT NOTE — this key's meaning is UNCHANGED, but what it is
	// no longer doing matters. Before 0.100.0 a job started executing the
	// instant it was accepted, so "accepted+running" and "executing right
	// now" were the same number and this one key silently did two jobs: it
	// bounded the backlog AND the concurrency. Admitted jobs now WAIT in
	// `accepted` for a bounded worker pool, so concurrency has its own key
	// (FleetMaxConcurrentJobs) and this one keeps only the meaning its name,
	// its old doc comment and the health field it caps all already stated.
	// The refusal boundary is byte-identical to 0.99.0's; actual concurrency
	// under any setting of this key is now less than or equal to what it was.
	//
	// The default is deliberately GENEROUS: normal use rarely touches it (a full
	// agent_delegate call is 8 subtasks, and since ADR 0076 a call runs as many at
	// once as its deal committed to each node, so a node is sent its whole share at
	// once), so it bites on a pile-up across concurrent delegators — the
	// measured failure mode here was unbounded queue LATENCY behind the single
	// llama-swap slot, not a crash. An over-tight cap is the worse defect: this
	// fleet's history includes written limits quietly suppressing real use.
	// Enforced at ack time before any request materialization; re-acks of jobs
	// this node already owns and result polls are never refused by it.
	FleetMaxQueueDepth int `json:"fleet_max_queue_depth,omitempty"`
	// FleetMaxConcurrentJobs caps how many ADMITTED jobs execute at the same
	// time (0.100.0). This is the limit that protects the shared llama-swap
	// endpoint and the single GPU behind it: jobs beyond it are admitted and
	// WAIT in `accepted` until a worker frees, they are never refused — that
	// is FleetMaxQueueDepth's job. 0 = the built-in default (4); negative =
	// unlimited (goroutine-per-job, the pre-0.100.0 execution behaviour).
	//
	// The default is 4 because that is what this fleet actually runs: the
	// delegator used to dispatch a fan-out four subtasks at a time, and since
	// ADR 0076 it deals a node at most the headroom this ceiling publishes, so 4
	// preserves the observed steady state while bounding the pathological one
	// the split exists to kill (a node at "depth 31" was 31 simultaneous
	// inferences against ONE llama-swap slot). A job that waits is strictly
	// better than a job that thrashes: nothing is refused that 0.99.0 admitted.
	FleetMaxConcurrentJobs int `json:"fleet_max_concurrent_jobs,omitempty"`
	// FleetBusyLeaseSec (0.113.27) is how much REMAINING time on this node's
	// GPU lease makes the node a non-target for fleet work, whatever the
	// lease's class. Before it, only a TEXT lease refused, so the harness's
	// LONGEST job class — a media render, and anything else that takes the
	// media lease, up to a multi-hour training run — left the node publishing
	// idle slots while its card was gone, and placement routed work TOWARD it
	// (2026-09-07 audit).
	//
	// It is a DURATION rule, not a class rule, because that is the real
	// distinction: a 20-second render must not refuse, a six-hour reservation
	// must. 0 or unset uses FleetBusyLeaseSecDefault (120); negative disables
	// the rule and restores the text-only behaviour.
	FleetBusyLeaseSec int `json:"fleet_busy_lease_sec,omitempty"`
	// FleetPollLeaseSec (ADR 0064) is how long a job a delegator PUSHED to this
	// node may sit `accepted` with nobody polling it before the node treats its
	// delegator as gone: the job is never started, it is reaped (terminal, with a
	// reason a late poller can read), and a run that finishes after its poller
	// left stops feeding recent_agent_wall_sec and the Retry-After built from it.
	// Only `accepted` jobs are ever reaped — a running job is never touched, so a
	// delegator's recovery pass can still collect it — and only agent jobs pushed
	// by a dispatch (a pulled queue job's result travels by ack; media and vision
	// pollers are other clients).
	//
	// 0 or unset uses FleetPollLeaseSecDefault (60); negative turns the rule off
	// (nothing is reaped or discounted: the behaviour before ADR 0064). A positive value
	// under FleetPollLeaseSecFloor is raised to it: the delegator's own gap between
	// polls (a 12 s long poll plus a few seconds of sleep) must fit inside the
	// lease, or a job that IS being polled could be reaped. See FleetPollLease.
	FleetPollLeaseSec int `json:"fleet_poll_lease_sec,omitempty"`
	// FleetStoreRoot is a persistent KV page store this node OWNS ON DISK and
	// keeps under a budget between its turns (0.113.16, store steward): the
	// LMCache fs_native pages the production seat writes over SMB into a
	// dataset here. LMCache evicts only what the running MP server wrote and
	// the seat wrapper prunes at seat start only, so under real fan-out the
	// store filled 28 → 99 GB against a 100 GB quota in 75 minutes (2026-09-06)
	// — and a ZFS dataset at its quota can refuse the deletes that would free
	// it. Empty = no steward. The node scans the root after every
	// FleetStorePruneEveryJobs completed jobs and on any health poll that finds
	// it above 95 % of its cap, and prunes oldest-first (mtime) to 85 %.
	// cap = min(FleetStoreCapGB, 0.8 × (used + free on the volume)).
	FleetStoreRoot string `json:"fleet_store_root,omitempty"`
	// FleetStoreCapGB is the operator's ceiling on the store, decimal GB;
	// 0 = the volume rule alone (80 % of used + free).
	FleetStoreCapGB float64 `json:"fleet_store_cap_gb,omitempty"`
	// FleetStorePruneEveryJobs is how many completed jobs pass between store
	// scans; 0 = 8 (one spread).
	FleetStorePruneEveryJobs int `json:"fleet_store_prune_every_jobs,omitempty"`
	// FleetStorePruneEverySec is a TIME tick beside the job tick (0.130.1, register
	// B-48/B-16): under a GPU lease no fleet job completes on this node while a
	// bench arm or the pair seat writes pages at ~1 GB/min, so the job tick never
	// fires — measured 2026-09-18: the steward ticked at 20:26 and the dataset
	// went 53 → 71 GB (its quota, ENOSPC) by 20:54 with no tick between. The scan
	// is a directory walk plus one statfs and prunes only above the high mark, so
	// a minute is cheap. 0 = 60; negative disables the time tick.
	FleetStorePruneEverySec int `json:"fleet_store_prune_every_sec,omitempty"`
	// ServingConfigPath is the rendered llama-swap config this node actually
	// serves (K-02). It is a PATH and not a derived default because no default
	// is right: every node in this fleet keeps it somewhere else (a top-level
	// llama-swap directory on one Windows box, the install-root stack directory
	// on another, a service etc/ directory on the Linux node), and a guess that
	// landed on the wrong file would publish some other config's provenance as
	// this node's.
	//
	// Set, /fleet/health publishes serving_config_spec_sha256 and
	// serving_config_state so a fleet-wide staleness check is one poll instead of
	// three ssh sessions. Empty, both fields are OMITTED -- a reader can then tell
	// "this node does not report" from "this node reports nothing wrong", which a
	// published empty string could not.
	//
	// The node only READS it. Nothing in the harness rewrites a live serving
	// config; re-rendering is `install render`, run by a human.
	//
	// It is also where a model that `layers` do not declare is placed: the env
	// CUDA_VISIBLE_DEVICES of its entry names its card, which the GPU lease's
	// unload list (register F15) and the load gate (register C-86a, ModelPins) read
	// through internal/servingcfg, so that a lease on one card leaves the seats on
	// the others alone. Unset, unreadable or not listing the model, the model is on
	// every card and a lease fences it, as it always did.
	ServingConfigPath string `json:"serving_config_path,omitempty"`
	// FleetQueueHost — Option B, ADR 0030, DARK by default: when true THIS
	// node's fleet server also hosts the consolidated pull queue (durable
	// bbolt store at <state-root>/fleet-queue.db + the /fleet/queue/* routes).
	// One node per fleet hosts; the always-on box is the intended holder.
	FleetQueueHost bool `json:"fleet_queue_host,omitempty"`
	// FleetQueueHolder is the holder's base URL (e.g. http://node-b:18793).
	// Non-empty enables queue participation: delegators may submit with
	// route:"queue", and a node that also sets FleetQueueClaim pulls eligible
	// work from it. Tailnet-vetted at load like every fleet URL; empty = the
	// whole Option B surface is inert (the shipped default).
	FleetQueueHolder string `json:"fleet_queue_holder,omitempty"`
	// FleetQueueClaim starts this node's claim loop against FleetQueueHolder.
	FleetQueueClaim bool `json:"fleet_queue_claim,omitempty"`
	// FleetAuthToken, when non-empty, bearer-gates EVERY lane of the node: a
	// dispatch of any task type (agent, vision, text, stt, the media tasks and
	// run-graph, the project, media-job and relay doors), the poll and withdraw
	// of any job, and the read of any rendered artifact require
	// `Authorization: Bearer <token>` (constant-time compared); 401 without it.
	// /fleet/health and the jobs feed answer without it, with their private
	// fields withheld. Empty (the default) = open on a LOOPBACK listener only
	// (the local trust boundary); on any other listener every request is
	// refused with 403, and fleet-serve will not start so. The SAME value goes
	// on every node and in every delegator's config: roll delegators out first
	// (they already send it whenever it is set), nodes after.
	FleetAuthToken string `json:"fleet_auth_token,omitempty"`
	// FleetComposeProjects (ADR 0071) opens this node's project-bundle door, POST
	// /fleet/compose-project: a holder of the fleet token sends a whole HyperFrames
	// project — trusted code HyperFrames' Chrome runs without a sandbox — which the
	// node extracts into a fresh directory, confines to itself and renders. Off unless
	// set, and never open on a node without fleet_auth_token or a bound compose route
	// (ComposeProjectsAdmissible).
	FleetComposeProjects bool `json:"fleet_compose_projects,omitempty"`
	// FleetComposeBundleMaxMB caps one project bundle as sent (gzip-compressed), MiB; 0 = 64.
	FleetComposeBundleMaxMB int `json:"fleet_compose_bundle_max_mb,omitempty"`
	// FleetMediaInputs (ADR 0077) opens this node's media-job door, POST /fleet/media-job: a
	// holder of the fleet token sends ONE image, video, animation, audio or ComfyUI-graph job
	// together with the input files it reads (a still, a reference image, a driver video, a voice
	// clone sample), which the node extracts into a fresh directory, sniffs by magic bytes and
	// renders from. Off unless set, and never open on a node without fleet_auth_token or a bound
	// media task (MediaInputsAdmissible).
	FleetMediaInputs bool `json:"fleet_media_inputs,omitempty"`
	// FleetMediaInputsMaxMB caps one media-job bundle as sent (gzip-compressed), MiB; 0 = 256. The node
	// holds the request body (base64, a third larger) and the decoded bundle at the same moment while it
	// admits a job, so the default is sized to keep that peak under about 0.6 GiB; the door takes one body
	// at a time (mediaJobInFlightMax), so that is the door's whole peak, and raising the cap raises it by
	// that much and a third again. Raise it for a node with the RAM and a driver video that needs it.
	FleetMediaInputsMaxMB int `json:"fleet_media_inputs_max_mb,omitempty"`
	// FleetSTTUploadMaxMB caps one audio upload to POST /fleet/stt (the stt upload door, ADR 0072),
	// MiB of decoded audio; 0 = 48. The request body is that cap in base64 (64 MiB at the default) plus
	// slack, and 48 MiB is about 4.6 h of the 32 kbps Opus an asker sends. Published in health
	// (stt_upload_max_mb) so an asker never sends a file the node would refuse.
	FleetSTTUploadMaxMB int `json:"fleet_stt_upload_max_mb,omitempty"`
	// FleetSTTTranscriptTTLMin is how long a node keeps the transcript files (.srt, .txt,
	// .segments.json) of an stt upload job under media_dir, minutes; 0 = 30, negative = keep them for
	// good. They are removed when the job record is evicted or once this old, swept at fleet-serve
	// start and on the job store's janitor tick; /fleet/media serves them only to a bearer holder
	// while they last (ADR 0072). The asker fetches the segment list within seconds of the job
	// finishing, so the default is generous.
	FleetSTTTranscriptTTLMin int `json:"fleet_stt_transcript_ttl_min,omitempty"`
	// FleetSTTMaxConcurrent caps how many fleet stt jobs run at once on this node, the legacy
	// path-taking lane and the upload door counted together; 0 = 1. Whisper is one single-slot
	// upstream: a job over the cap waits its turn in arrival order and is never refused. Inference
	// itself stays serialized by the whisper client's process-wide mutex whatever this says, so a
	// value above 1 only overlaps the jobs' ffmpeg conversions and queue time.
	FleetSTTMaxConcurrent int `json:"fleet_stt_max_concurrent,omitempty"`
	// KVSlotCapGiB bounds the node's kvslots/ directory (ADR 0056 Layer 2); 0 = 8 GiB.
	KVSlotCapGiB int `json:"kvslot_cap_gib,omitempty"`
	// FleetAgentEnabled opts this NODE into executing fleet "agent" tasks
	// (docs/specs/2026-08-16-multi-node-agent-delegation.md). Default false:
	// the agent lane runs a coding-agent loop on caller-supplied contracts, so
	// a node advertises and accepts that work only when the operator turns it
	// on — capability is derived from bindings everywhere else in the fleet,
	// but THIS one is an explicit switch because the binding (an agent seat)
	// exists on every tier while the ROLE (sub-agent worker) is a per-box
	// decision.
	FleetAgentEnabled bool `json:"fleet_agent_enabled,omitempty"`
	// AgentDelegationEnabled opts the DELEGATOR side in: it gates the
	// agent_delegate MCP tool's registration (tools/list stays byte-identical
	// when off) and the delegate CLI verb's willingness to place work.
	// Default false. Distinct from FleetAgentEnabled deliberately — a box can
	// be a worker without being a delegator and vice versa.
	AgentDelegationEnabled bool `json:"agent_delegation_enabled,omitempty"`
	// ToolsSchemaProfile picks how much of each MCP tool's prose tools/list carries: "full" (the
	// default, and what an unset key means) advertises every description and parameter description as written;
	// "compact" keeps every tool, every parameter name, type, enum and required entry (so every call that is
	// valid under "full" is valid under "compact") but cuts each description to its first sentence plus the
	// sentences a reviewed per-tool keep-list names (prohibitions, trust and privacy boundaries, cost rules, the
	// deferred-and-do-it-yourself protocol of every lane, acceptance-authoring rules; internal/mcpserver/toolsprofile_keep.go),
	// and drops examples. It exists for clients that send every tool schema up front on every call and have no deferred
	// tool search (opencode): a smaller schema is prompt tokens back on a small context window. The registered
	// schema, the handlers and the call-time validation are unchanged; only the advertised list is rewritten.
	// An unknown value fails the load; a hand-built Config with one reads as "full", never as a silent shrink.
	// The profile is read once, when the MCP server is built (the rewrite is a middleware installed at that moment), so
	// changing it takes an MCP server restart or a client reconnect, which starts a new server process.
	ToolsSchemaProfile string `json:"tools_schema_profile,omitempty"`
	// DelegateRemotes are the fleet node base URLs (tailnet-only, e.g.
	// "http://node-b:18811") the delegator considers when a call passes no
	// remotes of its own. Durable fleet membership belongs in config, not in every
	// agent_delegate call: measured 2026-08-21, a delegator whose remotes lived
	// only in the per-call argument ran every fan-out on one box. A call's own
	// remotes argument REPLACES this list (it does not merge) so a caller can
	// still target one node deliberately.
	DelegateRemotes []string `json:"delegate_remotes,omitempty"`
	// DelegateRemoteClasses declares the DATA CLASS of a fleet node (register SF-40), keyed by the node's base URL
	// exactly as delegate_remotes lists it (compared without case or a trailing slash). A node that is not
	// listed is "private-ok": it may be placed any contract, which is how every node behaved before this key. A node
	// listed as "public" is one whose operator is not this box's operator (a node shared into the tailnet by another
	// account): it is placed public-data work only, the page digests of offload_research and the fleet-smoke probe,
	// and never a contract that carries a context document, a diff or a goal an agent_delegate caller typed, because
	// whatever a contract holds is readable by the node's admin. A private contract is ineligible for such a node on
	// every placement route (auto, spread, remote, a retry, a replacement); a contract pinned route "remote" with
	// only public nodes eligible defers, naming the rule, and the exclusion is recorded in the placement reason.
	// Values: "public" or "private-ok"; any other value, and any key that is not a delegate_remotes entry, fails the
	// load by name, because a typo here would otherwise read as "private-ok" and send private work out. Like
	// delegate_remotes it is read once per process: restart the MCP server after changing it.
	DelegateRemoteClasses map[string]string `json:"delegate_remote_classes,omitempty"`
	// RetiredKeys are the retired config keys the FILE this value was loaded
	// from still carries, sorted. Never serialized: it describes the file, not
	// the settings. Load fills it from the raw bytes so `doctor` can print one
	// row per key — until now the only signal was a single stderr note at
	// startup, which nobody is reading when they run doctor to find out why a
	// media call blocked for twenty minutes (register S-42).
	RetiredKeys []string `json:"-"`
	// FleetSampler selects the per-render VRAM footprint source: "auto" (PDH
	// per-process tree on Windows, nvidia-smi global-delta elsewhere),
	// "pdh-shared" (J3: the tree summing Dedicated+Shared — REQUIRED on UMA
	// iGPUs like the amd-rdna3 tier, where allocations land in Shared and the
	// Dedicated counter reads ~0; the amd-rdna3 config_seed sets it), "pdh"
	// (force the Dedicated tree sampler), "global" (force global-delta — set this when
	// the FLEET-NODE.md Afterburner validation shows PDH disagreeing >15%).
	FleetSampler string `json:"fleet_sampler,omitempty"`
	// PrimaryGPUUUID pins /fleet/health's headline vram_total_gb/vram_free_gb to
	// ONE specific card by its stable nvidia-smi UUID, overriding the default
	// largest-total-VRAM rule (fleetnode.HeadlineDevice). Canonical guidance
	// (CMP tier notes): pin by GPU UUID, NEVER index — nvidia-smi's own
	// enumeration index, CUDA's device order (CUDA_DEVICE_ORDER=FASTEST_FIRST),
	// and raw total VRAM can all disagree about which card is "the" compute
	// card, and cards can change PCI slots across a reboot/reseat (verified
	// live on <node-b>: nvidia-smi index 0 is the RTX 5060 Ti while ComfyUI's CUDA
	// ordering binds cuda:0 to the RTX 5070 Ti at index 1; the two cards also
	// can't be told apart by total VRAM — 16311 vs 16303 MiB, a same-SKU-size
	// near-tie). The UUID is the only identifier stable across all of that.
	// Read the UUIDs straight off a running node's /fleet/health gpu_devices[]
	// to fill this in — gpu_devices[] is ALWAYS present for a nvidia-smi node
	// (single-GPU boxes included; there is no single-GPU special case, see
	// main.go's chooseSamplerKind). "" (default) = the largest-total rule,
	// unchanged. Set but not found among the parsed devices = the same
	// fallback PLUS one stderr warning (never a silent revert to guessing —
	// that would hide a typo'd UUID or an actually-removed card forever).
	// Trimmed of surrounding whitespace at Load (a copy-paste from a terminal
	// can carry a trailing newline) and matched case-insensitively
	// (fleetnode.SelectHeadlineDevice) — an operator's copy of the UUID should
	// never fail to match over incidental formatting. No FUNCTIONAL effect on
	// a single-GPU nvidia-smi node beyond confirming what's already true (its
	// one device is already the headline); no effect at all on a
	// windows-generic node, which has no gpu_devices[] to match against.
	PrimaryGPUUUID string `json:"primary_gpu_uuid,omitempty"`
	// UMAReserveGiB is the RAM a unified-memory SoC node (the rockchip-rk3588 tier)
	// holds back from inference for the box's own workload. Such a box has no VRAM —
	// its GPU and NPU allocate from the same RAM as everything else — so
	// /fleet/health advertises MemTotal minus this reserve as capacity and
	// MemAvailable minus it as free (fleetnode.MeminfoUMAProbe). The tier seeds 3,
	// for a board that also runs a home-automation stack. 0 (the default) reserves
	// nothing and advertises all of RAM. Inert on every other tier, which reads a real
	// VRAM counter. A reserve that leaves no capacity fails the probe, so fleet-serve
	// refuses to start rather than advertise a node with nothing to give; a negative
	// one is refused by name.
	UMAReserveGiB float64 `json:"uma_reserve_gib,omitempty"`
	// --- config-driven pipeline jobs (Task 4: fleet-node "pipeline job" task family) ---
	// Pipelines maps a task_type name (e.g. "scene-swap") to the externally-
	// provided CLI that serves it — see PipelineSpec. Empty/nil = this box
	// serves NO pipeline routes (opt-in per box, exactly like ImageGenScript):
	// a shared config file must never bind every node to a pipeline CLI that
	// only exists on one machine. Every entry is validated at Load() time (a
	// bad entry fails at startup, never silently at dispatch) — see
	// validatePipelines. Example entry:
	//
	//	"pipelines": {
	//	  "scene-swap": {
	//	    "script": "D:/pipelines/creative-marketing-pipelines/scripts/run-scene-swap.mjs",
	//	    "workdir": "D:/pipelines/creative-marketing-pipelines",
	//	    "timeout_sec": 2400,
	//	    "artifacts": ["final.png", "qa-report.json"],
	//	    "max_ref_mb": 24
	//	  }
	//	}
	Pipelines map[string]PipelineSpec `json:"pipelines,omitempty"`
	// contains filtered or unexported fields
}

Config controls endpoint, model, thresholds, and storage paths.

func CompositeFixture added in v0.206.0

func CompositeFixture() Config

CompositeFixture is the reference composite box every placement test reasons about: four layers with the measured footprints and windows. Shared across packages so the table, the delegate, the pipeline and the status tests all see one box; never consulted at runtime.

It declares one layer the SHIPPED tier table does not: the three-card `triple` layer, whose only seat (qwen3.8-flash-next-262k) parked 28-32 expert layers in host RAM and was removed by the 2026-09-10 operator rule that RAM is overflow only. The fixture keeps it because the TABLE still serves that shape — a guarded, host-RAM-bearing, display-card-spanning layer is exactly what the display_floor / host_ram / presence guards exist for, and the day a three-card seat fits inside VRAM the tier declares one again. Tests that assert what the box SHIPS read profiles.json, not this.

func Default

func Default() Config

func FlagshipFixture added in v0.206.0

func FlagshipFixture() Config

FlagshipFixture is CompositeFixture as the operator ordered the flagship on 2026-09-19: "the 3 card tier as the agent seat now and the 2 card tier to be the opt in one". The triple layer carries the AGENT seat (the pipeline seat spanning every card) and is not opt-in; the pair keeps its seats but is entered by name only; the single layer holds the one-card seats (the router and agent on card 0, the vision-OCR seat on card 2); the display layer stays dormant. It is the box the consumers of card-scoped leases reason about: a lease on card 2 fences the flagship, the pair and the card-2 seat, and leaves the card-0 seats alone. Never consulted at runtime.

func Load

func Load(path string) (Config, error)

Load merges a JSON config file over the defaults. Missing file => defaults. A leading "~/" in any path-typed field is expanded to the user home dir (LO-4: config.example.json ships "~/.local-offload/..." paths that were previously taken literally, silently creating a "~" directory in the cwd).

A config returned WITH an error never carries the composite keys (ADR 0052): LoadWithSource hands the value to every subcommand whatever the error, so the layers are stripped here, in the wrapper, for the same reason the GPU gate is armed in one — no exit path (decode, any validator, the fleet_queue_holder check) can hand a placeable layer to a caller that proceeds on the value.

func (Config) AgentContextCapBytes added in v0.206.0

func (c Config) AgentContextCapBytes() int

AgentContextCapBytes is the inline-context cap every agent door validates a contract against. On a plain box it is core.AgentContextMaxBytes (256 KiB) unchanged; on a composite box it scales with the largest declared seat window (ctx_tokens × 3 at chars/3, capped at 2 MiB) — at 256 KiB a contract estimates ~87k tokens and a 163,840 window can never overflow, so without this both long seats would be dead code. A composite box whose seats declare no window (refused by ValidateLayers, but defended here) keeps the plain cap.

func (Config) AgentModelShadowNote added in v0.206.0

func (c Config) AgentModelShadowNote() string

AgentModelShadowNote says when agent_model is NOT the seat a run will use, and "" when it is (or may be). On a box that declares layers the placement table picks the agent seat from them; agent_model only applies when a decision names no seat (register C-95). So a config that sets agent_model to a model none of its layers serves — typically a copy repointed at a scratch engine that kept the original `layers` — still sends every placed run to a layer seat, and the roster defer names a seat the operator never wrote there. The note is the one place that precedence is spoken in the operator's terms.

func (Config) AgentPlannerModel added in v0.206.0

func (c Config) AgentPlannerModel(explicit string) string

AgentPlannerModel resolves the coding agent's planner seat. Precedence: an explicit per-call/per-flag override > the configured AgentModel seat > the workhorse Model. The chain is resolved at call time, never persisted — an unset seat keeps following Model wherever Model goes.

func (Config) AgentTaskProfile added in v0.206.0

func (c Config) AgentTaskProfile(explicit string) string

AgentTaskProfile resolves the agent loop's TOOL PROFILE for a call that named none. Precedence mirrors AgentPlannerModel: an explicit per-call/per-flag value > the configured AgentProfile > "general". Resolved at call time, never persisted.

Returning the literal "general" rather than "" keeps the caller honest: every front door then hands a real profile name to agent.LookupProfile, so an unknown configured value fails by NAME instead of silently degrading to the un-narrowed set that was measured to score 0% on a small seat.

func (Config) AnimateGenBound added in v0.206.0

func (c Config) AnimateGenBound() bool

AnimateGenBound: animategen_script, or animategen_engine sdcpp.

func (Config) AudiocppMusicFamilyName added in v0.206.0

func (c Config) AudiocppMusicFamilyName() string

func (Config) AudiocppVoiceFamilyName added in v0.206.0

func (c Config) AudiocppVoiceFamilyName() string

AudiocppVoiceFamilyName / AudiocppMusicFamilyName are the audio.cpp --family values, with the verified defaults applied.

func (Config) AuditAllDoorsMode added in v0.206.0

func (c Config) AuditAllDoorsMode() string

AuditAllDoorsMode resolves audit_all_doors to "off", "warn" or "enforce"; an unset key is off. An unknown value comes back as written (trimmed, lower-cased), never as off: a one-shot verb keeps going after a config load error, and a mistyped "enforce" must make the door refuse (agent.DoorAudit), not run with no trail.

func (Config) BaseDir added in v0.206.0

func (c Config) BaseDir() string

BaseDir returns this node's resolved install root: c.Home when set, else DefaultBase() ($LOCAL_OFFLOAD_HOME, else ~/.local-offload) — the same root Default()'s derived paths (media, cache, ledger, ...) hang off. Added for Task 6 (pipeline-job materialization, internal/fleetnode buildPipelineJob): a job's working tree lives at BaseDir()/pipeline-jobs/<job-id>, beside every other harness-owned state rather than inventing a second root.

func (Config) BrowseActivateTabIgnored added in v0.206.0

func (c Config) BrowseActivateTabIgnored() bool

BrowseActivateTabIgnored reports a browse_activate_tab that is set but has no effect because there is no dedicated endpoint to honour it against. The lane is not failed for it; status and the load warning say so.

func (Config) BrowseActivateTabIgnoredNote added in v0.206.0

func (c Config) BrowseActivateTabIgnoredNote() string

BrowseActivateTabIgnoredNote is the one sentence status and the load warning share. It names the reason that applies: no browse_cdp_url at all, or one the lane refuses (the lane is then unregistered, and the load says so in its own warning).

func (Config) BrowseConfigured added in v0.206.0

func (c Config) BrowseConfigured() bool

BrowseConfigured reports whether THIS box serves the browse lane: the sidecar interpreter, the runner and a loopback decision endpoint are ALL bound, and a browse_cdp_url, when set, is a loopback endpoint (fail closed: a refused one leaves the lane unregistered rather than silently falling back to discovery). One predicate for the MCP registration, the pipeline gate and the agent doors.

func (Config) CallDeadline added in v0.206.0

func (c Config) CallDeadline() time.Duration

CallDeadline resolves AgentCallDeadlineSec: 0 → DefaultCallDeadlineSec, negative → 0 meaning "no whole-call deadline", positive → that many seconds.

func (Config) CascadeSeatGuardOn added in v0.206.0

func (c Config) CascadeSeatGuardOn() bool

CascadeSeatGuardOn reports whether the cascade seat guard runs: on unless cascade_seat_guard is explicitly false. It is inert anyway on a box that declares no vllm_seats — there is no seat to protect.

func (Config) CoherenceProbe added in v0.206.0

func (c Config) CoherenceProbe() string

CoherenceProbe resolves this box's post-warm coherence-probe policy to one of "cold", "off" or "always". An unset key is "cold"; an unknown value cannot reach here through Load (validateCoherenceProbe refuses it), and an in-process Config built by hand falls back to the default rather than skipping the probe.

func (Config) ComposeProjectsAdmissible added in v0.206.0

func (c Config) ComposeProjectsAdmissible() bool

ComposeProjectsAdmissible reports whether THIS node's project-bundle door is open (ADR 0071): the operator opted in, the node holds a fleet token for the door to check, and the composition lane is bound. One predicate for the route, the fleet advertisement and admission, so no door is ever open without a token.

func (Config) ComposeRouteConfigured added in v0.206.0

func (c Config) ComposeRouteConfigured() bool

ComposeRouteConfigured reports whether THIS box serves compose_video: the runner, the HyperFrames install and the browser are ALL bound. One predicate for the pipeline gate and the fleet advertisement, so health never promises a composition lane dispatch would defer.

func (Config) Composite added in v0.206.0

func (c Config) Composite() bool

Composite reports whether this box declares device layers (ADR 0052). It is THE gate every new surface keys on: a false here means every result, health row, status view and ledger entry is byte-identical to the pre-layer build.

func (Config) DeclaresUnconstrainedSeat added in v0.206.0

func (c Config) DeclaresUnconstrainedSeat(id string) bool

DeclaresUnconstrainedSeat reports whether `unconstrained_seats` names id: the box's own answer to "can this seat's runtime constrain decoding?". Matched case-insensitively for the same reason as DeclaresVLLMSeat (llama-swap resolves seat names that way). Empty = every seat takes a grammar, which is the default and the common case.

func (Config) DeclaresVLLMSeat added in v0.206.0

func (c Config) DeclaresVLLMSeat(id string) bool

DeclaresVLLMSeat reports whether `vllm_seats` names id — the box's own answer to "is this seat served by vLLM?", matched case-insensitively because llama-swap resolves seat names that way and a roster id that differs only in case is the same seat.

It is the only honest answer available: /v1/models publishes model ids, not engines, so a llama.cpp cascade seat and a vLLM seat are indistinguishable there (see Config.VLLMSeats for why the roster is declared rather than sniffed). Callers that hold an ALIAS must resolve it to its canonical id first — the 3-card reference box's agent seat is bound by the alias `agent-pool` of `qwen3.8-27b-vllm` (of `qwen3.8-27b-vllm-3card` until 2026-10-04), and only the canonical id is in `vllm_seats`, so an exact match alone would leave that box on a constraint field vLLM discards (register D-129).

func (Config) DefaultVideoSdcppFamily added in v0.206.0

func (c Config) DefaultVideoSdcppFamily() (string, bool)

DefaultVideoSdcppFamily reports the sdcpp family a generate_video request that names no model resolves to, exactly as the pipeline resolves it (resolveVideoFamily, then ResolveVideoFamilyBinding): an sdcpp family may be named like a ComfyUI family (wan22, ltx25, ...), and an unset videogen_family means wan22. mediacap's generate_video verdict and the fleet's bound helpers both ask this, so none of them re-derives the default.

func (Config) DisplayFloorGiB added in v0.206.0

func (c Config) DisplayFloorGiB() float64

DisplayFloorGiB is the desktop floor the declared layers keep on the display card: the largest display_floor_gib among the layers guarded by display_floor, 0 when none declares one. The card allocator reads it, so that the display card it opens up to gpu_display_cap_pct (gpu reserve --cards, an auto-placed media call) is also held to the SAME free-VRAM floor the display layer's own guard keeps when that is stricter than the cap, not only to the layer's placement path. A floor with no display_floor guard behind it is not in force (the guard is what applies it), exactly as ValidateLayers reads the pair.

func (Config) DisplayWatchInterval added in v0.206.0

func (c Config) DisplayWatchInterval() time.Duration

DisplayWatchInterval is the period of the display layer's post-admission check with the default applied: display_watch_sec 0 = 10 s, a positive value is that many seconds, and a negative one turns the check off, returned as 0 (a caller must not start a ticker on it).

func (Config) DynamicVRAMDisabled added in v0.206.0

func (c Config) DynamicVRAMDisabled() bool

DynamicVRAMDisabled reports whether a ComfyUI launched for this binding runs with dynamic VRAM off: comfy_dynamic_vram decides when set, else the extra args do (comfy_extra_args, else the inherited COMFY_EXTRA_ARGS env — the seam the runner itself falls back to).

func (Config) EditFamilies added in v0.206.0

func (c Config) EditFamilies() []FamilyInfo

EditFamilies is ImageFamilies for the generative edit route.

func (Config) EditMulticard added in v0.206.0

func (c Config) EditMulticard() bool

EditMulticard reports an edit binding that asks for the card-only placement (gen_edit_placement: multicard).

func (Config) EffectiveBrowseActivateTab added in v0.206.0

func (c Config) EffectiveBrowseActivateTab() bool

EffectiveBrowseActivateTab is the value the harness sends the sidecar as activate_tab: browse_activate_tab, and only when browse_cdp_url names an endpoint the lane accepts (an empty value names none). Activating the lane's tab switches the window's active tab, so it is honoured only against a dedicated browser the operator pinned, never against the everyday browser the lane finds by discovery (browse_browser or nothing). One predicate for the start line and offload_status.

func (Config) EffectiveBrowseCaptureDir added in v0.206.0

func (c Config) EffectiveBrowseCaptureDir() string

EffectiveBrowseCaptureDir is where requested network captures land: browse_capture_dir, else <state_dir>/browse-captures, else the OS temp dir.

func (Config) EffectiveBrowseMaxActions added in v0.206.0

func (c Config) EffectiveBrowseMaxActions() int

EffectiveBrowseMaxActions is browse_max_actions with 0 meaning the default 30 and anything above BrowseMaxActionsCeiling clamped to it.

func (Config) EffectiveComposeBundleMaxBytes added in v0.206.0

func (c Config) EffectiveComposeBundleMaxBytes() int64

EffectiveComposeBundleMaxBytes is the cap on one project bundle as sent.

func (Config) EffectiveComposeCacheDir added in v0.206.0

func (c Config) EffectiveComposeCacheDir() string

EffectiveComposeCacheDir is where the compose runner keeps its work dirs, the extracted-frame cache and HyperFrames' temp frames: compose_cache_dir, else <media_dir>/.compose-cache (a dot-dir, so /fleet/media can never serve it).

func (Config) EffectiveComposeTimeoutSec added in v0.206.0

func (c Config) EffectiveComposeTimeoutSec() int

EffectiveComposeTimeoutSec bounds one composition end to end: compose_timeout_sec, else 1800.

func (Config) EffectiveMediaInputsMaxBytes added in v0.206.0

func (c Config) EffectiveMediaInputsMaxBytes() int64

EffectiveMediaInputsMaxBytes is the cap on one media-job bundle as sent.

func (Config) EffectiveResearchScratchDir added in v0.206.0

func (c Config) EffectiveResearchScratchDir() string

EffectiveResearchScratchDir is the root under which offload_research makes its per-call scratch directories (the subtitle adapter's yt-dlp output): <state_dir>/research-scratch, else a subdirectory of the OS temp dir. Each call's directory is created beneath it and removed when the call ends; nothing else lives here.

func (Config) EffectiveSTTMaxConcurrent added in v0.206.0

func (c Config) EffectiveSTTMaxConcurrent() int

EffectiveSTTMaxConcurrent is how many fleet stt jobs this node runs at once: fleet_stt_max_concurrent, 1 when it is zero or negative.

func (Config) EffectiveSTTTranscriptTTL added in v0.206.0

func (c Config) EffectiveSTTTranscriptTTL() time.Duration

EffectiveSTTTranscriptTTL is how long an stt upload job's transcript files live on the node: fleet_stt_transcript_ttl_min minutes, 30 when it is zero; 0 for a negative value, which means "never remove".

func (Config) EffectiveSTTUploadMaxBytes added in v0.206.0

func (c Config) EffectiveSTTUploadMaxBytes() int64

EffectiveSTTUploadMaxBytes is the cap on one audio upload to POST /fleet/stt, decoded: 48 MiB unless fleet_stt_upload_max_mb says otherwise (zero and negative read as the built-in).

func (*Config) EffectiveUpscaleModel added in v0.206.0

func (c *Config) EffectiveUpscaleModel() string

EffectiveUpscaleModel is the ESRGAN filename the upscale_image route binds: UpscaleModel, else VideoGenUpscaleModel (the video route's post-decode upscaler is the same kind of file), else "" = no route. Pipeline gate and capability report both read THIS so they cannot disagree about whether the box upscales.

func (Config) EmbedMemoOn added in v0.206.0

func (c Config) EmbedMemoOn() bool

EmbedMemoOn reports whether the embed memo should run. The field is *bool rather than bool so an ABSENT key and an EXPLICIT false are distinguishable: the memo defaults ON, and a plain bool would make every config file written before this feature existed read as a deliberate opt-out. An empty EmbedMemoPath disables it just as firmly, because there is nowhere to store.

func (Config) EmbedMemoSettings added in v0.206.0

func (c Config) EmbedMemoSettings() (path, epoch string, maxEntries int)

EmbedMemoSettings returns the memo's (path, epoch, maxEntries) with the path blanked when the memo is off — one resolution point, so a second call site cannot accidentally enable the memo by forgetting the EmbedMemoOn check.

func (Config) EmbedModel added in v0.21.1

func (c Config) EmbedModel() string

EmbedModel is the embedding model shared code (the judge/kNN embedder) requests — a config accessor, never a hardcode, so the harness stays model-agnostic. Resolution order: the explicit EmbedModelName; else MemoryStack[0] (back-compat for configs that only set the stack); else the "embeddinggemma" fallback (lives ONLY here, mirroring the router pattern) so an empty config never sends a blank model name to the server. It does NOT infer a role from MemoryStack position beyond that back-compat step — set embed_model explicitly if the stack is not embedder-first.

func (Config) EnsureDirs

func (c Config) EnsureDirs() error

EnsureDirs creates the parent dirs for the store files.

func (Config) Findings added in v0.206.0

func (c Config) Findings() []string

Findings returns every NON-FATAL configuration finding `local-offload doctor` reports as a FAIL row: the endpoint-shape warnings above, plus the two that only doctor surfaces — a media-lane GPU wait that has drifted away from the vision lane's, and any retired key the file still carries.

It is a method on the loaded value rather than a second read of the file so doctor reports on the config the process is actually running under, which is the only one that can explain its behaviour.

func (Config) FleetConcurrencyLimit added in v0.206.0

func (c Config) FleetConcurrencyLimit() int

FleetConcurrencyLimit resolves FleetMaxConcurrentJobs: 0 → the built-in default (4), negative → 0 meaning unlimited. The worker pool treats <= 0 as unlimited, matching FleetQueueLimit's convention exactly so an operator learns one rule for both fleet caps.

func (Config) FleetIngressGuardMode added in v0.206.0

func (c Config) FleetIngressGuardMode() string

FleetIngressGuardMode is the effective SF-16 ingress mode: off, warn (the default) or enforce. A value the load would refuse comes back as enforce: a one-shot verb keeps going after a config load error, and an unknown mode must never fail open.

func (Config) FleetPollLease added in v0.206.0

func (c Config) FleetPollLease() time.Duration

FleetPollLease resolves FleetPollLeaseSec: 0 → the default (60 s), negative → 0 meaning the abandoned-job rules are off, and a positive value below the floor is raised to it. The store treats <= 0 as "no lease", the convention FleetQueueLimit and FleetConcurrencyLimit already teach.

func (Config) FleetQueueLimit added in v0.206.0

func (c Config) FleetQueueLimit() int

FleetQueueLimit resolves FleetMaxQueueDepth: 0 → the built-in default, negative → 0 meaning unlimited. Callers compare depth >= limit only when limit > 0.

The default (register S-04/C-25) is 2x FleetConcurrencyLimit() rather than a flat 32: a node admitting 32 deep behind 4 workers could pile up 28 jobs it has no hope of starting inside any wall a caller would wait out — 236 measured contracts died at the delegator's 5-minute queue deadline having never started, 75% of them while another node sat idle. Sizing the backlog from the concurrency the node actually has means a custom fleet_max_concurrent_jobs still gets a sane default depth (twice its own worker count) instead of the same flat ceiling regardless of box size.

func (Config) GPUDisplayCap added in v0.206.0

func (c Config) GPUDisplayCap() int

GPUDisplayCap is gpu_display_cap_pct with the default applied: 60 when unset, and 0 (the card closed to the allocator) only when the operator wrote 0. A value that is not a share (below 0 or above 100) reads as 0, closed, never as the whole card: Load refuses it by name, but it returns the Config beside that error and the one-shot verbs (gpu reserve among them) go on with the value, so a typo of 600 for 60 must not open the desktop's memory to a job. A Config set by hand takes the same rule.

func (Config) GPUHostRAMHeadroom added in v0.206.0

func (c Config) GPUHostRAMHeadroom() float64

GPUHostRAMHeadroom is gpu_host_ram_headroom_gib with the default applied.

func (Config) GPUHostRAMHoldMax added in v0.206.0

func (c Config) GPUHostRAMHoldMax() time.Duration

GPUHostRAMHoldMax is gpu_hostram_hold_max_sec as a duration, with the default applied: 600 seconds when unset, and 0 (no bound: the wait after the unload runs the whole --wait) only when the operator wrote 0. A negative value reads as the default and never as no bound: Load refuses it by name, but it returns the Config beside that error and the one-shot verbs (gpu reserve among them) go on with it, so a typo must not turn the bound off.

func (Config) GPUMaxTerm added in v0.206.0

func (c Config) GPUMaxTerm() time.Duration

GPUMaxTerm is gpu_max_term_min as a duration; unset or negative is the 6 hour default (gpulease.DefaultMaxTerm).

func (Config) GPUMaxTotal added in v0.206.0

func (c Config) GPUMaxTotal() time.Duration

GPUMaxTotal is gpu_max_total_min as a duration; unset or negative is the 48 hour default (gpulease.DefaultMaxTotal).

func (Config) GPUOrphanGrace added in v0.206.0

func (c Config) GPUOrphanGrace() time.Duration

GPUOrphanGrace is gpu_orphan_grace_min as a duration; unset or negative is the 15 minute default (gpulease.DefaultOrphanGrace).

func (Config) HasAccelerator added in v0.206.0

func (c Config) HasAccelerator(id string) bool

HasAccelerator reports whether id is listed in Accelerators. It is THE gate for accelerator-backed tools and status blocks: registration, not routing heuristics, so tools/list stays byte-identical on a box without the device.

func (Config) HyperframesBrowserAuto added in v0.206.0

func (c Config) HyperframesBrowserAuto() bool

HyperframesBrowserAuto reports whether hyperframes_browser_path is "auto" (any case, surrounding space ignored): not a file binding, so nothing path-like applies to it.

func (Config) ImageFamilies added in v0.206.0

func (c Config) ImageFamilies() []FamilyInfo

ImageFamilies lists this node's image bindings: the default first, then every named family in name order. A family whose overlay no longer resolves (only possible for an in-process Config that never went through Load) is skipped.

func (Config) ImageGenAdvertisable added in v0.206.0

func (c Config) ImageGenAdvertisable() bool

ImageGenAdvertisable reports whether this box serves generate_image AT ALL: its default binding (ImageRouteConfigured) OR at least one named family (imagegen_families — ADR 0058). A family-only node deliberately has NO default binding (an opt-in family, e.g. Qwen-Image-2.1, must never be the default — D1), so gating fleet advertisement/admission on ImageRouteConfigured alone made the fleet HTTP door invisible to every request naming a family, even though `local-offload doctor` showed the family fully CONFIGURED and it rendered correctly through the CLI (<node-f> wave session 5d227d30 §2a). The fleet capability gate (fleetnode.taskConfiguredFor) and the health advertiser (fleetnode.ImageFamilies) both key on this instead of ImageRouteConfigured alone.

func (Config) ImageMulticard added in v0.206.0

func (c Config) ImageMulticard() bool

ImageMulticard reports an image binding that asks for the card-only placement (imagegen_placement: multicard).

func (Config) ImagePooled added in v0.206.0

func (c Config) ImagePooled() bool

ImagePooled reports an image binding that loads through the DisTorch2 pool — the pool keys, not comfy_cuda_device, place it.

func (Config) ImageRouteConfigured added in v0.206.0

func (c Config) ImageRouteConfigured() bool

ImageRouteConfigured reports whether THIS box serves generate_image at all — the ComfyUI path (imagegen_script) OR the sdcpp engine (J2: sdcpp_bin + model; imagegen_script stays empty there). The fleet capability gate and fleet-measure key on this, matching the pipeline's engine-first routing.

func (Config) Layer added in v0.206.0

func (c Config) Layer(name string) (LayerSpec, bool)

Layer returns the declared layer by name. A miss is a miss, not a default: placement onto an undeclared layer must be refused, never guessed.

func (Config) LayerPins added in v0.206.0

func (c Config) LayerPins(model string) ([]string, bool)

LayerPins is the device pin of a model name read from the declared layers alone: the pins of every seat that serves it (a model declared on two seats sits on the union of their cards, in first-seen order). ModelPins adds the serving config behind it; the unload list asks the layers alone first so that it can say which of the two placed a model (LeaseScope.Locate).

A seat is matched by its model name, by a router seat's model_map twin, and, for the router seat that declares neither (the single layer's, "its models come from the cascade"), by the cascade's rung models: model, triage_model and escalation_model. Names compare case-insensitively. ok is false for a model no layer declares, an alias a layer does not spell, and a box with no layers at all.

func (Config) LayerSeat added in v0.206.0

func (c Config) LayerSeat(layer, role string) (LayerSeat, bool)

LayerSeat returns the seat serving `role` on `layer`. It exists so the placement table, the delegate gate and the pipeline all resolve a seat the same way — by declared role, never by model-name pattern matching.

func (Config) LayerSeatModels added in v0.206.0

func (c Config) LayerSeatModels() []string

LayerSeatModels lists every model name the declared layers serve, in layer order, router twins (model_map) included.

func (Config) LiveGPUDisplayCap added in v0.206.0

func (c Config) LiveGPUDisplayCap() int

LiveGPUDisplayCap is gpu_display_cap_pct as the file this Config was read from says NOW, for the readers that must see the operator's "I need the card" switch (0) while the process runs: the card allocator's input (gpualloc.BuildInput), `gpu status` and `gpu cards` (displayCapNow in gpu_cards.go) and the offload_status brief (internal/mcpserver/status_section.go). A process never reloads its config, so GPUDisplayCap, the value at load, would leave the switch dead for a `gpu reserve --wait 8h` already in line, for a detached holder, and for the long-lived MCP server that places media calls. The read is one small file and one key: a plain read on every call, no memo, because a memo keyed on the file's timestamp can miss a rewrite that keeps both timestamp and size.

A file that cannot be read or decoded at this moment (an editor part-way through a save, a lock) keeps the last value read from it, and before any read the value this Config holds, so a torn write never reopens a card the operator has just closed. A key removed reads as the default (60), a value that is not a share as closed (GPUDisplayCap). A Config with no source file answers with its own value.

func (Config) MediaInputsAdmissible added in v0.206.0

func (c Config) MediaInputsAdmissible() bool

MediaInputsAdmissible reports whether THIS node's media-job door is open (ADR 0077): the operator opted in, the node holds a fleet token for the door to check, and at least one media task (image, video, animation, voice or music, run-graph) is bound. One predicate for the route, the fleet advertisement and admission, so the door is never open without a token.

"Bound" is the notion the fleet advertisement binds a task with (fleetnode.mediaTaskBound): a ComfyUI/python script, the speech endpoint, OR the CT-49 engine that replaces it (the *Bound helpers), so a node whose only renderers are sd.cpp and audio.cpp, with every script key blank, opens the door like any other. Two notions of bound would leave it advertising video-gen, animate and audio-gen but unable to take a still, a driver video or a clone sample.

func (Config) ModelPins added in v0.206.0

func (c Config) ModelPins(model string) ([]string, bool)

ModelPins is the device pin of a model name: where the box says the seat that serves it is launched. It is what the model-affinity load gate is armed with (Load), so a render on one card fences only the seats on that card; the callers that narrow the same lease to one seat (the text and vision auto routes, the delegator's run-cap line) ask it too.

The declared layers place a model first (LayerPins). A model no layer declares is placed by its entry in the serving config (serving_config_path, read by internal/servingcfg), exactly as the lease's unload list places it (gpualloc.LeaseScope.Locate, register F15). On a box that declares no layers, as the installer's tier seeds leave it, that is what lets a lease on one card fence only the seats on that card (register C-86a). The serving config counts only through the env pin of its entry, with F15's strictness: a bare index only beside CUDA_DEVICE_ORDER=PCI_BUS_ID, while a proxy: seat, an entry that pins nothing in env and an alias two entries claim differently place nothing.

ok is false for a model neither places (and for a serving config that is unset or unreadable): the gate reads that as every card, which is the answer it gave before it could place a seat.

func (Config) ModelRoutes added in v0.206.0

func (c Config) ModelRoutes() []ModelRoute

ModelRoutes returns EVERY llama-swap model binding this config routes to, in report order. NIMModel is deliberately absent — it is a REMOTE endpoint's model id, never served by the local llama-swap.

func (Config) MulticardLaunchNotes added in v0.206.0

func (c Config) MulticardLaunchNotes() []string

MulticardLaunchNotes says, once each, the two flat settings a multicard seat ignores: comfy_cuda_device (the lease's two cards place the seat) and comfy_dynamic_vram "on" (the card-only launch runs --gpu-only). Both still serve the single-card routes, so they describe a deliberate config, not a mistake: doctor prints them and config load does not. The seats are the default image and edit bindings and every named family that resolves to multicard; a family overlay carries imagegen_* / gen_edit_* keys only, so a family always inherits the flat values and is named in the same note, not given one of its own.

func (Config) MusicGenBound added in v0.206.0

func (c Config) MusicGenBound() bool

MusicGenBound: musicgen_script, or musicgen_engine audiocpp.

func (Config) NIMBaseEnforced added in v0.206.0

func (c Config) NIMBaseEnforced() bool

NIMBaseEnforced reports whether nim_base_policy is "enforce"; anything else (the default "audit", empty, or an unrecognized value, which Load warns about) is audit mode.

func (Config) OnOverduePolicy added in v0.206.0

func (c Config) OnOverduePolicy() gpulease.OnOverdue

OnOverduePolicy is gpu_on_overdue as the policy the lease holders read: unset is the behaviour from before the key existed (nobody is asked), "request" asks the holder to yield, "hold" says so in words. A value Load refused reads as hold: the permissive direction is never the fallback.

func (Config) OperatorIdle added in v0.206.0

func (c Config) OperatorIdle() time.Duration

OperatorIdle is the last-input threshold for presence mode "auto" with the 15-minute default applied (operator_idle_sec 0 = default, never "0 seconds", which would read every keystroke gap as away).

func (Config) PipelineNames added in v0.206.0

func (c Config) PipelineNames() []string

PipelineNames returns the sorted task_type keys of every VALID pipelines entry (an entry that fails PipelineSpec.valid() is silently excluded, so a Config assembled directly rather than through Load() never advertises a route it cannot run — Load() itself already rejects a bad entry outright via validatePipelines).

func (Config) PipelinesConfigured added in v0.206.0

func (c Config) PipelinesConfigured() bool

PipelinesConfigured reports whether this node serves ANY pipeline-job routes — mirrors ImageRouteConfigured's single-route gate, scaled to a variable-size set (internal/fleetnode's capability gate keys on this).

func (Config) PlacementWait added in v0.206.0

func (c Config) PlacementWait() time.Duration

PlacementWait resolves AgentPlacementWaitSec: 0 → the built-in default (DefaultPlacementWait), negative → 0 meaning "do not wait". It is the wait of a call with no whole-call deadline; a call that has one is bounded by it (ADR 0073) and reads this only for the off switch.

func (Config) PresenceMode added in v0.206.0

func (c Config) PresenceMode() string

PresenceMode returns operator_presence with the default applied: "" reads as "present", so a box that never set the key keeps the display card closed to placement until the operator has read the probe's readings and opted in.

func (Config) RemoteIsPublic added in v0.206.0

func (c Config) RemoteIsPublic(base string) bool

RemoteIsPublic reports whether the operator declared the node at base "public" in delegate_remote_classes. It fails closed: a node that is not listed is private-ok (the key is opt-in, so an unset config changes nothing), but a LISTED node whose value is anything other than "private-ok" reads as public. Load refuses an unknown value, so that second clause is only reachable on a Config built by hand, and there the stricter reading wins.

func (Config) ResolveEditFamily added in v0.206.0

func (c Config) ResolveEditFamily(name string) (Config, FamilyInfo, error)

ResolveEditFamily is ResolveImageFamily for edit_image_generative.

func (Config) ResolveImageFamily added in v0.206.0

func (c Config) ResolveImageFamily(name string) (Config, FamilyInfo, error)

ResolveImageFamily returns the effective config for a generate_image request's `family` param. "" or the default binding's own family name = the default binding (the config itself, unchanged). A named family = its overlay applied. Anything else is an error that lists what this node serves.

func (Config) ResolveVideoFamilyBinding added in v0.206.0

func (c Config) ResolveVideoFamilyBinding(renderFamily string) VideoFamilyBinding

ResolveVideoFamilyBinding returns the effective per-family binding for a RESOLVED render family (renderFamily — already canonicalized against the runner's dispatch set by the caller, e.g. internal/pipeline.canonicalVideoFamily; "" is treated as this box's own default family, matching resolveVideoFamily's "nothing bound anywhere" case).

An EXPLICIT videogen_families[renderFamily] entry, when present, always wins for a family other than this box's own default — that is the opt-in fix for a SPECIFIC cross-family leak (e.g. an ltx25-seated box's text encoder reaching an overridden Wan render; bigger-models-2026-09-24.md). Absent an explicit entry — this box's own default family, or any other family nobody has scoped yet — resolution falls back to the flat videogen_* keys UNCHANGED. That fallback is deliberate back-compat, not a gap: it preserves the pre-existing, documented pattern of a box's flat keys carrying a DIFFERENT family's weights as an intentional fallback (e.g. Wan GGUF files left bound on videogen_unet_high/low on an ltx25-seated box specifically so a bare `model:"wan"` override still renders with them — TestRunGenerateVideo_OverrideProvenanceEndToEnd). A config that has never set videogen_families therefore behaves byte-for-byte as before this key existed; an operator closes a specific leak by adding ONLY the keys that need their own family-distinct value, nothing else has to change.

The license pair is the one exception to "the default family never reads its videogen_families entry": a license describes the model, not the weight files, so the pair is read from the family's own entry whichever way the weights resolved (the default family included), and a family with no entry carries none.

func (Config) SdcppVideoFamily added in v0.206.0

func (c Config) SdcppVideoFamily(name string) bool

SdcppVideoFamily reports whether name is a videogen_families entry bound to the sdcpp engine. It is what lets resolveVideoFamily (internal/pipeline) accept a family name outside the ComfyUI runner's closed dispatch set: an sdcpp family is matched by its own name, exactly.

func (Config) SpreadLocalSlot added in v0.206.0

func (c Config) SpreadLocalSlot() string

SpreadLocalSlot resolves AgentSpreadLocalSlot: "" (and any value that is not "always") → skip-when-busy, the 0.113.20 default; "always" → the old deal. Case-insensitive, whitespace-tolerant, so a hand-edited config cannot fall into a third, unnamed behaviour.

func (Config) SupportsTransparentEdit added in v0.206.0

func (c Config) SupportsTransparentEdit() bool

SupportsTransparentEdit is SupportsTransparentImage for the edit route.

func (Config) SupportsTransparentImage added in v0.206.0

func (c Config) SupportsTransparentImage() bool

SupportsTransparentImage reports whether this (effective) image binding can keep an alpha channel: only the qwen-image-2.1 model has an RGBA VAE — true on EITHER engine (the ComfyUI graph's SplitImageWithAlpha and the sdcpp runner's own alpha-flatten step both key off this same predicate to decide whether to keep or drop the channel). Engine-independent on purpose: sd.cpp's build of the model carries the identical RGBA VAE, so refusing transparency for the sdcpp engine was never a model limit, only a gap in the runner (D5, <node-f> wave session 5d227d30 §3b/§3c).

func (Config) TailnetZones added in v0.206.0

func (c Config) TailnetZones() ([]string, error)

TailnetZones is every tailnet DNS zone this config names: tailnet_suffix first (the operator's own tailnet), then tailnet_suffixes in the order written (a tailnet that shared a node in). Each is normalized by netguard.ParseZone, blank slots are skipped and duplicates collapse, so the same zone spelled twice is one zone.

A malformed entry is an error that names its key and index, never a silent drop: a zone that does not take effect fails closed in the gate while reading, to the person who typed it, as if it had. This is the list Load installs into netguard before any endpoint is vetted, and the list EndpointWarnings judges delegate_remotes against, so the load-time check and the doctor row read one answer.

func (Config) ToolOwnerClaims added in v0.206.0

func (c Config) ToolOwnerClaims(id string) []string

ToolOwnerClaims returns the tool names accelerator_tool_owners assigns to device id, sorted. It says nothing about whether the claim can apply — the device's own tool table decides that on each surface (ADR 0068).

func (Config) ToolsSchemaProfileMode added in v0.206.0

func (c Config) ToolsSchemaProfileMode() string

ToolsSchemaProfileMode resolves tools_schema_profile to "full" or "compact". An unset key is "full"; an unknown value cannot reach here through Load (validateToolsSchemaProfile refuses it), and a Config built by hand resolves to "full" rather than to a cut description.

func (Config) UpsamplerFile added in v0.206.0

func (c Config) UpsamplerFile() string

UpsamplerFile is the upsampler file the ComfyUI flux3-klein graph runs in-graph (imagegen_upsampler ending in .safetensors), "" for any other binding, for the model form and on the sd.cpp engine (which has no graph to run a file in).

func (Config) UpsamplerModel added in v0.206.0

func (c Config) UpsamplerModel() string

UpsamplerModel is the llama-swap model the harness calls for a flux3-klein binding's caption before the media lease: imagegen_upsampler in its model form on either engine, "" for any other binding, for the file form on ComfyUI and for a file named on the sd.cpp engine (a misbinding the config warns about).

func (Config) ValidateLayers added in v0.206.0

func (c Config) ValidateLayers() error

ValidateLayers refuses at load the layer shapes that would misplace work at runtime — each error names the JSON path so a seeded or hand-edited config fails by name, not at the first contract. Presence mode and the tier identity are checked on every box (closed vocabularies fail loudly); the per-layer and window rules apply only when layers are declared, so a plain box is untouched.

func (Config) VideoDefaultFamilyBinding added in v0.206.0

func (c Config) VideoDefaultFamilyBinding() VideoFamilyBinding

VideoDefaultFamilyBinding is this box's default video family's binding, built from the flat videogen_* keys — i.e. exactly what every render used before videogen_families existed. A request that renders this box's OWN configured family (no override, or an override naming the same family) always uses this, never a videogen_families entry — back-compat for every config that predates per-family binding.

func (Config) VideoGenBound added in v0.206.0

func (c Config) VideoGenBound() bool

VideoGenBound: videogen_script, or the default video family is bound to sdcpp.

func (Config) VideoPooled added in v0.206.0

func (c Config) VideoPooled() bool

VideoPooled reports a video binding that loads through the DisTorch2 pool — same rule as ImagePooled. An un-pooled video seat (videogen_pool_vvram_gb <= 0, the native/streaming shape) is a single-card route like image generation, so comfy_cuda_device DOES apply to it; a pooled one still must not be pinned (the blackwell-3x16 pool computes on ComfyUI's default device, MultiGPU #220).

func (Config) VoiceGenBound added in v0.206.0

func (c Config) VoiceGenBound() bool

VoiceGenBound: voicegen_script, tts_endpoint, or voicegen_engine audiocpp.

func (Config) WithSource added in v0.206.0

func (c Config) WithSource(path string) Config

WithSource returns c recording the file its values were read from, so LiveGPUDisplayCap can follow that file. Load records it; a caller that builds a Config by hand and wants the switch to follow a file does it here.

type FamilyInfo added in v0.206.0

type FamilyInfo struct {
	// Name is the request-facing name: an overlay's key, or the default binding's
	// family ("" when the default binding names none — the generic SDXL graph).
	Name string
	// Family is the graph family the binding renders with (imagegen_family /
	// gen_edit_family after the overlay).
	Family        string
	Engine        string
	License       string
	CommercialUse *bool
	Default       bool
}

FamilyInfo is what a request resolved to: which binding answered and under which license. CommercialUse nil = the binding declares no license (the default binding on a box that never set imagegen_license).

func (FamilyInfo) NonCommercial added in v0.206.0

func (f FamilyInfo) NonCommercial() bool

NonCommercial reports a binding that declared commercial_use false.

type FamilyOverlay added in v0.206.0

type FamilyOverlay map[string]json.RawMessage

FamilyOverlay is one named binding's keys, verbatim from the config file. Keys are validated at load (validateFamilies); values are decoded into the matching Config field's own type, so a wrong type fails the load by name.

type KVCacheServer added in v0.206.0

type KVCacheServer struct {
	// Enabled turns the tier on. False = the block is inert and reported as such.
	Enabled bool `json:"enabled"`
	// Store is the L2 adapter behind LMCache MP: "valkey" (Redis protocol; the
	// measured default) or "fs_native" (a filesystem export mounted on the serving
	// box). Empty = valkey.
	Store string `json:"store,omitempty"`
	// Address: for valkey, the store's host:port on the DIRECT LAN or the tailnet — a
	// private IPv4/IPv6, a tailnet CGNAT address, loopback, a bare hostname, a
	// `.local` name, or a name under `tailnet_suffix`. A public address is refused by
	// name: KV pages are unauthenticated bulk memory and never leave the operator's
	// networks. For fs_native, an ABSOLUTE local path (the mount point of the
	// export); a URL or host:port is refused so a network location cannot slip in
	// under the store that skips the network checks. Bulk KV prefers the direct LAN
	// over MagicDNS (WireGuard measured 6.6x slower, 2026-09-01) — guidance, not a
	// rule enforced here. Surrounding whitespace is trimmed at load.
	Address string `json:"address,omitempty"`
	// L1StagingGB is LMCache MP's pinned host buffer beside the engine (GB). It is a
	// staging area, not the tier. 0 = 2 (EffectiveL1StagingGB, register B-02). A
	// hybrid-attention model stages far more per chunk and needs more: the reference
	// two-card seat runs 8, the three-card pipeline seat 16.
	L1StagingGB int `json:"l1_staging_gb,omitempty"`
	// ChunkSize is LMCache's chunk in tokens and must equal the engine's unified block
	// size for the seat's model ("Setting attention block size to N tokens" in the
	// vLLM log; 784 for Qwen3.8-27B with fp16 KV, 1568 with fp8). 0 = 784 — a
	// model-specific number, so status marks it as defaulted. A mismatch fails the
	// engine's registration at start, loudly.
	ChunkSize int `json:"chunk_size,omitempty"`
	// KeyPrefix namespaces the store. Change it (or flush the store) whenever the
	// engine layout, the KV dtype or the LMCache build changes: objects written
	// under another generation fail reads with "value size exceeds buffer capacity"
	// and the tier silently serves nothing (measured 2026-09-03 00:25). Empty = the
	// seat name; when both are empty the block is refused (two seats must never share
	// a namespace by accident).
	KeyPrefix string `json:"key_prefix,omitempty"`
	// Seat is the llama-swap model id of the vLLM seat this binding backs (e.g.
	// "qwen3.8-27b-vllm"). EMPTY means "the box default": the binding applies to
	// every vLLM seat that has no binding of its own. One binding per seat and at
	// most one default — ValidateKVCacheServers refuses a second of either.
	Seat string `json:"seat,omitempty"`
	// Storeless is the EXPLICIT opt-out: this seat deliberately runs with no cache
	// server. It exists because `doctor` FAILS a vLLM seat with no binding
	// (operator directive 2026-09-10 #1: the second device's store backs every vLLM
	// seat while it is online), and the only honest way to run one without a store
	// is to say so and say why — silence is exactly what that gate is against.
	// Reason is required with it, and the store fields must be empty, so an opt-out
	// can never be a half-configured store that looks deliberate.
	Storeless bool `json:"storeless,omitempty"`
	// Reason is WHY this seat has no store ("a scratch seat on a box whose store
	// device is offline for maintenance"). Required with Storeless, refused
	// without it.
	Reason string `json:"reason,omitempty"`
	// KVDtype and TensorParallel declare the STACK GENERATION that writes this
	// namespace — the KV dtype ("fp8", "fp16") and the tensor-parallel width. They
	// exist for exactly one rule (B-45, "one key_prefix per stack generation"): two
	// seats may share a key_prefix only when both declare the SAME shape. Pages
	// written under another layout are not stale, they are unreadable, and the tier
	// then serves nothing while reporting success. Both may be omitted for a prefix
	// only one seat uses.
	KVDtype        string `json:"kv_dtype,omitempty"`
	TensorParallel int    `json:"tensor_parallel,omitempty"`
	// StatusFile is the seat wrapper's own L2 verdict file: seat_fg.sh writes the
	// file SEAT_L2_STATUS_FILE names ("ok <stamp> mbps=<n>", plus " addr=<address>" when the launcher
	// chose the store's address over mDNS (B-55) or read the server address of a share that was already
	// mounted, after the share mounted
	// and the write probe passed, "degraded <stamp> reason=<why>" when it fell back
	// to L1 only). A rendered seat env names one file PER SEAT,
	// `seat-l2-<seat id>.status` beside the env; `$WORK/seat-l2.status` is only the
	// wrapper's fallback when the env sets none, and two seats sharing it overwrite
	// each other's verdict. An fs_native store is a mounted path with no port to
	// dial, so this file is the only end-to-end readback the box has (B-29): status
	// publishes it as `reachable` true/false with the line and its age. On a WSL2
	// seat the path is the host-visible one
	// (`//wsl.localhost/<distro><seat-dir>/seat-l2-<seat id>.status`). A binding that
	// still names `seat-l2.status` reads a file a re-rendered seat no longer writes
	// (a frozen verdict, or unreadable): repoint it. Empty = not declared; status
	// says so instead of guessing.
	StatusFile string `json:"status_file,omitempty"`
}

KVCacheServer is the OPTIONAL "cache server" tier (operator directive 2026-09-02): a second machine's RAM that holds the KV pages that left a vLLM seat's VRAM, behind LMCache MP's small L1 staging buffer on the serving box. Off by default; the install and every single-box seat never depend on it — a box with no second device runs exactly as before, and this block exists so a box WITH one can declare it.

Why it is a tier and not a speedup: a context that fell out of VRAM comes back at parity cost or better with recomputing it (measured on Qwen3.8-27B, 24k tokens: 3.86 s from a second box over the LAN vs 24.68 s recompute with one store namespace per stack generation; 20.6 s when the store was shared across layouts) while the GPU is free for other requests and the serving box's RAM is untouched. Sized in tokens: ~255 KB per token as stored, so a 45 GB store holds ~175k tokens.

The harness does not run the store or the engine. This block is DECLARATIVE: it is what `offload_status` reports and what the docs describe; the seat wrapper (setup/templates/vllm-seat/seat_fg.sh) reads its own seat.env, so the operator keeps the two in agreement — the status view says so in its note.

func (KVCacheServer) AddressIsIPLiteral added in v0.206.0

func (k KVCacheServer) AddressIsIPLiteral() bool

AddressIsIPLiteral reports whether Address names an IP (with or without a port) rather than a hostname — the status probe dials literals only, because a hostname is vetted by shape, not by what DNS answers (the same two-layer reasoning as netguard's tailnet dial gate).

func (KVCacheServer) ChunkSizeDefaulted added in v0.206.0

func (k KVCacheServer) ChunkSizeDefaulted() bool

ChunkSizeDefaulted reports whether EffectiveChunkSize is the model-specific default rather than an operator value — status surfaces it, since 784 is only right for one model.

func (KVCacheServer) EffectiveChunkSize added in v0.206.0

func (k KVCacheServer) EffectiveChunkSize() int

EffectiveChunkSize applies the 784-token default (Qwen3.8-27B / fp16 KV).

func (KVCacheServer) EffectiveKeyPrefix added in v0.206.0

func (k KVCacheServer) EffectiveKeyPrefix() string

EffectiveKeyPrefix applies the seat-name default. Empty means "neither set" — a state validation refuses when the block is enabled.

func (KVCacheServer) EffectiveL1StagingGB added in v0.206.0

func (k KVCacheServer) EffectiveL1StagingGB() int

EffectiveL1StagingGB applies the 2 GB default for a seat with no measured value (register B-02: on 2026-09-18 the pair's 2 / 4 / 8 GB arms restored the same context at 3.1 / 5.1 / 9.1 GiB of MP-server RSS over 24 contracts). It is not enough for every seat: on 2026-09-21 2 GB starved the pair's staging under production load, so the pair seeds 8 (the hand-wired three-card seat runs 16).

func (KVCacheServer) StoreName added in v0.206.0

func (k KVCacheServer) StoreName() string

StoreName is the L2 adapter with the default applied.

type KVCacheServers added in v0.206.0

type KVCacheServers []*KVCacheServer

KVCacheServers is the box's cache-server bindings, ONE PER vLLM SEAT.

It is a LIST because the store is not a property of one favoured seat: the operator directive of 2026-09-10 is that the second device's store backs EVERY vLLM seat while that device is online — the tensor-parallel pair, the opt-in 3-card layout, and the second box's own small seat, each with its own store directory and namespace. The shape this replaces bound one `kv_cache_server.seat` to a single seat name, which made "the other seats have no tier" indistinguishable from "the other seats were never considered"; that is the recorded defect (B-01).

BACKWARD COMPATIBLE BY CONSTRUCTION: a config written against 0.117 and earlier carries ONE object, and it decodes here to a one-element list bound to its own `seat` (or to the box default when it named none). Nothing an operator already deployed has to change to keep loading.

func (KVCacheServers) AnyEnabled added in v0.206.0

func (l KVCacheServers) AnyEnabled() bool

AnyEnabled reports whether ANY binding is an enabled store — the one-bit answer to "does this box have a cache-server tier at all".

func (KVCacheServers) BoundSeatsNotDeclared added in v0.206.0

func (l KVCacheServers) BoundSeatsNotDeclared(seats []string) []string

BoundSeatsNotDeclared names the seats a binding claims that `vllm_seats` does not list. It is reported, never fatal: a binding left behind after a seat was renamed is a store nothing reads, and the operator should see it — but refusing the load would break a box the moment it retired a seat, which is the wrong trade for a tier that is optional by charter.

func (KVCacheServers) Covers added in v0.206.0

func (l KVCacheServers) Covers(seat string) bool

Covers reports whether seat has a DELIBERATE binding: an enabled store, or an explicit storeless opt-out. A binding that is merely present and disabled does not count — "the tier is off for this seat and nobody said why" is precisely the silence the gate exists to catch.

func (KVCacheServers) Default added in v0.206.0

func (l KVCacheServers) Default() *KVCacheServer

Default is the binding that names no seat (the box-wide default), or nil.

func (KVCacheServers) For added in v0.206.0

func (l KVCacheServers) For(seat string) *KVCacheServer

For returns the binding that backs seat: the one that NAMES it, else the box default (a binding that names no seat), else nil. An exact match always wins, so a box can declare one default store and still give a single seat its own directory and namespace.

func (KVCacheServers) UnboundSeats added in v0.206.0

func (l KVCacheServers) UnboundSeats(seats []string) []string

UnboundSeats names the seats of `seats` that no binding covers. `doctor` fails on it and `offload_status` publishes it, from ONE implementation, so the gate and the report can never disagree about which seats are uncovered.

func (*KVCacheServers) UnmarshalJSON added in v0.206.0

func (l *KVCacheServers) UnmarshalJSON(b []byte) error

UnmarshalJSON accepts BOTH shapes — the list (current) and the single object (0.117 and earlier). A decode failure names the key and both shapes, because the one thing an operator must not have to guess is which of two spellings a file was rejected for.

type LayerSeat added in v0.206.0

type LayerSeat struct {
	// Role is the closed vocabulary the placement table keys on:
	// router | agent | long | ocr | vision | stt. A layer holds at most one seat
	// per role so `LayerSeat(layer, role)` is unambiguous.
	Role string `json:"role"`
	// Model is the llama-swap id or alias served for this role; "" for the
	// router role, whose models come from the cascade (ModelMap) — a router with
	// a model is a contradiction and is refused.
	Model string `json:"model,omitempty"`
	// Device is this seat's CUDA_VISIBLE_DEVICES pin: "0" | "2" | "0,2" |
	// "0,1,2" | "1". Required on every seat — a seat without a pin cannot be
	// placed truthfully and cannot be checked against the display-card rule.
	Device string `json:"device"`
	// CtxTokens is the seat's SERVED window. It sizes the contract context cap
	// (AgentContextCapBytes) and the window-overflow decision; read from config,
	// never probed before admission.
	CtxTokens int `json:"ctx_tokens,omitempty"`
	// MaxInflight is vLLM's max_num_seqs for the seat; 0 = the seat is never
	// saturated by count (llama.cpp seats). A saturated pair is RECORDED in
	// placed.reason, never acted on (council R2).
	MaxInflight int `json:"max_inflight,omitempty"`
	// FootprintGiB is the VRAM this seat puts on EACH device of Device, measured
	// alone. Used to name the eviction a placement would cause on a shared set.
	FootprintGiB float64 `json:"footprint_gib,omitempty"`
	// DisplayFootprintGiB is the VRAM this seat puts on the layer's display
	// device. The display-floor guard is `free(display) − this ≥ floor`: the
	// old check compared free VRAM alone and admitted a 10.5 GB load onto a
	// card with 9 GB free (council R6). REQUIRED (> 0) on a display_floor-guarded
	// layer for every seat whose pin includes the display device — a 0 here
	// degrades the guard back to that rejected free-VRAM check. Config refuses
	// the omission at load when display_device is a plain CUDA index; a UUID pin
	// or "auto" is resolved at admission, where a 0 footprint refuses as undeclared.
	DisplayFootprintGiB float64 `json:"display_footprint_gib,omitempty"`
	// HostRAMGiB is the host RAM the seat holds while loaded (experts on CPU);
	// the host_ram guard refuses when free host RAM is below it.
	HostRAMGiB float64 `json:"host_ram_gib,omitempty"`
	// PrefillTPS is the measured prompt-processing rate. The long seats are
	// entered only when tokens ÷ this ≤ the contract's budget: flash-next-262k
	// prefills at 69 t/s, so a 200k prompt is ~48 min against a 900 s cap.
	PrefillTPS float64 `json:"prefill_tps,omitempty"`
	// ModelMap (router role only) maps a route key (workhorse | triage) to the
	// twin model served on THIS layer, so the dormant display layer can
	// substitute its device-1 twins for the cascade's rungs.
	ModelMap map[string]string `json:"model_map,omitempty"`
}

LayerSeat is one served seat inside a layer (ADR 0052): the model, the device PIN it is launched on and the measured numbers a placement decision needs. Seats carry their own device pin (not the layer) because a layer's "devices" is a documentary list of the sets it MAY occupy while a seat is launched with exactly one CUDA_VISIBLE_DEVICES value — `placed.devices` on a result is the seat's pin, never the layer's alternatives, so the two must not be conflated. The footprints are declared, not probed: a status or health path must never load a model to learn its size.

func (LayerSeat) DeviceList added in v0.206.0

func (s LayerSeat) DeviceList() []string

DeviceList splits the seat's pin into its CUDA indices ("0,2" → ["0","2"]), trimming spaces and dropping empties, so device arithmetic (the display-card rule, eviction naming) never string-matches a comma-joined pin.

type LayerSpec added in v0.206.0

type LayerSpec struct {
	// Name is the layer id placement records and a contract may request
	// (`layer` on the wire): single | pair | triple | display. Unique per box
	// and shaped like a contract layer id so it can travel on the wire unchanged.
	Name string `json:"name"`
	// Tier is the composed tier this layer stands for (blackwell-16 for
	// single, blackwell-2x16 for pair, …) — what health advertises per layer.
	Tier string `json:"tier"`
	// Devices lists the device SETS this layer may occupy (documentary; the
	// seats carry the pin). Required: a layer with no devices cannot be a layer.
	Devices []string `json:"devices"`
	// Seats are the roles served on this layer, at most one per role.
	Seats []LayerSeat `json:"seats"`
	// OptIn marks a layer that is never the default for any task class — the
	// triple layer is entered on an explicit context_class only.
	OptIn bool `json:"opt_in,omitempty"`
	// Dormant declares a layer that is never placed until the operator flips it
	// (the display layer ships dormant until its measurement is read; council R7).
	Dormant bool `json:"dormant,omitempty"`
	// DisplayDevice is the device (CUDA index or GPU-UUID prefix) the display
	// guards read live, or DisplayDeviceAuto ("auto") to guard whichever card
	// the driver reports as the monitor's. <node-b> pins it by UUID because the
	// board reorders indices on power loss. A declared card is the operator's
	// word, cross-checked against the driver; auto is the driver's word, and
	// refuses when the driver cannot give one card.
	DisplayDevice string `json:"display_device,omitempty"`
	// DisplayFloorGiB is the VRAM the desktop keeps on DisplayDevice: the
	// display_floor guard admits a seat only while
	// free(DisplayDevice) − seat.DisplayFootprintGiB ≥ this.
	DisplayFloorGiB float64 `json:"display_floor_gib,omitempty"`
	// Guards are the live checks an admission on this layer must pass, from the
	// closed set display_floor | presence | host_ram. Every guard fails CLOSED:
	// a probe that cannot read refuses.
	Guards []string `json:"guards,omitempty"`
}

LayerSpec is one device layer of a composite box (ADR 0052): the composed tier it stands for, the device sets it may occupy, its seats and the guards that gate admission. A box declares layers by seeding them into config from the tier table (tierseed), so at runtime everything reads config — a box that seeds none has one implicit layer and is byte-identical on every surface.

type ModelRoute added in v0.206.0

type ModelRoute struct {
	// Key is the config-file key, and the label doctor/report/acceptance print.
	Key string
	// StatusKey is the name offload_status publishes this route under.
	StatusKey string
	// Configured is the raw configured value; "" means unset.
	Configured string
	// Effective is the value after fallbacks; what the task will actually call.
	Effective string
	// Diffed marks the routes the alias-vs-live-roster gate checks.
	//
	// ocr and embed are deliberately NOT diffed. Both are reported, neither is a
	// gate: `embed` always resolves to a non-empty default ("embeddinggemma"),
	// so gating on it would fail every correctly-configured node whose serving
	// tier declares no embedder seat, and `ocr` rides the vision seat when unset.
	// Widening the gate is a policy change, not a consolidation.
	Diffed bool
}

ModelRoute is ONE config key that binds a llama-swap model, in the single table every surface that reports the roster reads from.

It exists because two hardcoded lists of the same thing had drifted: `doctor` (and with it `acceptance` and `report`) checked 8 keys while the MCP server's `offload_status` published 10, so the ocr and embed bindings were advertised to an autonomous planner by one surface and unknown to the other. One table, two readers, no drift.

The two value fields are not redundant — the surfaces ask different questions:

  • Configured is what the OPERATOR wrote. Empty means the binding is unset, which doctor reports as "(unset)" rather than a failure: an unset non-cascade route is an honest "this task defers on this box".
  • Effective is what will ACTUALLY run once the fallback chains are applied (agent → workhorse, ocr → vision, embed → the memory stack's embedder). This is what a planner needs, and what offload_status publishes.

type ParseError added in v0.206.0

type ParseError struct{ Err error }

ParseError is a config file that was read but could not be DECODED. Unlike a validation failure (the file's settings are in effect, one key is refused), nothing from the file is in effect: Load returns the built-in defaults. The message says so itself, so every surface that prints the load error verbatim (doctor, the MCP config_error, fleet-serve's refusal) tells the truth without a special case.

func (*ParseError) Error added in v0.206.0

func (e *ParseError) Error() string

func (*ParseError) Unwrap added in v0.206.0

func (e *ParseError) Unwrap() error

type PipelineSpec added in v0.206.0

type PipelineSpec struct {
	// Script is the absolute path to the CLI entry (a node script). Required —
	// Load() rejects an entry whose script is empty.
	Script string `json:"script"`
	// Workdir is the cwd for the child process (the pipeline repo root).
	// Required — Load() rejects an entry whose workdir is empty.
	Workdir string `json:"workdir"`
	// TimeoutSec bounds one run of this pipeline. Required, > 0 — this is a
	// PER-PIPELINE timeout (NOT imagegen's shared 720s default): a scene-swap
	// job needs its own ceiling (ComfyUI cold-start + a full generative
	// composite can run long).
	TimeoutSec int `json:"timeout_sec"`
	// Artifacts lists the bare filenames this pipeline writes inside the job's
	// out dir; the first entry is the primary result (becomes final_path /
	// artifacts[0] downstream). Required, non-empty.
	Artifacts []string `json:"artifacts"`
	// IngressAllow lists extra "host:port" pairs allowed for this pipeline's
	// image-ref downloads, beyond the tailnet CGNAT default (100.64.0.0/10).
	// Empty = the default allowlist only.
	IngressAllow []string `json:"ingress_allow,omitempty"`
	// MaxRefMB caps a single downloaded image ref in MB. 0/negative = 24 (read
	// via RefCapMB(), never this field directly).
	MaxRefMB int `json:"max_ref_mb,omitempty"`
}

PipelineSpec describes one externally-provided pipeline CLI this node can run as a fleet task (Task 4: config surface for pipeline jobs — the CMP scene-swap pipeline is the first consumer, but this type is deliberately generic). The map key under Config.Pipelines is the task_type dispatched to reach it (e.g. "scene-swap"); nothing about this struct is CMP-specific. A well-formed entry example (see the pipelines doc comment on Config for the full JSON):

"scene-swap": {
  "script": "D:/pipelines/creative-marketing-pipelines/scripts/run-scene-swap.mjs",
  "workdir": "D:/pipelines/creative-marketing-pipelines",
  "timeout_sec": 2400,
  "artifacts": ["final.png", "qa-report.json"],
  "max_ref_mb": 24
}

func (PipelineSpec) RefCapMB added in v0.206.0

func (p PipelineSpec) RefCapMB() int

RefCapMB returns the effective per-ref download cap for this pipeline, in MB: MaxRefMB when positive, else 24 (a scene-swap job pulls a handful of PNGs, not a video — 24MB comfortably covers that with margin).

type Source added in v0.206.0

type Source struct {
	Path     string // the resolved candidate ("" = nothing resolved, built-in defaults)
	NotFound bool   // Path was explicit (--config/env) but no file exists there
	LoadErr  error  // the file existed but failed: a *ParseError (nothing from it in effect, built-in defaults) or a validation refusal (its other settings in effect)
}

Source records where a Config actually came from — the loaded-vs-resolved distinction. A resolved path is NOT proof anything was read: disclosure must key on Loaded().

func (Source) Loaded added in v0.206.0

func (s Source) Loaded() bool

Loaded reports whether cfg values actually came from Path.

type UpdateConfig added in v0.206.0

type UpdateConfig struct {
	// Channel is "nightly" (default: the newest complete build) or "release" (llama.cpp only: the build the
	// publisher's release-tag file names).
	Channel string `json:"channel,omitempty"`
	// Paths overrides a component's live path, keyed by component (llama, llama-swap, whisper, sdcpp,
	// hyperframes). The default is <home>/<component>; llama-swap's is the executable itself.
	Paths map[string]string `json:"paths,omitempty"`
	// Restart overrides how the llama-swap daemon is stopped and restarted around a swap, keyed by component
	// (only llama-swap restarts).
	Restart map[string]UpdateRestart `json:"restart,omitempty"`
	// LlamaSwapYAML is the rendered llama-swap config the llama flag check and the smoke gate read
	// (default <home>/llama-swap.yaml).
	LlamaSwapYAML string `json:"llama_swap_yaml,omitempty"`
	// Gate configures the side-port smoke gate and the post-flip watch.
	Gate *UpdateGate `json:"gate,omitempty"`
	// Home is the install root the update verb works on when neither --home nor $OFFLOAD_HOME names one.
	Home string `json:"home,omitempty"`
	// Variant names a component's build family (cuda13, cuda12, vulkan or cpu), keyed by component. The default is
	// the family of the build at the component's live path, else the node's serving backend.
	Variant map[string]string `json:"variant,omitempty"`
}

UpdateConfig is the `update` object of config.json, read by `local-offload update` (docs/systems/update.md). Every field is optional. internal/update.FileConfig decodes the same JSON; a key added here is added there.

type UpdateGate added in v0.206.0

type UpdateGate struct {
	// Enabled false turns the smoke gate and the post-flip watch off (default on).
	Enabled *bool `json:"enabled,omitempty"`
	// LeaseWait is how long the gate queues for the GPU lease (default 30m); past it the answer is inconclusive.
	LeaseWait string `json:"lease_wait,omitempty"`
	// SidePort is the loopback port of the gate's llama-server (default 11499).
	SidePort int `json:"side_port,omitempty"`
	// LoadTimeout is how long one llama-server may take to answer /health (default 5m).
	LoadTimeout string `json:"load_timeout,omitempty"`
	// PostFlipTimeout is how long the first real seat load after the flip is watched (default 5m).
	PostFlipTimeout string `json:"post_flip_timeout,omitempty"`
}

UpdateGate is `update.gate`. Durations are Go duration strings ("30m").

type UpdateRestart added in v0.206.0

type UpdateRestart struct {
	Task    string `json:"task,omitempty"`
	Command string `json:"command,omitempty"`
	None    bool   `json:"none,omitempty"`
}

UpdateRestart names how the daemon restarts: a scheduled task, a shell command, or None (no restart).

type VideoFamilyBinding added in v0.206.0

type VideoFamilyBinding struct {
	UnetHigh         string  `json:"unet_high,omitempty"`
	UnetLow          string  `json:"unet_low,omitempty"`
	TextEncoder      string  `json:"text_encoder,omitempty"`
	Transformer      string  `json:"transformer,omitempty"`
	VideoVAE         string  `json:"video_vae,omitempty"`
	AudioVAE         string  `json:"audio_vae,omitempty"`
	LatentUpscaler   string  `json:"latent_upscaler,omitempty"`
	WanVirtualVramGB float64 `json:"wan_virtual_vram_gb,omitempty"`
	WanLoader        string  `json:"wan_loader,omitempty"`
	WanDecode        string  `json:"wan_decode,omitempty"`
	Placement        string  `json:"placement,omitempty"`
	WanResidentGB    float64 `json:"wan_resident_gb,omitempty"`
	FPS              int     `json:"fps,omitempty"`
	Width            int     `json:"width,omitempty"`
	Height           int     `json:"height,omitempty"`
	Frames           int     `json:"frames,omitempty"`
	PoolVvramGB      float64 `json:"pool_vvram_gb,omitempty"`
	PoolCompute      string  `json:"pool_compute,omitempty"`
	PoolDonor        string  `json:"pool_donor,omitempty"`
	UpscaleModel     string  `json:"upscale_model,omitempty"`
	UpscaleWidth     int     `json:"upscale_width,omitempty"`
	UpscaleHeight    int     `json:"upscale_height,omitempty"`
	// License and CommercialUse declare the family's license, with the same
	// contract as imagegen_license / imagegen_commercial_use: both or neither (a
	// license with no commercial verdict cannot tag a result), published on every
	// result, ledger row and status row, and nothing else — no warning text, no gate
	// (CT-47, operator order 2026-10-01). Unlike the weight fields they belong to the
	// MODEL FAMILY, so they apply to this box's own default family too (see
	// ResolveVideoFamilyBinding). Empty / nil = undeclared, which a reader treats as
	// UNKNOWN, never commercial-safe.
	License       string `json:"license,omitempty"`
	CommercialUse *bool  `json:"commercial_use,omitempty"`

	// Engine selects the renderer for this family: "" or "comfy" = ComfyUI through
	// render/comfy-video.mjs (every field above); "sdcpp" = stable-diffusion.cpp's
	// `sd-cli -M vid_gen` through render/sdcpp-video.mjs, a spawn-per-job native
	// binary on a Vulkan GPU (no ComfyUI, no Python). An sdcpp family may carry any
	// name (see Config.SdcppVideoFamily), and its entry wins wholesale: none of the
	// flat videogen_* weight keys reach it. FPS, Width, Height and Frames above are
	// shared with the comfy fields.
	Engine string `json:"engine,omitempty"`
	// SdcppBin is the sd-cli binary; SdcppModel the diffusion model (--diffusion-model);
	// SdcppHighNoiseModel the optional Wan2.2 high-noise expert (--high-noise-diffusion-model);
	// SdcppVAE and SdcppT5xxl the companion files. All full paths.
	SdcppBin            string `json:"sdcpp_bin,omitempty"`
	SdcppModel          string `json:"sdcpp_model,omitempty"`
	SdcppHighNoiseModel string `json:"sdcpp_high_noise_model,omitempty"`
	SdcppVAE            string `json:"sdcpp_vae,omitempty"`
	SdcppT5xxl          string `json:"sdcpp_t5xxl,omitempty"`
	// SdcppBackend is sd-cli's --backend value (e.g. "vulkan0"). REQUIRED when the
	// engine is sdcpp and never a CPU assignment: no model runs on CPU on this engine
	// (see CPUBackendRefusal).
	SdcppBackend string `json:"sdcpp_backend,omitempty"`
	// SdcppExtraArgs are appended to the sd-cli invocation after the script's own flags.
	// An element that changes the backend or placement is refused (ExtraArgsRefusal).
	SdcppExtraArgs []string `json:"sdcpp_extra_args,omitempty"`
	// SdcppMaxTokens is the latent-token cap for this family on an iGPU whose driver resets
	// the GPU when one dispatch outlives its 2 s lockup timeout (amdgpu's default): a request
	// whose LatentTokens exceeds it is a typed non-retryable defer before anything spawns.
	// 0 = no cap (no check). SdcppVAEStride (8 or 16: the VAE's spatial downsampling, 16 for
	// the Wan2.2 VAE, 8 for Wan2.1) is REQUIRED when a cap is set.
	SdcppMaxTokens int `json:"sdcpp_max_tokens,omitempty"`
	SdcppVAEStride int `json:"sdcpp_vae_stride,omitempty"`
	// SdcppTAE is the OPT-IN tiny autoencoder (sd-cli --taesd; lightx2v taew2_2 is the
	// verified one, lighttaew2_2 is broken in this sd.cpp: never bind it). A request with
	// fast=true decodes with it (299 s -> 2.8 s for 17 frames at SSIM 0.95); the full VAE
	// stays the default, and without this key fast is a no-op on the sdcpp lane that says so.
	SdcppTAE string `json:"sdcpp_tae,omitempty"`
	// HighNoiseCFG, HighNoiseSteps and HighNoiseSampler are the A14B high-noise expert's own
	// sampling recipe (sd-cli --high-noise-cfg-scale / --high-noise-steps /
	// --high-noise-sampling-method; sd-cli's default there is cfg 7.0, which doubles the
	// iGPU time of a distilled recipe). They need sdcpp_high_noise_model.
	HighNoiseCFG     float64 `json:"high_noise_cfg,omitempty"`
	HighNoiseSteps   int     `json:"high_noise_steps,omitempty"`
	HighNoiseSampler string  `json:"high_noise_sampler,omitempty"`
	// Steps, CFG, FlowShift and Sampler are the family's sampling recipe (0 / ""
	// = sd-cli's own default). A per-request `steps` wins over Steps.
	Steps     int     `json:"steps,omitempty"`
	CFG       float64 `json:"cfg,omitempty"`
	FlowShift float64 `json:"flow_shift,omitempty"`
	Sampler   string  `json:"sampler,omitempty"`
}

VideoFamilyBinding is one video family's per-machine weight/behavior override, an entry of Config.VideoGenFamilies. Every field mirrors a top-level videogen_* key, scoped to ONE family (ADR: bigger-models-2026-09-24.md "Interim Phase 2 round 2"). All fields are optional; an empty field means "the render script's own builder default for this family", never another family's bound value — see (Config).ResolveVideoFamilyBinding for how this is resolved against a request's family choice. Placement and WanResidentGB mirror videogen_placement / videogen_wan_resident_gb (the card-only Wan placement).

func (VideoFamilyBinding) UsesSdcpp added in v0.206.0

func (b VideoFamilyBinding) UsesSdcpp() bool

UsesSdcpp reports a video binding whose engine is stable-diffusion.cpp.

func (VideoFamilyBinding) WanMulticard added in v0.206.0

func (b VideoFamilyBinding) WanMulticard() bool

WanMulticard reports a binding that asks for the card-only Wan placement (videogen_placement / placement: multicard).

Jump to

Keyboard shortcuts

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