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: (windowId) => loadScopedValues(windowId),
saveValues: (windowId, values) => saveScopedValues(windowId, values),
openSettings: (windowId, section, context) => openSettingsUI(section, context),
});
runtime.registerService('config', config.handler);
// Push one externally-originated scoped update:
config.publishValues({ theme: 'light', density: 'compact' }, 'window-1');
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.