@vue-skuilder/db 0.1.31 → 0.1.32-b

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.
@@ -1562,6 +1562,7 @@ var init_hierarchyDefinition = __esm({
1562
1562
  "src/core/navigators/filters/hierarchyDefinition.ts"() {
1563
1563
  "use strict";
1564
1564
  init_navigators();
1565
+ init_logger();
1565
1566
  DEFAULT_MIN_COUNT = 3;
1566
1567
  HierarchyDefinitionNavigator = class extends ContentNavigator {
1567
1568
  config;
@@ -1729,6 +1730,9 @@ var init_hierarchyDefinition = __esm({
1729
1730
  finalScore *= maxBoost;
1730
1731
  action = "boosted";
1731
1732
  finalReason = `${reason} | preReqBoost \xD7${maxBoost.toFixed(2)} for ${boostedPrereqs.join(", ")}`;
1733
+ logger.info(
1734
+ `[HierarchyDefinition] preReqBoost \xD7${maxBoost.toFixed(2)} applied to card ${card.cardId} via tags [${boostedPrereqs.join(", ")}] (score: ${card.score.toFixed(3)} \u2192 ${finalScore.toFixed(3)})`
1735
+ );
1732
1736
  }
1733
1737
  }
1734
1738
  gated.push({
@@ -2238,7 +2242,7 @@ var init_relativePriority = __esm({
2238
2242
  const cardTags = card.tags ?? [];
2239
2243
  const priority = this.computeCardPriority(cardTags);
2240
2244
  const boostFactor = this.computeBoostFactor(priority);
2241
- const finalScore = Math.max(0, Math.min(1, card.score * boostFactor));
2245
+ const finalScore = Math.max(0, card.score * boostFactor);
2242
2246
  const action = boostFactor > 1 ? "boosted" : boostFactor < 1 ? "penalized" : "passed";
2243
2247
  const reason = this.buildPriorityReason(cardTags, priority, boostFactor, finalScore);
2244
2248
  return {
@@ -2757,7 +2761,7 @@ var init_Pipeline = __esm({
2757
2761
  card.provenance.push({
2758
2762
  strategy: "ephemeralHint",
2759
2763
  strategyId: "ephemeral-hint",
2760
- strategyName: "Replan Hint",
2764
+ strategyName: hints._label ? `Replan Hint (${hints._label})` : "Replan Hint",
2761
2765
  action: "boosted",
2762
2766
  score: card.score,
2763
2767
  reason: `boostTag ${pattern} \xD7${factor}`
@@ -2774,7 +2778,7 @@ var init_Pipeline = __esm({
2774
2778
  card.provenance.push({
2775
2779
  strategy: "ephemeralHint",
2776
2780
  strategyId: "ephemeral-hint",
2777
- strategyName: "Replan Hint",
2781
+ strategyName: hints._label ? `Replan Hint (${hints._label})` : "Replan Hint",
2778
2782
  action: "boosted",
2779
2783
  score: card.score,
2780
2784
  reason: `boostCard ${pattern} \xD7${factor}`
@@ -2784,6 +2788,7 @@ var init_Pipeline = __esm({
2784
2788
  }
2785
2789
  }
2786
2790
  const cardIds = new Set(cards.map((c) => c.cardId));
2791
+ const hintLabel = hints._label ? `Replan Hint (${hints._label})` : "Replan Hint";
2787
2792
  const inject = (card, reason) => {
2788
2793
  if (!cardIds.has(card.cardId)) {
2789
2794
  const floorScore = Math.max(card.score, 1);
@@ -2795,7 +2800,7 @@ var init_Pipeline = __esm({
2795
2800
  {
2796
2801
  strategy: "ephemeralHint",
2797
2802
  strategyId: "ephemeral-hint",
2798
- strategyName: "Replan Hint",
2803
+ strategyName: hintLabel,
2799
2804
  action: "boosted",
2800
2805
  score: floorScore,
2801
2806
  reason
@@ -5898,9 +5903,17 @@ var init_courseDB3 = __esm({
5898
5903
  }
5899
5904
  }
5900
5905
  // Study Content Source implementation
5906
+ _pendingHints = null;
5907
+ setEphemeralHints(hints) {
5908
+ this._pendingHints = hints;
5909
+ }
5901
5910
  async getWeightedCards(limit) {
5902
5911
  try {
5903
5912
  const navigator = await this.createNavigator(this.userDB);
5913
+ if (this._pendingHints) {
5914
+ navigator.setEphemeralHints(this._pendingHints);
5915
+ this._pendingHints = null;
5916
+ }
5904
5917
  return navigator.getWeightedCards(limit);
5905
5918
  } catch (e) {
5906
5919
  logger.error(`[static/courseDB] Error getting weighted cards: ${e}`);