/** * schema-domain-memory.ts, MemoryGovernor config (`memory.*`). * * Owner-confirmed defaults (2026-07-14). `memory.budgetMb` uses 0 as an "auto" * sentinel: the governor resolves it to min(25% of system RAM, 4096 MB) at * runtime, kept a sentinel here so the browser-safe config schema never calls * node:os. The tier percentages and tripwire values are literal defaults. */ import { type ConfigSettingDefinition } from './schema-shared.js'; /** MemoryGovernor policy (`memory.*`). */ export interface MemoryConfig { /** Budget in MB. 0 = auto: min(25% of system RAM, 4096). */ budgetMb: number; tier: { /** Trim caches to floor + gc at/above this % of budget. */ elevatedPct: number; /** Flush caches + pause deferrable jobs at/above this % of budget. */ highPct: number; /** Refuse new expensive work + emit ops event at/above this % of budget. */ criticalPct: number; }; tripwire: { /** Post-flush RSS growth rate (MB/s) that, if sustained, indicates a leak. */ rateMbPerSec: number; /** How long (s) the growth must be sustained after a flush before exiting. */ sustainSec: number; }; /** * Absolute-RSS backstop as a percent of the EFFECTIVE KILL CEILING, the * own-cgroup memory limit where one applies, else physical RAM. Default 90. * Anchored to the ceiling (not the budget) so a large-but-stable working set * above the deliberately-small budget never exits a healthy daemon; the * critical tier handles that by refusing new expensive work and staying * alive. This only fires when the kernel/cgroup OOM killer is genuinely * imminent and the leak was too slow for the rate tripwire to see. */ hardLimitPct: number; } declare module './schema-types.js' { interface GoodVibesConfig { memory: MemoryConfig; } } export declare const memoryConfigDefaults: { memory: MemoryConfig; }; export declare const memoryConfigSettings: ConfigSettingDefinition[]; //# sourceMappingURL=schema-domain-memory.d.ts.map