@vue-skuilder/db 0.2.26 → 0.2.28
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/classroomDB-DLTtLZct.d.cts +86 -0
- package/dist/classroomDB-DLTtLZct.d.ts +86 -0
- package/dist/{contentSource-LPf044hY.d.ts → contentSource-BoFBwvYa.d.ts} +65 -98
- package/dist/{contentSource-D3c1fMAk.d.cts → contentSource-DpQqTG3m.d.cts} +65 -98
- package/dist/core/index.d.cts +6 -5
- package/dist/core/index.d.ts +6 -5
- package/dist/core/index.js +43 -15
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +43 -15
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DaAootVV.d.ts → dataLayerProvider-D_LJT3F4.d.ts} +2 -8
- package/dist/{dataLayerProvider-CeLiFbHv.d.cts → dataLayerProvider-Dl3cAAvQ.d.cts} +2 -8
- package/dist/diagnostics/index.d.cts +370 -0
- package/dist/diagnostics/index.d.ts +370 -0
- package/dist/diagnostics/index.js +778 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/diagnostics/index.mjs +729 -0
- package/dist/diagnostics/index.mjs.map +1 -0
- package/dist/impl/couch/index.d.cts +4 -3
- package/dist/impl/couch/index.d.ts +4 -3
- package/dist/impl/couch/index.js +43 -15
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +43 -15
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +5 -5
- package/dist/impl/static/index.d.ts +5 -5
- package/dist/impl/static/index.js +43 -21
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +43 -21
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/{index-BkBJlGDX.d.ts → index-CVGehe_t.d.ts} +1 -1
- package/dist/{index-D7WdMDAs.d.cts → index-Ktg72jKb.d.cts} +1 -1
- package/dist/index.d.cts +10 -9
- package/dist/index.d.ts +10 -9
- package/dist/index.js +85 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -36
- package/dist/index.mjs.map +1 -1
- package/dist/{types-DjiFOZxJ.d.cts → types-D0oQeJAi.d.cts} +1 -1
- package/dist/{types-uJ2Xn3_X.d.ts → types-dXWfyz9B.d.ts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.cts → types-legacy-BkOYOR6U.d.cts} +1 -1
- package/dist/{types-legacy-CrwyZIvI.d.ts → types-legacy-BkOYOR6U.d.ts} +1 -1
- package/dist/util/packer/index.d.cts +3 -3
- package/dist/util/packer/index.d.ts +3 -3
- package/package.json +15 -3
- package/src/core/interfaces/dataLayerProvider.ts +3 -8
- package/src/core/navigators/Pipeline.ts +5 -2
- package/src/core/navigators/PipelineDebugger.ts +64 -16
- package/src/core/navigators/generators/prescribed.ts +43 -14
- package/src/core/navigators/index.ts +1 -0
- package/src/core/types/studySession.ts +37 -0
- package/src/diagnostics/dataset.ts +231 -0
- package/src/diagnostics/derive.ts +555 -0
- package/src/diagnostics/index.ts +24 -0
- package/src/diagnostics/loader.ts +191 -0
- package/src/diagnostics/text.ts +242 -0
- package/src/impl/couch/PouchDataLayerProvider.ts +0 -23
- package/src/impl/static/StaticDataLayerProvider.ts +0 -11
- package/src/study/SessionController.ts +56 -2
- package/tests/core/navigators/prescribedIntroExposure.test.ts +29 -0
- package/tsup.config.ts +1 -0
package/dist/core/index.js
CHANGED
|
@@ -723,7 +723,7 @@ function parseCardElo(provenance) {
|
|
|
723
723
|
const match = eloEntry.reason.match(/card:\s*(\d+)/);
|
|
724
724
|
return match ? parseInt(match[1], 10) : void 0;
|
|
725
725
|
}
|
|
726
|
-
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints) {
|
|
726
|
+
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards) {
|
|
727
727
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
728
728
|
const toReport = (card) => ({
|
|
729
729
|
cardId: card.cardId,
|
|
@@ -776,6 +776,23 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
776
776
|
note: `${discardedTailCards.length} additional candidate(s) scored below the top ${DISCARDED_KEEP_TOP} near-misses and were not retained (score ${scoreMin.toExponential(2)}\u2013${scoreMax.toExponential(2)}${eloFragment}). Likely ELO-window pull remnants filtered out by hierarchy/lesson/priority gates.`
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
|
+
const isUnselectedNew = (c) => !c.reviewID && !selectedIds.has(c.cardId);
|
|
780
|
+
const generatorScore = (c) => c.provenance[0]?.score ?? 0;
|
|
781
|
+
const keptIds = new Set(allCards.map((c) => c.cardId));
|
|
782
|
+
const hintExcluded = (c) => c.score > 0 && !keptIds.has(c.cardId);
|
|
783
|
+
let nextInLine;
|
|
784
|
+
for (const c of allCards) {
|
|
785
|
+
if (isUnselectedNew(c) && (!nextInLine || c.score > nextInLine.score)) nextInLine = c;
|
|
786
|
+
}
|
|
787
|
+
let topGenerated;
|
|
788
|
+
for (const c of scoredCards ?? allCards) {
|
|
789
|
+
if (!isUnselectedNew(c) || hintExcluded(c)) continue;
|
|
790
|
+
if (!topGenerated || generatorScore(c) > generatorScore(topGenerated)) topGenerated = c;
|
|
791
|
+
}
|
|
792
|
+
const unselectedNew = nextInLine || topGenerated ? {
|
|
793
|
+
...nextInLine ? { nextInLine: toReport(nextInLine) } : {},
|
|
794
|
+
...topGenerated && topGenerated.cardId !== nextInLine?.cardId ? { topGenerated: toReport(topGenerated) } : {}
|
|
795
|
+
} : void 0;
|
|
779
796
|
const reviewsSelected = selectedCards.filter((c) => getOrigin(c) === "review").length;
|
|
780
797
|
const newSelected = selectedCards.filter((c) => getOrigin(c) === "new").length;
|
|
781
798
|
return {
|
|
@@ -791,6 +808,7 @@ function buildRunReport(courseId, courseName, generatorName, generators, generat
|
|
|
791
808
|
reviewsSelected,
|
|
792
809
|
newSelected,
|
|
793
810
|
cards,
|
|
811
|
+
unselectedNew,
|
|
794
812
|
discardedTail
|
|
795
813
|
};
|
|
796
814
|
}
|
|
@@ -1889,7 +1907,8 @@ var init_generators = __esm({
|
|
|
1889
1907
|
// src/core/navigators/generators/prescribed.ts
|
|
1890
1908
|
var prescribed_exports = {};
|
|
1891
1909
|
__export(prescribed_exports, {
|
|
1892
|
-
default: () => PrescribedCardsGenerator
|
|
1910
|
+
default: () => PrescribedCardsGenerator,
|
|
1911
|
+
unmetIntroExposeTags: () => unmetIntroExposeTags
|
|
1893
1912
|
});
|
|
1894
1913
|
function dedupe(arr) {
|
|
1895
1914
|
return [...new Set(arr)];
|
|
@@ -1929,6 +1948,19 @@ function formatAge(ms) {
|
|
|
1929
1948
|
if (hours < 24) return `${hours}h`;
|
|
1930
1949
|
return `${Math.round(hours / 24)}d`;
|
|
1931
1950
|
}
|
|
1951
|
+
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1952
|
+
if (minCount <= 0) return [];
|
|
1953
|
+
const exposeTags = new Set(tags.filter((tag) => tag.startsWith("gpc:expose:")));
|
|
1954
|
+
for (const tag of tags) {
|
|
1955
|
+
if (!tag.startsWith("gpc:intro:")) continue;
|
|
1956
|
+
const suffix = tag.slice("gpc:intro:".length);
|
|
1957
|
+
if (suffix) exposeTags.add(`gpc:expose:${suffix}`);
|
|
1958
|
+
}
|
|
1959
|
+
return [...exposeTags].filter((tag) => {
|
|
1960
|
+
const tagElo = userTagElo[tag];
|
|
1961
|
+
return !tagElo || tagElo.count < minCount;
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1932
1964
|
function pickTopByScore(cards, limit) {
|
|
1933
1965
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1934
1966
|
}
|
|
@@ -2227,6 +2259,7 @@ var init_prescribed = __esm({
|
|
|
2227
2259
|
freshnessWindowSessions: typeof raw.freshnessWindowSessions === "number" ? raw.freshnessWindowSessions : DEFAULT_FRESHNESS_WINDOW,
|
|
2228
2260
|
maxDirectTargetsPerRun: typeof raw.maxDirectTargetsPerRun === "number" ? raw.maxDirectTargetsPerRun : DEFAULT_MAX_DIRECT_PER_RUN,
|
|
2229
2261
|
maxSupportCardsPerRun: typeof raw.maxSupportCardsPerRun === "number" ? raw.maxSupportCardsPerRun : DEFAULT_MAX_SUPPORT_PER_RUN,
|
|
2262
|
+
introExposeMinCount: typeof raw.introExposeMinCount === "number" ? raw.introExposeMinCount : DEFAULT_MIN_COUNT,
|
|
2230
2263
|
hierarchyWalk: {
|
|
2231
2264
|
enabled: raw.hierarchyWalk?.enabled !== false,
|
|
2232
2265
|
maxDepth: typeof raw.hierarchyWalk?.maxDepth === "number" ? raw.hierarchyWalk.maxDepth : DEFAULT_HIERARCHY_DEPTH
|
|
@@ -2302,18 +2335,11 @@ var init_prescribed = __esm({
|
|
|
2302
2335
|
group.hierarchyWalk?.enabled !== false,
|
|
2303
2336
|
group.hierarchyWalk?.maxDepth ?? DEFAULT_HIERARCHY_DEPTH
|
|
2304
2337
|
);
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
exposeTags.add(`gpc:expose:${suffix}`);
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
const unmetExposeTags = [...exposeTags].filter((tag) => {
|
|
2314
|
-
const tagElo = userTagElo[tag];
|
|
2315
|
-
return !tagElo || tagElo.count < DEFAULT_MIN_COUNT;
|
|
2316
|
-
});
|
|
2338
|
+
const unmetExposeTags = unmetIntroExposeTags(
|
|
2339
|
+
tags,
|
|
2340
|
+
userTagElo,
|
|
2341
|
+
group.introExposeMinCount ?? DEFAULT_MIN_COUNT
|
|
2342
|
+
);
|
|
2317
2343
|
if (unmetExposeTags.length > 0) {
|
|
2318
2344
|
unmetExposeTags.forEach((tag) => supportTags.add(tag));
|
|
2319
2345
|
}
|
|
@@ -4602,6 +4628,7 @@ var init_Pipeline = __esm({
|
|
|
4602
4628
|
}
|
|
4603
4629
|
logger.debug(`[Pipeline] Filter '${filter.name}': ${beforeScores.size} \u2192 ${cards.length} cards (\u2191${boosted} \u2193${penalized} =${passed})`);
|
|
4604
4630
|
}
|
|
4631
|
+
const scoredCards = cards;
|
|
4605
4632
|
cards = cards.filter((c) => c.score > 0);
|
|
4606
4633
|
const hints = this._ephemeralHints;
|
|
4607
4634
|
if (hints) {
|
|
@@ -4638,7 +4665,8 @@ var init_Pipeline = __esm({
|
|
|
4638
4665
|
cards,
|
|
4639
4666
|
result,
|
|
4640
4667
|
context.userElo,
|
|
4641
|
-
hints ?? void 0
|
|
4668
|
+
hints ?? void 0,
|
|
4669
|
+
scoredCards
|
|
4642
4670
|
);
|
|
4643
4671
|
captureRun(report);
|
|
4644
4672
|
} catch (e) {
|