/** * OpenKernel — Config Sync (API / provider sharing) * * A hub holds a SharedConfig (cloud providers + API keys, policy, default model) * with a monotonic revision. Satellites request it on connect and re-apply only * when the revision changes — so you set API keys once on the hub and the whole * fleet inherits them, no per-device key management. * * Sensitive: the shared config carries API keys. It only travels over the * admin-opened, optionally-tokened transport, and satellites persist it locally * via the apply callback (which the federation manager wires to provider * registration + the local config file). */ import type { Logger } from '../types.js'; import type { SharedConfig } from './types.js'; export interface ConfigSyncOptions { logger: Logger; /** Apply an incoming shared config on a satellite (register providers, etc.). */ apply?: (cfg: SharedConfig) => void | Promise; } export declare class ConfigSync { private opts; private shared; private appliedRevision; constructor(opts: ConfigSyncOptions); /** Hub: publish a new shared config (bumps revision). */ publish(cfg: Omit): SharedConfig; /** Hub: current offer to satisfy a config.request. */ offer(): SharedConfig; /** Satellite: receive a hub's offer; apply only if newer than what we have. */ receive(cfg: SharedConfig): Promise; currentRevision(): number; }