enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Function discoverEmbedDbConfigCached

    • Read the discriminated, root-scoped embedding configuration discovery through a bounded LRU cache. Entries are isolated by exact file/root tuple and invalidated when the main file's mtimeMs/size or the WAL sidecar's presence/mtimeMs/size changes. The returned owned metadata is cloned so callers cannot mutate a cached authority snapshot. Raw peek entries and other roots never share this cache keyspace. refused is never cached: transient open/read/close/permission uncertainty is re-probed on every call.

      This remains pre-open guidance rather than bootstrap authority; every writable EmbedDb.open() repeats same-handle transactional admission.

      Parameters

      • file: string

        Absolute path to the candidate embedding database.

      • expectedVaultRoot: string

        Exact vault root allowed to own a populated file.

      Returns Promise<EmbedDbConfigDiscovery>

      The same four-state result as discoverEmbedDbConfig.

      If file does not end exactly in .embed.db.

      const discovery = await discoverEmbedDbConfigCached(embedFile, vault.root);
      if (discovery.kind !== "owned") return [];
      useStoredConfig(discovery.meta);