@equationalapplications/core-llm-wiki 4.5.1 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1003,7 +1003,7 @@ After running the migration SQL, restart your application.`
1003
1003
  async read(entityId, query, options) {
1004
1004
  const config = this.options.config;
1005
1005
  const entityIds = normalizeEntityIds(entityId);
1006
- const sanitizedTierWeights = sanitizeTierWeights(entityIds, options?.tierWeights);
1006
+ const sanitizedTierWeights = shouldExposeReadMetadata(entityId) ? sanitizeTierWeights(entityIds, options?.tierWeights) : void 0;
1007
1007
  const exposeMetadata = shouldExposeReadMetadata(entityId);
1008
1008
  if (entityIds.length === 0) {
1009
1009
  const empty = { facts: [], tasks: [], events: [] };
@@ -1058,7 +1058,7 @@ After running the migration SQL, restart your application.`
1058
1058
  );
1059
1059
  }
1060
1060
  }
1061
- const mismatchScope = this._entityInClause(entityIds);
1061
+ const mismatchScope = this._entityInClause(scoredEntityIds);
1062
1062
  const mismatchedCount = await this.db.getFirstAsync(
1063
1063
  `SELECT COUNT(*) AS cnt FROM ${this.prefix}entries
1064
1064
  WHERE ${mismatchScope.clause} AND deleted_at IS NULL