/** * Opt-in headless credential storage for library consumers. * * Deliberately NOT a module side effect and NOT in the ctix-generated barrel: * `import { anything } from '@sonisoft/now-sdk-ext-core'` must never monkeypatch * the ServiceNow SDK's credential storage as a consequence. A consumer that * wants the shim asks for it by calling this. * * Applications that own their entry point (nex, the MCP server) import * '@sonisoft/sn-credstore/register' there instead — earlier, and unconditional. * This exists for embedders that do not control process startup. */ export interface InitCredentialStoreResult { /** True once the SDK's KeyChain is reading the headless-safe store. */ active: boolean; /** Why it is not active, when it is not. */ reason?: 'not-installed' | 'disabled'; } /** * Point the ServiceNow SDK's credential storage at a headless-safe store. * * Non-interactive sessions cannot unlock the OS keyring even as the same user, * and `KeyChain.getPassword()` swallows that failure and returns null — so the * SDK reports "Default Credential has not been set" rather than a keyring error. * * Idempotent, and safe to call when @sonisoft/sn-credstore is not installed: it * reports `active: false` and leaves the SDK on its default keyring path. Callers * that require the store should check the result rather than assume success. * * Throws only when the shim IS installed and fails to apply — continuing then * would silently fall back to the keyring, and the SDK's next credential write * reseeds from a failed read, wiping every other alias. */ export declare function initCredentialStore(): Promise;