enquire-mcp API reference - v3.11.6-rc.2
    Preparing search index...

    Function pruneExcludedHits

    • v3.10.0-rc.8 — prune excluded paths from a fused ranking list, at the fusion-stage source. Defense-in-depth parity with the rc.18 L-HYB-1 response-build guard: the fusion-stage consumers of the fused list (graph-boost reads candidate CONTENT via readNote; recency stats candidate mtime) run before that terminal guard, and this keeps them excluded-free even if a future ranker arm forgets its own per-arm filter.

      Pure (the isExcluded predicate is injected) and granularity-aware: for "block" ids of the form path#chunk, the chunk suffix is stripped before the membership test — matching the response-build guard's lastIndexOf("#") logic exactly so the two layers never disagree.

      Type Parameters

      • T extends { id: string }

      Parameters

      • hits: T[]

        fused ranking entries (each carries an id = path or path#chunk).

      • isExcluded: (relPath: string) => boolean

        returns true if a vault-relative path is excluded (vault.isExcluded).

      • granularity: "block" | "note"

        "note" (id IS the path) or "block" (id is path#chunk).

      Returns T[]

      a new array with excluded-path entries removed (order preserved).