/** * config-client.ts, reading and writing the settings the DAEMON owns. * * ── The split, and why it is not "all config goes over the wire" ─────────── * * A config key belongs to the runtime that ACTS on it (config-ownership.ts is * the authority, and this module never keeps a second copy of its lists). Two * scopes matter here: * * - DAEMON-OWNED (`surfaces.*`, `controlPlane.*`, `watchers.*`, `device.*`, * `automation.*`, `atRest.*`, `payments.*`, `voice.local.*`, …). The daemon * executes these unattended. When a surface hosted the daemon, writing them to * that surface's own settings file happened to work. It does not anymore: a * Telegram bot token saved there would land in the surface's own settings * file, the daemon would never read it, and the save would report success * while configuring nothing. These go over `config.set` and come back over * `config.get` / `settings.snapshot`. * * - SURFACE-OWNED (rendering, theme, transcript display, keybindings, and the * `daemon.*` / `service.*` switches that say whether THIS installation runs a * daemon at all). These stay local, in the surface's own file, read and * written by the in-process ConfigManager exactly as before. Sending them to * the daemon would make one machine's theme everyone's theme. * * ── Degrading honestly ───────────────────────────────────────────────────── * * With no reachable daemon a daemon-owned WRITE fails, loudly, with the * refusal reason, it does not fall back to writing the local file. A silent * local write is the exact failure this split exists to end: it looks like it * worked and changes nothing. A daemon-owned READ falls back to the local * value, because a stale-but-real number renders better than a blank field and * reads were always allowed to be optimistic. */ import { isDaemonOwnedConfigKey } from '../../config/index.js'; import type { DaemonVerbCaller } from './daemon-verbs.js'; /** Re-exported so call sites classify a key through one import, not two. */ export { isDaemonOwnedConfigKey }; export interface DaemonConfigClient { /** True when this key's value lives in the daemon's own settings tier. */ ownsKey(key: string): boolean; /** * Write a daemon-owned key. Rejects (never falls back to a local write) when * no daemon is reachable, a write that configures nothing must not report * success. */ set(key: string, value: unknown): Promise; /** Read a daemon-owned key; `undefined` when the daemon could not answer. */ get(key: string): Promise; /** The daemon's whole resolved config snapshot, for a settings view that opens cold. */ snapshot(): Promise | null>; } export declare function createDaemonConfigClient(verbs: DaemonVerbCaller): DaemonConfigClient; //# sourceMappingURL=config-client.d.ts.map