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

    Interface EmbedReceiptReader

    Database-content-non-mutating authority check over an existing embedding database. Opening and closing do publish then remove private persistence coordination markers; the configured SQLite family remains read-only. Implementations are safe to keep open across awaited vault reads: each validation call starts a fresh read transaction, while every receipt in one batch shares that transaction's SQLite snapshot.

    const reader = await openEmbedReceiptReader(file, vault.root);
    try {
    reader.currentSourceReceiptMask(receipts);
    } finally {
    reader.close();
    }
    interface EmbedReceiptReader {
        close(): void;
        closeAndRelease(): Promise<void>;
        currentSourceReceiptMask(
            receipts: readonly EmbedSourceReceipt[],
        ): boolean[];
        isCurrentSourceReceipt(
            relPath: string,
            kind: EmbedChunkKind,
            indexedMtimeMs: number,
            indexedRevision: number,
        ): boolean;
    }
    Index
    • Close the read-only SQLite handle and begin releasing its exact shared semantic-family lifetime. Idempotent. Release rejection is observed internally and retained by the persistence debt registry; callers that need teardown completion or an explicit retry use closeAndRelease.

      Returns void

      Nothing.

      reader.close();
      
    • Close SQLite and await exact shared-lifetime release. A failed release remains retryable through a later invocation against the same ownership handle.

      Returns Promise<void>

      After both the native handle and shared lease are released.

      await reader.closeAndRelease();
      
    • Validate a batch in one synchronous SQLite read snapshot.

      Parameters

      Returns boolean[]

      A current/stale mask captured atomically, or all false after close.

      If more than 512 receipts are supplied while open.

      const current = reader.currentSourceReceiptMask(receipts);
      
    • Confirm an exact, non-quarantined source receipt.

      Parameters

      • relPath: string

        Vault-relative source path.

      • kind: EmbedChunkKind

        Content-source kind.

      • indexedMtimeMs: number

        Source mtime selected with the persisted bytes.

      • indexedRevision: number

        Source authority revision selected with the bytes.

      Returns boolean

      True only while that exact receipt remains current; false after close.

      const current = reader.isCurrentSourceReceipt(path, kind, mtimeMs, revision);