@vue-skuilder/db 0.1.30 → 0.1.31-a
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/{contentSource-ygoFw9oV.d.ts → contentSource-BmnmvH8C.d.ts} +4 -19
- package/dist/{contentSource-B7nXusjk.d.cts → contentSource-DfBbaLA-.d.cts} +4 -19
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +11 -18
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +11 -17
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-BW7HvkMt.d.cts → dataLayerProvider-BeRXVMs5.d.cts} +1 -1
- package/dist/{dataLayerProvider-BfXUVDuG.d.ts → dataLayerProvider-CG9GfaAY.d.ts} +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +11 -16
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +11 -16
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +11 -16
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +11 -16
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -17
- package/dist/index.mjs.map +1 -1
- package/docs/navigators-architecture.md +5 -64
- package/package.json +3 -3
- package/src/core/navigators/generators/elo.ts +17 -6
- package/src/core/navigators/index.ts +10 -43
|
@@ -1131,19 +1131,20 @@ var init_elo = __esm({
|
|
|
1131
1131
|
const scored = newCards.map((c, i) => {
|
|
1132
1132
|
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1133
1133
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1134
|
-
const
|
|
1134
|
+
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1135
|
+
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
1135
1136
|
return {
|
|
1136
1137
|
cardId: c.cardID,
|
|
1137
1138
|
courseId: c.courseID,
|
|
1138
|
-
score,
|
|
1139
|
+
score: samplingKey,
|
|
1139
1140
|
provenance: [
|
|
1140
1141
|
{
|
|
1141
1142
|
strategy: "elo",
|
|
1142
1143
|
strategyName: this.strategyName || this.name,
|
|
1143
1144
|
strategyId: this.strategyId || "NAVIGATION_STRATEGY-ELO-default",
|
|
1144
1145
|
action: "generated",
|
|
1145
|
-
score,
|
|
1146
|
-
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}),
|
|
1146
|
+
score: samplingKey,
|
|
1147
|
+
reason: `ELO distance ${Math.round(distance)} (card: ${Math.round(cardElo)}, user: ${Math.round(userGlobalElo)}), raw ${rawScore.toFixed(3)}, key ${samplingKey.toFixed(3)}`
|
|
1147
1148
|
}
|
|
1148
1149
|
]
|
|
1149
1150
|
};
|
|
@@ -2836,7 +2837,6 @@ __export(navigators_exports, {
|
|
|
2836
2837
|
getCardOrigin: () => getCardOrigin,
|
|
2837
2838
|
getRegisteredNavigator: () => getRegisteredNavigator,
|
|
2838
2839
|
getRegisteredNavigatorNames: () => getRegisteredNavigatorNames,
|
|
2839
|
-
getRegisteredNavigatorRole: () => getRegisteredNavigatorRole,
|
|
2840
2840
|
hasRegisteredNavigator: () => hasRegisteredNavigator,
|
|
2841
2841
|
initializeNavigatorRegistry: () => initializeNavigatorRegistry,
|
|
2842
2842
|
isFilter: () => isFilter,
|
|
@@ -2845,19 +2845,16 @@ __export(navigators_exports, {
|
|
|
2845
2845
|
pipelineDebugAPI: () => pipelineDebugAPI,
|
|
2846
2846
|
registerNavigator: () => registerNavigator
|
|
2847
2847
|
});
|
|
2848
|
-
function registerNavigator(implementingClass, constructor
|
|
2849
|
-
navigatorRegistry.set(implementingClass,
|
|
2850
|
-
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}
|
|
2848
|
+
function registerNavigator(implementingClass, constructor) {
|
|
2849
|
+
navigatorRegistry.set(implementingClass, constructor);
|
|
2850
|
+
logger.debug(`[NavigatorRegistry] Registered: ${implementingClass}`);
|
|
2851
2851
|
}
|
|
2852
2852
|
function getRegisteredNavigator(implementingClass) {
|
|
2853
|
-
return navigatorRegistry.get(implementingClass)
|
|
2853
|
+
return navigatorRegistry.get(implementingClass);
|
|
2854
2854
|
}
|
|
2855
2855
|
function hasRegisteredNavigator(implementingClass) {
|
|
2856
2856
|
return navigatorRegistry.has(implementingClass);
|
|
2857
2857
|
}
|
|
2858
|
-
function getRegisteredNavigatorRole(implementingClass) {
|
|
2859
|
-
return navigatorRegistry.get(implementingClass)?.role;
|
|
2860
|
-
}
|
|
2861
2858
|
function getRegisteredNavigatorNames() {
|
|
2862
2859
|
return Array.from(navigatorRegistry.keys());
|
|
2863
2860
|
}
|
|
@@ -2903,12 +2900,10 @@ function getCardOrigin(card) {
|
|
|
2903
2900
|
return "new";
|
|
2904
2901
|
}
|
|
2905
2902
|
function isGenerator(impl) {
|
|
2906
|
-
|
|
2907
|
-
return getRegisteredNavigatorRole(impl) === "generator" /* GENERATOR */;
|
|
2903
|
+
return NavigatorRoles[impl] === "generator" /* GENERATOR */;
|
|
2908
2904
|
}
|
|
2909
2905
|
function isFilter(impl) {
|
|
2910
|
-
|
|
2911
|
-
return getRegisteredNavigatorRole(impl) === "filter" /* FILTER */;
|
|
2906
|
+
return NavigatorRoles[impl] === "filter" /* FILTER */;
|
|
2912
2907
|
}
|
|
2913
2908
|
var navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator;
|
|
2914
2909
|
var init_navigators = __esm({
|