@vue-skuilder/db 0.2.10 → 0.2.12
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/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +22 -17
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +22 -17
- package/dist/core/index.mjs.map +1 -1
- package/dist/impl/couch/index.js +22 -17
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +22 -17
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.js +22 -17
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +22 -17
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +68 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/navigators/SrsDebugger.ts +8 -7
- package/src/core/navigators/generators/srs.ts +40 -28
- package/src/study/SessionController.ts +5 -1
- package/src/study/SessionDebugger.ts +16 -8
- package/src/study/SessionOverlay.ts +17 -23
- package/src/study/services/ResponseProcessor.ts +56 -22
package/dist/core/index.mjs
CHANGED
|
@@ -2743,7 +2743,7 @@ __export(srs_exports, {
|
|
|
2743
2743
|
default: () => SRSNavigator
|
|
2744
2744
|
});
|
|
2745
2745
|
import moment3 from "moment";
|
|
2746
|
-
var DEFAULT_HEALTHY_BACKLOG,
|
|
2746
|
+
var DEFAULT_HEALTHY_BACKLOG, BACKLOG_GROWTH_RATE, SRSNavigator;
|
|
2747
2747
|
var init_srs = __esm({
|
|
2748
2748
|
"src/core/navigators/generators/srs.ts"() {
|
|
2749
2749
|
"use strict";
|
|
@@ -2751,7 +2751,7 @@ var init_srs = __esm({
|
|
|
2751
2751
|
init_SrsDebugger();
|
|
2752
2752
|
init_logger();
|
|
2753
2753
|
DEFAULT_HEALTHY_BACKLOG = 20;
|
|
2754
|
-
|
|
2754
|
+
BACKLOG_GROWTH_RATE = 2;
|
|
2755
2755
|
SRSNavigator = class extends ContentNavigator {
|
|
2756
2756
|
/** Human-readable name for CardGenerator interface */
|
|
2757
2757
|
name;
|
|
@@ -2873,7 +2873,7 @@ var init_srs = __esm({
|
|
|
2873
2873
|
dueNow: dueReviews.length,
|
|
2874
2874
|
healthyBacklog: this.healthyBacklog,
|
|
2875
2875
|
backlogMultiplier,
|
|
2876
|
-
|
|
2876
|
+
backlogGrowthRate: BACKLOG_GROWTH_RATE,
|
|
2877
2877
|
topReviewScore: sorted.length > 0 ? sorted[0].score : null,
|
|
2878
2878
|
nextDueIn,
|
|
2879
2879
|
timestamp: Date.now()
|
|
@@ -2883,25 +2883,30 @@ var init_srs = __esm({
|
|
|
2883
2883
|
/**
|
|
2884
2884
|
* Compute the multiplicative backlog pressure based on number of due reviews.
|
|
2885
2885
|
*
|
|
2886
|
-
* ×1.0 at or below the healthy threshold (no boost),
|
|
2887
|
-
*
|
|
2886
|
+
* ×1.0 at or below the healthy threshold (no boost); above it, grows as
|
|
2887
|
+
* BACKLOG_GROWTH_RATE raised to the excess expressed in multiples of the
|
|
2888
|
+
* healthy threshold. Uncapped — self-regulating instead: reviews winning
|
|
2889
|
+
* slots depletes dueCount, which drops the ratio and relaxes the multiplier
|
|
2890
|
+
* next run.
|
|
2888
2891
|
*
|
|
2889
|
-
* Examples (with default healthyBacklog=20,
|
|
2890
|
-
* - 10 due reviews → ×1.00
|
|
2891
|
-
* - 20 due reviews → ×1.00
|
|
2892
|
-
* - 40 due reviews → ×1.50
|
|
2893
|
-
* - 60 due reviews → ×2.
|
|
2892
|
+
* Examples (with default healthyBacklog=20, BACKLOG_GROWTH_RATE=1.5):
|
|
2893
|
+
* - 10 due reviews → ×1.00 (healthy)
|
|
2894
|
+
* - 20 due reviews → ×1.00 (at threshold, ratio 0)
|
|
2895
|
+
* - 40 due reviews → ×1.50 (ratio 1, 2x threshold)
|
|
2896
|
+
* - 60 due reviews → ×2.25 (ratio 2, 3x threshold — old hard cap was ×2.00 here)
|
|
2897
|
+
* - 100 due reviews → ×5.06 (ratio 4, 5x threshold)
|
|
2898
|
+
* - 160 due reviews → ×17.09 (ratio 7, 8x threshold)
|
|
2894
2899
|
*
|
|
2895
2900
|
* @param dueCount - Number of reviews currently due
|
|
2896
|
-
* @returns Multiplier applied to review urgency (1.0
|
|
2901
|
+
* @returns Multiplier applied to review urgency (>= 1.0, unbounded)
|
|
2897
2902
|
*/
|
|
2898
2903
|
computeBacklogMultiplier(dueCount) {
|
|
2899
2904
|
if (dueCount <= this.healthyBacklog) {
|
|
2900
2905
|
return 1;
|
|
2901
2906
|
}
|
|
2902
2907
|
const excess = dueCount - this.healthyBacklog;
|
|
2903
|
-
const
|
|
2904
|
-
return Math.
|
|
2908
|
+
const ratio = excess / this.healthyBacklog;
|
|
2909
|
+
return Math.pow(BACKLOG_GROWTH_RATE, ratio);
|
|
2905
2910
|
}
|
|
2906
2911
|
/**
|
|
2907
2912
|
* Compute urgency score for a review card.
|
|
@@ -2917,17 +2922,17 @@ var init_srs = __esm({
|
|
|
2917
2922
|
* - 180 days → ~0.30
|
|
2918
2923
|
*
|
|
2919
2924
|
* 3. Backlog pressure = global *multiplier* when review backlog exceeds the
|
|
2920
|
-
* healthy threshold (×1.0 healthy →
|
|
2925
|
+
* healthy threshold (×1.0 healthy → exponential growth, uncapped, above it).
|
|
2921
2926
|
*
|
|
2922
2927
|
* Combined: (base 0.5 + urgency factors * 0.45) × backlog multiplier.
|
|
2923
2928
|
* Per-card range before pressure: ~0.57–0.95. NOT clamped to 1.0 — under a
|
|
2924
2929
|
* heavy backlog reviews scale onto the open scale to compete with (and exceed)
|
|
2925
|
-
* new cards;
|
|
2926
|
-
*
|
|
2930
|
+
* new cards; there's no ceiling at all now, so a bad enough backlog always
|
|
2931
|
+
* wins eventually — self-regulating because winning slots depletes dueCount.
|
|
2927
2932
|
*
|
|
2928
2933
|
* @param review - The scheduled card to score
|
|
2929
2934
|
* @param now - Current time
|
|
2930
|
-
* @param backlogMultiplier - Pre-computed backlog multiplier (1.0
|
|
2935
|
+
* @param backlogMultiplier - Pre-computed backlog multiplier (>= 1.0, unbounded)
|
|
2931
2936
|
*/
|
|
2932
2937
|
computeUrgencyScore(review, now, backlogMultiplier) {
|
|
2933
2938
|
const scheduledAt = moment3.utc(review.scheduledAt);
|