import { type ManualForwardPatch, type NatSettingsFile } from './types.js'; /** * Atomic JSON store for `nat.json` — write to `.tmp`, then rename. * * Concurrency assumption: only one cadre-host process owns a given rootDir. */ export declare class NatStore { private readonly path; private cache; constructor(rootDir: string); filePath(): string; /** Load (with caching). A missing file returns defaults. */ load(): NatSettingsFile; /** Persist current settings atomically. */ save(state: NatSettingsFile): void; /** Patch and persist (validation lives here). `forwards` is edited through `setForward`. */ update(patch: Partial>): NatSettingsFile; /** * Apply a manual-forward patch for one node: a number sets that port's * external port, `null` clears it, an absent key leaves it alone. An entry * with no ports left is removed. */ setForward(nodeId: string, patch: ManualForwardPatch): NatSettingsFile; /** Drop a node's manual forward entry. No-op (no write) when there is none. */ deleteForward(nodeId: string): NatSettingsFile; }