Host-supplied implementation hooks (options-as-bridge,
v1.6 Decision 18). getValues is required; all other fields are optional.
A ConfigService bundle.
import { createConfigService } from '@kehto/services';
const config = createConfigService({
getValues: () => ({ theme: 'dark', density: 'compact' }),
openSettings: (windowId, section) => openSettingsUI(section),
});
runtime.registerService('config', config.handler);
// Push a live update to all subscribers:
config.publishValues({ theme: 'light', density: 'compact' });
Create a NAP-CONFIG reference service.
Shell-writes, napplet-reads. Handles the full
@napplet/nap/configwire protocol:config.get(correlated snapshot),config.subscribe/config.unsubscribe(live push stream),config.registerSchema(optional schema registration + Core Subset validation),config.openSettings(optional UI deep-link, fire-and-forget).Returns a
ConfigServicebundle:{ handler, publishValues }. Registerhandlerwith the runtime; callpublishValues(newValues)from the shell whenever config state changes.