@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.js CHANGED
@@ -1009,7 +1009,7 @@ After running the migration SQL, restart your application.`
1009
1009
  async read(entityId, query, options) {
1010
1010
  const config = this.options.config;
1011
1011
  const entityIds = normalizeEntityIds(entityId);
1012
- const sanitizedTierWeights = sanitizeTierWeights(entityIds, options?.tierWeights);
1012
+ const sanitizedTierWeights = shouldExposeReadMetadata(entityId) ? sanitizeTierWeights(entityIds, options?.tierWeights) : void 0;
1013
1013
  const exposeMetadata = shouldExposeReadMetadata(entityId);
1014
1014
  if (entityIds.length === 0) {
1015
1015
  const empty = { facts: [], tasks: [], events: [] };
@@ -1064,7 +1064,7 @@ After running the migration SQL, restart your application.`
1064
1064
  );
1065
1065
  }
1066
1066
  }
1067
- const mismatchScope = this._entityInClause(entityIds);
1067
+ const mismatchScope = this._entityInClause(scoredEntityIds);
1068
1068
  const mismatchedCount = await this.db.getFirstAsync(
1069
1069
  `SELECT COUNT(*) AS cnt FROM ${this.prefix}entries
1070
1070
  WHERE ${mismatchScope.clause} AND deleted_at IS NULL