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

    Function openEmbedReceiptReader

    • Open an existing embedding database strictly read-only for final receipt validation. This function never bootstraps, rebuilds, migrates, or writes the configured SQLite family: missing files and legacy/incompatible authority schemas are rejected. It does hold private shared coordination markers for the reader lifetime. The main/WAL/SHM/rollback-journal family is checked before dependency loading and again immediately before native open; every present leaf must be a singly linked regular file and the main must exist.

      Parameters

      • file: string

        Absolute path to an existing .embed.db file.

      • expectedVaultRoot: string

        Exact vault root the database must declare.

      Returns Promise<EmbedReceiptReader>

      A synchronous receipt validator backed by a read-only SQLite handle.

      If file is outside the exact .embed.db namespace; this is checked before dependency loading or filesystem I/O.

      If the file is absent, belongs to another vault, or lacks the current revision ledger contract.

      const reader = await openEmbedReceiptReader(file, vault.root);
      try {
      if (!reader.isCurrentSourceReceipt(path, kind, mtimeMs, revision)) return [];
      } finally {
      reader.close();
      }