/**
 * Canonical plugin id for @remnic/plugin-openclaw.
 *
 * This is the identifier OpenClaw uses as a lookup key in plugins.slots.memory
 * and plugins.entries.<id>. The legacy shim package @joshuaswarren/openclaw-engram
 * intentionally uses a different id ("openclaw-engram") as a backwards-compat alias.
 */
declare const PLUGIN_ID: "openclaw-remnic";
declare const LEGACY_PLUGIN_ID: "openclaw-engram";
/**
 * Resolve the Remnic plugin entry from an OpenClaw-shaped config object.
 *
 * Lookup order:
 *   1. `plugins.slots.memory` — but **only** when it resolves to a known
 *      Remnic plugin id; foreign slots are ignored so mixed-plugin installs
 *      do not accidentally apply another plugin's config to Remnic.
 *   2. `preferredId` — the caller's own plugin id (e.g. `"openclaw-engram"` for
 *      the shim package); only consulted when no active slot overrides the choice.
 *   3. `plugins.entries["openclaw-remnic"]`
 *   4. `plugins.entries["openclaw-engram"]` (legacy backward-compat)
 *
 * Returns `undefined` when no Remnic entry is found.
 *
 * All five config-loader sites (loadPluginEntryFromFile, readPluginHooksPolicy,
 * loadPluginConfig in access-cli.ts, loadCliPluginConfig in operator-toolkit.ts,
 * and unwrapOpenClawEntry in materialize.cjs) delegate here so fallback order
 * and guard logic are defined in exactly one place.
 *
 * @param raw - The raw OpenClaw config object.
 * @param preferredId - The calling plugin's own id.  When present and no
 *   `plugins.slots.memory` slot is set, this id is tried before the hardcoded
 *   `PLUGIN_ID`/`LEGACY_PLUGIN_ID` fallbacks.  Ignored if it is not a known
 *   Remnic plugin id (safety guard against unexpected values).
 */
declare function resolveRemnicPluginEntry(raw: unknown, preferredId?: string): Record<string, unknown> | undefined;

export { LEGACY_PLUGIN_ID, PLUGIN_ID, resolveRemnicPluginEntry };
