/** * Runtime overlay for the koi roster. * * Why this exists: the gateway's chat / koi handlers read config via * `loadConfig()` on every request, which returns a fresh-from-disk * snapshot (modulo a small cache). Components that mutate the config * in-memory at runtime — `applyCompanions` is the canonical example — * mutate ONE copy of the config object held by `startPlatformSync`, * which is not the same object the request handlers see. Result: * companion kois the platform tells us about never make it into * `cfg.kois.list` from the handlers' point of view, and `listKoiIds` * / `resolveKoiConfig` return only the on-disk roster. * * This module is the side-channel: companions.ts publishes the * computed companion KoiEntry rows here, koi-scope.ts merges them in * at read time. The on-disk config remains the source of truth for * everything else; the overlay just adds entries the platform owns * and the gateway should treat as live without needing a config * rewrite. * * Module state is fine because the overlay is per-process and the * gateway is single-process. Persistence isn't needed — restarting * the gateway re-fetches companions on the first heartbeat tick. */ import type { SKYKOIConfig } from "../config/config.js"; type KoiEntry = NonNullable["list"]>[number]; /** Replace the runtime overlay with a fresh list of companion kois. */ export declare function setRuntimeKoiOverlay(next: KoiEntry[]): void; /** Read-only snapshot of the current overlay. */ export declare function getRuntimeKoiOverlay(): KoiEntry[]; /** Drop the overlay — only useful for tests / shutdown. */ export declare function clearRuntimeKoiOverlay(): void; export {};