Documentation
¶
Overview ¶
Package sizing owns the deployment's default sandbox size and nothing else.
It is a leaf (standard library only) so that internal/composer can read the effective default without importing internal/runner, which imports the whole egress proxy. internal/runner re-exports every name here, so a caller that already speaks runner.EffectiveLimits keeps doing so.
Index ¶
Constants ¶
const ( DefaultCPUMillis int64 = 2000 // 2 vCPU DefaultMemoryMiB int64 = 4096 // 4 GiB hard memory cap DefaultPidsLimit int64 = 512 // max processes/threads (fork-bomb guard) )
Conservative platform resource defaults, applied when a Resources field is zero, so EVERY agent sandbox is capped even when policy sets nothing: without them one runaway or prompt-injected agent can OOM-kill the host, fork-bomb the host PID space, or fill host storage and take sibling runs down with it (see types.ResourceLimits). A policy value always overrides.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultLimits ¶
func SetDefaultLimits(cpuMillis, memoryMiB int64)
SetDefaultLimits records the deployment's default sandbox size; a value <= 0 leaves that field at its compiled-in default.
Types ¶
type Limits ¶
Limits is the effective default size of one sandbox.
func EffectiveLimits ¶
func EffectiveLimits() Limits
EffectiveLimits is the default sandbox size every fallback site uses when a Resources field is zero: the deployment's configured value, else DefaultCPUMillis/DefaultMemoryMiB. PidsLimit is always the compiled-in default.