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

    Function peekEmbedDbMeta

    • Legacy fail-soft diagnostic peek at bounded EmbedDb metadata.

      Production configuration decisions use discoverEmbedDbConfig (or its cached sibling), whose discriminated result distinguishes missing and exactly schema-empty files from full-class, exact-root ownership and generic refusal. This compatibility helper never authorizes an open or rebuild. Without an expected root it may expose only bounded known raw keys; with an expected root it returns metadata only after the complete readonly class/schema/root admission. Missing dependencies, unreadable/corrupt files, malformed rows and query failures collapse to null after exact namespace admission. An invalid suffix throws before I/O. A close failure never escapes; this legacy diagnostic may still return metadata already read. The complete main/WAL/SHM/rollback-journal family receives the same two-stage singly linked regular-file preflight as production discovery; an unsafe or orphaned leaf returns null before native open.

      Parameters

      • file: string

        Absolute path to a .embed.db file.

      • OptionalexpectedVaultRoot: string

        Optional exact root plus full-class filter for configuration discovery. Omit only for bounded raw diagnostics.

      Returns Promise<PeekEmbedDbMetaResult>

      Bounded metadata when readable and root-compatible, otherwise null.

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

      const meta = await peekEmbedDbMeta(embedFile, canonicalVaultRoot);
      console.log(meta?.schema_version); // diagnostic only