/** * The state-toggle `DeviceSource` (design.md D19; tasks 6.8–6.11). * * Promotes a `StateManager` boolean toggle to an ordinary device: its stable * identity is the state key, its capability is one writable boolean, and its * liveness is push-backed and always reachable, since its backing store is * in-process. Toggles are declared explicitly; the source never derives them * from the contents of the state store, so keys the engine writes for its * own purposes — room assignments, automation enabled flags — are never * presented as user-facing devices. This holds whether or not the HomeKit * bridge is enabled, since this source has no dependency on it. */ import type { Logger } from "pino"; import type { StateManager } from "../state/state-manager.js"; import type { DeviceChangeListener, DeviceCommandOutcome, DeviceDescriptor, DeviceSource } from "./device-source.js"; export declare const STATE_SOURCE_ID = "state"; /** A boolean `StateManager` key exposed as a device. */ export interface StateToggleConfig { /** `StateManager` key to expose. */ stateKey: string; /** Display name. */ name: string; } export declare class StateDeviceSource implements DeviceSource { private readonly state; private readonly toggles; private readonly logger; readonly id = "state"; private readonly listeners; private readonly handlers; private readonly displayNames; constructor(state: StateManager, toggles: StateToggleConfig[], logger: Logger); /** Always available: the backing store is in-process and never absent. */ get available(): boolean; start(): void; stop(): void; list(): DeviceDescriptor[]; get(deviceId: string): DeviceDescriptor | undefined; command(deviceId: string, properties: Record): Promise; subscribe(listener: DeviceChangeListener): () => void; private notify; private toDescriptor; } //# sourceMappingURL=state-source.d.ts.map